aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-10-26 11:09:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-10-26 11:11:15 +0000
commit5681d3921e4d545c854829ec55980d95524bdf23 (patch)
treed938ab0387422d44377e5c30d0c2594a538f060a
parent650c08badb6229254f7625ffdbb9e566558e3649 (diff)
downloadalpine_aports-5681d3921e4d545c854829ec55980d95524bdf23.tar.bz2
alpine_aports-5681d3921e4d545c854829ec55980d95524bdf23.tar.xz
alpine_aports-5681d3921e4d545c854829ec55980d95524bdf23.zip
main/linux-grsec: upgrade to grsecurity-2.2.0-2.6.35.7-201010232009
-rw-r--r--main/linux-grsec/0001-grsec-revert-conflicting-flow-cache-changes.patch43
-rw-r--r--main/linux-grsec/0002-gre-fix-hard-header-destination-address-checking.patch44
-rw-r--r--main/linux-grsec/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch39
-rw-r--r--main/linux-grsec/0005-r8169-fix-broken-register-writes.patch52
-rw-r--r--main/linux-grsec/0007-r8169-Fix-rtl8169_rx_interrupt.patch89
-rw-r--r--main/linux-grsec/0009-ipsec-Fix-bogus-bundle-flowi.patch110
-rw-r--r--main/linux-grsec/0010-xfrm-Remove-xfrm_state_genid.patch54
-rw-r--r--main/linux-grsec/0012-xfrm-remove-policy-lock-when-accessing-policy-walk.d.patch105
-rw-r--r--main/linux-grsec/0013-flow-structurize-flow-cache.patch395
-rw-r--r--main/linux-grsec/0014-flow-virtualize-flow-cache-entry-methods.patch513
-rw-r--r--main/linux-grsec/0015-xfrm-cache-bundles-instead-of-policies-for-outgoing-.patch1068
-rw-r--r--main/linux-grsec/0016-xfrm-remove-policy-garbage-collection.patch91
-rw-r--r--main/linux-grsec/0017-flow-delayed-deletion-of-flow-cache-entries.patch231
-rw-r--r--main/linux-grsec/0018-xfrm-Fix-crashes-in-xfrm_lookup.patch46
-rw-r--r--main/linux-grsec/0019-ipv4-check-rt_genid-in-dst_check.patch96
-rw-r--r--main/linux-grsec/0020-xfrm-check-bundle-policy-existance-before-dereferencing-it.patch44
-rw-r--r--main/linux-grsec/0021-xfrm-do-not-assume-that-template-resolving-always-returns-xfrms.patch66
-rw-r--r--main/linux-grsec/APKBUILD66
-rw-r--r--main/linux-grsec/grsecurity-2.2.0-2.6.35.7-201010232009.patch (renamed from main/linux-grsec/grsecurity-2.2.0-2.6.32.24-201010232009.patch)18751
-rw-r--r--main/linux-grsec/hv-grsec.patch13
-rw-r--r--main/linux-grsec/kernelconfig.x86737
-rw-r--r--main/linux-grsec/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch48
-rw-r--r--main/linux-grsec/xfrm-cache-size-revert.patch12
-rw-r--r--main/linux-grsec/xfrm-fix-policy-unreferencing-on-larval-drop.patch14
24 files changed, 9279 insertions, 13448 deletions
diff --git a/main/linux-grsec/0001-grsec-revert-conflicting-flow-cache-changes.patch b/main/linux-grsec/0001-grsec-revert-conflicting-flow-cache-changes.patch
deleted file mode 100644
index 99571657b1..0000000000
--- a/main/linux-grsec/0001-grsec-revert-conflicting-flow-cache-changes.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 5ea3677e1f26dd343ed139d2bdad23ae2f1393db Mon Sep 17 00:00:00 2001
2From: Timo Teras <timo.teras@iki.fi>
3Date: Mon, 12 Apr 2010 13:43:01 +0000
4Subject: [PATCH 01/18] grsec: revert conflicting flow cache changes
5
6---
7 net/core/flow.c | 6 +++---
8 1 files changed, 3 insertions(+), 3 deletions(-)
9
10diff --git a/net/core/flow.c b/net/core/flow.c
11index 5b27992..9601587 100644
12--- a/net/core/flow.c
13+++ b/net/core/flow.c
14@@ -39,7 +39,7 @@ atomic_t flow_cache_genid = ATOMIC_INIT(0);
15
16 static u32 flow_hash_shift;
17 #define flow_hash_size (1 << flow_hash_shift)
18-static DEFINE_PER_CPU(struct flow_cache_entry **, flow_tables);
19+static DEFINE_PER_CPU(struct flow_cache_entry **, flow_tables) = { NULL };
20
21 #define flow_table(cpu) (per_cpu(flow_tables, cpu))
22
23@@ -52,7 +52,7 @@ struct flow_percpu_info {
24 u32 hash_rnd;
25 int count;
26 };
27-static DEFINE_PER_CPU(struct flow_percpu_info, flow_hash_info);
28+static DEFINE_PER_CPU(struct flow_percpu_info, flow_hash_info) = { 0 };
29
30 #define flow_hash_rnd_recalc(cpu) \
31 (per_cpu(flow_hash_info, cpu).hash_rnd_recalc)
32@@ -69,7 +69,7 @@ struct flow_flush_info {
33 atomic_t cpuleft;
34 struct completion completion;
35 };
36-static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets);
37+static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL };
38
39 #define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu))
40
41--
421.7.0.2
43
diff --git a/main/linux-grsec/0002-gre-fix-hard-header-destination-address-checking.patch b/main/linux-grsec/0002-gre-fix-hard-header-destination-address-checking.patch
deleted file mode 100644
index 36a0ae449a..0000000000
--- a/main/linux-grsec/0002-gre-fix-hard-header-destination-address-checking.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 9082391046940c410eac3bad065c8701998b5cab Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Wed, 3 Mar 2010 04:01:13 +0000
4Subject: [PATCH 02/18] gre: fix hard header destination address checking
5
6ipgre_header() can be called with zero daddr when the gre device is
7configured as multipoint tunnel and still has the NOARP flag set (which is
8typically cleared by the userspace arp daemon). If the NOARP packets are
9not dropped, ipgre_tunnel_xmit() will take rt->rt_gateway (= NBMA IP) and
10use that for route look up (and may lead to bogus xfrm acquires).
11
12The multicast address check is removed as sending to multicast group should
13be ok. In fact, if gre device has a multicast address as destination
14ipgre_header is always called with multicast address.
15
16Signed-off-by: Timo Teras <timo.teras@iki.fi>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18(cherry picked from commit 6d55cb91a0020ac0d78edcad61efd6c8cf5785a3)
19---
20 net/ipv4/ip_gre.c | 7 ++-----
21 1 files changed, 2 insertions(+), 5 deletions(-)
22
23diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
24index 1433338..ac88ce5 100644
25--- a/net/ipv4/ip_gre.c
26+++ b/net/ipv4/ip_gre.c
27@@ -1137,12 +1137,9 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev,
28
29 if (saddr)
30 memcpy(&iph->saddr, saddr, 4);
31-
32- if (daddr) {
33+ if (daddr)
34 memcpy(&iph->daddr, daddr, 4);
35- return t->hlen;
36- }
37- if (iph->daddr && !ipv4_is_multicast(iph->daddr))
38+ if (iph->daddr)
39 return t->hlen;
40
41 return -t->hlen;
42--
431.7.0.2
44
diff --git a/main/linux-grsec/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch b/main/linux-grsec/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch
deleted file mode 100644
index 61d7c9a6c1..0000000000
--- a/main/linux-grsec/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From cd0e9d08480e1e0648e17d099ecf50f6fd8714e5 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Sat, 20 Mar 2010 02:27:58 +0000
4Subject: [PATCH 03/18] ip_gre: include route header_len in max_headroom calculation
5
6Taking route's header_len into account, and updating gre device
7needed_headroom will give better hints on upper bound of required
8headroom. This is useful if the gre traffic is xfrm'ed.
9
10Signed-off-by: Timo Teras <timo.teras@iki.fi>
11Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
12Signed-off-by: David S. Miller <davem@davemloft.net>
13(cherry picked from commit 243aad830e8a4cdda261626fbaeddde16b08d04a)
14---
15 net/ipv4/ip_gre.c | 4 +++-
16 1 files changed, 3 insertions(+), 1 deletions(-)
17
18diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
19index ac88ce5..7f1ff73 100644
20--- a/net/ipv4/ip_gre.c
21+++ b/net/ipv4/ip_gre.c
22@@ -803,11 +803,13 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
23 tunnel->err_count = 0;
24 }
25
26- max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen;
27+ max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen + rt->u.dst.header_len;
28
29 if (skb_headroom(skb) < max_headroom || skb_shared(skb)||
30 (skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
31 struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
32+ if (max_headroom > dev->needed_headroom)
33+ dev->needed_headroom = max_headroom;
34 if (!new_skb) {
35 ip_rt_put(rt);
36 stats->tx_dropped++;
37--
381.7.0.2
39
diff --git a/main/linux-grsec/0005-r8169-fix-broken-register-writes.patch b/main/linux-grsec/0005-r8169-fix-broken-register-writes.patch
deleted file mode 100644
index bfa8df2900..0000000000
--- a/main/linux-grsec/0005-r8169-fix-broken-register-writes.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 89f350c4ec426b4c1db6ef269546940365d918e1 Mon Sep 17 00:00:00 2001
2From: Francois Romieu <romieu@fr.zoreil.com>
3Date: Sat, 27 Mar 2010 19:35:46 -0700
4Subject: [PATCH 05/18] r8169: fix broken register writes
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This is quite similar to b39fe41f481d20c201012e4483e76c203802dda7
10though said registers are not even documented as 64-bit registers
11- as opposed to the initial TxDescStartAddress ones - but as single
12bytes which must be combined into 32 bits at the MMIO read/write
13level before being merged into a 64 bit logical entity.
14
15Credits go to Ben Hutchings <ben@decadent.org.uk> for the MAR
16registers (aka "multicast is broken for ages on ARM) and to
17Timo Teräs <timo.teras@iki.fi> for the MAC registers.
18
19Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21(cherry picked from commit 78f1cd02457252e1ffbc6caa44a17424a45286b8)
22---
23 drivers/net/r8169.c | 4 ++--
24 1 files changed, 2 insertions(+), 2 deletions(-)
25
26diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
27index 0fe2fc9..24599b5 100644
28--- a/drivers/net/r8169.c
29+++ b/drivers/net/r8169.c
30@@ -2827,8 +2827,8 @@ static void rtl_rar_set(struct rtl8169_private *tp, u8 *addr)
31 spin_lock_irq(&tp->lock);
32
33 RTL_W8(Cfg9346, Cfg9346_Unlock);
34- RTL_W32(MAC0, low);
35 RTL_W32(MAC4, high);
36+ RTL_W32(MAC0, low);
37 RTL_W8(Cfg9346, Cfg9346_Lock);
38
39 spin_unlock_irq(&tp->lock);
40@@ -4795,8 +4795,8 @@ static void rtl_set_rx_mode(struct net_device *dev)
41 mc_filter[1] = swab32(data);
42 }
43
44- RTL_W32(MAR0 + 0, mc_filter[0]);
45 RTL_W32(MAR0 + 4, mc_filter[1]);
46+ RTL_W32(MAR0 + 0, mc_filter[0]);
47
48 RTL_W32(RxConfig, tmp);
49
50--
511.7.0.2
52
diff --git a/main/linux-grsec/0007-r8169-Fix-rtl8169_rx_interrupt.patch b/main/linux-grsec/0007-r8169-Fix-rtl8169_rx_interrupt.patch
deleted file mode 100644
index fad2723284..0000000000
--- a/main/linux-grsec/0007-r8169-Fix-rtl8169_rx_interrupt.patch
+++ /dev/null
@@ -1,89 +0,0 @@
1From 26654a966adb674afc30d285f7e79535d03c2492 Mon Sep 17 00:00:00 2001
2From: Eric Dumazet <eric.dumazet@gmail.com>
3Date: Wed, 31 Mar 2010 02:08:31 +0000
4Subject: [PATCH 07/18] r8169: Fix rtl8169_rx_interrupt()
5
6In case a reset is performed, rtl8169_rx_interrupt() is called from
7process context instead of softirq context. Special care must be taken
8to call appropriate network core services (netif_rx() instead of
9netif_receive_skb()). VLAN handling also corrected.
10
11Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
12Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
13Diagnosed-by: Oleg Nesterov <oleg@redhat.com>
14Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16(cherry picked from commit 630b943c182d1aed69f244405131902fbcba7ec6)
17---
18 drivers/net/r8169.c | 22 +++++++++++++++++-----
19 1 files changed, 17 insertions(+), 5 deletions(-)
20
21diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
22index 1484528..bed1d47 100644
23--- a/drivers/net/r8169.c
24+++ b/drivers/net/r8169.c
25@@ -1047,14 +1047,14 @@ static void rtl8169_vlan_rx_register(struct net_device *dev,
26 }
27
28 static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
29- struct sk_buff *skb)
30+ struct sk_buff *skb, int polling)
31 {
32 u32 opts2 = le32_to_cpu(desc->opts2);
33 struct vlan_group *vlgrp = tp->vlgrp;
34 int ret;
35
36 if (vlgrp && (opts2 & RxVlanTag)) {
37- vlan_hwaccel_receive_skb(skb, vlgrp, swab16(opts2 & 0xffff));
38+ __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling);
39 ret = 0;
40 } else
41 ret = -1;
42@@ -1071,7 +1071,7 @@ static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp,
43 }
44
45 static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
46- struct sk_buff *skb)
47+ struct sk_buff *skb, int polling)
48 {
49 return -1;
50 }
51@@ -4480,12 +4480,20 @@ out:
52 return done;
53 }
54
55+/*
56+ * Warning : rtl8169_rx_interrupt() might be called :
57+ * 1) from NAPI (softirq) context
58+ * (polling = 1 : we should call netif_receive_skb())
59+ * 2) from process context (rtl8169_reset_task())
60+ * (polling = 0 : we must call netif_rx() instead)
61+ */
62 static int rtl8169_rx_interrupt(struct net_device *dev,
63 struct rtl8169_private *tp,
64 void __iomem *ioaddr, u32 budget)
65 {
66 unsigned int cur_rx, rx_left;
67 unsigned int delta, count;
68+ int polling = (budget != ~(u32)0) ? 1 : 0;
69
70 cur_rx = tp->cur_rx;
71 rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx;
72@@ -4550,8 +4558,12 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
73 skb_put(skb, pkt_size);
74 skb->protocol = eth_type_trans(skb, dev);
75
76- if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0)
77- netif_receive_skb(skb);
78+ if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) {
79+ if (likely(polling))
80+ netif_receive_skb(skb);
81+ else
82+ netif_rx(skb);
83+ }
84
85 dev->stats.rx_bytes += pkt_size;
86 dev->stats.rx_packets++;
87--
881.7.0.2
89
diff --git a/main/linux-grsec/0009-ipsec-Fix-bogus-bundle-flowi.patch b/main/linux-grsec/0009-ipsec-Fix-bogus-bundle-flowi.patch
deleted file mode 100644
index d4de0e1d58..0000000000
--- a/main/linux-grsec/0009-ipsec-Fix-bogus-bundle-flowi.patch
+++ /dev/null
@@ -1,110 +0,0 @@
1From 21ee14f92ef1b6d4ca965c9b59135f3462919631 Mon Sep 17 00:00:00 2001
2From: Herbert Xu <herbert@gondor.apana.org.au>
3Date: Tue, 2 Mar 2010 02:51:56 +0000
4Subject: [PATCH 09/18] ipsec: Fix bogus bundle flowi
5
6When I merged the bundle creation code, I introduced a bogus
7flowi value in the bundle. Instead of getting from the caller,
8it was instead set to the flow in the route object, which is
9totally different.
10
11The end result is that the bundles we created never match, and
12we instead end up with an ever growing bundle list.
13
14Thanks to Jamal for find this problem.
15
16Reported-by: Jamal Hadi Salim <hadi@cyberus.ca>
17Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
19Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21(cherry picked from commit 87c1e12b5eeb7b30b4b41291bef8e0b41fc3dde9)
22---
23 include/net/xfrm.h | 3 ++-
24 net/ipv4/xfrm4_policy.c | 5 +++--
25 net/ipv6/xfrm6_policy.c | 3 ++-
26 net/xfrm/xfrm_policy.c | 7 ++++---
27 4 files changed, 11 insertions(+), 7 deletions(-)
28
29diff --git a/include/net/xfrm.h b/include/net/xfrm.h
30index 223e90a..6960be2 100644
31--- a/include/net/xfrm.h
32+++ b/include/net/xfrm.h
33@@ -273,7 +273,8 @@ struct xfrm_policy_afinfo {
34 struct dst_entry *dst,
35 int nfheader_len);
36 int (*fill_dst)(struct xfrm_dst *xdst,
37- struct net_device *dev);
38+ struct net_device *dev,
39+ struct flowi *fl);
40 };
41
42 extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo);
43diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
44index 74fb2eb..7009886 100644
45--- a/net/ipv4/xfrm4_policy.c
46+++ b/net/ipv4/xfrm4_policy.c
47@@ -92,11 +92,12 @@ static int xfrm4_init_path(struct xfrm_dst *path, struct dst_entry *dst,
48 return 0;
49 }
50
51-static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
52+static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
53+ struct flowi *fl)
54 {
55 struct rtable *rt = (struct rtable *)xdst->route;
56
57- xdst->u.rt.fl = rt->fl;
58+ xdst->u.rt.fl = *fl;
59
60 xdst->u.dst.dev = dev;
61 dev_hold(dev);
62diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
63index 8ec3d45..3f89ab7 100644
64--- a/net/ipv6/xfrm6_policy.c
65+++ b/net/ipv6/xfrm6_policy.c
66@@ -117,7 +117,8 @@ static int xfrm6_init_path(struct xfrm_dst *path, struct dst_entry *dst,
67 return 0;
68 }
69
70-static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
71+static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
72+ struct flowi *fl)
73 {
74 struct rt6_info *rt = (struct rt6_info*)xdst->route;
75
76diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
77index cb81ca3..d75047c 100644
78--- a/net/xfrm/xfrm_policy.c
79+++ b/net/xfrm/xfrm_policy.c
80@@ -1341,7 +1341,8 @@ static inline int xfrm_init_path(struct xfrm_dst *path, struct dst_entry *dst,
81 return err;
82 }
83
84-static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
85+static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
86+ struct flowi *fl)
87 {
88 struct xfrm_policy_afinfo *afinfo =
89 xfrm_policy_get_afinfo(xdst->u.dst.ops->family);
90@@ -1350,7 +1351,7 @@ static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
91 if (!afinfo)
92 return -EINVAL;
93
94- err = afinfo->fill_dst(xdst, dev);
95+ err = afinfo->fill_dst(xdst, dev, fl);
96
97 xfrm_policy_put_afinfo(afinfo);
98
99@@ -1454,7 +1455,7 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
100 for (dst_prev = dst0; dst_prev != dst; dst_prev = dst_prev->child) {
101 struct xfrm_dst *xdst = (struct xfrm_dst *)dst_prev;
102
103- err = xfrm_fill_dst(xdst, dev);
104+ err = xfrm_fill_dst(xdst, dev, fl);
105 if (err)
106 goto free_dst;
107
108--
1091.7.0.2
110
diff --git a/main/linux-grsec/0010-xfrm-Remove-xfrm_state_genid.patch b/main/linux-grsec/0010-xfrm-Remove-xfrm_state_genid.patch
deleted file mode 100644
index 8cfffd7398..0000000000
--- a/main/linux-grsec/0010-xfrm-Remove-xfrm_state_genid.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From f2c59932757a06851bb740dc757ce2ba1961fc08 Mon Sep 17 00:00:00 2001
2From: Herbert Xu <herbert@gondor.apana.org.au>
3Date: Wed, 31 Mar 2010 01:19:49 +0000
4Subject: [PATCH 10/18] xfrm: Remove xfrm_state_genid
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The xfrm state genid only needs to be matched against the copy
10saved in xfrm_dst. So we don't need a global genid at all. In
11fact, we don't even need to initialise it.
12
13Based on observation by Timo Teräs.
14
15Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16Signed-off-by: David S. Miller <davem@davemloft.net>
17(cherry picked from commit 34996cb91dd72f0b0456d8fd3fef4aaee62232f2)
18---
19 net/xfrm/xfrm_state.c | 5 +----
20 1 files changed, 1 insertions(+), 4 deletions(-)
21
22diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
23index f2f7c63..8ee733f 100644
24--- a/net/xfrm/xfrm_state.c
25+++ b/net/xfrm/xfrm_state.c
26@@ -34,7 +34,6 @@
27 static DEFINE_SPINLOCK(xfrm_state_lock);
28
29 static unsigned int xfrm_state_hashmax __read_mostly = 1 * 1024 * 1024;
30-static unsigned int xfrm_state_genid;
31
32 static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned int family);
33 static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo);
34@@ -903,8 +902,6 @@ static void __xfrm_state_insert(struct xfrm_state *x)
35 struct net *net = xs_net(x);
36 unsigned int h;
37
38- x->genid = ++xfrm_state_genid;
39-
40 list_add(&x->km.all, &net->xfrm.state_all);
41
42 h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
43@@ -948,7 +945,7 @@ static void __xfrm_state_bump_genids(struct xfrm_state *xnew)
44 x->props.reqid == reqid &&
45 !xfrm_addr_cmp(&x->id.daddr, &xnew->id.daddr, family) &&
46 !xfrm_addr_cmp(&x->props.saddr, &xnew->props.saddr, family))
47- x->genid = xfrm_state_genid;
48+ x->genid++;
49 }
50 }
51
52--
531.7.0.2
54
diff --git a/main/linux-grsec/0012-xfrm-remove-policy-lock-when-accessing-policy-walk.d.patch b/main/linux-grsec/0012-xfrm-remove-policy-lock-when-accessing-policy-walk.d.patch
deleted file mode 100644
index 222caaddfd..0000000000
--- a/main/linux-grsec/0012-xfrm-remove-policy-lock-when-accessing-policy-walk.d.patch
+++ /dev/null
@@ -1,105 +0,0 @@
1From 7a400eb025dd53883c3560d0fdb069542f7ad3db Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Wed, 31 Mar 2010 00:17:05 +0000
4Subject: [PATCH 12/18] xfrm: remove policy lock when accessing policy->walk.dead
5
6All of the code considers ->dead as a hint that the cached policy
7needs to get refreshed. The read side can just drop the read lock
8without any side effects.
9
10The write side needs to make sure that it's written only exactly
11once. Only possible race is at xfrm_policy_kill(). This is fixed
12by checking result of __xfrm_policy_unlink() when needed. It will
13always succeed if the policy object is looked up from the hash
14list (so some checks are removed), but it needs to be checked if
15we are trying to unlink policy via a reference (appropriate
16checks added).
17
18Since policy->walk.dead is written exactly once, it no longer
19needs to be protected with a write lock.
20
21Signed-off-by: Timo Teras <timo.teras@iki.fi>
22Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
23Signed-off-by: David S. Miller <davem@davemloft.net>
24(backported from commit ea2dea9dacc256fe927857feb423872051642ae7)
25---
26 net/xfrm/xfrm_policy.c | 20 +++++---------------
27 net/xfrm/xfrm_user.c | 6 +-----
28 2 files changed, 6 insertions(+), 20 deletions(-)
29
30diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
31index d75047c..110184f 100644
32--- a/net/xfrm/xfrm_policy.c
33+++ b/net/xfrm/xfrm_policy.c
34@@ -156,7 +156,7 @@ static void xfrm_policy_timer(unsigned long data)
35
36 read_lock(&xp->lock);
37
38- if (xp->walk.dead)
39+ if (unlikely(xp->walk.dead))
40 goto out;
41
42 dir = xfrm_policy_id2dir(xp->index);
43@@ -297,17 +297,7 @@ static DECLARE_WORK(xfrm_policy_gc_work, xfrm_policy_gc_task);
44
45 static void xfrm_policy_kill(struct xfrm_policy *policy)
46 {
47- int dead;
48-
49- write_lock_bh(&policy->lock);
50- dead = policy->walk.dead;
51 policy->walk.dead = 1;
52- write_unlock_bh(&policy->lock);
53-
54- if (unlikely(dead)) {
55- WARN_ON(1);
56- return;
57- }
58
59 spin_lock_bh(&xfrm_policy_gc_lock);
60 hlist_add_head(&policy->bydst, &xfrm_policy_gc_list);
61@@ -1115,6 +1105,9 @@ int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol)
62 __xfrm_policy_link(pol, XFRM_POLICY_MAX+dir);
63 }
64 if (old_pol)
65+ /* Unlinking succeeds always. This is the only function
66+ * allowed to delete or replace socket policy.
67+ */
68 __xfrm_policy_unlink(old_pol, XFRM_POLICY_MAX+dir);
69 write_unlock_bh(&xfrm_policy_lock);
70
71@@ -1705,11 +1698,8 @@ restart:
72 goto error;
73 }
74
75- for (pi = 0; pi < npols; pi++) {
76- read_lock_bh(&pols[pi]->lock);
77+ for (pi = 0; pi < npols; pi++)
78 pol_dead |= pols[pi]->walk.dead;
79- read_unlock_bh(&pols[pi]->lock);
80- }
81
82 write_lock_bh(&policy->lock);
83 if (unlikely(pol_dead || stale_bundle(dst))) {
84diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
85index d1e9ee3..f9c56e9 100644
86--- a/net/xfrm/xfrm_user.c
87+++ b/net/xfrm/xfrm_user.c
88@@ -1617,13 +1617,9 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
89 if (xp == NULL)
90 return -ENOENT;
91
92- read_lock(&xp->lock);
93- if (xp->walk.dead) {
94- read_unlock(&xp->lock);
95+ if (unlikely(xp->walk.dead))
96 goto out;
97- }
98
99- read_unlock(&xp->lock);
100 err = 0;
101 if (up->hard) {
102 uid_t loginuid = NETLINK_CB(skb).loginuid;
103--
1041.7.0.2
105
diff --git a/main/linux-grsec/0013-flow-structurize-flow-cache.patch b/main/linux-grsec/0013-flow-structurize-flow-cache.patch
deleted file mode 100644
index 68fa753a2c..0000000000
--- a/main/linux-grsec/0013-flow-structurize-flow-cache.patch
+++ /dev/null
@@ -1,395 +0,0 @@
1From 884f6e44f0b405c06bd234b14cc228482291bb38 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Wed, 31 Mar 2010 00:17:06 +0000
4Subject: [PATCH 13/18] flow: structurize flow cache
5
6Group all per-cpu data to one structure instead of having many
7globals. Also prepare the internals so that we can have multiple
8instances of the flow cache if needed.
9
10Only the kmem_cache is left as a global as all flow caches share
11the same element size, and benefit from using a common cache.
12
13Signed-off-by: Timo Teras <timo.teras@iki.fi>
14Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
15Signed-off-by: David S. Miller <davem@davemloft.net>
16(cherry picked from commit d7997fe1f4584da12e9c29fb682c18e9bdc13b73)
17---
18 net/core/flow.c | 223 +++++++++++++++++++++++++++++--------------------------
19 1 files changed, 119 insertions(+), 104 deletions(-)
20
21diff --git a/net/core/flow.c b/net/core/flow.c
22index 9601587..1d27ca6 100644
23--- a/net/core/flow.c
24+++ b/net/core/flow.c
25@@ -35,104 +35,105 @@ struct flow_cache_entry {
26 atomic_t *object_ref;
27 };
28
29-atomic_t flow_cache_genid = ATOMIC_INIT(0);
30-
31-static u32 flow_hash_shift;
32-#define flow_hash_size (1 << flow_hash_shift)
33-static DEFINE_PER_CPU(struct flow_cache_entry **, flow_tables) = { NULL };
34-
35-#define flow_table(cpu) (per_cpu(flow_tables, cpu))
36-
37-static struct kmem_cache *flow_cachep __read_mostly;
38-
39-static int flow_lwm, flow_hwm;
40-
41-struct flow_percpu_info {
42- int hash_rnd_recalc;
43- u32 hash_rnd;
44- int count;
45+struct flow_cache_percpu {
46+ struct flow_cache_entry ** hash_table;
47+ int hash_count;
48+ u32 hash_rnd;
49+ int hash_rnd_recalc;
50+ struct tasklet_struct flush_tasklet;
51 };
52-static DEFINE_PER_CPU(struct flow_percpu_info, flow_hash_info) = { 0 };
53-
54-#define flow_hash_rnd_recalc(cpu) \
55- (per_cpu(flow_hash_info, cpu).hash_rnd_recalc)
56-#define flow_hash_rnd(cpu) \
57- (per_cpu(flow_hash_info, cpu).hash_rnd)
58-#define flow_count(cpu) \
59- (per_cpu(flow_hash_info, cpu).count)
60-
61-static struct timer_list flow_hash_rnd_timer;
62-
63-#define FLOW_HASH_RND_PERIOD (10 * 60 * HZ)
64
65 struct flow_flush_info {
66- atomic_t cpuleft;
67- struct completion completion;
68+ struct flow_cache * cache;
69+ atomic_t cpuleft;
70+ struct completion completion;
71 };
72-static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL };
73
74-#define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu))
75+struct flow_cache {
76+ u32 hash_shift;
77+ unsigned long order;
78+ struct flow_cache_percpu * percpu;
79+ struct notifier_block hotcpu_notifier;
80+ int low_watermark;
81+ int high_watermark;
82+ struct timer_list rnd_timer;
83+};
84+
85+atomic_t flow_cache_genid = ATOMIC_INIT(0);
86+static struct flow_cache flow_cache_global;
87+static struct kmem_cache *flow_cachep;
88+
89+#define flow_cache_hash_size(cache) (1 << (cache)->hash_shift)
90+#define FLOW_HASH_RND_PERIOD (10 * 60 * HZ)
91
92 static void flow_cache_new_hashrnd(unsigned long arg)
93 {
94+ struct flow_cache *fc = (void *) arg;
95 int i;
96
97 for_each_possible_cpu(i)
98- flow_hash_rnd_recalc(i) = 1;
99+ per_cpu_ptr(fc->percpu, i)->hash_rnd_recalc = 1;
100
101- flow_hash_rnd_timer.expires = jiffies + FLOW_HASH_RND_PERIOD;
102- add_timer(&flow_hash_rnd_timer);
103+ fc->rnd_timer.expires = jiffies + FLOW_HASH_RND_PERIOD;
104+ add_timer(&fc->rnd_timer);
105 }
106
107-static void flow_entry_kill(int cpu, struct flow_cache_entry *fle)
108+static void flow_entry_kill(struct flow_cache *fc,
109+ struct flow_cache_percpu *fcp,
110+ struct flow_cache_entry *fle)
111 {
112 if (fle->object)
113 atomic_dec(fle->object_ref);
114 kmem_cache_free(flow_cachep, fle);
115- flow_count(cpu)--;
116+ fcp->hash_count--;
117 }
118
119-static void __flow_cache_shrink(int cpu, int shrink_to)
120+static void __flow_cache_shrink(struct flow_cache *fc,
121+ struct flow_cache_percpu *fcp,
122+ int shrink_to)
123 {
124 struct flow_cache_entry *fle, **flp;
125 int i;
126
127- for (i = 0; i < flow_hash_size; i++) {
128+ for (i = 0; i < flow_cache_hash_size(fc); i++) {
129 int k = 0;
130
131- flp = &flow_table(cpu)[i];
132+ flp = &fcp->hash_table[i];
133 while ((fle = *flp) != NULL && k < shrink_to) {
134 k++;
135 flp = &fle->next;
136 }
137 while ((fle = *flp) != NULL) {
138 *flp = fle->next;
139- flow_entry_kill(cpu, fle);
140+ flow_entry_kill(fc, fcp, fle);
141 }
142 }
143 }
144
145-static void flow_cache_shrink(int cpu)
146+static void flow_cache_shrink(struct flow_cache *fc,
147+ struct flow_cache_percpu *fcp)
148 {
149- int shrink_to = flow_lwm / flow_hash_size;
150+ int shrink_to = fc->low_watermark / flow_cache_hash_size(fc);
151
152- __flow_cache_shrink(cpu, shrink_to);
153+ __flow_cache_shrink(fc, fcp, shrink_to);
154 }
155
156-static void flow_new_hash_rnd(int cpu)
157+static void flow_new_hash_rnd(struct flow_cache *fc,
158+ struct flow_cache_percpu *fcp)
159 {
160- get_random_bytes(&flow_hash_rnd(cpu), sizeof(u32));
161- flow_hash_rnd_recalc(cpu) = 0;
162-
163- __flow_cache_shrink(cpu, 0);
164+ get_random_bytes(&fcp->hash_rnd, sizeof(u32));
165+ fcp->hash_rnd_recalc = 0;
166+ __flow_cache_shrink(fc, fcp, 0);
167 }
168
169-static u32 flow_hash_code(struct flowi *key, int cpu)
170+static u32 flow_hash_code(struct flow_cache *fc,
171+ struct flow_cache_percpu *fcp,
172+ struct flowi *key)
173 {
174 u32 *k = (u32 *) key;
175
176- return (jhash2(k, (sizeof(*key) / sizeof(u32)), flow_hash_rnd(cpu)) &
177- (flow_hash_size - 1));
178+ return (jhash2(k, (sizeof(*key) / sizeof(u32)), fcp->hash_rnd)
179+ & (flow_cache_hash_size(fc) - 1));
180 }
181
182 #if (BITS_PER_LONG == 64)
183@@ -168,24 +169,25 @@ static int flow_key_compare(struct flowi *key1, struct flowi *key2)
184 void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
185 flow_resolve_t resolver)
186 {
187+ struct flow_cache *fc = &flow_cache_global;
188+ struct flow_cache_percpu *fcp;
189 struct flow_cache_entry *fle, **head;
190 unsigned int hash;
191- int cpu;
192
193 local_bh_disable();
194- cpu = smp_processor_id();
195+ fcp = per_cpu_ptr(fc->percpu, smp_processor_id());
196
197 fle = NULL;
198 /* Packet really early in init? Making flow_cache_init a
199 * pre-smp initcall would solve this. --RR */
200- if (!flow_table(cpu))
201+ if (!fcp->hash_table)
202 goto nocache;
203
204- if (flow_hash_rnd_recalc(cpu))
205- flow_new_hash_rnd(cpu);
206- hash = flow_hash_code(key, cpu);
207+ if (fcp->hash_rnd_recalc)
208+ flow_new_hash_rnd(fc, fcp);
209+ hash = flow_hash_code(fc, fcp, key);
210
211- head = &flow_table(cpu)[hash];
212+ head = &fcp->hash_table[hash];
213 for (fle = *head; fle; fle = fle->next) {
214 if (fle->family == family &&
215 fle->dir == dir &&
216@@ -204,8 +206,8 @@ void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
217 }
218
219 if (!fle) {
220- if (flow_count(cpu) > flow_hwm)
221- flow_cache_shrink(cpu);
222+ if (fcp->hash_count > fc->high_watermark)
223+ flow_cache_shrink(fc, fcp);
224
225 fle = kmem_cache_alloc(flow_cachep, GFP_ATOMIC);
226 if (fle) {
227@@ -215,7 +217,7 @@ void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
228 fle->dir = dir;
229 memcpy(&fle->key, key, sizeof(*key));
230 fle->object = NULL;
231- flow_count(cpu)++;
232+ fcp->hash_count++;
233 }
234 }
235
236@@ -249,14 +251,15 @@ nocache:
237 static void flow_cache_flush_tasklet(unsigned long data)
238 {
239 struct flow_flush_info *info = (void *)data;
240+ struct flow_cache *fc = info->cache;
241+ struct flow_cache_percpu *fcp;
242 int i;
243- int cpu;
244
245- cpu = smp_processor_id();
246- for (i = 0; i < flow_hash_size; i++) {
247+ fcp = per_cpu_ptr(fc->percpu, smp_processor_id());
248+ for (i = 0; i < flow_cache_hash_size(fc); i++) {
249 struct flow_cache_entry *fle;
250
251- fle = flow_table(cpu)[i];
252+ fle = fcp->hash_table[i];
253 for (; fle; fle = fle->next) {
254 unsigned genid = atomic_read(&flow_cache_genid);
255
256@@ -272,7 +275,6 @@ static void flow_cache_flush_tasklet(unsigned long data)
257 complete(&info->completion);
258 }
259
260-static void flow_cache_flush_per_cpu(void *) __attribute__((__unused__));
261 static void flow_cache_flush_per_cpu(void *data)
262 {
263 struct flow_flush_info *info = data;
264@@ -280,8 +282,7 @@ static void flow_cache_flush_per_cpu(void *data)
265 struct tasklet_struct *tasklet;
266
267 cpu = smp_processor_id();
268-
269- tasklet = flow_flush_tasklet(cpu);
270+ tasklet = &per_cpu_ptr(info->cache->percpu, cpu)->flush_tasklet;
271 tasklet->data = (unsigned long)info;
272 tasklet_schedule(tasklet);
273 }
274@@ -294,6 +295,7 @@ void flow_cache_flush(void)
275 /* Don't want cpus going down or up during this. */
276 get_online_cpus();
277 mutex_lock(&flow_flush_sem);
278+ info.cache = &flow_cache_global;
279 atomic_set(&info.cpuleft, num_online_cpus());
280 init_completion(&info.completion);
281
282@@ -307,62 +309,75 @@ void flow_cache_flush(void)
283 put_online_cpus();
284 }
285
286-static void __init flow_cache_cpu_prepare(int cpu)
287+static void __init flow_cache_cpu_prepare(struct flow_cache *fc,
288+ struct flow_cache_percpu *fcp)
289 {
290- struct tasklet_struct *tasklet;
291- unsigned long order;
292-
293- for (order = 0;
294- (PAGE_SIZE << order) <
295- (sizeof(struct flow_cache_entry *)*flow_hash_size);
296- order++)
297- /* NOTHING */;
298-
299- flow_table(cpu) = (struct flow_cache_entry **)
300- __get_free_pages(GFP_KERNEL|__GFP_ZERO, order);
301- if (!flow_table(cpu))
302- panic("NET: failed to allocate flow cache order %lu\n", order);
303-
304- flow_hash_rnd_recalc(cpu) = 1;
305- flow_count(cpu) = 0;
306-
307- tasklet = flow_flush_tasklet(cpu);
308- tasklet_init(tasklet, flow_cache_flush_tasklet, 0);
309+ fcp->hash_table = (struct flow_cache_entry **)
310+ __get_free_pages(GFP_KERNEL|__GFP_ZERO, fc->order);
311+ if (!fcp->hash_table)
312+ panic("NET: failed to allocate flow cache order %lu\n", fc->order);
313+
314+ fcp->hash_rnd_recalc = 1;
315+ fcp->hash_count = 0;
316+ tasklet_init(&fcp->flush_tasklet, flow_cache_flush_tasklet, 0);
317 }
318
319 static int flow_cache_cpu(struct notifier_block *nfb,
320 unsigned long action,
321 void *hcpu)
322 {
323+ struct flow_cache *fc = container_of(nfb, struct flow_cache, hotcpu_notifier);
324+ int cpu = (unsigned long) hcpu;
325+ struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, cpu);
326+
327 if (action == CPU_DEAD || action == CPU_DEAD_FROZEN)
328- __flow_cache_shrink((unsigned long)hcpu, 0);
329+ __flow_cache_shrink(fc, fcp, 0);
330 return NOTIFY_OK;
331 }
332
333-static int __init flow_cache_init(void)
334+static int flow_cache_init(struct flow_cache *fc)
335 {
336+ unsigned long order;
337 int i;
338
339- flow_cachep = kmem_cache_create("flow_cache",
340- sizeof(struct flow_cache_entry),
341- 0, SLAB_PANIC,
342- NULL);
343- flow_hash_shift = 10;
344- flow_lwm = 2 * flow_hash_size;
345- flow_hwm = 4 * flow_hash_size;
346+ fc->hash_shift = 10;
347+ fc->low_watermark = 2 * flow_cache_hash_size(fc);
348+ fc->high_watermark = 4 * flow_cache_hash_size(fc);
349+
350+ for (order = 0;
351+ (PAGE_SIZE << order) <
352+ (sizeof(struct flow_cache_entry *)*flow_cache_hash_size(fc));
353+ order++)
354+ /* NOTHING */;
355+ fc->order = order;
356+ fc->percpu = alloc_percpu(struct flow_cache_percpu);
357
358- setup_timer(&flow_hash_rnd_timer, flow_cache_new_hashrnd, 0);
359- flow_hash_rnd_timer.expires = jiffies + FLOW_HASH_RND_PERIOD;
360- add_timer(&flow_hash_rnd_timer);
361+ setup_timer(&fc->rnd_timer, flow_cache_new_hashrnd,
362+ (unsigned long) fc);
363+ fc->rnd_timer.expires = jiffies + FLOW_HASH_RND_PERIOD;
364+ add_timer(&fc->rnd_timer);
365
366 for_each_possible_cpu(i)
367- flow_cache_cpu_prepare(i);
368+ flow_cache_cpu_prepare(fc, per_cpu_ptr(fc->percpu, i));
369+
370+ fc->hotcpu_notifier = (struct notifier_block){
371+ .notifier_call = flow_cache_cpu,
372+ };
373+ register_hotcpu_notifier(&fc->hotcpu_notifier);
374
375- hotcpu_notifier(flow_cache_cpu, 0);
376 return 0;
377 }
378
379-module_init(flow_cache_init);
380+static int __init flow_cache_init_global(void)
381+{
382+ flow_cachep = kmem_cache_create("flow_cache",
383+ sizeof(struct flow_cache_entry),
384+ 0, SLAB_PANIC, NULL);
385+
386+ return flow_cache_init(&flow_cache_global);
387+}
388+
389+module_init(flow_cache_init_global);
390
391 EXPORT_SYMBOL(flow_cache_genid);
392 EXPORT_SYMBOL(flow_cache_lookup);
393--
3941.7.0.2
395
diff --git a/main/linux-grsec/0014-flow-virtualize-flow-cache-entry-methods.patch b/main/linux-grsec/0014-flow-virtualize-flow-cache-entry-methods.patch
deleted file mode 100644
index 5c4a9ea594..0000000000
--- a/main/linux-grsec/0014-flow-virtualize-flow-cache-entry-methods.patch
+++ /dev/null
@@ -1,513 +0,0 @@
1From d56cd1c538e5448fe43acc69991aa842f382a622 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Wed, 7 Apr 2010 00:30:04 +0000
4Subject: [PATCH 14/18] flow: virtualize flow cache entry methods
5
6This allows to validate the cached object before returning it.
7It also allows to destruct object properly, if the last reference
8was held in flow cache. This is also a prepartion for caching
9bundles in the flow cache.
10
11In return for virtualizing the methods, we save on:
12- not having to regenerate the whole flow cache on policy removal:
13 each flow matching a killed policy gets refreshed as the getter
14 function notices it smartly.
15- we do not have to call flow_cache_flush from policy gc, since the
16 flow cache now properly deletes the object if it had any references
17
18Signed-off-by: Timo Teras <timo.teras@iki.fi>
19Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21(backported from commit fe1a5f031e76bd8761a7803d75b95ee96e84a574)
22---
23 include/net/flow.h | 23 +++++++--
24 include/net/xfrm.h | 3 +
25 net/core/flow.c | 128 +++++++++++++++++++++++++----------------------
26 net/xfrm/xfrm_policy.c | 111 ++++++++++++++++++++++++++++--------------
27 4 files changed, 164 insertions(+), 101 deletions(-)
28
29diff --git a/include/net/flow.h b/include/net/flow.h
30index 809970b..bb08692 100644
31--- a/include/net/flow.h
32+++ b/include/net/flow.h
33@@ -86,11 +86,26 @@ struct flowi {
34
35 struct net;
36 struct sock;
37-typedef int (*flow_resolve_t)(struct net *net, struct flowi *key, u16 family,
38- u8 dir, void **objp, atomic_t **obj_refp);
39+struct flow_cache_ops;
40+
41+struct flow_cache_object {
42+ const struct flow_cache_ops *ops;
43+};
44+
45+struct flow_cache_ops {
46+ struct flow_cache_object *(*get)(struct flow_cache_object *);
47+ int (*check)(struct flow_cache_object *);
48+ void (*delete)(struct flow_cache_object *);
49+};
50+
51+typedef struct flow_cache_object *(*flow_resolve_t)(
52+ struct net *net, struct flowi *key, u16 family,
53+ u8 dir, struct flow_cache_object *oldobj, void *ctx);
54+
55+extern struct flow_cache_object *flow_cache_lookup(
56+ struct net *net, struct flowi *key, u16 family,
57+ u8 dir, flow_resolve_t resolver, void *ctx);
58
59-extern void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family,
60- u8 dir, flow_resolve_t resolver);
61 extern void flow_cache_flush(void);
62 extern atomic_t flow_cache_genid;
63
64diff --git a/include/net/xfrm.h b/include/net/xfrm.h
65index 6960be2..6023a48 100644
66--- a/include/net/xfrm.h
67+++ b/include/net/xfrm.h
68@@ -19,6 +19,8 @@
69 #include <net/route.h>
70 #include <net/ipv6.h>
71 #include <net/ip6_fib.h>
72+#include <net/flow.h>
73+
74 #ifdef CONFIG_XFRM_STATISTICS
75 #include <net/snmp.h>
76 #endif
77@@ -482,6 +484,7 @@ struct xfrm_policy
78 atomic_t refcnt;
79 struct timer_list timer;
80
81+ struct flow_cache_object flo;
82 u32 priority;
83 u32 index;
84 struct xfrm_selector selector;
85diff --git a/net/core/flow.c b/net/core/flow.c
86index 1d27ca6..521df52 100644
87--- a/net/core/flow.c
88+++ b/net/core/flow.c
89@@ -26,17 +26,16 @@
90 #include <linux/security.h>
91
92 struct flow_cache_entry {
93- struct flow_cache_entry *next;
94- u16 family;
95- u8 dir;
96- u32 genid;
97- struct flowi key;
98- void *object;
99- atomic_t *object_ref;
100+ struct flow_cache_entry *next;
101+ u16 family;
102+ u8 dir;
103+ u32 genid;
104+ struct flowi key;
105+ struct flow_cache_object *object;
106 };
107
108 struct flow_cache_percpu {
109- struct flow_cache_entry ** hash_table;
110+ struct flow_cache_entry **hash_table;
111 int hash_count;
112 u32 hash_rnd;
113 int hash_rnd_recalc;
114@@ -44,7 +43,7 @@ struct flow_cache_percpu {
115 };
116
117 struct flow_flush_info {
118- struct flow_cache * cache;
119+ struct flow_cache *cache;
120 atomic_t cpuleft;
121 struct completion completion;
122 };
123@@ -52,7 +51,7 @@ struct flow_flush_info {
124 struct flow_cache {
125 u32 hash_shift;
126 unsigned long order;
127- struct flow_cache_percpu * percpu;
128+ struct flow_cache_percpu *percpu;
129 struct notifier_block hotcpu_notifier;
130 int low_watermark;
131 int high_watermark;
132@@ -78,12 +77,21 @@ static void flow_cache_new_hashrnd(unsigned long arg)
133 add_timer(&fc->rnd_timer);
134 }
135
136+static int flow_entry_valid(struct flow_cache_entry *fle)
137+{
138+ if (atomic_read(&flow_cache_genid) != fle->genid)
139+ return 0;
140+ if (fle->object && !fle->object->ops->check(fle->object))
141+ return 0;
142+ return 1;
143+}
144+
145 static void flow_entry_kill(struct flow_cache *fc,
146 struct flow_cache_percpu *fcp,
147 struct flow_cache_entry *fle)
148 {
149 if (fle->object)
150- atomic_dec(fle->object_ref);
151+ fle->object->ops->delete(fle->object);
152 kmem_cache_free(flow_cachep, fle);
153 fcp->hash_count--;
154 }
155@@ -96,16 +104,18 @@ static void __flow_cache_shrink(struct flow_cache *fc,
156 int i;
157
158 for (i = 0; i < flow_cache_hash_size(fc); i++) {
159- int k = 0;
160+ int saved = 0;
161
162 flp = &fcp->hash_table[i];
163- while ((fle = *flp) != NULL && k < shrink_to) {
164- k++;
165- flp = &fle->next;
166- }
167 while ((fle = *flp) != NULL) {
168- *flp = fle->next;
169- flow_entry_kill(fc, fcp, fle);
170+ if (saved < shrink_to &&
171+ flow_entry_valid(fle)) {
172+ saved++;
173+ flp = &fle->next;
174+ } else {
175+ *flp = fle->next;
176+ flow_entry_kill(fc, fcp, fle);
177+ }
178 }
179 }
180 }
181@@ -166,18 +176,21 @@ static int flow_key_compare(struct flowi *key1, struct flowi *key2)
182 return 0;
183 }
184
185-void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
186- flow_resolve_t resolver)
187+struct flow_cache_object *
188+flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
189+ flow_resolve_t resolver, void *ctx)
190 {
191 struct flow_cache *fc = &flow_cache_global;
192 struct flow_cache_percpu *fcp;
193 struct flow_cache_entry *fle, **head;
194+ struct flow_cache_object *flo;
195 unsigned int hash;
196
197 local_bh_disable();
198 fcp = per_cpu_ptr(fc->percpu, smp_processor_id());
199
200 fle = NULL;
201+ flo = NULL;
202 /* Packet really early in init? Making flow_cache_init a
203 * pre-smp initcall would solve this. --RR */
204 if (!fcp->hash_table)
205@@ -185,27 +198,17 @@ void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
206
207 if (fcp->hash_rnd_recalc)
208 flow_new_hash_rnd(fc, fcp);
209- hash = flow_hash_code(fc, fcp, key);
210
211+ hash = flow_hash_code(fc, fcp, key);
212 head = &fcp->hash_table[hash];
213 for (fle = *head; fle; fle = fle->next) {
214 if (fle->family == family &&
215 fle->dir == dir &&
216- flow_key_compare(key, &fle->key) == 0) {
217- if (fle->genid == atomic_read(&flow_cache_genid)) {
218- void *ret = fle->object;
219-
220- if (ret)
221- atomic_inc(fle->object_ref);
222- local_bh_enable();
223-
224- return ret;
225- }
226+ flow_key_compare(key, &fle->key) == 0)
227 break;
228- }
229 }
230
231- if (!fle) {
232+ if (unlikely(!fle)) {
233 if (fcp->hash_count > fc->high_watermark)
234 flow_cache_shrink(fc, fcp);
235
236@@ -219,33 +222,39 @@ void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
237 fle->object = NULL;
238 fcp->hash_count++;
239 }
240+ } else if (likely(fle->genid == atomic_read(&flow_cache_genid))) {
241+ flo = fle->object;
242+ if (!flo)
243+ goto ret_object;
244+ flo = flo->ops->get(flo);
245+ if (flo)
246+ goto ret_object;
247+ } else if (fle->object) {
248+ flo = fle->object;
249+ flo->ops->delete(flo);
250+ fle->object = NULL;
251 }
252
253 nocache:
254- {
255- int err;
256- void *obj;
257- atomic_t *obj_ref;
258-
259- err = resolver(net, key, family, dir, &obj, &obj_ref);
260-
261- if (fle && !err) {
262- fle->genid = atomic_read(&flow_cache_genid);
263-
264- if (fle->object)
265- atomic_dec(fle->object_ref);
266-
267- fle->object = obj;
268- fle->object_ref = obj_ref;
269- if (obj)
270- atomic_inc(fle->object_ref);
271- }
272- local_bh_enable();
273-
274- if (err)
275- obj = ERR_PTR(err);
276- return obj;
277+ flo = NULL;
278+ if (fle) {
279+ flo = fle->object;
280+ fle->object = NULL;
281+ }
282+ flo = resolver(net, key, family, dir, flo, ctx);
283+ if (fle) {
284+ fle->genid = atomic_read(&flow_cache_genid);
285+ if (!IS_ERR(flo))
286+ fle->object = flo;
287+ else
288+ fle->genid--;
289+ } else {
290+ if (flo && !IS_ERR(flo))
291+ flo->ops->delete(flo);
292 }
293+ret_object:
294+ local_bh_enable();
295+ return flo;
296 }
297
298 static void flow_cache_flush_tasklet(unsigned long data)
299@@ -261,13 +270,12 @@ static void flow_cache_flush_tasklet(unsigned long data)
300
301 fle = fcp->hash_table[i];
302 for (; fle; fle = fle->next) {
303- unsigned genid = atomic_read(&flow_cache_genid);
304-
305- if (!fle->object || fle->genid == genid)
306+ if (flow_entry_valid(fle))
307 continue;
308
309+ if (fle->object)
310+ fle->object->ops->delete(fle->object);
311 fle->object = NULL;
312- atomic_dec(fle->object_ref);
313 }
314 }
315
316diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
317index 110184f..d1eb2b5 100644
318--- a/net/xfrm/xfrm_policy.c
319+++ b/net/xfrm/xfrm_policy.c
320@@ -216,6 +216,35 @@ expired:
321 xfrm_pol_put(xp);
322 }
323
324+static struct flow_cache_object *xfrm_policy_flo_get(struct flow_cache_object *flo)
325+{
326+ struct xfrm_policy *pol = container_of(flo, struct xfrm_policy, flo);
327+
328+ if (unlikely(pol->walk.dead))
329+ flo = NULL;
330+ else
331+ xfrm_pol_hold(pol);
332+
333+ return flo;
334+}
335+
336+static int xfrm_policy_flo_check(struct flow_cache_object *flo)
337+{
338+ struct xfrm_policy *pol = container_of(flo, struct xfrm_policy, flo);
339+
340+ return !pol->walk.dead;
341+}
342+
343+static void xfrm_policy_flo_delete(struct flow_cache_object *flo)
344+{
345+ xfrm_pol_put(container_of(flo, struct xfrm_policy, flo));
346+}
347+
348+static const struct flow_cache_ops xfrm_policy_fc_ops = {
349+ .get = xfrm_policy_flo_get,
350+ .check = xfrm_policy_flo_check,
351+ .delete = xfrm_policy_flo_delete,
352+};
353
354 /* Allocate xfrm_policy. Not used here, it is supposed to be used by pfkeyv2
355 * SPD calls.
356@@ -236,6 +265,7 @@ struct xfrm_policy *xfrm_policy_alloc(struct net *net, gfp_t gfp)
357 atomic_set(&policy->refcnt, 1);
358 setup_timer(&policy->timer, xfrm_policy_timer,
359 (unsigned long)policy);
360+ policy->flo.ops = &xfrm_policy_fc_ops;
361 }
362 return policy;
363 }
364@@ -269,9 +299,6 @@ static void xfrm_policy_gc_kill(struct xfrm_policy *policy)
365 if (del_timer(&policy->timer))
366 atomic_dec(&policy->refcnt);
367
368- if (atomic_read(&policy->refcnt) > 1)
369- flow_cache_flush();
370-
371 xfrm_pol_put(policy);
372 }
373
374@@ -658,10 +685,8 @@ struct xfrm_policy *xfrm_policy_bysel_ctx(struct net *net, u8 type, int dir,
375 }
376 write_unlock_bh(&xfrm_policy_lock);
377
378- if (ret && delete) {
379- atomic_inc(&flow_cache_genid);
380+ if (ret && delete)
381 xfrm_policy_kill(ret);
382- }
383 return ret;
384 }
385 EXPORT_SYMBOL(xfrm_policy_bysel_ctx);
386@@ -699,10 +724,8 @@ struct xfrm_policy *xfrm_policy_byid(struct net *net, u8 type, int dir, u32 id,
387 }
388 write_unlock_bh(&xfrm_policy_lock);
389
390- if (ret && delete) {
391- atomic_inc(&flow_cache_genid);
392+ if (ret && delete)
393 xfrm_policy_kill(ret);
394- }
395 return ret;
396 }
397 EXPORT_SYMBOL(xfrm_policy_byid);
398@@ -967,32 +990,35 @@ fail:
399 return ret;
400 }
401
402-static int xfrm_policy_lookup(struct net *net, struct flowi *fl, u16 family,
403- u8 dir, void **objp, atomic_t **obj_refp)
404+static struct flow_cache_object *
405+xfrm_policy_lookup(struct net *net, struct flowi *fl, u16 family,
406+ u8 dir, struct flow_cache_object *old_obj, void *ctx)
407 {
408 struct xfrm_policy *pol;
409- int err = 0;
410+
411+ if (old_obj)
412+ xfrm_pol_put(container_of(old_obj, struct xfrm_policy, flo));
413
414 #ifdef CONFIG_XFRM_SUB_POLICY
415 pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_SUB, fl, family, dir);
416- if (IS_ERR(pol)) {
417- err = PTR_ERR(pol);
418- pol = NULL;
419- }
420- if (pol || err)
421- goto end;
422+ if (IS_ERR(pol))
423+ return ERR_CAST(pol);
424+ if (pol)
425+ goto found;
426 #endif
427 pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_MAIN, fl, family, dir);
428- if (IS_ERR(pol)) {
429- err = PTR_ERR(pol);
430- pol = NULL;
431- }
432-#ifdef CONFIG_XFRM_SUB_POLICY
433-end:
434-#endif
435- if ((*objp = (void *) pol) != NULL)
436- *obj_refp = &pol->refcnt;
437- return err;
438+ if (IS_ERR(pol))
439+ return ERR_CAST(pol);
440+ if (pol)
441+ goto found;
442+ return NULL;
443+
444+found:
445+ /* Resolver returns two references:
446+ * one for cache and one for caller of flow_cache_lookup() */
447+ xfrm_pol_hold(pol);
448+
449+ return &pol->flo;
450 }
451
452 static inline int policy_to_flow_dir(int dir)
453@@ -1077,8 +1103,6 @@ int xfrm_policy_delete(struct xfrm_policy *pol, int dir)
454 pol = __xfrm_policy_unlink(pol, dir);
455 write_unlock_bh(&xfrm_policy_lock);
456 if (pol) {
457- if (dir < XFRM_POLICY_MAX)
458- atomic_inc(&flow_cache_genid);
459 xfrm_policy_kill(pol);
460 return 0;
461 }
462@@ -1549,18 +1573,24 @@ restart:
463 }
464
465 if (!policy) {
466+ struct flow_cache_object *flo;
467+
468 /* To accelerate a bit... */
469 if ((dst_orig->flags & DST_NOXFRM) ||
470 !net->xfrm.policy_count[XFRM_POLICY_OUT])
471 goto nopol;
472
473- policy = flow_cache_lookup(net, fl, dst_orig->ops->family,
474- dir, xfrm_policy_lookup);
475- err = PTR_ERR(policy);
476- if (IS_ERR(policy)) {
477+ flo = flow_cache_lookup(net, fl, dst_orig->ops->family,
478+ dir, xfrm_policy_lookup, NULL);
479+ err = PTR_ERR(flo);
480+ if (IS_ERR(flo)) {
481 XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLERROR);
482 goto dropdst;
483 }
484+ if (flo)
485+ policy = container_of(flo, struct xfrm_policy, flo);
486+ else
487+ policy = NULL;
488 }
489
490 if (!policy)
491@@ -1910,9 +1940,16 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
492 }
493 }
494
495- if (!pol)
496- pol = flow_cache_lookup(net, &fl, family, fl_dir,
497- xfrm_policy_lookup);
498+ if (!pol) {
499+ struct flow_cache_object *flo;
500+
501+ flo = flow_cache_lookup(net, &fl, family, fl_dir,
502+ xfrm_policy_lookup, NULL);
503+ if (flo == NULL || IS_ERR(flo))
504+ pol = ERR_CAST(flo);
505+ else
506+ pol = container_of(flo, struct xfrm_policy, flo);
507+ }
508
509 if (IS_ERR(pol)) {
510 XFRM_INC_STATS(net, LINUX_MIB_XFRMINPOLERROR);
511--
5121.7.0.2
513
diff --git a/main/linux-grsec/0015-xfrm-cache-bundles-instead-of-policies-for-outgoing-.patch b/main/linux-grsec/0015-xfrm-cache-bundles-instead-of-policies-for-outgoing-.patch
deleted file mode 100644
index 0d066c84d9..0000000000
--- a/main/linux-grsec/0015-xfrm-cache-bundles-instead-of-policies-for-outgoing-.patch
+++ /dev/null
@@ -1,1068 +0,0 @@
1From f89d21648e6dc06db2aeabc8926c270894c41446 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Wed, 7 Apr 2010 00:30:05 +0000
4Subject: [PATCH 15/18] xfrm: cache bundles instead of policies for outgoing flows
5
6__xfrm_lookup() is called for each packet transmitted out of
7system. The xfrm_find_bundle() does a linear search which can
8kill system performance depending on how many bundles are
9required per policy.
10
11This modifies __xfrm_lookup() to store bundles directly in
12the flow cache. If we did not get a hit, we just create a new
13bundle instead of doing slow search. This means that we can now
14get multiple xfrm_dst's for same flow (on per-cpu basis).
15
16Signed-off-by: Timo Teras <timo.teras@iki.fi>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18(backported from commit 80c802f3073e84c956846e921e8a0b02dfa3755f)
19---
20 include/net/xfrm.h | 10 +-
21 net/ipv4/xfrm4_policy.c | 22 --
22 net/ipv6/xfrm6_policy.c | 31 --
23 net/xfrm/xfrm_policy.c | 710 +++++++++++++++++++++++++----------------------
24 4 files changed, 383 insertions(+), 390 deletions(-)
25
26diff --git a/include/net/xfrm.h b/include/net/xfrm.h
27index 6023a48..d51ef61 100644
28--- a/include/net/xfrm.h
29+++ b/include/net/xfrm.h
30@@ -266,7 +266,6 @@ struct xfrm_policy_afinfo {
31 xfrm_address_t *saddr,
32 xfrm_address_t *daddr);
33 int (*get_saddr)(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr);
34- struct dst_entry *(*find_bundle)(struct flowi *fl, struct xfrm_policy *policy);
35 void (*decode_session)(struct sk_buff *skb,
36 struct flowi *fl,
37 int reverse);
38@@ -485,12 +484,12 @@ struct xfrm_policy
39 struct timer_list timer;
40
41 struct flow_cache_object flo;
42+ atomic_t genid;
43 u32 priority;
44 u32 index;
45 struct xfrm_selector selector;
46 struct xfrm_lifetime_cfg lft;
47 struct xfrm_lifetime_cur curlft;
48- struct dst_entry *bundles;
49 struct xfrm_policy_walk_entry walk;
50 u8 type;
51 u8 action;
52@@ -883,11 +882,15 @@ struct xfrm_dst
53 struct rt6_info rt6;
54 } u;
55 struct dst_entry *route;
56+ struct flow_cache_object flo;
57+ struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX];
58+ int num_pols, num_xfrms;
59 #ifdef CONFIG_XFRM_SUB_POLICY
60 struct flowi *origin;
61 struct xfrm_selector *partner;
62 #endif
63- u32 genid;
64+ u32 xfrm_genid;
65+ u32 policy_genid;
66 u32 route_mtu_cached;
67 u32 child_mtu_cached;
68 u32 route_cookie;
69@@ -897,6 +900,7 @@ struct xfrm_dst
70 #ifdef CONFIG_XFRM
71 static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
72 {
73+ xfrm_pols_put(xdst->pols, xdst->num_pols);
74 dst_release(xdst->route);
75 if (likely(xdst->u.dst.xfrm))
76 xfrm_state_put(xdst->u.dst.xfrm);
77diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
78index 7009886..651a3e7 100644
79--- a/net/ipv4/xfrm4_policy.c
80+++ b/net/ipv4/xfrm4_policy.c
81@@ -60,27 +60,6 @@ static int xfrm4_get_saddr(struct net *net,
82 return 0;
83 }
84
85-static struct dst_entry *
86-__xfrm4_find_bundle(struct flowi *fl, struct xfrm_policy *policy)
87-{
88- struct dst_entry *dst;
89-
90- read_lock_bh(&policy->lock);
91- for (dst = policy->bundles; dst; dst = dst->next) {
92- struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
93- if (xdst->u.rt.fl.oif == fl->oif && /*XXX*/
94- xdst->u.rt.fl.fl4_dst == fl->fl4_dst &&
95- xdst->u.rt.fl.fl4_src == fl->fl4_src &&
96- xdst->u.rt.fl.fl4_tos == fl->fl4_tos &&
97- xfrm_bundle_ok(policy, xdst, fl, AF_INET, 0)) {
98- dst_clone(dst);
99- break;
100- }
101- }
102- read_unlock_bh(&policy->lock);
103- return dst;
104-}
105-
106 static int xfrm4_get_tos(struct flowi *fl)
107 {
108 return fl->fl4_tos;
109@@ -258,7 +237,6 @@ static struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
110 .dst_ops = &xfrm4_dst_ops,
111 .dst_lookup = xfrm4_dst_lookup,
112 .get_saddr = xfrm4_get_saddr,
113- .find_bundle = __xfrm4_find_bundle,
114 .decode_session = _decode_session4,
115 .get_tos = xfrm4_get_tos,
116 .init_path = xfrm4_init_path,
117diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
118index 3f89ab7..fb2a5b7 100644
119--- a/net/ipv6/xfrm6_policy.c
120+++ b/net/ipv6/xfrm6_policy.c
121@@ -68,36 +68,6 @@ static int xfrm6_get_saddr(struct net *net,
122 return 0;
123 }
124
125-static struct dst_entry *
126-__xfrm6_find_bundle(struct flowi *fl, struct xfrm_policy *policy)
127-{
128- struct dst_entry *dst;
129-
130- /* Still not clear if we should set fl->fl6_{src,dst}... */
131- read_lock_bh(&policy->lock);
132- for (dst = policy->bundles; dst; dst = dst->next) {
133- struct xfrm_dst *xdst = (struct xfrm_dst*)dst;
134- struct in6_addr fl_dst_prefix, fl_src_prefix;
135-
136- ipv6_addr_prefix(&fl_dst_prefix,
137- &fl->fl6_dst,
138- xdst->u.rt6.rt6i_dst.plen);
139- ipv6_addr_prefix(&fl_src_prefix,
140- &fl->fl6_src,
141- xdst->u.rt6.rt6i_src.plen);
142- if (ipv6_addr_equal(&xdst->u.rt6.rt6i_dst.addr, &fl_dst_prefix) &&
143- ipv6_addr_equal(&xdst->u.rt6.rt6i_src.addr, &fl_src_prefix) &&
144- xfrm_bundle_ok(policy, xdst, fl, AF_INET6,
145- (xdst->u.rt6.rt6i_dst.plen != 128 ||
146- xdst->u.rt6.rt6i_src.plen != 128))) {
147- dst_clone(dst);
148- break;
149- }
150- }
151- read_unlock_bh(&policy->lock);
152- return dst;
153-}
154-
155 static int xfrm6_get_tos(struct flowi *fl)
156 {
157 return 0;
158@@ -290,7 +260,6 @@ static struct xfrm_policy_afinfo xfrm6_policy_afinfo = {
159 .dst_ops = &xfrm6_dst_ops,
160 .dst_lookup = xfrm6_dst_lookup,
161 .get_saddr = xfrm6_get_saddr,
162- .find_bundle = __xfrm6_find_bundle,
163 .decode_session = _decode_session6,
164 .get_tos = xfrm6_get_tos,
165 .init_path = xfrm6_init_path,
166diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
167index d1eb2b5..0379d82 100644
168--- a/net/xfrm/xfrm_policy.c
169+++ b/net/xfrm/xfrm_policy.c
170@@ -37,6 +37,8 @@
171 DEFINE_MUTEX(xfrm_cfg_mutex);
172 EXPORT_SYMBOL(xfrm_cfg_mutex);
173
174+static DEFINE_SPINLOCK(xfrm_policy_sk_bundle_lock);
175+static struct dst_entry *xfrm_policy_sk_bundles;
176 static DEFINE_RWLOCK(xfrm_policy_lock);
177
178 static DEFINE_RWLOCK(xfrm_policy_afinfo_lock);
179@@ -50,6 +52,7 @@ static DEFINE_SPINLOCK(xfrm_policy_gc_lock);
180 static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family);
181 static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo);
182 static void xfrm_init_pmtu(struct dst_entry *dst);
183+static int stale_bundle(struct dst_entry *dst);
184
185 static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
186 int dir);
187@@ -277,8 +280,6 @@ void xfrm_policy_destroy(struct xfrm_policy *policy)
188 {
189 BUG_ON(!policy->walk.dead);
190
191- BUG_ON(policy->bundles);
192-
193 if (del_timer(&policy->timer))
194 BUG();
195
196@@ -289,12 +290,7 @@ EXPORT_SYMBOL(xfrm_policy_destroy);
197
198 static void xfrm_policy_gc_kill(struct xfrm_policy *policy)
199 {
200- struct dst_entry *dst;
201-
202- while ((dst = policy->bundles) != NULL) {
203- policy->bundles = dst->next;
204- dst_free(dst);
205- }
206+ atomic_inc(&policy->genid);
207
208 if (del_timer(&policy->timer))
209 atomic_dec(&policy->refcnt);
210@@ -572,7 +568,6 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
211 struct xfrm_policy *delpol;
212 struct hlist_head *chain;
213 struct hlist_node *entry, *newpos;
214- struct dst_entry *gc_list;
215
216 write_lock_bh(&xfrm_policy_lock);
217 chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
218@@ -620,34 +615,6 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
219 else if (xfrm_bydst_should_resize(net, dir, NULL))
220 schedule_work(&net->xfrm.policy_hash_work);
221
222- read_lock_bh(&xfrm_policy_lock);
223- gc_list = NULL;
224- entry = &policy->bydst;
225- hlist_for_each_entry_continue(policy, entry, bydst) {
226- struct dst_entry *dst;
227-
228- write_lock(&policy->lock);
229- dst = policy->bundles;
230- if (dst) {
231- struct dst_entry *tail = dst;
232- while (tail->next)
233- tail = tail->next;
234- tail->next = gc_list;
235- gc_list = dst;
236-
237- policy->bundles = NULL;
238- }
239- write_unlock(&policy->lock);
240- }
241- read_unlock_bh(&xfrm_policy_lock);
242-
243- while (gc_list) {
244- struct dst_entry *dst = gc_list;
245-
246- gc_list = dst->next;
247- dst_free(dst);
248- }
249-
250 return 0;
251 }
252 EXPORT_SYMBOL(xfrm_policy_insert);
253@@ -990,6 +957,19 @@ fail:
254 return ret;
255 }
256
257+static struct xfrm_policy *
258+__xfrm_policy_lookup(struct net *net, struct flowi *fl, u16 family, u8 dir)
259+{
260+#ifdef CONFIG_XFRM_SUB_POLICY
261+ struct xfrm_policy *pol;
262+
263+ pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_SUB, fl, family, dir);
264+ if (pol != NULL)
265+ return pol;
266+#endif
267+ return xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_MAIN, fl, family, dir);
268+}
269+
270 static struct flow_cache_object *
271 xfrm_policy_lookup(struct net *net, struct flowi *fl, u16 family,
272 u8 dir, struct flow_cache_object *old_obj, void *ctx)
273@@ -999,21 +979,10 @@ xfrm_policy_lookup(struct net *net, struct flowi *fl, u16 family,
274 if (old_obj)
275 xfrm_pol_put(container_of(old_obj, struct xfrm_policy, flo));
276
277-#ifdef CONFIG_XFRM_SUB_POLICY
278- pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_SUB, fl, family, dir);
279- if (IS_ERR(pol))
280+ pol = __xfrm_policy_lookup(net, fl, family, dir);
281+ if (pol == NULL || IS_ERR(pol))
282 return ERR_CAST(pol);
283- if (pol)
284- goto found;
285-#endif
286- pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_MAIN, fl, family, dir);
287- if (IS_ERR(pol))
288- return ERR_CAST(pol);
289- if (pol)
290- goto found;
291- return NULL;
292
293-found:
294 /* Resolver returns two references:
295 * one for cache and one for caller of flow_cache_lookup() */
296 xfrm_pol_hold(pol);
297@@ -1299,18 +1268,6 @@ xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, struct flowi *fl,
298 * still valid.
299 */
300
301-static struct dst_entry *
302-xfrm_find_bundle(struct flowi *fl, struct xfrm_policy *policy, unsigned short family)
303-{
304- struct dst_entry *x;
305- struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family);
306- if (unlikely(afinfo == NULL))
307- return ERR_PTR(-EINVAL);
308- x = afinfo->find_bundle(fl, policy);
309- xfrm_policy_put_afinfo(afinfo);
310- return x;
311-}
312-
313 static inline int xfrm_get_tos(struct flowi *fl, int family)
314 {
315 struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family);
316@@ -1326,6 +1283,54 @@ static inline int xfrm_get_tos(struct flowi *fl, int family)
317 return tos;
318 }
319
320+static struct flow_cache_object *xfrm_bundle_flo_get(struct flow_cache_object *flo)
321+{
322+ struct xfrm_dst *xdst = container_of(flo, struct xfrm_dst, flo);
323+ struct dst_entry *dst = &xdst->u.dst;
324+
325+ if (xdst->route == NULL) {
326+ /* Dummy bundle - if it has xfrms we were not
327+ * able to build bundle as template resolution failed.
328+ * It means we need to try again resolving. */
329+ if (xdst->num_xfrms > 0)
330+ return NULL;
331+ } else {
332+ /* Real bundle */
333+ if (stale_bundle(dst))
334+ return NULL;
335+ }
336+
337+ dst_hold(dst);
338+ return flo;
339+}
340+
341+static int xfrm_bundle_flo_check(struct flow_cache_object *flo)
342+{
343+ struct xfrm_dst *xdst = container_of(flo, struct xfrm_dst, flo);
344+ struct dst_entry *dst = &xdst->u.dst;
345+
346+ if (!xdst->route)
347+ return 0;
348+ if (stale_bundle(dst))
349+ return 0;
350+
351+ return 1;
352+}
353+
354+static void xfrm_bundle_flo_delete(struct flow_cache_object *flo)
355+{
356+ struct xfrm_dst *xdst = container_of(flo, struct xfrm_dst, flo);
357+ struct dst_entry *dst = &xdst->u.dst;
358+
359+ dst_free(dst);
360+}
361+
362+static const struct flow_cache_ops xfrm_bundle_fc_ops = {
363+ .get = xfrm_bundle_flo_get,
364+ .check = xfrm_bundle_flo_check,
365+ .delete = xfrm_bundle_flo_delete,
366+};
367+
368 static inline struct xfrm_dst *xfrm_alloc_dst(int family)
369 {
370 struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family);
371@@ -1338,6 +1343,8 @@ static inline struct xfrm_dst *xfrm_alloc_dst(int family)
372
373 xfrm_policy_put_afinfo(afinfo);
374
375+ xdst->flo.ops = &xfrm_bundle_fc_ops;
376+
377 return xdst;
378 }
379
380@@ -1375,6 +1382,7 @@ static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
381 return err;
382 }
383
384+
385 /* Allocate chain of dst_entry's, attach known xfrm's, calculate
386 * all the metrics... Shortly, bundle a bundle.
387 */
388@@ -1437,7 +1445,7 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
389 dst_hold(dst);
390
391 dst1->xfrm = xfrm[i];
392- xdst->genid = xfrm[i]->genid;
393+ xdst->xfrm_genid = xfrm[i]->genid;
394
395 dst1->obsolete = -1;
396 dst1->flags |= DST_HOST;
397@@ -1530,7 +1538,186 @@ xfrm_dst_update_origin(struct dst_entry *dst, struct flowi *fl)
398 #endif
399 }
400
401-static int stale_bundle(struct dst_entry *dst);
402+static int xfrm_expand_policies(struct flowi *fl, u16 family,
403+ struct xfrm_policy **pols,
404+ int *num_pols, int *num_xfrms)
405+{
406+ int i;
407+
408+ if (*num_pols == 0 || !pols[0]) {
409+ *num_pols = 0;
410+ *num_xfrms = 0;
411+ return 0;
412+ }
413+ if (IS_ERR(pols[0]))
414+ return PTR_ERR(pols[0]);
415+
416+ *num_xfrms = pols[0]->xfrm_nr;
417+
418+#ifdef CONFIG_XFRM_SUB_POLICY
419+ if (pols[0] && pols[0]->action == XFRM_POLICY_ALLOW &&
420+ pols[0]->type != XFRM_POLICY_TYPE_MAIN) {
421+ pols[1] = xfrm_policy_lookup_bytype(xp_net(pols[0]),
422+ XFRM_POLICY_TYPE_MAIN,
423+ fl, family,
424+ XFRM_POLICY_OUT);
425+ if (pols[1]) {
426+ if (IS_ERR(pols[1])) {
427+ xfrm_pols_put(pols, *num_pols);
428+ return PTR_ERR(pols[1]);
429+ }
430+ (*num_pols) ++;
431+ (*num_xfrms) += pols[1]->xfrm_nr;
432+ }
433+ }
434+#endif
435+ for (i = 0; i < *num_pols; i++) {
436+ if (pols[i]->action != XFRM_POLICY_ALLOW) {
437+ *num_xfrms = -1;
438+ break;
439+ }
440+ }
441+
442+ return 0;
443+
444+}
445+
446+static struct xfrm_dst *
447+xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
448+ struct flowi *fl, u16 family,
449+ struct dst_entry *dst_orig)
450+{
451+ struct net *net = xp_net(pols[0]);
452+ struct xfrm_state *xfrm[XFRM_MAX_DEPTH];
453+ struct dst_entry *dst;
454+ struct xfrm_dst *xdst;
455+ int err;
456+
457+ /* Try to instantiate a bundle */
458+ err = xfrm_tmpl_resolve(pols, num_pols, fl, xfrm, family);
459+ if (err < 0) {
460+ if (err != -EAGAIN)
461+ XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLERROR);
462+ return ERR_PTR(err);
463+ }
464+
465+ dst = xfrm_bundle_create(pols[0], xfrm, err, fl, dst_orig);
466+ if (IS_ERR(dst)) {
467+ XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTBUNDLEGENERROR);
468+ return ERR_CAST(dst);
469+ }
470+
471+ xdst = (struct xfrm_dst *)dst;
472+ xdst->num_xfrms = err;
473+ if (num_pols > 1)
474+ err = xfrm_dst_update_parent(dst, &pols[1]->selector);
475+ else
476+ err = xfrm_dst_update_origin(dst, fl);
477+ if (unlikely(err)) {
478+ dst_free(dst);
479+ XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTBUNDLECHECKERROR);
480+ return ERR_PTR(err);
481+ }
482+
483+ xdst->num_pols = num_pols;
484+ memcpy(xdst->pols, pols, sizeof(struct xfrm_policy*) * num_pols);
485+ xdst->policy_genid = atomic_read(&pols[0]->genid);
486+
487+ return xdst;
488+}
489+
490+static struct flow_cache_object *
491+xfrm_bundle_lookup(struct net *net, struct flowi *fl, u16 family, u8 dir,
492+ struct flow_cache_object *oldflo, void *ctx)
493+{
494+ struct dst_entry *dst_orig = (struct dst_entry *)ctx;
495+ struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX];
496+ struct xfrm_dst *xdst, *new_xdst;
497+ int num_pols = 0, num_xfrms = 0, i, err, pol_dead;
498+
499+ /* Check if the policies from old bundle are usable */
500+ xdst = NULL;
501+ if (oldflo) {
502+ xdst = container_of(oldflo, struct xfrm_dst, flo);
503+ num_pols = xdst->num_pols;
504+ num_xfrms = xdst->num_xfrms;
505+ pol_dead = 0;
506+ for (i = 0; i < num_pols; i++) {
507+ pols[i] = xdst->pols[i];
508+ pol_dead |= pols[i]->walk.dead;
509+ }
510+ if (pol_dead) {
511+ dst_free(&xdst->u.dst);
512+ xdst = NULL;
513+ num_pols = 0;
514+ num_xfrms = 0;
515+ oldflo = NULL;
516+ }
517+ }
518+
519+ /* Resolve policies to use if we couldn't get them from
520+ * previous cache entry */
521+ if (xdst == NULL) {
522+ num_pols = 1;
523+ pols[0] = __xfrm_policy_lookup(net, fl, family, dir);
524+ err = xfrm_expand_policies(fl, family, pols,
525+ &num_pols, &num_xfrms);
526+ if (err < 0)
527+ goto inc_error;
528+ if (num_pols == 0)
529+ return NULL;
530+ if (num_xfrms <= 0)
531+ goto make_dummy_bundle;
532+ }
533+
534+ new_xdst = xfrm_resolve_and_create_bundle(pols, num_pols, fl, family, dst_orig);
535+ if (IS_ERR(new_xdst)) {
536+ err = PTR_ERR(new_xdst);
537+ if (err != -EAGAIN)
538+ goto error;
539+ if (oldflo == NULL)
540+ goto make_dummy_bundle;
541+ dst_hold(&xdst->u.dst);
542+ return oldflo;
543+ }
544+
545+ /* Kill the previous bundle */
546+ if (xdst) {
547+ /* The policies were stolen for newly generated bundle */
548+ xdst->num_pols = 0;
549+ dst_free(&xdst->u.dst);
550+ }
551+
552+ /* Flow cache does not have reference, it dst_free()'s,
553+ * but we do need to return one reference for original caller */
554+ dst_hold(&new_xdst->u.dst);
555+ return &new_xdst->flo;
556+
557+make_dummy_bundle:
558+ /* We found policies, but there's no bundles to instantiate:
559+ * either because the policy blocks, has no transformations or
560+ * we could not build template (no xfrm_states).*/
561+ xdst = xfrm_alloc_dst(family);
562+ if (IS_ERR(xdst)) {
563+ xfrm_pols_put(pols, num_pols);
564+ return ERR_CAST(xdst);
565+ }
566+ xdst->num_pols = num_pols;
567+ xdst->num_xfrms = num_xfrms;
568+ memcpy(xdst->pols, pols, sizeof(struct xfrm_policy*) * num_pols);
569+
570+ dst_hold(&xdst->u.dst);
571+ return &xdst->flo;
572+
573+inc_error:
574+ XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLERROR);
575+error:
576+ if (xdst != NULL)
577+ dst_free(&xdst->u.dst);
578+ else
579+ xfrm_pols_put(pols, num_pols);
580+ return ERR_PTR(err);
581+}
582
583 /* Main function: finds/creates a bundle for given flow.
584 *
585@@ -1540,248 +1727,152 @@ static int stale_bundle(struct dst_entry *dst);
586 int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl,
587 struct sock *sk, int flags)
588 {
589- struct xfrm_policy *policy;
590 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX];
591- int npols;
592- int pol_dead;
593- int xfrm_nr;
594- int pi;
595- struct xfrm_state *xfrm[XFRM_MAX_DEPTH];
596- struct dst_entry *dst, *dst_orig = *dst_p;
597- int nx = 0;
598- int err;
599- u32 genid;
600- u16 family;
601+ struct flow_cache_object *flo;
602+ struct xfrm_dst *xdst;
603+ struct dst_entry *dst, *dst_orig = *dst_p, *route;
604+ u16 family = dst_orig->ops->family;
605 u8 dir = policy_to_flow_dir(XFRM_POLICY_OUT);
606+ int i, err, num_pols, num_xfrms, drop_pols = 0;
607
608 restart:
609- genid = atomic_read(&flow_cache_genid);
610- policy = NULL;
611- for (pi = 0; pi < ARRAY_SIZE(pols); pi++)
612- pols[pi] = NULL;
613- npols = 0;
614- pol_dead = 0;
615- xfrm_nr = 0;
616+ dst = NULL;
617+ xdst = NULL;
618+ route = NULL;
619
620 if (sk && sk->sk_policy[XFRM_POLICY_OUT]) {
621- policy = xfrm_sk_policy_lookup(sk, XFRM_POLICY_OUT, fl);
622- err = PTR_ERR(policy);
623- if (IS_ERR(policy)) {
624- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLERROR);
625+ num_pols = 1;
626+ pols[0] = xfrm_sk_policy_lookup(sk, XFRM_POLICY_OUT, fl);
627+ err = xfrm_expand_policies(fl, family, pols,
628+ &num_pols, &num_xfrms);
629+ if (err < 0)
630 goto dropdst;
631+
632+ if (num_pols) {
633+ if (num_xfrms <= 0) {
634+ drop_pols = num_pols;
635+ goto no_transform;
636+ }
637+
638+ xdst = xfrm_resolve_and_create_bundle(
639+ pols, num_pols, fl,
640+ family, dst_orig);
641+ if (IS_ERR(xdst)) {
642+ xfrm_pols_put(pols, num_pols);
643+ err = PTR_ERR(xdst);
644+ goto dropdst;
645+ }
646+
647+ spin_lock_bh(&xfrm_policy_sk_bundle_lock);
648+ xdst->u.dst.next = xfrm_policy_sk_bundles;
649+ xfrm_policy_sk_bundles = &xdst->u.dst;
650+ spin_unlock_bh(&xfrm_policy_sk_bundle_lock);
651+
652+ route = xdst->route;
653 }
654 }
655
656- if (!policy) {
657- struct flow_cache_object *flo;
658-
659+ if (xdst == NULL) {
660 /* To accelerate a bit... */
661 if ((dst_orig->flags & DST_NOXFRM) ||
662 !net->xfrm.policy_count[XFRM_POLICY_OUT])
663 goto nopol;
664
665- flo = flow_cache_lookup(net, fl, dst_orig->ops->family,
666- dir, xfrm_policy_lookup, NULL);
667- err = PTR_ERR(flo);
668+ flo = flow_cache_lookup(net, fl, family, dir,
669+ xfrm_bundle_lookup, dst_orig);
670+ if (flo == NULL)
671+ goto nopol;
672 if (IS_ERR(flo)) {
673- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLERROR);
674+ err = PTR_ERR(flo);
675 goto dropdst;
676 }
677- if (flo)
678- policy = container_of(flo, struct xfrm_policy, flo);
679- else
680- policy = NULL;
681+ xdst = container_of(flo, struct xfrm_dst, flo);
682+
683+ num_pols = xdst->num_pols;
684+ num_xfrms = xdst->num_xfrms;
685+ memcpy(pols, xdst->pols, sizeof(struct xfrm_policy*) * num_pols);
686+ route = xdst->route;
687+ }
688+
689+ dst = &xdst->u.dst;
690+ if (route == NULL && num_xfrms > 0) {
691+ /* The only case when xfrm_bundle_lookup() returns a
692+ * bundle with null route, is when the template could
693+ * not be resolved. It means policies are there, but
694+ * bundle could not be created, since we don't yet
695+ * have the xfrm_state's. We need to wait for KM to
696+ * negotiate new SA's or bail out with error.*/
697+ if (net->xfrm.sysctl_larval_drop) {
698+ /* EREMOTE tells the caller to generate
699+ * a one-shot blackhole route. */
700+ dst_release(dst);
701+ xfrm_pols_put(pols, num_pols);
702+ XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTNOSTATES);
703+ return -EREMOTE;
704+ }
705+ if (flags & XFRM_LOOKUP_WAIT) {
706+ DECLARE_WAITQUEUE(wait, current);
707+
708+ add_wait_queue(&net->xfrm.km_waitq, &wait);
709+ set_current_state(TASK_INTERRUPTIBLE);
710+ schedule();
711+ set_current_state(TASK_RUNNING);
712+ remove_wait_queue(&net->xfrm.km_waitq, &wait);
713+
714+ if (!signal_pending(current)) {
715+ dst_release(dst);
716+ goto restart;
717+ }
718+
719+ err = -ERESTART;
720+ } else
721+ err = -EAGAIN;
722+
723+ XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTNOSTATES);
724+ goto error;
725 }
726
727- if (!policy)
728+no_transform:
729+ if (num_pols == 0)
730 goto nopol;
731
732- family = dst_orig->ops->family;
733- pols[0] = policy;
734- npols ++;
735- xfrm_nr += pols[0]->xfrm_nr;
736-
737- err = -ENOENT;
738- if ((flags & XFRM_LOOKUP_ICMP) && !(policy->flags & XFRM_POLICY_ICMP))
739+ if ((flags & XFRM_LOOKUP_ICMP) &&
740+ !(pols[0]->flags & XFRM_POLICY_ICMP)) {
741+ err = -ENOENT;
742 goto error;
743+ }
744
745- policy->curlft.use_time = get_seconds();
746+ for (i = 0; i < num_pols; i++)
747+ pols[i]->curlft.use_time = get_seconds();
748
749- switch (policy->action) {
750- default:
751- case XFRM_POLICY_BLOCK:
752+ if (num_xfrms < 0) {
753 /* Prohibit the flow */
754 XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLBLOCK);
755 err = -EPERM;
756 goto error;
757-
758- case XFRM_POLICY_ALLOW:
759-#ifndef CONFIG_XFRM_SUB_POLICY
760- if (policy->xfrm_nr == 0) {
761- /* Flow passes not transformed. */
762- xfrm_pol_put(policy);
763- return 0;
764- }
765-#endif
766-
767- /* Try to find matching bundle.
768- *
769- * LATER: help from flow cache. It is optional, this
770- * is required only for output policy.
771- */
772- dst = xfrm_find_bundle(fl, policy, family);
773- if (IS_ERR(dst)) {
774- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTBUNDLECHECKERROR);
775- err = PTR_ERR(dst);
776- goto error;
777- }
778-
779- if (dst)
780- break;
781-
782-#ifdef CONFIG_XFRM_SUB_POLICY
783- if (pols[0]->type != XFRM_POLICY_TYPE_MAIN) {
784- pols[1] = xfrm_policy_lookup_bytype(net,
785- XFRM_POLICY_TYPE_MAIN,
786- fl, family,
787- XFRM_POLICY_OUT);
788- if (pols[1]) {
789- if (IS_ERR(pols[1])) {
790- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLERROR);
791- err = PTR_ERR(pols[1]);
792- goto error;
793- }
794- if (pols[1]->action == XFRM_POLICY_BLOCK) {
795- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLBLOCK);
796- err = -EPERM;
797- goto error;
798- }
799- npols ++;
800- xfrm_nr += pols[1]->xfrm_nr;
801- }
802- }
803-
804- /*
805- * Because neither flowi nor bundle information knows about
806- * transformation template size. On more than one policy usage
807- * we can realize whether all of them is bypass or not after
808- * they are searched. See above not-transformed bypass
809- * is surrounded by non-sub policy configuration, too.
810- */
811- if (xfrm_nr == 0) {
812- /* Flow passes not transformed. */
813- xfrm_pols_put(pols, npols);
814- return 0;
815- }
816-
817-#endif
818- nx = xfrm_tmpl_resolve(pols, npols, fl, xfrm, family);
819-
820- if (unlikely(nx<0)) {
821- err = nx;
822- if (err == -EAGAIN && net->xfrm.sysctl_larval_drop) {
823- /* EREMOTE tells the caller to generate
824- * a one-shot blackhole route.
825- */
826- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTNOSTATES);
827- xfrm_pol_put(policy);
828- return -EREMOTE;
829- }
830- if (err == -EAGAIN && (flags & XFRM_LOOKUP_WAIT)) {
831- DECLARE_WAITQUEUE(wait, current);
832-
833- add_wait_queue(&net->xfrm.km_waitq, &wait);
834- set_current_state(TASK_INTERRUPTIBLE);
835- schedule();
836- set_current_state(TASK_RUNNING);
837- remove_wait_queue(&net->xfrm.km_waitq, &wait);
838-
839- nx = xfrm_tmpl_resolve(pols, npols, fl, xfrm, family);
840-
841- if (nx == -EAGAIN && signal_pending(current)) {
842- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTNOSTATES);
843- err = -ERESTART;
844- goto error;
845- }
846- if (nx == -EAGAIN ||
847- genid != atomic_read(&flow_cache_genid)) {
848- xfrm_pols_put(pols, npols);
849- goto restart;
850- }
851- err = nx;
852- }
853- if (err < 0) {
854- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTNOSTATES);
855- goto error;
856- }
857- }
858- if (nx == 0) {
859- /* Flow passes not transformed. */
860- xfrm_pols_put(pols, npols);
861- return 0;
862- }
863-
864- dst = xfrm_bundle_create(policy, xfrm, nx, fl, dst_orig);
865- err = PTR_ERR(dst);
866- if (IS_ERR(dst)) {
867- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTBUNDLEGENERROR);
868- goto error;
869- }
870-
871- for (pi = 0; pi < npols; pi++)
872- pol_dead |= pols[pi]->walk.dead;
873-
874- write_lock_bh(&policy->lock);
875- if (unlikely(pol_dead || stale_bundle(dst))) {
876- /* Wow! While we worked on resolving, this
877- * policy has gone. Retry. It is not paranoia,
878- * we just cannot enlist new bundle to dead object.
879- * We can't enlist stable bundles either.
880- */
881- write_unlock_bh(&policy->lock);
882- dst_free(dst);
883-
884- if (pol_dead)
885- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLDEAD);
886- else
887- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTBUNDLECHECKERROR);
888- err = -EHOSTUNREACH;
889- goto error;
890- }
891-
892- if (npols > 1)
893- err = xfrm_dst_update_parent(dst, &pols[1]->selector);
894- else
895- err = xfrm_dst_update_origin(dst, fl);
896- if (unlikely(err)) {
897- write_unlock_bh(&policy->lock);
898- dst_free(dst);
899- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTBUNDLECHECKERROR);
900- goto error;
901- }
902-
903- dst->next = policy->bundles;
904- policy->bundles = dst;
905- dst_hold(dst);
906- write_unlock_bh(&policy->lock);
907+ } else if (num_xfrms > 0) {
908+ /* Flow transformed */
909+ *dst_p = dst;
910+ dst_release(dst_orig);
911+ } else {
912+ /* Flow passes untransformed */
913+ dst_release(dst);
914 }
915- *dst_p = dst;
916- dst_release(dst_orig);
917- xfrm_pols_put(pols, npols);
918+ok:
919+ xfrm_pols_put(pols, drop_pols);
920 return 0;
921
922+nopol:
923+ if (!(flags & XFRM_LOOKUP_ICMP))
924+ goto ok;
925+ err = -ENOENT;
926 error:
927- xfrm_pols_put(pols, npols);
928+ dst_release(dst);
929 dropdst:
930 dst_release(dst_orig);
931 *dst_p = NULL;
932+ xfrm_pols_put(pols, drop_pols);
933 return err;
934-
935-nopol:
936- err = -ENOENT;
937- if (flags & XFRM_LOOKUP_ICMP)
938- goto dropdst;
939- return 0;
940 }
941 EXPORT_SYMBOL(__xfrm_lookup);
942
943@@ -2134,71 +2225,24 @@ static struct dst_entry *xfrm_negative_advice(struct dst_entry *dst)
944 return dst;
945 }
946
947-static void prune_one_bundle(struct xfrm_policy *pol, int (*func)(struct dst_entry *), struct dst_entry **gc_list_p)
948-{
949- struct dst_entry *dst, **dstp;
950-
951- write_lock(&pol->lock);
952- dstp = &pol->bundles;
953- while ((dst=*dstp) != NULL) {
954- if (func(dst)) {
955- *dstp = dst->next;
956- dst->next = *gc_list_p;
957- *gc_list_p = dst;
958- } else {
959- dstp = &dst->next;
960- }
961- }
962- write_unlock(&pol->lock);
963-}
964-
965-static void xfrm_prune_bundles(struct net *net, int (*func)(struct dst_entry *))
966+static void __xfrm_garbage_collect(struct net *net)
967 {
968- struct dst_entry *gc_list = NULL;
969- int dir;
970+ struct dst_entry *head, *next;
971
972- read_lock_bh(&xfrm_policy_lock);
973- for (dir = 0; dir < XFRM_POLICY_MAX * 2; dir++) {
974- struct xfrm_policy *pol;
975- struct hlist_node *entry;
976- struct hlist_head *table;
977- int i;
978+ flow_cache_flush();
979
980- hlist_for_each_entry(pol, entry,
981- &net->xfrm.policy_inexact[dir], bydst)
982- prune_one_bundle(pol, func, &gc_list);
983+ spin_lock_bh(&xfrm_policy_sk_bundle_lock);
984+ head = xfrm_policy_sk_bundles;
985+ xfrm_policy_sk_bundles = NULL;
986+ spin_unlock_bh(&xfrm_policy_sk_bundle_lock);
987
988- table = net->xfrm.policy_bydst[dir].table;
989- for (i = net->xfrm.policy_bydst[dir].hmask; i >= 0; i--) {
990- hlist_for_each_entry(pol, entry, table + i, bydst)
991- prune_one_bundle(pol, func, &gc_list);
992- }
993- }
994- read_unlock_bh(&xfrm_policy_lock);
995-
996- while (gc_list) {
997- struct dst_entry *dst = gc_list;
998- gc_list = dst->next;
999- dst_free(dst);
1000+ while (head) {
1001+ next = head->next;
1002+ dst_free(head);
1003+ head = next;
1004 }
1005 }
1006
1007-static int unused_bundle(struct dst_entry *dst)
1008-{
1009- return !atomic_read(&dst->__refcnt);
1010-}
1011-
1012-static void __xfrm_garbage_collect(struct net *net)
1013-{
1014- xfrm_prune_bundles(net, unused_bundle);
1015-}
1016-
1017-static int xfrm_flush_bundles(struct net *net)
1018-{
1019- xfrm_prune_bundles(net, stale_bundle);
1020- return 0;
1021-}
1022-
1023 static void xfrm_init_pmtu(struct dst_entry *dst)
1024 {
1025 do {
1026@@ -2256,7 +2300,9 @@ int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first,
1027 return 0;
1028 if (dst->xfrm->km.state != XFRM_STATE_VALID)
1029 return 0;
1030- if (xdst->genid != dst->xfrm->genid)
1031+ if (xdst->xfrm_genid != dst->xfrm->genid)
1032+ return 0;
1033+ if (xdst->policy_genid != atomic_read(&xdst->pols[0]->genid))
1034 return 0;
1035
1036 if (strict && fl &&
1037@@ -2383,7 +2429,7 @@ static int xfrm_dev_event(struct notifier_block *this, unsigned long event, void
1038
1039 switch (event) {
1040 case NETDEV_DOWN:
1041- xfrm_flush_bundles(dev_net(dev));
1042+ __xfrm_garbage_collect(dev_net(dev));
1043 }
1044 return NOTIFY_DONE;
1045 }
1046@@ -2714,7 +2760,6 @@ static int xfrm_policy_migrate(struct xfrm_policy *pol,
1047 struct xfrm_migrate *m, int num_migrate)
1048 {
1049 struct xfrm_migrate *mp;
1050- struct dst_entry *dst;
1051 int i, j, n = 0;
1052
1053 write_lock_bh(&pol->lock);
1054@@ -2739,10 +2784,7 @@ static int xfrm_policy_migrate(struct xfrm_policy *pol,
1055 sizeof(pol->xfrm_vec[i].saddr));
1056 pol->xfrm_vec[i].encap_family = mp->new_family;
1057 /* flush bundles */
1058- while ((dst = pol->bundles) != NULL) {
1059- pol->bundles = dst->next;
1060- dst_free(dst);
1061- }
1062+ atomic_inc(&pol->genid);
1063 }
1064 }
1065
1066--
10671.7.0.2
1068
diff --git a/main/linux-grsec/0016-xfrm-remove-policy-garbage-collection.patch b/main/linux-grsec/0016-xfrm-remove-policy-garbage-collection.patch
deleted file mode 100644
index 4a45c7f40d..0000000000
--- a/main/linux-grsec/0016-xfrm-remove-policy-garbage-collection.patch
+++ /dev/null
@@ -1,91 +0,0 @@
1From 4c53c9239069f48ec9a86f8e596c163b72e8bc4d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Wed, 7 Apr 2010 00:30:06 +0000
4Subject: [PATCH 16/18] xfrm: remove policy garbage collection
5
6Policies are now properly reference counted and destroyed from
7all code paths. The delayed gc is just an overhead now and can
8be removed.
9
10Signed-off-by: Timo Teras <timo.teras@iki.fi>
11Signed-off-by: David S. Miller <davem@davemloft.net>
12(cherry picked from commit 285ead175c5dd5075cab5b6c94f35a3e6c0a3ae6)
13---
14 net/xfrm/xfrm_policy.c | 39 +++++----------------------------------
15 1 files changed, 5 insertions(+), 34 deletions(-)
16
17diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
18index 0379d82..5606841 100644
19--- a/net/xfrm/xfrm_policy.c
20+++ b/net/xfrm/xfrm_policy.c
21@@ -46,9 +46,6 @@ static struct xfrm_policy_afinfo *xfrm_policy_afinfo[NPROTO];
22
23 static struct kmem_cache *xfrm_dst_cache __read_mostly;
24
25-static HLIST_HEAD(xfrm_policy_gc_list);
26-static DEFINE_SPINLOCK(xfrm_policy_gc_lock);
27-
28 static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family);
29 static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo);
30 static void xfrm_init_pmtu(struct dst_entry *dst);
31@@ -288,32 +285,6 @@ void xfrm_policy_destroy(struct xfrm_policy *policy)
32 }
33 EXPORT_SYMBOL(xfrm_policy_destroy);
34
35-static void xfrm_policy_gc_kill(struct xfrm_policy *policy)
36-{
37- atomic_inc(&policy->genid);
38-
39- if (del_timer(&policy->timer))
40- atomic_dec(&policy->refcnt);
41-
42- xfrm_pol_put(policy);
43-}
44-
45-static void xfrm_policy_gc_task(struct work_struct *work)
46-{
47- struct xfrm_policy *policy;
48- struct hlist_node *entry, *tmp;
49- struct hlist_head gc_list;
50-
51- spin_lock_bh(&xfrm_policy_gc_lock);
52- gc_list.first = xfrm_policy_gc_list.first;
53- INIT_HLIST_HEAD(&xfrm_policy_gc_list);
54- spin_unlock_bh(&xfrm_policy_gc_lock);
55-
56- hlist_for_each_entry_safe(policy, entry, tmp, &gc_list, bydst)
57- xfrm_policy_gc_kill(policy);
58-}
59-static DECLARE_WORK(xfrm_policy_gc_work, xfrm_policy_gc_task);
60-
61 /* Rule must be locked. Release descentant resources, announce
62 * entry dead. The rule must be unlinked from lists to the moment.
63 */
64@@ -322,11 +293,12 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
65 {
66 policy->walk.dead = 1;
67
68- spin_lock_bh(&xfrm_policy_gc_lock);
69- hlist_add_head(&policy->bydst, &xfrm_policy_gc_list);
70- spin_unlock_bh(&xfrm_policy_gc_lock);
71+ atomic_inc(&policy->genid);
72
73- schedule_work(&xfrm_policy_gc_work);
74+ if (del_timer(&policy->timer))
75+ xfrm_pol_put(policy);
76+
77+ xfrm_pol_put(policy);
78 }
79
80 static unsigned int xfrm_policy_hashmax __read_mostly = 1 * 1024 * 1024;
81@@ -2535,7 +2507,6 @@ static void xfrm_policy_fini(struct net *net)
82 audit_info.sessionid = -1;
83 audit_info.secid = 0;
84 xfrm_policy_flush(net, XFRM_POLICY_TYPE_MAIN, &audit_info);
85- flush_work(&xfrm_policy_gc_work);
86
87 WARN_ON(!list_empty(&net->xfrm.policy_all));
88
89--
901.7.0.2
91
diff --git a/main/linux-grsec/0017-flow-delayed-deletion-of-flow-cache-entries.patch b/main/linux-grsec/0017-flow-delayed-deletion-of-flow-cache-entries.patch
deleted file mode 100644
index 7d17d41aed..0000000000
--- a/main/linux-grsec/0017-flow-delayed-deletion-of-flow-cache-entries.patch
+++ /dev/null
@@ -1,231 +0,0 @@
1From fede05e99e2d860e97bc877b8b77fb9e63f55cc8 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Wed, 7 Apr 2010 00:30:07 +0000
4Subject: [PATCH 17/18] flow: delayed deletion of flow cache entries
5
6Speed up lookups by freeing flow cache entries later. After
7virtualizing flow cache entry operations, the flow cache may now
8end up calling policy or bundle destructor which can be slowish.
9
10As gc_list is more effective with double linked list, the flow cache
11is converted to use common hlist and list macroes where appropriate.
12
13Signed-off-by: Timo Teras <timo.teras@iki.fi>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15(cherry picked from commit 8e4795605d1e1b39113818ad7c147b8a867a1f6a)
16---
17 net/core/flow.c | 100 ++++++++++++++++++++++++++++++++++++++-----------------
18 1 files changed, 69 insertions(+), 31 deletions(-)
19
20diff --git a/net/core/flow.c b/net/core/flow.c
21index 521df52..1619006 100644
22--- a/net/core/flow.c
23+++ b/net/core/flow.c
24@@ -26,7 +26,10 @@
25 #include <linux/security.h>
26
27 struct flow_cache_entry {
28- struct flow_cache_entry *next;
29+ union {
30+ struct hlist_node hlist;
31+ struct list_head gc_list;
32+ } u;
33 u16 family;
34 u8 dir;
35 u32 genid;
36@@ -35,7 +38,7 @@ struct flow_cache_entry {
37 };
38
39 struct flow_cache_percpu {
40- struct flow_cache_entry **hash_table;
41+ struct hlist_head *hash_table;
42 int hash_count;
43 u32 hash_rnd;
44 int hash_rnd_recalc;
45@@ -62,6 +65,9 @@ atomic_t flow_cache_genid = ATOMIC_INIT(0);
46 static struct flow_cache flow_cache_global;
47 static struct kmem_cache *flow_cachep;
48
49+static DEFINE_SPINLOCK(flow_cache_gc_lock);
50+static LIST_HEAD(flow_cache_gc_list);
51+
52 #define flow_cache_hash_size(cache) (1 << (cache)->hash_shift)
53 #define FLOW_HASH_RND_PERIOD (10 * 60 * HZ)
54
55@@ -86,38 +92,66 @@ static int flow_entry_valid(struct flow_cache_entry *fle)
56 return 1;
57 }
58
59-static void flow_entry_kill(struct flow_cache *fc,
60- struct flow_cache_percpu *fcp,
61- struct flow_cache_entry *fle)
62+static void flow_entry_kill(struct flow_cache_entry *fle)
63 {
64 if (fle->object)
65 fle->object->ops->delete(fle->object);
66 kmem_cache_free(flow_cachep, fle);
67- fcp->hash_count--;
68+}
69+
70+static void flow_cache_gc_task(struct work_struct *work)
71+{
72+ struct list_head gc_list;
73+ struct flow_cache_entry *fce, *n;
74+
75+ INIT_LIST_HEAD(&gc_list);
76+ spin_lock_bh(&flow_cache_gc_lock);
77+ list_splice_tail_init(&flow_cache_gc_list, &gc_list);
78+ spin_unlock_bh(&flow_cache_gc_lock);
79+
80+ list_for_each_entry_safe(fce, n, &gc_list, u.gc_list)
81+ flow_entry_kill(fce);
82+}
83+static DECLARE_WORK(flow_cache_gc_work, flow_cache_gc_task);
84+
85+static void flow_cache_queue_garbage(struct flow_cache_percpu *fcp,
86+ int deleted, struct list_head *gc_list)
87+{
88+ if (deleted) {
89+ fcp->hash_count -= deleted;
90+ spin_lock_bh(&flow_cache_gc_lock);
91+ list_splice_tail(gc_list, &flow_cache_gc_list);
92+ spin_unlock_bh(&flow_cache_gc_lock);
93+ schedule_work(&flow_cache_gc_work);
94+ }
95 }
96
97 static void __flow_cache_shrink(struct flow_cache *fc,
98 struct flow_cache_percpu *fcp,
99 int shrink_to)
100 {
101- struct flow_cache_entry *fle, **flp;
102- int i;
103+ struct flow_cache_entry *fle;
104+ struct hlist_node *entry, *tmp;
105+ LIST_HEAD(gc_list);
106+ int i, deleted = 0;
107
108 for (i = 0; i < flow_cache_hash_size(fc); i++) {
109 int saved = 0;
110
111- flp = &fcp->hash_table[i];
112- while ((fle = *flp) != NULL) {
113+ hlist_for_each_entry_safe(fle, entry, tmp,
114+ &fcp->hash_table[i], u.hlist) {
115 if (saved < shrink_to &&
116 flow_entry_valid(fle)) {
117 saved++;
118- flp = &fle->next;
119 } else {
120- *flp = fle->next;
121- flow_entry_kill(fc, fcp, fle);
122+ deleted++;
123+ hlist_del(&fle->u.hlist);
124+ list_add_tail(&fle->u.gc_list, &gc_list);
125 }
126 }
127 }
128+
129+ flow_cache_queue_garbage(fcp, deleted, &gc_list);
130 }
131
132 static void flow_cache_shrink(struct flow_cache *fc,
133@@ -182,7 +216,8 @@ flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
134 {
135 struct flow_cache *fc = &flow_cache_global;
136 struct flow_cache_percpu *fcp;
137- struct flow_cache_entry *fle, **head;
138+ struct flow_cache_entry *fle, *tfle;
139+ struct hlist_node *entry;
140 struct flow_cache_object *flo;
141 unsigned int hash;
142
143@@ -200,12 +235,13 @@ flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
144 flow_new_hash_rnd(fc, fcp);
145
146 hash = flow_hash_code(fc, fcp, key);
147- head = &fcp->hash_table[hash];
148- for (fle = *head; fle; fle = fle->next) {
149- if (fle->family == family &&
150- fle->dir == dir &&
151- flow_key_compare(key, &fle->key) == 0)
152+ hlist_for_each_entry(tfle, entry, &fcp->hash_table[hash], u.hlist) {
153+ if (tfle->family == family &&
154+ tfle->dir == dir &&
155+ flow_key_compare(key, &tfle->key) == 0) {
156+ fle = tfle;
157 break;
158+ }
159 }
160
161 if (unlikely(!fle)) {
162@@ -214,12 +250,11 @@ flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
163
164 fle = kmem_cache_alloc(flow_cachep, GFP_ATOMIC);
165 if (fle) {
166- fle->next = *head;
167- *head = fle;
168 fle->family = family;
169 fle->dir = dir;
170 memcpy(&fle->key, key, sizeof(*key));
171 fle->object = NULL;
172+ hlist_add_head(&fle->u.hlist, &fcp->hash_table[hash]);
173 fcp->hash_count++;
174 }
175 } else if (likely(fle->genid == atomic_read(&flow_cache_genid))) {
176@@ -262,23 +297,26 @@ static void flow_cache_flush_tasklet(unsigned long data)
177 struct flow_flush_info *info = (void *)data;
178 struct flow_cache *fc = info->cache;
179 struct flow_cache_percpu *fcp;
180- int i;
181+ struct flow_cache_entry *fle;
182+ struct hlist_node *entry, *tmp;
183+ LIST_HEAD(gc_list);
184+ int i, deleted = 0;
185
186 fcp = per_cpu_ptr(fc->percpu, smp_processor_id());
187 for (i = 0; i < flow_cache_hash_size(fc); i++) {
188- struct flow_cache_entry *fle;
189-
190- fle = fcp->hash_table[i];
191- for (; fle; fle = fle->next) {
192+ hlist_for_each_entry_safe(fle, entry, tmp,
193+ &fcp->hash_table[i], u.hlist) {
194 if (flow_entry_valid(fle))
195 continue;
196
197- if (fle->object)
198- fle->object->ops->delete(fle->object);
199- fle->object = NULL;
200+ deleted++;
201+ hlist_del(&fle->u.hlist);
202+ list_add_tail(&fle->u.gc_list, &gc_list);
203 }
204 }
205
206+ flow_cache_queue_garbage(fcp, deleted, &gc_list);
207+
208 if (atomic_dec_and_test(&info->cpuleft))
209 complete(&info->completion);
210 }
211@@ -320,7 +358,7 @@ void flow_cache_flush(void)
212 static void __init flow_cache_cpu_prepare(struct flow_cache *fc,
213 struct flow_cache_percpu *fcp)
214 {
215- fcp->hash_table = (struct flow_cache_entry **)
216+ fcp->hash_table = (struct hlist_head *)
217 __get_free_pages(GFP_KERNEL|__GFP_ZERO, fc->order);
218 if (!fcp->hash_table)
219 panic("NET: failed to allocate flow cache order %lu\n", fc->order);
220@@ -354,7 +392,7 @@ static int flow_cache_init(struct flow_cache *fc)
221
222 for (order = 0;
223 (PAGE_SIZE << order) <
224- (sizeof(struct flow_cache_entry *)*flow_cache_hash_size(fc));
225+ (sizeof(struct hlist_head)*flow_cache_hash_size(fc));
226 order++)
227 /* NOTHING */;
228 fc->order = order;
229--
2301.7.0.2
231
diff --git a/main/linux-grsec/0018-xfrm-Fix-crashes-in-xfrm_lookup.patch b/main/linux-grsec/0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
deleted file mode 100644
index 6f0dc91286..0000000000
--- a/main/linux-grsec/0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From e0c0800740cdf64fe7b121c2ef235c01f1957af0 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Thu, 8 Apr 2010 11:27:42 -0700
4Subject: [PATCH 18/18] xfrm: Fix crashes in xfrm_lookup()
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9From: Timo Teräs <timo.teras@iki.fi>
10
11Happens because CONFIG_XFRM_SUB_POLICY is not enabled, and one of
12the helper functions I used did unexpected things in that case.
13
14Signed-off-by: David S. Miller <davem@davemloft.net>
15(cherry picked from commit e4077e018b5ead3de9951fc01d8bf12eeeeeefed)
16---
17 include/net/xfrm.h | 7 -------
18 1 files changed, 0 insertions(+), 7 deletions(-)
19
20diff --git a/include/net/xfrm.h b/include/net/xfrm.h
21index d51ef61..280f46f 100644
22--- a/include/net/xfrm.h
23+++ b/include/net/xfrm.h
24@@ -738,19 +738,12 @@ static inline void xfrm_pol_put(struct xfrm_policy *policy)
25 xfrm_policy_destroy(policy);
26 }
27
28-#ifdef CONFIG_XFRM_SUB_POLICY
29 static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
30 {
31 int i;
32 for (i = npols - 1; i >= 0; --i)
33 xfrm_pol_put(pols[i]);
34 }
35-#else
36-static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
37-{
38- xfrm_pol_put(pols[0]);
39-}
40-#endif
41
42 extern void __xfrm_state_destroy(struct xfrm_state *);
43
44--
451.7.0.2
46
diff --git a/main/linux-grsec/0019-ipv4-check-rt_genid-in-dst_check.patch b/main/linux-grsec/0019-ipv4-check-rt_genid-in-dst_check.patch
deleted file mode 100644
index e1e9a655e1..0000000000
--- a/main/linux-grsec/0019-ipv4-check-rt_genid-in-dst_check.patch
+++ /dev/null
@@ -1,96 +0,0 @@
1From d11a4dc18bf41719c9f0d7ed494d295dd2973b92 Mon Sep 17 00:00:00 2001
2From: =?utf8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Thu, 18 Mar 2010 23:20:20 +0000
4Subject: [PATCH] ipv4: check rt_genid in dst_check
5
6Xfrm_dst keeps a reference to ipv4 rtable entries on each
7cached bundle. The only way to renew xfrm_dst when the underlying
8route has changed, is to implement dst_check for this. This is
9what ipv6 side does too.
10
11The problems started after 87c1e12b5eeb7b30b4b41291bef8e0b41fc3dde9
12("ipsec: Fix bogus bundle flowi") which fixed a bug causing xfrm_dst
13to not get reused, until that all lookups always generated new
14xfrm_dst with new route reference and path mtu worked. But after the
15fix, the old routes started to get reused even after they were expired
16causing pmtu to break (well it would occationally work if the rtable
17gc had run recently and marked the route obsolete causing dst_check to
18get called).
19
20Signed-off-by: Timo Teras <timo.teras@iki.fi>
21Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
22Signed-off-by: David S. Miller <davem@davemloft.net>
23---
24 net/ipv4/route.c | 14 ++++++++++----
25 1 files changed, 10 insertions(+), 4 deletions(-)
26
27diff --git a/net/ipv4/route.c b/net/ipv4/route.c
28index a770df2..32d3961 100644
29--- a/net/ipv4/route.c
30+++ b/net/ipv4/route.c
31@@ -1441,7 +1441,7 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
32 dev_hold(rt->u.dst.dev);
33 if (rt->idev)
34 in_dev_hold(rt->idev);
35- rt->u.dst.obsolete = 0;
36+ rt->u.dst.obsolete = -1;
37 rt->u.dst.lastuse = jiffies;
38 rt->u.dst.path = &rt->u.dst;
39 rt->u.dst.neighbour = NULL;
40@@ -1506,7 +1506,7 @@ static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst)
41 struct dst_entry *ret = dst;
42
43 if (rt) {
44- if (dst->obsolete) {
45+ if (dst->obsolete > 0) {
46 ip_rt_put(rt);
47 ret = NULL;
48 } else if ((rt->rt_flags & RTCF_REDIRECTED) ||
49@@ -1726,7 +1726,9 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
50
51 static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
52 {
53- return NULL;
54+ if (rt_is_expired((struct rtable *)dst))
55+ return NULL;
56+ return dst;
57 }
58
59 static void ipv4_dst_destroy(struct dst_entry *dst)
60@@ -1888,7 +1890,8 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
61 if (!rth)
62 goto e_nobufs;
63
64- rth->u.dst.output= ip_rt_bug;
65+ rth->u.dst.output = ip_rt_bug;
66+ rth->u.dst.obsolete = -1;
67
68 atomic_set(&rth->u.dst.__refcnt, 1);
69 rth->u.dst.flags= DST_HOST;
70@@ -2054,6 +2057,7 @@ static int __mkroute_input(struct sk_buff *skb,
71 rth->fl.oif = 0;
72 rth->rt_spec_dst= spec_dst;
73
74+ rth->u.dst.obsolete = -1;
75 rth->u.dst.input = ip_forward;
76 rth->u.dst.output = ip_output;
77 rth->rt_genid = rt_genid(dev_net(rth->u.dst.dev));
78@@ -2218,6 +2222,7 @@ local_input:
79 goto e_nobufs;
80
81 rth->u.dst.output= ip_rt_bug;
82+ rth->u.dst.obsolete = -1;
83 rth->rt_genid = rt_genid(net);
84
85 atomic_set(&rth->u.dst.__refcnt, 1);
86@@ -2444,6 +2449,7 @@ static int __mkroute_output(struct rtable **result,
87 rth->rt_spec_dst= fl->fl4_src;
88
89 rth->u.dst.output=ip_output;
90+ rth->u.dst.obsolete = -1;
91 rth->rt_genid = rt_genid(dev_net(dev_out));
92
93 RT_CACHE_STAT_INC(out_slow_tot);
94--
951.7.1
96
diff --git a/main/linux-grsec/0020-xfrm-check-bundle-policy-existance-before-dereferencing-it.patch b/main/linux-grsec/0020-xfrm-check-bundle-policy-existance-before-dereferencing-it.patch
deleted file mode 100644
index 1a962e1610..0000000000
--- a/main/linux-grsec/0020-xfrm-check-bundle-policy-existance-before-dereferencing-it.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From patchwork Thu Jun 24 05:45:19 2010
2Content-Type: text/plain; charset="utf-8"
3MIME-Version: 1.0
4Content-Transfer-Encoding: 8bit
5Subject: xfrm: check bundle policy existance before dereferencing it
6Date: Wed, 23 Jun 2010 19:45:19 -0000
7From: =?utf-8?b?VGltbyBUZXLDpHMgPHRpbW8udGVyYXNAaWtpLmZpPg==?=
8X-Patchwork-Id: 56759
9Message-Id: <1277358319-9868-1-git-send-email-timo.teras@iki.fi>
10To: netdev@vger.kernel.org, "Justin P. Mattock" <justinmattock@gmail.com>,
11 Eric Dumazet <eric.dumazet@gmail.com>,
12 "John W.Linville" <linville@tuxdriver.com>,
13 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
14 davem@davemloft.net
15Cc: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
16
17Fix the bundle validation code to not assume having a valid policy.
18When we have multiple transformations for a xfrm policy, the bundle
19instance will be a chain of bundles with only the first one having
20the policy reference. When policy_genid is bumped it will expire the
21first bundle in the chain which is equivalent of expiring the whole
22chain.
23
24Reported-bisected-and-tested-by: Justin P. Mattock <justinmattock@gmail.com>
25Signed-off-by: Timo Teräs <timo.teras@iki.fi>
26
27---
28net/xfrm/xfrm_policy.c | 3 ++-
29 1 files changed, 2 insertions(+), 1 deletions(-)
30
31diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
32index 4bf27d9..af1c173 100644
33--- a/net/xfrm/xfrm_policy.c
34+++ b/net/xfrm/xfrm_policy.c
35@@ -2300,7 +2300,8 @@ int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first,
36 return 0;
37 if (xdst->xfrm_genid != dst->xfrm->genid)
38 return 0;
39- if (xdst->policy_genid != atomic_read(&xdst->pols[0]->genid))
40+ if (xdst->num_pols > 0 &&
41+ xdst->policy_genid != atomic_read(&xdst->pols[0]->genid))
42 return 0;
43
44 if (strict && fl &&
diff --git a/main/linux-grsec/0021-xfrm-do-not-assume-that-template-resolving-always-returns-xfrms.patch b/main/linux-grsec/0021-xfrm-do-not-assume-that-template-resolving-always-returns-xfrms.patch
deleted file mode 100644
index bc660dd5cc..0000000000
--- a/main/linux-grsec/0021-xfrm-do-not-assume-that-template-resolving-always-returns-xfrms.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1From d809ec895505e6f35fb1965f0946381ab4eaa474 Mon Sep 17 00:00:00 2001
2From: =?utf8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Mon, 12 Jul 2010 21:29:42 +0000
4Subject: [PATCH] xfrm: do not assume that template resolving always returns xfrms
5MIME-Version: 1.0
6Content-Type: text/plain; charset=utf8
7Content-Transfer-Encoding: 8bit
8
9xfrm_resolve_and_create_bundle() assumed that, if policies indicated
10presence of xfrms, bundle template resolution would always return
11some xfrms. This is not true for 'use' level policies which can
12result in no xfrm's being applied if there is no suitable xfrm states.
13This fixes a crash by this incorrect assumption.
14
15Reported-by: George Spelvin <linux@horizon.com>
16Bisected-by: George Spelvin <linux@horizon.com>
17Tested-by: George Spelvin <linux@horizon.com>
18Signed-off-by: Timo Teräs <timo.teras@iki.fi>
19Signed-off-by: David S. Miller <davem@davemloft.net>
20---
21 net/xfrm/xfrm_policy.c | 15 +++++++++++++--
22 1 files changed, 13 insertions(+), 2 deletions(-)
23
24diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
25index af1c173..a7ec5a8 100644
26--- a/net/xfrm/xfrm_policy.c
27+++ b/net/xfrm/xfrm_policy.c
28@@ -1594,8 +1594,8 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,
29
30 /* Try to instantiate a bundle */
31 err = xfrm_tmpl_resolve(pols, num_pols, fl, xfrm, family);
32- if (err < 0) {
33- if (err != -EAGAIN)
34+ if (err <= 0) {
35+ if (err != 0 && err != -EAGAIN)
36 XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTPOLERROR);
37 return ERR_PTR(err);
38 }
39@@ -1678,6 +1678,13 @@ xfrm_bundle_lookup(struct net *net, struct flowi *fl, u16 family, u8 dir,
40 goto make_dummy_bundle;
41 dst_hold(&xdst->u.dst);
42 return oldflo;
43+ } else if (new_xdst == NULL) {
44+ num_xfrms = 0;
45+ if (oldflo == NULL)
46+ goto make_dummy_bundle;
47+ xdst->num_xfrms = 0;
48+ dst_hold(&xdst->u.dst);
49+ return oldflo;
50 }
51
52 /* Kill the previous bundle */
53@@ -1760,6 +1767,10 @@ restart:
54 xfrm_pols_put(pols, num_pols);
55 err = PTR_ERR(xdst);
56 goto dropdst;
57+ } else if (xdst == NULL) {
58+ num_xfrms = 0;
59+ drop_pols = num_pols;
60+ goto no_transform;
61 }
62
63 spin_lock_bh(&xfrm_policy_sk_bundle_lock);
64--
651.7.1.1
66
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 3ec14830b3..d557959e66 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -2,9 +2,9 @@
2 2
3_flavor=grsec 3_flavor=grsec
4pkgname=linux-${_flavor} 4pkgname=linux-${_flavor}
5pkgver=2.6.32.24 5pkgver=2.6.35.7
6_kernver=2.6.32 6_kernver=2.6.35
7pkgrel=2 7pkgrel=0
8pkgdesc="Linux kernel with grsecurity" 8pkgdesc="Linux kernel with grsecurity"
9url=http://grsecurity.net 9url=http://grsecurity.net
10depends="mkinitfs linux-firmware" 10depends="mkinitfs linux-firmware"
@@ -14,31 +14,12 @@ _config=${config:-kernelconfig.${CARCH:-x86}}
14install= 14install=
15source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2 15source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
16 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2 16 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
17 grsecurity-2.2.0-2.6.32.24-201010232009.patch 17 grsecurity-2.2.0-2.6.35.7-201010232009.patch
18 0001-grsec-revert-conflicting-flow-cache-changes.patch
19 0002-gre-fix-hard-header-destination-address-checking.patch
20 0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch
21 0004-arp-flush-arp-cache-on-device-change.patch 18 0004-arp-flush-arp-cache-on-device-change.patch
22 0007-r8169-Fix-rtl8169_rx_interrupt.patch
23 0009-ipsec-Fix-bogus-bundle-flowi.patch
24 0010-xfrm-Remove-xfrm_state_genid.patch
25 0011-xfrm_user-verify-policy-direction-at-XFRM_MSG_POLEXP.patch 19 0011-xfrm_user-verify-policy-direction-at-XFRM_MSG_POLEXP.patch
26 0012-xfrm-remove-policy-lock-when-accessing-policy-walk.d.patch
27 0013-flow-structurize-flow-cache.patch
28 0014-flow-virtualize-flow-cache-entry-methods.patch
29 0015-xfrm-cache-bundles-instead-of-policies-for-outgoing-.patch
30 0016-xfrm-remove-policy-garbage-collection.patch
31 0017-flow-delayed-deletion-of-flow-cache-entries.patch
32 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
33 0019-ipv4-check-rt_genid-in-dst_check.patch
34 0020-xfrm-check-bundle-policy-existance-before-dereferencing-it.patch
35 0021-xfrm-do-not-assume-that-template-resolving-always-returns-xfrms.patch
36 xfrm-fix-policy-unreferencing-on-larval-drop.patch
37 r8169-fix-random-mdio_write-failures.patch 20 r8169-fix-random-mdio_write-failures.patch
38 r8169-fix-rx-checksum-offload.patch 21 r8169-fix-rx-checksum-offload.patch
39 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
40 r8169-add-gro-support.patch 22 r8169-add-gro-support.patch
41 hv-grsec.patch
42 kernelconfig.x86 23 kernelconfig.x86
43 " 24 "
44subpackages="$pkgname-dev linux-firmware:firmware" 25subpackages="$pkgname-dev linux-firmware:firmware"
@@ -47,6 +28,7 @@ license="GPL-2"
47_abi_release=${pkgver}-${_flavor} 28_abi_release=${pkgver}-${_flavor}
48 29
49prepare() { 30prepare() {
31 local _patch_failed=
50 cd "$srcdir"/linux-$_kernver 32 cd "$srcdir"/linux-$_kernver
51 if [ "$_kernver" != "$pkgver" ]; then 33 if [ "$_kernver" != "$pkgver" ]; then
52 bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1 34 bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1
@@ -57,11 +39,20 @@ prepare() {
57 case $i in 39 case $i in
58 *.patch) 40 *.patch)
59 msg "Applying $i..." 41 msg "Applying $i..."
60 patch -s -p1 -N < "$srcdir"/$i || return 1 42 if ! patch -s -p1 -N -i "$srcdir"/$i; then
43 echo $i >>failed
44 _patch_failed=1
45 fi
61 ;; 46 ;;
62 esac 47 esac
63 done 48 done
64 49
50 if ! [ -z "$_patch_failed" ]; then
51 error "The following patches failed:"
52 cat failed
53 return 1
54 fi
55
65 mkdir -p "$srcdir"/build 56 mkdir -p "$srcdir"/build
66 cp "$srcdir"/$_config "$srcdir"/build/.config 57 cp "$srcdir"/$_config "$srcdir"/build/.config
67 make -C "$srcdir"/linux-$_kernver O="$srcdir"/build HOSTCC="${CC:-gcc}" \ 58 make -C "$srcdir"/linux-$_kernver O="$srcdir"/build HOSTCC="${CC:-gcc}" \
@@ -148,31 +139,12 @@ firmware() {
148 mv "$pkgdir"/lib/firmware "$subpkgdir"/lib/ 139 mv "$pkgdir"/lib/firmware "$subpkgdir"/lib/
149} 140}
150 141
151md5sums="260551284ac224c3a43c4adac7df4879 linux-2.6.32.tar.bz2 142md5sums="091abeb4684ce03d1d936851618687b6 linux-2.6.35.tar.bz2
152e3346e3b4b92f048b8ecded829f45cdf patch-2.6.32.24.bz2 1436a00ec267b0100f20a3fa900b97a5b7f patch-2.6.35.7.bz2
153cee569fe23aac484a4352e3e97987d23 grsecurity-2.2.0-2.6.32.24-201010232009.patch 1444a1ceddc62ff83b136f32dbab50e15f8 grsecurity-2.2.0-2.6.35.7-201010232009.patch
1541d247140abec49b96250aec9aa59b324 0001-grsec-revert-conflicting-flow-cache-changes.patch
155437317f88ec13ace8d39c31983a41696 0002-gre-fix-hard-header-destination-address-checking.patch
156151b29a161178ed39d62a08f21f3484d 0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch
157776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch 145776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
1585f8b9a76d95319c5b1aa26b54a42e6b5 0007-r8169-Fix-rtl8169_rx_interrupt.patch
159cf168620efa63479a6e03da78906e32f 0009-ipsec-Fix-bogus-bundle-flowi.patch
1603af4b5ae1afae3278b0070f585b874e3 0010-xfrm-Remove-xfrm_state_genid.patch
1619f284c3fd5ab38cef4544efc1f50c6ba 0011-xfrm_user-verify-policy-direction-at-XFRM_MSG_POLEXP.patch 1469f284c3fd5ab38cef4544efc1f50c6ba 0011-xfrm_user-verify-policy-direction-at-XFRM_MSG_POLEXP.patch
162b035114e893883cf67530350678e00f5 0012-xfrm-remove-policy-lock-when-accessing-policy-walk.d.patch
1639dea03ec19aaf9a384e4f56f57009257 0013-flow-structurize-flow-cache.patch
164fc9ab26abbfec0d3f20000b5e695620b 0014-flow-virtualize-flow-cache-entry-methods.patch
165c09b82b89a49ba2a3836a0bc3a3312f4 0015-xfrm-cache-bundles-instead-of-policies-for-outgoing-.patch
16641618efb65ab9ddacfb59a1cde9b4edd 0016-xfrm-remove-policy-garbage-collection.patch
1673b83f0972ab715819d1119b120a987e7 0017-flow-delayed-deletion-of-flow-cache-entries.patch
16845a676c7a1759fec60b724d557b4e295 0018-xfrm-Fix-crashes-in-xfrm_lookup.patch
16974e511f12854972db08d3fddc4df0f52 0019-ipv4-check-rt_genid-in-dst_check.patch
170edfac5844f91721d49a00a09b6ef258b 0020-xfrm-check-bundle-policy-existance-before-dereferencing-it.patch
171b39bccb5a1124f5a3f2f209edb21aba5 0021-xfrm-do-not-assume-that-template-resolving-always-returns-xfrms.patch
172c7e606c11c05ff03012b21c3fe0ece47 xfrm-fix-policy-unreferencing-on-larval-drop.patch
173ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch 147ce4a74190febe13713bab1b886dd5bee r8169-fix-random-mdio_write-failures.patch
1740ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch 1480ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch
175a1bcf76870b63a4a4035a8948fb758e2 x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
176139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch 149139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch
177bf14850a0036d14bc6177adbdec23a17 hv-grsec.patch 150f6b46f11945c77d01679c87e95d512ee kernelconfig.x86"
178888d09239837d7544034b60107fdd019 kernelconfig.x86"
diff --git a/main/linux-grsec/grsecurity-2.2.0-2.6.32.24-201010232009.patch b/main/linux-grsec/grsecurity-2.2.0-2.6.35.7-201010232009.patch
index 35712f0b36..c570cf880c 100644
--- a/main/linux-grsec/grsecurity-2.2.0-2.6.32.24-201010232009.patch
+++ b/main/linux-grsec/grsecurity-2.2.0-2.6.35.7-201010232009.patch
@@ -1,7 +1,22 @@
1diff -urNp linux-2.6.32.24/arch/alpha/include/asm/elf.h linux-2.6.32.24/arch/alpha/include/asm/elf.h 1diff -urNp linux-2.6.35.7/arch/alpha/include/asm/dma-mapping.h linux-2.6.35.7/arch/alpha/include/asm/dma-mapping.h
2--- linux-2.6.32.24/arch/alpha/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 2--- linux-2.6.35.7/arch/alpha/include/asm/dma-mapping.h 2010-08-26 19:47:12.000000000 -0400
3+++ linux-2.6.32.24/arch/alpha/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 3+++ linux-2.6.35.7/arch/alpha/include/asm/dma-mapping.h 2010-09-17 20:12:09.000000000 -0400
4@@ -91,6 +91,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N 4@@ -3,9 +3,9 @@
5
6 #include <linux/dma-attrs.h>
7
8-extern struct dma_map_ops *dma_ops;
9+extern const struct dma_map_ops *dma_ops;
10
11-static inline struct dma_map_ops *get_dma_ops(struct device *dev)
12+static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
13 {
14 return dma_ops;
15 }
16diff -urNp linux-2.6.35.7/arch/alpha/include/asm/elf.h linux-2.6.35.7/arch/alpha/include/asm/elf.h
17--- linux-2.6.35.7/arch/alpha/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
18+++ linux-2.6.35.7/arch/alpha/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
19@@ -90,6 +90,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
5 20
6 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000) 21 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
7 22
@@ -15,9 +30,9 @@ diff -urNp linux-2.6.32.24/arch/alpha/include/asm/elf.h linux-2.6.32.24/arch/alp
15 /* $0 is set by ld.so to a pointer to a function which might be 30 /* $0 is set by ld.so to a pointer to a function which might be
16 registered using atexit. This provides a mean for the dynamic 31 registered using atexit. This provides a mean for the dynamic
17 linker to call DT_FINI functions for shared libraries that have 32 linker to call DT_FINI functions for shared libraries that have
18diff -urNp linux-2.6.32.24/arch/alpha/include/asm/pgtable.h linux-2.6.32.24/arch/alpha/include/asm/pgtable.h 33diff -urNp linux-2.6.35.7/arch/alpha/include/asm/pgtable.h linux-2.6.35.7/arch/alpha/include/asm/pgtable.h
19--- linux-2.6.32.24/arch/alpha/include/asm/pgtable.h 2010-08-13 16:24:37.000000000 -0400 34--- linux-2.6.35.7/arch/alpha/include/asm/pgtable.h 2010-08-26 19:47:12.000000000 -0400
20+++ linux-2.6.32.24/arch/alpha/include/asm/pgtable.h 2010-10-23 19:59:19.000000000 -0400 35+++ linux-2.6.35.7/arch/alpha/include/asm/pgtable.h 2010-09-17 20:12:09.000000000 -0400
21@@ -101,6 +101,17 @@ struct vm_area_struct; 36@@ -101,6 +101,17 @@ struct vm_area_struct;
22 #define PAGE_SHARED __pgprot(_PAGE_VALID | __ACCESS_BITS) 37 #define PAGE_SHARED __pgprot(_PAGE_VALID | __ACCESS_BITS)
23 #define PAGE_COPY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW) 38 #define PAGE_COPY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
@@ -36,9 +51,9 @@ diff -urNp linux-2.6.32.24/arch/alpha/include/asm/pgtable.h linux-2.6.32.24/arch
36 #define PAGE_KERNEL __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE | _PAGE_KWE) 51 #define PAGE_KERNEL __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE | _PAGE_KWE)
37 52
38 #define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x)) 53 #define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
39diff -urNp linux-2.6.32.24/arch/alpha/kernel/module.c linux-2.6.32.24/arch/alpha/kernel/module.c 54diff -urNp linux-2.6.35.7/arch/alpha/kernel/module.c linux-2.6.35.7/arch/alpha/kernel/module.c
40--- linux-2.6.32.24/arch/alpha/kernel/module.c 2010-08-13 16:24:37.000000000 -0400 55--- linux-2.6.35.7/arch/alpha/kernel/module.c 2010-08-26 19:47:12.000000000 -0400
41+++ linux-2.6.32.24/arch/alpha/kernel/module.c 2010-10-23 19:59:19.000000000 -0400 56+++ linux-2.6.35.7/arch/alpha/kernel/module.c 2010-09-17 20:12:09.000000000 -0400
42@@ -182,7 +182,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, 57@@ -182,7 +182,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs,
43 58
44 /* The small sections were sorted to the end of the segment. 59 /* The small sections were sorted to the end of the segment.
@@ -48,10 +63,10 @@ diff -urNp linux-2.6.32.24/arch/alpha/kernel/module.c linux-2.6.32.24/arch/alpha
48 got = sechdrs[me->arch.gotsecindex].sh_addr; 63 got = sechdrs[me->arch.gotsecindex].sh_addr;
49 64
50 for (i = 0; i < n; i++) { 65 for (i = 0; i < n; i++) {
51diff -urNp linux-2.6.32.24/arch/alpha/kernel/osf_sys.c linux-2.6.32.24/arch/alpha/kernel/osf_sys.c 66diff -urNp linux-2.6.35.7/arch/alpha/kernel/osf_sys.c linux-2.6.35.7/arch/alpha/kernel/osf_sys.c
52--- linux-2.6.32.24/arch/alpha/kernel/osf_sys.c 2010-08-13 16:24:37.000000000 -0400 67--- linux-2.6.35.7/arch/alpha/kernel/osf_sys.c 2010-08-26 19:47:12.000000000 -0400
53+++ linux-2.6.32.24/arch/alpha/kernel/osf_sys.c 2010-10-23 19:59:19.000000000 -0400 68+++ linux-2.6.35.7/arch/alpha/kernel/osf_sys.c 2010-09-17 20:12:09.000000000 -0400
54@@ -1169,7 +1169,7 @@ arch_get_unmapped_area_1(unsigned long a 69@@ -1170,7 +1170,7 @@ arch_get_unmapped_area_1(unsigned long a
55 /* At this point: (!vma || addr < vma->vm_end). */ 70 /* At this point: (!vma || addr < vma->vm_end). */
56 if (limit - len < addr) 71 if (limit - len < addr)
57 return -ENOMEM; 72 return -ENOMEM;
@@ -60,7 +75,7 @@ diff -urNp linux-2.6.32.24/arch/alpha/kernel/osf_sys.c linux-2.6.32.24/arch/alph
60 return addr; 75 return addr;
61 addr = vma->vm_end; 76 addr = vma->vm_end;
62 vma = vma->vm_next; 77 vma = vma->vm_next;
63@@ -1205,6 +1205,10 @@ arch_get_unmapped_area(struct file *filp 78@@ -1206,6 +1206,10 @@ arch_get_unmapped_area(struct file *filp
64 merely specific addresses, but regions of memory -- perhaps 79 merely specific addresses, but regions of memory -- perhaps
65 this feature should be incorporated into all ports? */ 80 this feature should be incorporated into all ports? */
66 81
@@ -71,7 +86,7 @@ diff -urNp linux-2.6.32.24/arch/alpha/kernel/osf_sys.c linux-2.6.32.24/arch/alph
71 if (addr) { 86 if (addr) {
72 addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit); 87 addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
73 if (addr != (unsigned long) -ENOMEM) 88 if (addr != (unsigned long) -ENOMEM)
74@@ -1212,8 +1216,8 @@ arch_get_unmapped_area(struct file *filp 89@@ -1213,8 +1217,8 @@ arch_get_unmapped_area(struct file *filp
75 } 90 }
76 91
77 /* Next, try allocating at TASK_UNMAPPED_BASE. */ 92 /* Next, try allocating at TASK_UNMAPPED_BASE. */
@@ -82,9 +97,49 @@ diff -urNp linux-2.6.32.24/arch/alpha/kernel/osf_sys.c linux-2.6.32.24/arch/alph
82 if (addr != (unsigned long) -ENOMEM) 97 if (addr != (unsigned long) -ENOMEM)
83 return addr; 98 return addr;
84 99
85diff -urNp linux-2.6.32.24/arch/alpha/mm/fault.c linux-2.6.32.24/arch/alpha/mm/fault.c 100diff -urNp linux-2.6.35.7/arch/alpha/kernel/pci_iommu.c linux-2.6.35.7/arch/alpha/kernel/pci_iommu.c
86--- linux-2.6.32.24/arch/alpha/mm/fault.c 2010-08-13 16:24:37.000000000 -0400 101--- linux-2.6.35.7/arch/alpha/kernel/pci_iommu.c 2010-08-26 19:47:12.000000000 -0400
87+++ linux-2.6.32.24/arch/alpha/mm/fault.c 2010-10-23 19:59:19.000000000 -0400 102+++ linux-2.6.35.7/arch/alpha/kernel/pci_iommu.c 2010-09-17 20:12:09.000000000 -0400
103@@ -950,7 +950,7 @@ static int alpha_pci_set_mask(struct dev
104 return 0;
105 }
106
107-struct dma_map_ops alpha_pci_ops = {
108+const struct dma_map_ops alpha_pci_ops = {
109 .alloc_coherent = alpha_pci_alloc_coherent,
110 .free_coherent = alpha_pci_free_coherent,
111 .map_page = alpha_pci_map_page,
112@@ -962,5 +962,5 @@ struct dma_map_ops alpha_pci_ops = {
113 .set_dma_mask = alpha_pci_set_mask,
114 };
115
116-struct dma_map_ops *dma_ops = &alpha_pci_ops;
117+const struct dma_map_ops *dma_ops = &alpha_pci_ops;
118 EXPORT_SYMBOL(dma_ops);
119diff -urNp linux-2.6.35.7/arch/alpha/kernel/pci-noop.c linux-2.6.35.7/arch/alpha/kernel/pci-noop.c
120--- linux-2.6.35.7/arch/alpha/kernel/pci-noop.c 2010-08-26 19:47:12.000000000 -0400
121+++ linux-2.6.35.7/arch/alpha/kernel/pci-noop.c 2010-09-17 20:12:09.000000000 -0400
122@@ -173,7 +173,7 @@ static int alpha_noop_set_mask(struct de
123 return 0;
124 }
125
126-struct dma_map_ops alpha_noop_ops = {
127+const struct dma_map_ops alpha_noop_ops = {
128 .alloc_coherent = alpha_noop_alloc_coherent,
129 .free_coherent = alpha_noop_free_coherent,
130 .map_page = alpha_noop_map_page,
131@@ -183,7 +183,7 @@ struct dma_map_ops alpha_noop_ops = {
132 .set_dma_mask = alpha_noop_set_mask,
133 };
134
135-struct dma_map_ops *dma_ops = &alpha_noop_ops;
136+const struct dma_map_ops *dma_ops = &alpha_noop_ops;
137 EXPORT_SYMBOL(dma_ops);
138
139 void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
140diff -urNp linux-2.6.35.7/arch/alpha/mm/fault.c linux-2.6.35.7/arch/alpha/mm/fault.c
141--- linux-2.6.35.7/arch/alpha/mm/fault.c 2010-08-26 19:47:12.000000000 -0400
142+++ linux-2.6.35.7/arch/alpha/mm/fault.c 2010-09-17 20:12:09.000000000 -0400
88@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct * 143@@ -54,6 +54,124 @@ __load_new_mm_context(struct mm_struct *
89 __reload_thread(pcb); 144 __reload_thread(pcb);
90 } 145 }
@@ -241,10 +296,10 @@ diff -urNp linux-2.6.32.24/arch/alpha/mm/fault.c linux-2.6.32.24/arch/alpha/mm/f
241 } else if (!cause) { 296 } else if (!cause) {
242 /* Allow reads even for write-only mappings */ 297 /* Allow reads even for write-only mappings */
243 if (!(vma->vm_flags & (VM_READ | VM_WRITE))) 298 if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
244diff -urNp linux-2.6.32.24/arch/arm/include/asm/elf.h linux-2.6.32.24/arch/arm/include/asm/elf.h 299diff -urNp linux-2.6.35.7/arch/arm/include/asm/elf.h linux-2.6.35.7/arch/arm/include/asm/elf.h
245--- linux-2.6.32.24/arch/arm/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 300--- linux-2.6.35.7/arch/arm/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
246+++ linux-2.6.32.24/arch/arm/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 301+++ linux-2.6.35.7/arch/arm/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
247@@ -109,7 +109,14 @@ int dump_task_regs(struct task_struct *t 302@@ -111,7 +111,14 @@ int dump_task_regs(struct task_struct *t
248 the loader. We need to make sure that it is out of the way of the program 303 the loader. We need to make sure that it is out of the way of the program
249 that it will "exec", and that there is sufficient room for the brk. */ 304 that it will "exec", and that there is sufficient room for the brk. */
250 305
@@ -260,20 +315,20 @@ diff -urNp linux-2.6.32.24/arch/arm/include/asm/elf.h linux-2.6.32.24/arch/arm/i
260 315
261 /* When the program starts, a1 contains a pointer to a function to be 316 /* When the program starts, a1 contains a pointer to a function to be
262 registered with atexit, as per the SVR4 ABI. A value of 0 means we 317 registered with atexit, as per the SVR4 ABI. A value of 0 means we
263diff -urNp linux-2.6.32.24/arch/arm/include/asm/kmap_types.h linux-2.6.32.24/arch/arm/include/asm/kmap_types.h 318diff -urNp linux-2.6.35.7/arch/arm/include/asm/kmap_types.h linux-2.6.35.7/arch/arm/include/asm/kmap_types.h
264--- linux-2.6.32.24/arch/arm/include/asm/kmap_types.h 2010-08-13 16:24:37.000000000 -0400 319--- linux-2.6.35.7/arch/arm/include/asm/kmap_types.h 2010-08-26 19:47:12.000000000 -0400
265+++ linux-2.6.32.24/arch/arm/include/asm/kmap_types.h 2010-10-23 19:59:19.000000000 -0400 320+++ linux-2.6.35.7/arch/arm/include/asm/kmap_types.h 2010-09-17 20:12:09.000000000 -0400
266@@ -19,6 +19,7 @@ enum km_type { 321@@ -21,6 +21,7 @@ enum km_type {
267 KM_SOFTIRQ0, 322 KM_L1_CACHE,
268 KM_SOFTIRQ1,
269 KM_L2_CACHE, 323 KM_L2_CACHE,
324 KM_KDB,
270+ KM_CLEARPAGE, 325+ KM_CLEARPAGE,
271 KM_TYPE_NR 326 KM_TYPE_NR
272 }; 327 };
273 328
274diff -urNp linux-2.6.32.24/arch/arm/include/asm/uaccess.h linux-2.6.32.24/arch/arm/include/asm/uaccess.h 329diff -urNp linux-2.6.35.7/arch/arm/include/asm/uaccess.h linux-2.6.35.7/arch/arm/include/asm/uaccess.h
275--- linux-2.6.32.24/arch/arm/include/asm/uaccess.h 2010-08-13 16:24:37.000000000 -0400 330--- linux-2.6.35.7/arch/arm/include/asm/uaccess.h 2010-08-26 19:47:12.000000000 -0400
276+++ linux-2.6.32.24/arch/arm/include/asm/uaccess.h 2010-10-23 19:59:19.000000000 -0400 331+++ linux-2.6.35.7/arch/arm/include/asm/uaccess.h 2010-09-17 20:12:09.000000000 -0400
277@@ -403,6 +403,9 @@ extern unsigned long __must_check __strn 332@@ -403,6 +403,9 @@ extern unsigned long __must_check __strn
278 333
279 static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n) 334 static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)
@@ -294,10 +349,10 @@ diff -urNp linux-2.6.32.24/arch/arm/include/asm/uaccess.h linux-2.6.32.24/arch/a
294 if (access_ok(VERIFY_WRITE, to, n)) 349 if (access_ok(VERIFY_WRITE, to, n))
295 n = __copy_to_user(to, from, n); 350 n = __copy_to_user(to, from, n);
296 return n; 351 return n;
297diff -urNp linux-2.6.32.24/arch/arm/kernel/kgdb.c linux-2.6.32.24/arch/arm/kernel/kgdb.c 352diff -urNp linux-2.6.35.7/arch/arm/kernel/kgdb.c linux-2.6.35.7/arch/arm/kernel/kgdb.c
298--- linux-2.6.32.24/arch/arm/kernel/kgdb.c 2010-08-13 16:24:37.000000000 -0400 353--- linux-2.6.35.7/arch/arm/kernel/kgdb.c 2010-08-26 19:47:12.000000000 -0400
299+++ linux-2.6.32.24/arch/arm/kernel/kgdb.c 2010-10-23 19:59:19.000000000 -0400 354+++ linux-2.6.35.7/arch/arm/kernel/kgdb.c 2010-09-17 20:12:09.000000000 -0400
300@@ -190,7 +190,7 @@ void kgdb_arch_exit(void) 355@@ -208,7 +208,7 @@ void kgdb_arch_exit(void)
301 * and we handle the normal undef case within the do_undefinstr 356 * and we handle the normal undef case within the do_undefinstr
302 * handler. 357 * handler.
303 */ 358 */
@@ -306,10 +361,10 @@ diff -urNp linux-2.6.32.24/arch/arm/kernel/kgdb.c linux-2.6.32.24/arch/arm/kerne
306 #ifndef __ARMEB__ 361 #ifndef __ARMEB__
307 .gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7} 362 .gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7}
308 #else /* ! __ARMEB__ */ 363 #else /* ! __ARMEB__ */
309diff -urNp linux-2.6.32.24/arch/arm/mach-at91/pm.c linux-2.6.32.24/arch/arm/mach-at91/pm.c 364diff -urNp linux-2.6.35.7/arch/arm/mach-at91/pm.c linux-2.6.35.7/arch/arm/mach-at91/pm.c
310--- linux-2.6.32.24/arch/arm/mach-at91/pm.c 2010-08-13 16:24:37.000000000 -0400 365--- linux-2.6.35.7/arch/arm/mach-at91/pm.c 2010-08-26 19:47:12.000000000 -0400
311+++ linux-2.6.32.24/arch/arm/mach-at91/pm.c 2010-10-23 19:59:19.000000000 -0400 366+++ linux-2.6.35.7/arch/arm/mach-at91/pm.c 2010-09-17 20:12:09.000000000 -0400
312@@ -348,7 +348,7 @@ static void at91_pm_end(void) 367@@ -294,7 +294,7 @@ static void at91_pm_end(void)
313 } 368 }
314 369
315 370
@@ -318,9 +373,32 @@ diff -urNp linux-2.6.32.24/arch/arm/mach-at91/pm.c linux-2.6.32.24/arch/arm/mach
318 .valid = at91_pm_valid_state, 373 .valid = at91_pm_valid_state,
319 .begin = at91_pm_begin, 374 .begin = at91_pm_begin,
320 .enter = at91_pm_enter, 375 .enter = at91_pm_enter,
321diff -urNp linux-2.6.32.24/arch/arm/mach-omap1/pm.c linux-2.6.32.24/arch/arm/mach-omap1/pm.c 376diff -urNp linux-2.6.35.7/arch/arm/mach-davinci/pm.c linux-2.6.35.7/arch/arm/mach-davinci/pm.c
322--- linux-2.6.32.24/arch/arm/mach-omap1/pm.c 2010-08-13 16:24:37.000000000 -0400 377--- linux-2.6.35.7/arch/arm/mach-davinci/pm.c 2010-08-26 19:47:12.000000000 -0400
323+++ linux-2.6.32.24/arch/arm/mach-omap1/pm.c 2010-10-23 19:59:19.000000000 -0400 378+++ linux-2.6.35.7/arch/arm/mach-davinci/pm.c 2010-09-17 20:12:09.000000000 -0400
379@@ -110,7 +110,7 @@ static int davinci_pm_enter(suspend_stat
380 return ret;
381 }
382
383-static struct platform_suspend_ops davinci_pm_ops = {
384+static const struct platform_suspend_ops davinci_pm_ops = {
385 .enter = davinci_pm_enter,
386 .valid = suspend_valid_only_mem,
387 };
388diff -urNp linux-2.6.35.7/arch/arm/mach-msm/last_radio_log.c linux-2.6.35.7/arch/arm/mach-msm/last_radio_log.c
389--- linux-2.6.35.7/arch/arm/mach-msm/last_radio_log.c 2010-08-26 19:47:12.000000000 -0400
390+++ linux-2.6.35.7/arch/arm/mach-msm/last_radio_log.c 2010-09-17 20:12:09.000000000 -0400
391@@ -47,6 +47,7 @@ static ssize_t last_radio_log_read(struc
392 return count;
393 }
394
395+/* cannot be const, see msm_init_last_radio_log */
396 static struct file_operations last_radio_log_fops = {
397 .read = last_radio_log_read
398 };
399diff -urNp linux-2.6.35.7/arch/arm/mach-omap1/pm.c linux-2.6.35.7/arch/arm/mach-omap1/pm.c
400--- linux-2.6.35.7/arch/arm/mach-omap1/pm.c 2010-08-26 19:47:12.000000000 -0400
401+++ linux-2.6.35.7/arch/arm/mach-omap1/pm.c 2010-09-17 20:12:09.000000000 -0400
324@@ -647,7 +647,7 @@ static struct irqaction omap_wakeup_irq 402@@ -647,7 +647,7 @@ static struct irqaction omap_wakeup_irq
325 403
326 404
@@ -330,10 +408,10 @@ diff -urNp linux-2.6.32.24/arch/arm/mach-omap1/pm.c linux-2.6.32.24/arch/arm/mac
330 .prepare = omap_pm_prepare, 408 .prepare = omap_pm_prepare,
331 .enter = omap_pm_enter, 409 .enter = omap_pm_enter,
332 .finish = omap_pm_finish, 410 .finish = omap_pm_finish,
333diff -urNp linux-2.6.32.24/arch/arm/mach-omap2/pm24xx.c linux-2.6.32.24/arch/arm/mach-omap2/pm24xx.c 411diff -urNp linux-2.6.35.7/arch/arm/mach-omap2/pm24xx.c linux-2.6.35.7/arch/arm/mach-omap2/pm24xx.c
334--- linux-2.6.32.24/arch/arm/mach-omap2/pm24xx.c 2010-08-13 16:24:37.000000000 -0400 412--- linux-2.6.35.7/arch/arm/mach-omap2/pm24xx.c 2010-08-26 19:47:12.000000000 -0400
335+++ linux-2.6.32.24/arch/arm/mach-omap2/pm24xx.c 2010-10-23 19:59:19.000000000 -0400 413+++ linux-2.6.35.7/arch/arm/mach-omap2/pm24xx.c 2010-09-17 20:12:09.000000000 -0400
336@@ -326,7 +326,7 @@ static void omap2_pm_finish(void) 414@@ -325,7 +325,7 @@ static void omap2_pm_finish(void)
337 enable_hlt(); 415 enable_hlt();
338 } 416 }
339 417
@@ -342,10 +420,10 @@ diff -urNp linux-2.6.32.24/arch/arm/mach-omap2/pm24xx.c linux-2.6.32.24/arch/arm
342 .prepare = omap2_pm_prepare, 420 .prepare = omap2_pm_prepare,
343 .enter = omap2_pm_enter, 421 .enter = omap2_pm_enter,
344 .finish = omap2_pm_finish, 422 .finish = omap2_pm_finish,
345diff -urNp linux-2.6.32.24/arch/arm/mach-omap2/pm34xx.c linux-2.6.32.24/arch/arm/mach-omap2/pm34xx.c 423diff -urNp linux-2.6.35.7/arch/arm/mach-omap2/pm34xx.c linux-2.6.35.7/arch/arm/mach-omap2/pm34xx.c
346--- linux-2.6.32.24/arch/arm/mach-omap2/pm34xx.c 2010-08-13 16:24:37.000000000 -0400 424--- linux-2.6.35.7/arch/arm/mach-omap2/pm34xx.c 2010-08-26 19:47:12.000000000 -0400
347+++ linux-2.6.32.24/arch/arm/mach-omap2/pm34xx.c 2010-10-23 19:59:19.000000000 -0400 425+++ linux-2.6.35.7/arch/arm/mach-omap2/pm34xx.c 2010-09-17 20:12:09.000000000 -0400
348@@ -401,7 +401,7 @@ static void omap3_pm_end(void) 426@@ -669,7 +669,7 @@ static void omap3_pm_end(void)
349 return; 427 return;
350 } 428 }
351 429
@@ -354,10 +432,10 @@ diff -urNp linux-2.6.32.24/arch/arm/mach-omap2/pm34xx.c linux-2.6.32.24/arch/arm
354 .begin = omap3_pm_begin, 432 .begin = omap3_pm_begin,
355 .end = omap3_pm_end, 433 .end = omap3_pm_end,
356 .prepare = omap3_pm_prepare, 434 .prepare = omap3_pm_prepare,
357diff -urNp linux-2.6.32.24/arch/arm/mach-pnx4008/pm.c linux-2.6.32.24/arch/arm/mach-pnx4008/pm.c 435diff -urNp linux-2.6.35.7/arch/arm/mach-pnx4008/pm.c linux-2.6.35.7/arch/arm/mach-pnx4008/pm.c
358--- linux-2.6.32.24/arch/arm/mach-pnx4008/pm.c 2010-08-13 16:24:37.000000000 -0400 436--- linux-2.6.35.7/arch/arm/mach-pnx4008/pm.c 2010-08-26 19:47:12.000000000 -0400
359+++ linux-2.6.32.24/arch/arm/mach-pnx4008/pm.c 2010-10-23 19:59:19.000000000 -0400 437+++ linux-2.6.35.7/arch/arm/mach-pnx4008/pm.c 2010-09-17 20:12:09.000000000 -0400
360@@ -116,7 +116,7 @@ static int pnx4008_pm_valid(suspend_stat 438@@ -119,7 +119,7 @@ static int pnx4008_pm_valid(suspend_stat
361 (state == PM_SUSPEND_MEM); 439 (state == PM_SUSPEND_MEM);
362 } 440 }
363 441
@@ -366,10 +444,10 @@ diff -urNp linux-2.6.32.24/arch/arm/mach-pnx4008/pm.c linux-2.6.32.24/arch/arm/m
366 .enter = pnx4008_pm_enter, 444 .enter = pnx4008_pm_enter,
367 .valid = pnx4008_pm_valid, 445 .valid = pnx4008_pm_valid,
368 }; 446 };
369diff -urNp linux-2.6.32.24/arch/arm/mach-pxa/pm.c linux-2.6.32.24/arch/arm/mach-pxa/pm.c 447diff -urNp linux-2.6.35.7/arch/arm/mach-pxa/pm.c linux-2.6.35.7/arch/arm/mach-pxa/pm.c
370--- linux-2.6.32.24/arch/arm/mach-pxa/pm.c 2010-08-13 16:24:37.000000000 -0400 448--- linux-2.6.35.7/arch/arm/mach-pxa/pm.c 2010-08-26 19:47:12.000000000 -0400
371+++ linux-2.6.32.24/arch/arm/mach-pxa/pm.c 2010-10-23 19:59:19.000000000 -0400 449+++ linux-2.6.35.7/arch/arm/mach-pxa/pm.c 2010-09-17 20:12:09.000000000 -0400
372@@ -95,7 +95,7 @@ void pxa_pm_finish(void) 450@@ -96,7 +96,7 @@ void pxa_pm_finish(void)
373 pxa_cpu_pm_fns->finish(); 451 pxa_cpu_pm_fns->finish();
374 } 452 }
375 453
@@ -378,9 +456,9 @@ diff -urNp linux-2.6.32.24/arch/arm/mach-pxa/pm.c linux-2.6.32.24/arch/arm/mach-
378 .valid = pxa_pm_valid, 456 .valid = pxa_pm_valid,
379 .enter = pxa_pm_enter, 457 .enter = pxa_pm_enter,
380 .prepare = pxa_pm_prepare, 458 .prepare = pxa_pm_prepare,
381diff -urNp linux-2.6.32.24/arch/arm/mach-pxa/sharpsl_pm.c linux-2.6.32.24/arch/arm/mach-pxa/sharpsl_pm.c 459diff -urNp linux-2.6.35.7/arch/arm/mach-pxa/sharpsl_pm.c linux-2.6.35.7/arch/arm/mach-pxa/sharpsl_pm.c
382--- linux-2.6.32.24/arch/arm/mach-pxa/sharpsl_pm.c 2010-08-13 16:24:37.000000000 -0400 460--- linux-2.6.35.7/arch/arm/mach-pxa/sharpsl_pm.c 2010-08-26 19:47:12.000000000 -0400
383+++ linux-2.6.32.24/arch/arm/mach-pxa/sharpsl_pm.c 2010-10-23 19:59:19.000000000 -0400 461+++ linux-2.6.35.7/arch/arm/mach-pxa/sharpsl_pm.c 2010-09-17 20:12:09.000000000 -0400
384@@ -891,7 +891,7 @@ static void sharpsl_apm_get_power_status 462@@ -891,7 +891,7 @@ static void sharpsl_apm_get_power_status
385 } 463 }
386 464
@@ -390,9 +468,9 @@ diff -urNp linux-2.6.32.24/arch/arm/mach-pxa/sharpsl_pm.c linux-2.6.32.24/arch/a
390 .prepare = pxa_pm_prepare, 468 .prepare = pxa_pm_prepare,
391 .finish = pxa_pm_finish, 469 .finish = pxa_pm_finish,
392 .enter = corgi_pxa_pm_enter, 470 .enter = corgi_pxa_pm_enter,
393diff -urNp linux-2.6.32.24/arch/arm/mach-sa1100/pm.c linux-2.6.32.24/arch/arm/mach-sa1100/pm.c 471diff -urNp linux-2.6.35.7/arch/arm/mach-sa1100/pm.c linux-2.6.35.7/arch/arm/mach-sa1100/pm.c
394--- linux-2.6.32.24/arch/arm/mach-sa1100/pm.c 2010-08-13 16:24:37.000000000 -0400 472--- linux-2.6.35.7/arch/arm/mach-sa1100/pm.c 2010-08-26 19:47:12.000000000 -0400
395+++ linux-2.6.32.24/arch/arm/mach-sa1100/pm.c 2010-10-23 19:59:19.000000000 -0400 473+++ linux-2.6.35.7/arch/arm/mach-sa1100/pm.c 2010-09-17 20:12:09.000000000 -0400
396@@ -120,7 +120,7 @@ unsigned long sleep_phys_sp(void *sp) 474@@ -120,7 +120,7 @@ unsigned long sleep_phys_sp(void *sp)
397 return virt_to_phys(sp); 475 return virt_to_phys(sp);
398 } 476 }
@@ -402,10 +480,10 @@ diff -urNp linux-2.6.32.24/arch/arm/mach-sa1100/pm.c linux-2.6.32.24/arch/arm/ma
402 .enter = sa11x0_pm_enter, 480 .enter = sa11x0_pm_enter,
403 .valid = suspend_valid_only_mem, 481 .valid = suspend_valid_only_mem,
404 }; 482 };
405diff -urNp linux-2.6.32.24/arch/arm/mm/fault.c linux-2.6.32.24/arch/arm/mm/fault.c 483diff -urNp linux-2.6.35.7/arch/arm/mm/fault.c linux-2.6.35.7/arch/arm/mm/fault.c
406--- linux-2.6.32.24/arch/arm/mm/fault.c 2010-08-13 16:24:37.000000000 -0400 484--- linux-2.6.35.7/arch/arm/mm/fault.c 2010-08-26 19:47:12.000000000 -0400
407+++ linux-2.6.32.24/arch/arm/mm/fault.c 2010-10-23 19:59:19.000000000 -0400 485+++ linux-2.6.35.7/arch/arm/mm/fault.c 2010-09-17 20:12:09.000000000 -0400
408@@ -166,6 +166,13 @@ __do_user_fault(struct task_struct *tsk, 486@@ -167,6 +167,13 @@ __do_user_fault(struct task_struct *tsk,
409 } 487 }
410 #endif 488 #endif
411 489
@@ -419,7 +497,7 @@ diff -urNp linux-2.6.32.24/arch/arm/mm/fault.c linux-2.6.32.24/arch/arm/mm/fault
419 tsk->thread.address = addr; 497 tsk->thread.address = addr;
420 tsk->thread.error_code = fsr; 498 tsk->thread.error_code = fsr;
421 tsk->thread.trap_no = 14; 499 tsk->thread.trap_no = 14;
422@@ -357,6 +364,33 @@ do_page_fault(unsigned long addr, unsign 500@@ -364,6 +371,33 @@ do_page_fault(unsigned long addr, unsign
423 } 501 }
424 #endif /* CONFIG_MMU */ 502 #endif /* CONFIG_MMU */
425 503
@@ -453,9 +531,9 @@ diff -urNp linux-2.6.32.24/arch/arm/mm/fault.c linux-2.6.32.24/arch/arm/mm/fault
453 /* 531 /*
454 * First Level Translation Fault Handler 532 * First Level Translation Fault Handler
455 * 533 *
456diff -urNp linux-2.6.32.24/arch/arm/mm/mmap.c linux-2.6.32.24/arch/arm/mm/mmap.c 534diff -urNp linux-2.6.35.7/arch/arm/mm/mmap.c linux-2.6.35.7/arch/arm/mm/mmap.c
457--- linux-2.6.32.24/arch/arm/mm/mmap.c 2010-08-13 16:24:37.000000000 -0400 535--- linux-2.6.35.7/arch/arm/mm/mmap.c 2010-08-26 19:47:12.000000000 -0400
458+++ linux-2.6.32.24/arch/arm/mm/mmap.c 2010-10-23 19:59:19.000000000 -0400 536+++ linux-2.6.35.7/arch/arm/mm/mmap.c 2010-09-17 20:12:09.000000000 -0400
459@@ -63,6 +63,10 @@ arch_get_unmapped_area(struct file *filp 537@@ -63,6 +63,10 @@ arch_get_unmapped_area(struct file *filp
460 if (len > TASK_SIZE) 538 if (len > TASK_SIZE)
461 return -ENOMEM; 539 return -ENOMEM;
@@ -505,9 +583,9 @@ diff -urNp linux-2.6.32.24/arch/arm/mm/mmap.c linux-2.6.32.24/arch/arm/mm/mmap.c
505 /* 583 /*
506 * Remember the place where we stopped the search: 584 * Remember the place where we stopped the search:
507 */ 585 */
508diff -urNp linux-2.6.32.24/arch/arm/plat-s3c/pm.c linux-2.6.32.24/arch/arm/plat-s3c/pm.c 586diff -urNp linux-2.6.35.7/arch/arm/plat-samsung/pm.c linux-2.6.35.7/arch/arm/plat-samsung/pm.c
509--- linux-2.6.32.24/arch/arm/plat-s3c/pm.c 2010-08-13 16:24:37.000000000 -0400 587--- linux-2.6.35.7/arch/arm/plat-samsung/pm.c 2010-08-26 19:47:12.000000000 -0400
510+++ linux-2.6.32.24/arch/arm/plat-s3c/pm.c 2010-10-23 19:59:19.000000000 -0400 588+++ linux-2.6.35.7/arch/arm/plat-samsung/pm.c 2010-09-17 20:12:09.000000000 -0400
511@@ -355,7 +355,7 @@ static void s3c_pm_finish(void) 589@@ -355,7 +355,7 @@ static void s3c_pm_finish(void)
512 s3c_pm_check_cleanup(); 590 s3c_pm_check_cleanup();
513 } 591 }
@@ -517,10 +595,10 @@ diff -urNp linux-2.6.32.24/arch/arm/plat-s3c/pm.c linux-2.6.32.24/arch/arm/plat-
517 .enter = s3c_pm_enter, 595 .enter = s3c_pm_enter,
518 .prepare = s3c_pm_prepare, 596 .prepare = s3c_pm_prepare,
519 .finish = s3c_pm_finish, 597 .finish = s3c_pm_finish,
520diff -urNp linux-2.6.32.24/arch/avr32/include/asm/elf.h linux-2.6.32.24/arch/avr32/include/asm/elf.h 598diff -urNp linux-2.6.35.7/arch/avr32/include/asm/elf.h linux-2.6.35.7/arch/avr32/include/asm/elf.h
521--- linux-2.6.32.24/arch/avr32/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 599--- linux-2.6.35.7/arch/avr32/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
522+++ linux-2.6.32.24/arch/avr32/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 600+++ linux-2.6.35.7/arch/avr32/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
523@@ -85,8 +85,14 @@ typedef struct user_fpu_struct elf_fpreg 601@@ -84,8 +84,14 @@ typedef struct user_fpu_struct elf_fpreg
524 the loader. We need to make sure that it is out of the way of the program 602 the loader. We need to make sure that it is out of the way of the program
525 that it will "exec", and that there is sufficient room for the brk. */ 603 that it will "exec", and that there is sufficient room for the brk. */
526 604
@@ -536,9 +614,9 @@ diff -urNp linux-2.6.32.24/arch/avr32/include/asm/elf.h linux-2.6.32.24/arch/avr
536 614
537 /* This yields a mask that user programs can use to figure out what 615 /* This yields a mask that user programs can use to figure out what
538 instruction set this CPU supports. This could be done in user space, 616 instruction set this CPU supports. This could be done in user space,
539diff -urNp linux-2.6.32.24/arch/avr32/include/asm/kmap_types.h linux-2.6.32.24/arch/avr32/include/asm/kmap_types.h 617diff -urNp linux-2.6.35.7/arch/avr32/include/asm/kmap_types.h linux-2.6.35.7/arch/avr32/include/asm/kmap_types.h
540--- linux-2.6.32.24/arch/avr32/include/asm/kmap_types.h 2010-08-13 16:24:37.000000000 -0400 618--- linux-2.6.35.7/arch/avr32/include/asm/kmap_types.h 2010-08-26 19:47:12.000000000 -0400
541+++ linux-2.6.32.24/arch/avr32/include/asm/kmap_types.h 2010-10-23 19:59:19.000000000 -0400 619+++ linux-2.6.35.7/arch/avr32/include/asm/kmap_types.h 2010-09-17 20:12:09.000000000 -0400
542@@ -22,7 +22,8 @@ D(10) KM_IRQ0, 620@@ -22,7 +22,8 @@ D(10) KM_IRQ0,
543 D(11) KM_IRQ1, 621 D(11) KM_IRQ1,
544 D(12) KM_SOFTIRQ0, 622 D(12) KM_SOFTIRQ0,
@@ -549,9 +627,9 @@ diff -urNp linux-2.6.32.24/arch/avr32/include/asm/kmap_types.h linux-2.6.32.24/a
549 }; 627 };
550 628
551 #undef D 629 #undef D
552diff -urNp linux-2.6.32.24/arch/avr32/mach-at32ap/pm.c linux-2.6.32.24/arch/avr32/mach-at32ap/pm.c 630diff -urNp linux-2.6.35.7/arch/avr32/mach-at32ap/pm.c linux-2.6.35.7/arch/avr32/mach-at32ap/pm.c
553--- linux-2.6.32.24/arch/avr32/mach-at32ap/pm.c 2010-08-13 16:24:37.000000000 -0400 631--- linux-2.6.35.7/arch/avr32/mach-at32ap/pm.c 2010-08-26 19:47:12.000000000 -0400
554+++ linux-2.6.32.24/arch/avr32/mach-at32ap/pm.c 2010-10-23 19:59:19.000000000 -0400 632+++ linux-2.6.35.7/arch/avr32/mach-at32ap/pm.c 2010-09-17 20:12:09.000000000 -0400
555@@ -176,7 +176,7 @@ out: 633@@ -176,7 +176,7 @@ out:
556 return 0; 634 return 0;
557 } 635 }
@@ -561,9 +639,9 @@ diff -urNp linux-2.6.32.24/arch/avr32/mach-at32ap/pm.c linux-2.6.32.24/arch/avr3
561 .valid = avr32_pm_valid_state, 639 .valid = avr32_pm_valid_state,
562 .enter = avr32_pm_enter, 640 .enter = avr32_pm_enter,
563 }; 641 };
564diff -urNp linux-2.6.32.24/arch/avr32/mm/fault.c linux-2.6.32.24/arch/avr32/mm/fault.c 642diff -urNp linux-2.6.35.7/arch/avr32/mm/fault.c linux-2.6.35.7/arch/avr32/mm/fault.c
565--- linux-2.6.32.24/arch/avr32/mm/fault.c 2010-08-13 16:24:37.000000000 -0400 643--- linux-2.6.35.7/arch/avr32/mm/fault.c 2010-08-26 19:47:12.000000000 -0400
566+++ linux-2.6.32.24/arch/avr32/mm/fault.c 2010-10-23 19:59:19.000000000 -0400 644+++ linux-2.6.35.7/arch/avr32/mm/fault.c 2010-09-17 20:12:09.000000000 -0400
567@@ -41,6 +41,23 @@ static inline int notify_page_fault(stru 645@@ -41,6 +41,23 @@ static inline int notify_page_fault(stru
568 646
569 int exception_trace = 1; 647 int exception_trace = 1;
@@ -605,10 +683,10 @@ diff -urNp linux-2.6.32.24/arch/avr32/mm/fault.c linux-2.6.32.24/arch/avr32/mm/f
605 if (exception_trace && printk_ratelimit()) 683 if (exception_trace && printk_ratelimit())
606 printk("%s%s[%d]: segfault at %08lx pc %08lx " 684 printk("%s%s[%d]: segfault at %08lx pc %08lx "
607 "sp %08lx ecr %lu\n", 685 "sp %08lx ecr %lu\n",
608diff -urNp linux-2.6.32.24/arch/blackfin/kernel/kgdb.c linux-2.6.32.24/arch/blackfin/kernel/kgdb.c 686diff -urNp linux-2.6.35.7/arch/blackfin/kernel/kgdb.c linux-2.6.35.7/arch/blackfin/kernel/kgdb.c
609--- linux-2.6.32.24/arch/blackfin/kernel/kgdb.c 2010-08-13 16:24:37.000000000 -0400 687--- linux-2.6.35.7/arch/blackfin/kernel/kgdb.c 2010-08-26 19:47:12.000000000 -0400
610+++ linux-2.6.32.24/arch/blackfin/kernel/kgdb.c 2010-10-23 19:59:19.000000000 -0400 688+++ linux-2.6.35.7/arch/blackfin/kernel/kgdb.c 2010-09-17 20:12:09.000000000 -0400
611@@ -428,7 +428,7 @@ int kgdb_arch_handle_exception(int vecto 689@@ -397,7 +397,7 @@ int kgdb_arch_handle_exception(int vecto
612 return -1; /* this means that we do not want to exit from the handler */ 690 return -1; /* this means that we do not want to exit from the handler */
613 } 691 }
614 692
@@ -617,10 +695,10 @@ diff -urNp linux-2.6.32.24/arch/blackfin/kernel/kgdb.c linux-2.6.32.24/arch/blac
617 .gdb_bpt_instr = {0xa1}, 695 .gdb_bpt_instr = {0xa1},
618 #ifdef CONFIG_SMP 696 #ifdef CONFIG_SMP
619 .flags = KGDB_HW_BREAKPOINT|KGDB_THR_PROC_SWAP, 697 .flags = KGDB_HW_BREAKPOINT|KGDB_THR_PROC_SWAP,
620diff -urNp linux-2.6.32.24/arch/blackfin/mach-common/pm.c linux-2.6.32.24/arch/blackfin/mach-common/pm.c 698diff -urNp linux-2.6.35.7/arch/blackfin/mach-common/pm.c linux-2.6.35.7/arch/blackfin/mach-common/pm.c
621--- linux-2.6.32.24/arch/blackfin/mach-common/pm.c 2010-08-13 16:24:37.000000000 -0400 699--- linux-2.6.35.7/arch/blackfin/mach-common/pm.c 2010-08-26 19:47:12.000000000 -0400
622+++ linux-2.6.32.24/arch/blackfin/mach-common/pm.c 2010-10-23 19:59:19.000000000 -0400 700+++ linux-2.6.35.7/arch/blackfin/mach-common/pm.c 2010-09-17 20:12:09.000000000 -0400
623@@ -255,7 +255,7 @@ static int bfin_pm_enter(suspend_state_t 701@@ -232,7 +232,7 @@ static int bfin_pm_enter(suspend_state_t
624 return 0; 702 return 0;
625 } 703 }
626 704
@@ -629,9 +707,30 @@ diff -urNp linux-2.6.32.24/arch/blackfin/mach-common/pm.c linux-2.6.32.24/arch/b
629 .enter = bfin_pm_enter, 707 .enter = bfin_pm_enter,
630 .valid = bfin_pm_valid, 708 .valid = bfin_pm_valid,
631 }; 709 };
632diff -urNp linux-2.6.32.24/arch/frv/include/asm/kmap_types.h linux-2.6.32.24/arch/frv/include/asm/kmap_types.h 710diff -urNp linux-2.6.35.7/arch/blackfin/mm/maccess.c linux-2.6.35.7/arch/blackfin/mm/maccess.c
633--- linux-2.6.32.24/arch/frv/include/asm/kmap_types.h 2010-08-13 16:24:37.000000000 -0400 711--- linux-2.6.35.7/arch/blackfin/mm/maccess.c 2010-08-26 19:47:12.000000000 -0400
634+++ linux-2.6.32.24/arch/frv/include/asm/kmap_types.h 2010-10-23 19:59:19.000000000 -0400 712+++ linux-2.6.35.7/arch/blackfin/mm/maccess.c 2010-09-17 20:12:09.000000000 -0400
713@@ -16,7 +16,7 @@ static int validate_memory_access_addres
714 return bfin_mem_access_type(addr, size);
715 }
716
717-long probe_kernel_read(void *dst, void *src, size_t size)
718+long probe_kernel_read(void *dst, const void *src, size_t size)
719 {
720 unsigned long lsrc = (unsigned long)src;
721 int mem_type;
722@@ -55,7 +55,7 @@ long probe_kernel_read(void *dst, void *
723 return -EFAULT;
724 }
725
726-long probe_kernel_write(void *dst, void *src, size_t size)
727+long probe_kernel_write(void *dst, const void *src, size_t size)
728 {
729 unsigned long ldst = (unsigned long)dst;
730 int mem_type;
731diff -urNp linux-2.6.35.7/arch/frv/include/asm/kmap_types.h linux-2.6.35.7/arch/frv/include/asm/kmap_types.h
732--- linux-2.6.35.7/arch/frv/include/asm/kmap_types.h 2010-08-26 19:47:12.000000000 -0400
733+++ linux-2.6.35.7/arch/frv/include/asm/kmap_types.h 2010-09-17 20:12:09.000000000 -0400
635@@ -23,6 +23,7 @@ enum km_type { 734@@ -23,6 +23,7 @@ enum km_type {
636 KM_IRQ1, 735 KM_IRQ1,
637 KM_SOFTIRQ0, 736 KM_SOFTIRQ0,
@@ -640,9 +739,9 @@ diff -urNp linux-2.6.32.24/arch/frv/include/asm/kmap_types.h linux-2.6.32.24/arc
640 KM_TYPE_NR 739 KM_TYPE_NR
641 }; 740 };
642 741
643diff -urNp linux-2.6.32.24/arch/frv/mm/elf-fdpic.c linux-2.6.32.24/arch/frv/mm/elf-fdpic.c 742diff -urNp linux-2.6.35.7/arch/frv/mm/elf-fdpic.c linux-2.6.35.7/arch/frv/mm/elf-fdpic.c
644--- linux-2.6.32.24/arch/frv/mm/elf-fdpic.c 2010-08-13 16:24:37.000000000 -0400 743--- linux-2.6.35.7/arch/frv/mm/elf-fdpic.c 2010-08-26 19:47:12.000000000 -0400
645+++ linux-2.6.32.24/arch/frv/mm/elf-fdpic.c 2010-10-23 19:59:19.000000000 -0400 744+++ linux-2.6.35.7/arch/frv/mm/elf-fdpic.c 2010-09-17 20:12:09.000000000 -0400
646@@ -73,8 +73,7 @@ unsigned long arch_get_unmapped_area(str 745@@ -73,8 +73,7 @@ unsigned long arch_get_unmapped_area(str
647 if (addr) { 746 if (addr) {
648 addr = PAGE_ALIGN(addr); 747 addr = PAGE_ALIGN(addr);
@@ -671,9 +770,9 @@ diff -urNp linux-2.6.32.24/arch/frv/mm/elf-fdpic.c linux-2.6.32.24/arch/frv/mm/e
671 goto success; 770 goto success;
672 addr = vma->vm_end; 771 addr = vma->vm_end;
673 } 772 }
674diff -urNp linux-2.6.32.24/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.32.24/arch/ia64/hp/common/hwsw_iommu.c 773diff -urNp linux-2.6.35.7/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.35.7/arch/ia64/hp/common/hwsw_iommu.c
675--- linux-2.6.32.24/arch/ia64/hp/common/hwsw_iommu.c 2010-08-13 16:24:37.000000000 -0400 774--- linux-2.6.35.7/arch/ia64/hp/common/hwsw_iommu.c 2010-08-26 19:47:12.000000000 -0400
676+++ linux-2.6.32.24/arch/ia64/hp/common/hwsw_iommu.c 2010-10-23 19:59:19.000000000 -0400 775+++ linux-2.6.35.7/arch/ia64/hp/common/hwsw_iommu.c 2010-09-17 20:12:09.000000000 -0400
677@@ -17,7 +17,7 @@ 776@@ -17,7 +17,7 @@
678 #include <linux/swiotlb.h> 777 #include <linux/swiotlb.h>
679 #include <asm/machvec.h> 778 #include <asm/machvec.h>
@@ -692,9 +791,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/hp/common/hwsw_iommu.c linux-2.6.32.24/arch
692 { 791 {
693 if (use_swiotlb(dev)) 792 if (use_swiotlb(dev))
694 return &swiotlb_dma_ops; 793 return &swiotlb_dma_ops;
695diff -urNp linux-2.6.32.24/arch/ia64/hp/common/sba_iommu.c linux-2.6.32.24/arch/ia64/hp/common/sba_iommu.c 794diff -urNp linux-2.6.35.7/arch/ia64/hp/common/sba_iommu.c linux-2.6.35.7/arch/ia64/hp/common/sba_iommu.c
696--- linux-2.6.32.24/arch/ia64/hp/common/sba_iommu.c 2010-08-13 16:24:37.000000000 -0400 795--- linux-2.6.35.7/arch/ia64/hp/common/sba_iommu.c 2010-08-26 19:47:12.000000000 -0400
697+++ linux-2.6.32.24/arch/ia64/hp/common/sba_iommu.c 2010-10-23 19:59:19.000000000 -0400 796+++ linux-2.6.35.7/arch/ia64/hp/common/sba_iommu.c 2010-09-17 20:12:09.000000000 -0400
698@@ -2097,7 +2097,7 @@ static struct acpi_driver acpi_sba_ioc_d 797@@ -2097,7 +2097,7 @@ static struct acpi_driver acpi_sba_ioc_d
699 }, 798 },
700 }; 799 };
@@ -713,45 +812,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/hp/common/sba_iommu.c linux-2.6.32.24/arch/
713 .alloc_coherent = sba_alloc_coherent, 812 .alloc_coherent = sba_alloc_coherent,
714 .free_coherent = sba_free_coherent, 813 .free_coherent = sba_free_coherent,
715 .map_page = sba_map_page, 814 .map_page = sba_map_page,
716diff -urNp linux-2.6.32.24/arch/ia64/ia32/binfmt_elf32.c linux-2.6.32.24/arch/ia64/ia32/binfmt_elf32.c 815diff -urNp linux-2.6.35.7/arch/ia64/include/asm/dma-mapping.h linux-2.6.35.7/arch/ia64/include/asm/dma-mapping.h
717--- linux-2.6.32.24/arch/ia64/ia32/binfmt_elf32.c 2010-08-13 16:24:37.000000000 -0400 816--- linux-2.6.35.7/arch/ia64/include/asm/dma-mapping.h 2010-08-26 19:47:12.000000000 -0400
718+++ linux-2.6.32.24/arch/ia64/ia32/binfmt_elf32.c 2010-10-23 19:59:19.000000000 -0400 817+++ linux-2.6.35.7/arch/ia64/include/asm/dma-mapping.h 2010-09-17 20:12:09.000000000 -0400
719@@ -45,6 +45,13 @@ randomize_stack_top(unsigned long stack_
720
721 #define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack))
722
723+#ifdef CONFIG_PAX_ASLR
724+#define PAX_ELF_ET_DYN_BASE (current->personality == PER_LINUX32 ? 0x08048000UL : 0x4000000000000000UL)
725+
726+#define PAX_DELTA_MMAP_LEN (current->personality == PER_LINUX32 ? 16 : 3*PAGE_SHIFT - 13)
727+#define PAX_DELTA_STACK_LEN (current->personality == PER_LINUX32 ? 16 : 3*PAGE_SHIFT - 13)
728+#endif
729+
730 /* Ugly but avoids duplication */
731 #include "../../../fs/binfmt_elf.c"
732
733diff -urNp linux-2.6.32.24/arch/ia64/ia32/ia32priv.h linux-2.6.32.24/arch/ia64/ia32/ia32priv.h
734--- linux-2.6.32.24/arch/ia64/ia32/ia32priv.h 2010-08-13 16:24:37.000000000 -0400
735+++ linux-2.6.32.24/arch/ia64/ia32/ia32priv.h 2010-10-23 19:59:19.000000000 -0400
736@@ -296,7 +296,14 @@ typedef struct compat_siginfo {
737 #define ELF_DATA ELFDATA2LSB
738 #define ELF_ARCH EM_386
739
740-#define IA32_STACK_TOP IA32_PAGE_OFFSET
741+#ifdef CONFIG_PAX_RANDUSTACK
742+#define __IA32_DELTA_STACK (current->mm->delta_stack)
743+#else
744+#define __IA32_DELTA_STACK 0UL
745+#endif
746+
747+#define IA32_STACK_TOP (IA32_PAGE_OFFSET - __IA32_DELTA_STACK)
748+
749 #define IA32_GATE_OFFSET IA32_PAGE_OFFSET
750 #define IA32_GATE_END IA32_PAGE_OFFSET + PAGE_SIZE
751
752diff -urNp linux-2.6.32.24/arch/ia64/include/asm/dma-mapping.h linux-2.6.32.24/arch/ia64/include/asm/dma-mapping.h
753--- linux-2.6.32.24/arch/ia64/include/asm/dma-mapping.h 2010-08-13 16:24:37.000000000 -0400
754+++ linux-2.6.32.24/arch/ia64/include/asm/dma-mapping.h 2010-10-23 19:59:19.000000000 -0400
755@@ -12,7 +12,7 @@ 818@@ -12,7 +12,7 @@
756 819
757 #define ARCH_HAS_DMA_GET_REQUIRED_MASK 820 #define ARCH_HAS_DMA_GET_REQUIRED_MASK
@@ -795,10 +858,10 @@ diff -urNp linux-2.6.32.24/arch/ia64/include/asm/dma-mapping.h linux-2.6.32.24/a
795 return ops->dma_supported(dev, mask); 858 return ops->dma_supported(dev, mask);
796 } 859 }
797 860
798diff -urNp linux-2.6.32.24/arch/ia64/include/asm/elf.h linux-2.6.32.24/arch/ia64/include/asm/elf.h 861diff -urNp linux-2.6.35.7/arch/ia64/include/asm/elf.h linux-2.6.35.7/arch/ia64/include/asm/elf.h
799--- linux-2.6.32.24/arch/ia64/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 862--- linux-2.6.35.7/arch/ia64/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
800+++ linux-2.6.32.24/arch/ia64/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 863+++ linux-2.6.35.7/arch/ia64/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
801@@ -43,6 +43,13 @@ 864@@ -42,6 +42,13 @@
802 */ 865 */
803 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x800000000UL) 866 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x800000000UL)
804 867
@@ -812,9 +875,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/include/asm/elf.h linux-2.6.32.24/arch/ia64
812 #define PT_IA_64_UNWIND 0x70000001 875 #define PT_IA_64_UNWIND 0x70000001
813 876
814 /* IA-64 relocations: */ 877 /* IA-64 relocations: */
815diff -urNp linux-2.6.32.24/arch/ia64/include/asm/machvec.h linux-2.6.32.24/arch/ia64/include/asm/machvec.h 878diff -urNp linux-2.6.35.7/arch/ia64/include/asm/machvec.h linux-2.6.35.7/arch/ia64/include/asm/machvec.h
816--- linux-2.6.32.24/arch/ia64/include/asm/machvec.h 2010-08-13 16:24:37.000000000 -0400 879--- linux-2.6.35.7/arch/ia64/include/asm/machvec.h 2010-08-26 19:47:12.000000000 -0400
817+++ linux-2.6.32.24/arch/ia64/include/asm/machvec.h 2010-10-23 19:59:19.000000000 -0400 880+++ linux-2.6.35.7/arch/ia64/include/asm/machvec.h 2010-09-17 20:12:09.000000000 -0400
818@@ -45,7 +45,7 @@ typedef void ia64_mv_kernel_launch_event 881@@ -45,7 +45,7 @@ typedef void ia64_mv_kernel_launch_event
819 /* DMA-mapping interface: */ 882 /* DMA-mapping interface: */
820 typedef void ia64_mv_dma_init (void); 883 typedef void ia64_mv_dma_init (void);
@@ -833,9 +896,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/include/asm/machvec.h linux-2.6.32.24/arch/
833 896
834 /* 897 /*
835 * Define default versions so we can extend machvec for new platforms without having 898 * Define default versions so we can extend machvec for new platforms without having
836diff -urNp linux-2.6.32.24/arch/ia64/include/asm/pgtable.h linux-2.6.32.24/arch/ia64/include/asm/pgtable.h 899diff -urNp linux-2.6.35.7/arch/ia64/include/asm/pgtable.h linux-2.6.35.7/arch/ia64/include/asm/pgtable.h
837--- linux-2.6.32.24/arch/ia64/include/asm/pgtable.h 2010-08-13 16:24:37.000000000 -0400 900--- linux-2.6.35.7/arch/ia64/include/asm/pgtable.h 2010-08-26 19:47:12.000000000 -0400
838+++ linux-2.6.32.24/arch/ia64/include/asm/pgtable.h 2010-10-23 19:59:19.000000000 -0400 901+++ linux-2.6.35.7/arch/ia64/include/asm/pgtable.h 2010-09-17 20:12:09.000000000 -0400
839@@ -12,7 +12,7 @@ 902@@ -12,7 +12,7 @@
840 * David Mosberger-Tang <davidm@hpl.hp.com> 903 * David Mosberger-Tang <davidm@hpl.hp.com>
841 */ 904 */
@@ -863,9 +926,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/include/asm/pgtable.h linux-2.6.32.24/arch/
863 #define PAGE_GATE __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_X_RX) 926 #define PAGE_GATE __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_X_RX)
864 #define PAGE_KERNEL __pgprot(__DIRTY_BITS | _PAGE_PL_0 | _PAGE_AR_RWX) 927 #define PAGE_KERNEL __pgprot(__DIRTY_BITS | _PAGE_PL_0 | _PAGE_AR_RWX)
865 #define PAGE_KERNELRX __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_RX) 928 #define PAGE_KERNELRX __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_RX)
866diff -urNp linux-2.6.32.24/arch/ia64/include/asm/uaccess.h linux-2.6.32.24/arch/ia64/include/asm/uaccess.h 929diff -urNp linux-2.6.35.7/arch/ia64/include/asm/uaccess.h linux-2.6.35.7/arch/ia64/include/asm/uaccess.h
867--- linux-2.6.32.24/arch/ia64/include/asm/uaccess.h 2010-08-13 16:24:37.000000000 -0400 930--- linux-2.6.35.7/arch/ia64/include/asm/uaccess.h 2010-08-26 19:47:12.000000000 -0400
868+++ linux-2.6.32.24/arch/ia64/include/asm/uaccess.h 2010-10-23 19:59:19.000000000 -0400 931+++ linux-2.6.35.7/arch/ia64/include/asm/uaccess.h 2010-09-17 20:12:09.000000000 -0400
869@@ -257,7 +257,7 @@ __copy_from_user (void *to, const void _ 932@@ -257,7 +257,7 @@ __copy_from_user (void *to, const void _
870 const void *__cu_from = (from); \ 933 const void *__cu_from = (from); \
871 long __cu_len = (n); \ 934 long __cu_len = (n); \
@@ -884,9 +947,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/include/asm/uaccess.h linux-2.6.32.24/arch/
884 __cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \ 947 __cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \
885 __cu_len; \ 948 __cu_len; \
886 }) 949 })
887diff -urNp linux-2.6.32.24/arch/ia64/kernel/dma-mapping.c linux-2.6.32.24/arch/ia64/kernel/dma-mapping.c 950diff -urNp linux-2.6.35.7/arch/ia64/kernel/dma-mapping.c linux-2.6.35.7/arch/ia64/kernel/dma-mapping.c
888--- linux-2.6.32.24/arch/ia64/kernel/dma-mapping.c 2010-08-13 16:24:37.000000000 -0400 951--- linux-2.6.35.7/arch/ia64/kernel/dma-mapping.c 2010-08-26 19:47:12.000000000 -0400
889+++ linux-2.6.32.24/arch/ia64/kernel/dma-mapping.c 2010-10-23 19:59:19.000000000 -0400 952+++ linux-2.6.35.7/arch/ia64/kernel/dma-mapping.c 2010-09-17 20:12:09.000000000 -0400
890@@ -3,7 +3,7 @@ 953@@ -3,7 +3,7 @@
891 /* Set this to 1 if there is a HW IOMMU in the system */ 954 /* Set this to 1 if there is a HW IOMMU in the system */
892 int iommu_detected __read_mostly; 955 int iommu_detected __read_mostly;
@@ -905,9 +968,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/kernel/dma-mapping.c linux-2.6.32.24/arch/i
905 { 968 {
906 return dma_ops; 969 return dma_ops;
907 } 970 }
908diff -urNp linux-2.6.32.24/arch/ia64/kernel/module.c linux-2.6.32.24/arch/ia64/kernel/module.c 971diff -urNp linux-2.6.35.7/arch/ia64/kernel/module.c linux-2.6.35.7/arch/ia64/kernel/module.c
909--- linux-2.6.32.24/arch/ia64/kernel/module.c 2010-08-13 16:24:37.000000000 -0400 972--- linux-2.6.35.7/arch/ia64/kernel/module.c 2010-08-26 19:47:12.000000000 -0400
910+++ linux-2.6.32.24/arch/ia64/kernel/module.c 2010-10-23 19:59:19.000000000 -0400 973+++ linux-2.6.35.7/arch/ia64/kernel/module.c 2010-09-17 20:12:09.000000000 -0400
911@@ -315,8 +315,7 @@ module_alloc (unsigned long size) 974@@ -315,8 +315,7 @@ module_alloc (unsigned long size)
912 void 975 void
913 module_free (struct module *mod, void *module_region) 976 module_free (struct module *mod, void *module_region)
@@ -996,9 +1059,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/kernel/module.c linux-2.6.32.24/arch/ia64/k
996 mod->arch.gp = gp; 1059 mod->arch.gp = gp;
997 DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp); 1060 DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
998 } 1061 }
999diff -urNp linux-2.6.32.24/arch/ia64/kernel/pci-dma.c linux-2.6.32.24/arch/ia64/kernel/pci-dma.c 1062diff -urNp linux-2.6.35.7/arch/ia64/kernel/pci-dma.c linux-2.6.35.7/arch/ia64/kernel/pci-dma.c
1000--- linux-2.6.32.24/arch/ia64/kernel/pci-dma.c 2010-08-13 16:24:37.000000000 -0400 1063--- linux-2.6.35.7/arch/ia64/kernel/pci-dma.c 2010-08-26 19:47:12.000000000 -0400
1001+++ linux-2.6.32.24/arch/ia64/kernel/pci-dma.c 2010-10-23 19:59:19.000000000 -0400 1064+++ linux-2.6.35.7/arch/ia64/kernel/pci-dma.c 2010-09-17 20:12:09.000000000 -0400
1002@@ -43,7 +43,7 @@ struct device fallback_dev = { 1065@@ -43,7 +43,7 @@ struct device fallback_dev = {
1003 .dma_mask = &fallback_dev.coherent_dma_mask, 1066 .dma_mask = &fallback_dev.coherent_dma_mask,
1004 }; 1067 };
@@ -1008,52 +1071,10 @@ diff -urNp linux-2.6.32.24/arch/ia64/kernel/pci-dma.c linux-2.6.32.24/arch/ia64/
1008 1071
1009 static int __init pci_iommu_init(void) 1072 static int __init pci_iommu_init(void)
1010 { 1073 {
1011@@ -96,15 +96,34 @@ int iommu_dma_supported(struct device *d 1074diff -urNp linux-2.6.35.7/arch/ia64/kernel/pci-swiotlb.c linux-2.6.35.7/arch/ia64/kernel/pci-swiotlb.c
1012 } 1075--- linux-2.6.35.7/arch/ia64/kernel/pci-swiotlb.c 2010-08-26 19:47:12.000000000 -0400
1013 EXPORT_SYMBOL(iommu_dma_supported); 1076+++ linux-2.6.35.7/arch/ia64/kernel/pci-swiotlb.c 2010-09-17 20:12:09.000000000 -0400
1014 1077@@ -22,7 +22,7 @@ static void *ia64_swiotlb_alloc_coherent
1015+extern void *intel_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flags);
1016+extern void intel_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle);
1017+extern int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int nelems, enum dma_data_direction dir, struct dma_attrs *attrs);
1018+extern void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist, int nelems, enum dma_data_direction dir, struct dma_attrs *attrs);
1019+extern dma_addr_t intel_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs);
1020+extern void intel_unmap_page(struct device *dev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs);
1021+extern int intel_mapping_error(struct device *dev, dma_addr_t dma_addr);
1022+
1023+static const struct dma_map_ops intel_iommu_dma_ops = {
1024+ /* from drivers/pci/intel-iommu.c:intel_dma_ops */
1025+ .alloc_coherent = intel_alloc_coherent,
1026+ .free_coherent = intel_free_coherent,
1027+ .map_sg = intel_map_sg,
1028+ .unmap_sg = intel_unmap_sg,
1029+ .map_page = intel_map_page,
1030+ .unmap_page = intel_unmap_page,
1031+ .mapping_error = intel_mapping_error,
1032+
1033+ .sync_single_for_cpu = machvec_dma_sync_single,
1034+ .sync_sg_for_cpu = machvec_dma_sync_sg,
1035+ .sync_single_for_device = machvec_dma_sync_single,
1036+ .sync_sg_for_device = machvec_dma_sync_sg,
1037+ .dma_supported = iommu_dma_supported,
1038+};
1039+
1040 void __init pci_iommu_alloc(void)
1041 {
1042- dma_ops = &intel_dma_ops;
1043-
1044- dma_ops->sync_single_for_cpu = machvec_dma_sync_single;
1045- dma_ops->sync_sg_for_cpu = machvec_dma_sync_sg;
1046- dma_ops->sync_single_for_device = machvec_dma_sync_single;
1047- dma_ops->sync_sg_for_device = machvec_dma_sync_sg;
1048- dma_ops->dma_supported = iommu_dma_supported;
1049+ dma_ops = &intel_iommu_dma_ops;
1050
1051 /*
1052 * The order of these functions is important for
1053diff -urNp linux-2.6.32.24/arch/ia64/kernel/pci-swiotlb.c linux-2.6.32.24/arch/ia64/kernel/pci-swiotlb.c
1054--- linux-2.6.32.24/arch/ia64/kernel/pci-swiotlb.c 2010-08-13 16:24:37.000000000 -0400
1055+++ linux-2.6.32.24/arch/ia64/kernel/pci-swiotlb.c 2010-10-23 19:59:19.000000000 -0400
1056@@ -21,7 +21,7 @@ static void *ia64_swiotlb_alloc_coherent
1057 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); 1078 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
1058 } 1079 }
1059 1080
@@ -1062,9 +1083,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/kernel/pci-swiotlb.c linux-2.6.32.24/arch/i
1062 .alloc_coherent = ia64_swiotlb_alloc_coherent, 1083 .alloc_coherent = ia64_swiotlb_alloc_coherent,
1063 .free_coherent = swiotlb_free_coherent, 1084 .free_coherent = swiotlb_free_coherent,
1064 .map_page = swiotlb_map_page, 1085 .map_page = swiotlb_map_page,
1065diff -urNp linux-2.6.32.24/arch/ia64/kernel/sys_ia64.c linux-2.6.32.24/arch/ia64/kernel/sys_ia64.c 1086diff -urNp linux-2.6.35.7/arch/ia64/kernel/sys_ia64.c linux-2.6.35.7/arch/ia64/kernel/sys_ia64.c
1066--- linux-2.6.32.24/arch/ia64/kernel/sys_ia64.c 2010-08-13 16:24:37.000000000 -0400 1087--- linux-2.6.35.7/arch/ia64/kernel/sys_ia64.c 2010-08-26 19:47:12.000000000 -0400
1067+++ linux-2.6.32.24/arch/ia64/kernel/sys_ia64.c 2010-10-23 19:59:19.000000000 -0400 1088+++ linux-2.6.35.7/arch/ia64/kernel/sys_ia64.c 2010-09-17 20:12:09.000000000 -0400
1068@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *fil 1089@@ -43,6 +43,13 @@ arch_get_unmapped_area (struct file *fil
1069 if (REGION_NUMBER(addr) == RGN_HPAGE) 1090 if (REGION_NUMBER(addr) == RGN_HPAGE)
1070 addr = 0; 1091 addr = 0;
@@ -1097,22 +1118,10 @@ diff -urNp linux-2.6.32.24/arch/ia64/kernel/sys_ia64.c linux-2.6.32.24/arch/ia64
1097 /* Remember the address where we stopped this search: */ 1118 /* Remember the address where we stopped this search: */
1098 mm->free_area_cache = addr + len; 1119 mm->free_area_cache = addr + len;
1099 return addr; 1120 return addr;
1100diff -urNp linux-2.6.32.24/arch/ia64/kernel/topology.c linux-2.6.32.24/arch/ia64/kernel/topology.c 1121diff -urNp linux-2.6.35.7/arch/ia64/kernel/vmlinux.lds.S linux-2.6.35.7/arch/ia64/kernel/vmlinux.lds.S
1101--- linux-2.6.32.24/arch/ia64/kernel/topology.c 2010-08-13 16:24:37.000000000 -0400 1122--- linux-2.6.35.7/arch/ia64/kernel/vmlinux.lds.S 2010-08-26 19:47:12.000000000 -0400
1102+++ linux-2.6.32.24/arch/ia64/kernel/topology.c 2010-10-23 19:59:19.000000000 -0400 1123+++ linux-2.6.35.7/arch/ia64/kernel/vmlinux.lds.S 2010-09-17 20:12:09.000000000 -0400
1103@@ -282,7 +282,7 @@ static ssize_t cache_show(struct kobject 1124@@ -196,7 +196,7 @@ SECTIONS
1104 return ret;
1105 }
1106
1107-static struct sysfs_ops cache_sysfs_ops = {
1108+static const struct sysfs_ops cache_sysfs_ops = {
1109 .show = cache_show
1110 };
1111
1112diff -urNp linux-2.6.32.24/arch/ia64/kernel/vmlinux.lds.S linux-2.6.32.24/arch/ia64/kernel/vmlinux.lds.S
1113--- linux-2.6.32.24/arch/ia64/kernel/vmlinux.lds.S 2010-08-13 16:24:37.000000000 -0400
1114+++ linux-2.6.32.24/arch/ia64/kernel/vmlinux.lds.S 2010-10-23 19:59:19.000000000 -0400
1115@@ -190,7 +190,7 @@ SECTIONS
1116 /* Per-cpu data: */ 1125 /* Per-cpu data: */
1117 . = ALIGN(PERCPU_PAGE_SIZE); 1126 . = ALIGN(PERCPU_PAGE_SIZE);
1118 PERCPU_VADDR(PERCPU_ADDR, :percpu) 1127 PERCPU_VADDR(PERCPU_ADDR, :percpu)
@@ -1121,9 +1130,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/kernel/vmlinux.lds.S linux-2.6.32.24/arch/i
1121 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits 1130 . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits
1122 * into percpu page size 1131 * into percpu page size
1123 */ 1132 */
1124diff -urNp linux-2.6.32.24/arch/ia64/mm/fault.c linux-2.6.32.24/arch/ia64/mm/fault.c 1133diff -urNp linux-2.6.35.7/arch/ia64/mm/fault.c linux-2.6.35.7/arch/ia64/mm/fault.c
1125--- linux-2.6.32.24/arch/ia64/mm/fault.c 2010-08-13 16:24:37.000000000 -0400 1134--- linux-2.6.35.7/arch/ia64/mm/fault.c 2010-08-26 19:47:12.000000000 -0400
1126+++ linux-2.6.32.24/arch/ia64/mm/fault.c 2010-10-23 19:59:19.000000000 -0400 1135+++ linux-2.6.35.7/arch/ia64/mm/fault.c 2010-09-17 20:12:09.000000000 -0400
1127@@ -72,6 +72,23 @@ mapped_kernel_page_is_present (unsigned 1136@@ -72,6 +72,23 @@ mapped_kernel_page_is_present (unsigned
1128 return pte_present(pte); 1137 return pte_present(pte);
1129 } 1138 }
@@ -1170,13 +1179,13 @@ diff -urNp linux-2.6.32.24/arch/ia64/mm/fault.c linux-2.6.32.24/arch/ia64/mm/fau
1170 1179
1171+ } 1180+ }
1172+ 1181+
1173 survive:
1174 /* 1182 /*
1175 * If for any reason at all we couldn't handle the fault, make 1183 * If for any reason at all we couldn't handle the fault, make
1176diff -urNp linux-2.6.32.24/arch/ia64/mm/hugetlbpage.c linux-2.6.32.24/arch/ia64/mm/hugetlbpage.c 1184 * sure we exit gracefully rather than endlessly redo the
1177--- linux-2.6.32.24/arch/ia64/mm/hugetlbpage.c 2010-08-13 16:24:37.000000000 -0400 1185diff -urNp linux-2.6.35.7/arch/ia64/mm/hugetlbpage.c linux-2.6.35.7/arch/ia64/mm/hugetlbpage.c
1178+++ linux-2.6.32.24/arch/ia64/mm/hugetlbpage.c 2010-10-23 19:59:19.000000000 -0400 1186--- linux-2.6.35.7/arch/ia64/mm/hugetlbpage.c 2010-08-26 19:47:12.000000000 -0400
1179@@ -172,7 +172,7 @@ unsigned long hugetlb_get_unmapped_area( 1187+++ linux-2.6.35.7/arch/ia64/mm/hugetlbpage.c 2010-09-17 20:12:09.000000000 -0400
1188@@ -171,7 +171,7 @@ unsigned long hugetlb_get_unmapped_area(
1180 /* At this point: (!vmm || addr < vmm->vm_end). */ 1189 /* At this point: (!vmm || addr < vmm->vm_end). */
1181 if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT) 1190 if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT)
1182 return -ENOMEM; 1191 return -ENOMEM;
@@ -1185,9 +1194,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/mm/hugetlbpage.c linux-2.6.32.24/arch/ia64/
1185 return addr; 1194 return addr;
1186 addr = ALIGN(vmm->vm_end, HPAGE_SIZE); 1195 addr = ALIGN(vmm->vm_end, HPAGE_SIZE);
1187 } 1196 }
1188diff -urNp linux-2.6.32.24/arch/ia64/mm/init.c linux-2.6.32.24/arch/ia64/mm/init.c 1197diff -urNp linux-2.6.35.7/arch/ia64/mm/init.c linux-2.6.35.7/arch/ia64/mm/init.c
1189--- linux-2.6.32.24/arch/ia64/mm/init.c 2010-08-13 16:24:37.000000000 -0400 1198--- linux-2.6.35.7/arch/ia64/mm/init.c 2010-08-26 19:47:12.000000000 -0400
1190+++ linux-2.6.32.24/arch/ia64/mm/init.c 2010-10-23 19:59:19.000000000 -0400 1199+++ linux-2.6.35.7/arch/ia64/mm/init.c 2010-09-17 20:12:09.000000000 -0400
1191@@ -122,6 +122,19 @@ ia64_init_addr_space (void) 1200@@ -122,6 +122,19 @@ ia64_init_addr_space (void)
1192 vma->vm_start = current->thread.rbs_bot & PAGE_MASK; 1201 vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
1193 vma->vm_end = vma->vm_start + PAGE_SIZE; 1202 vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -1208,10 +1217,10 @@ diff -urNp linux-2.6.32.24/arch/ia64/mm/init.c linux-2.6.32.24/arch/ia64/mm/init
1208 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); 1217 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
1209 down_write(&current->mm->mmap_sem); 1218 down_write(&current->mm->mmap_sem);
1210 if (insert_vm_struct(current->mm, vma)) { 1219 if (insert_vm_struct(current->mm, vma)) {
1211diff -urNp linux-2.6.32.24/arch/ia64/sn/pci/pci_dma.c linux-2.6.32.24/arch/ia64/sn/pci/pci_dma.c 1220diff -urNp linux-2.6.35.7/arch/ia64/sn/pci/pci_dma.c linux-2.6.35.7/arch/ia64/sn/pci/pci_dma.c
1212--- linux-2.6.32.24/arch/ia64/sn/pci/pci_dma.c 2010-08-13 16:24:37.000000000 -0400 1221--- linux-2.6.35.7/arch/ia64/sn/pci/pci_dma.c 2010-08-26 19:47:12.000000000 -0400
1213+++ linux-2.6.32.24/arch/ia64/sn/pci/pci_dma.c 2010-10-23 19:59:19.000000000 -0400 1222+++ linux-2.6.35.7/arch/ia64/sn/pci/pci_dma.c 2010-09-17 20:12:09.000000000 -0400
1214@@ -464,7 +464,7 @@ int sn_pci_legacy_write(struct pci_bus * 1223@@ -465,7 +465,7 @@ int sn_pci_legacy_write(struct pci_bus *
1215 return ret; 1224 return ret;
1216 } 1225 }
1217 1226
@@ -1220,9 +1229,9 @@ diff -urNp linux-2.6.32.24/arch/ia64/sn/pci/pci_dma.c linux-2.6.32.24/arch/ia64/
1220 .alloc_coherent = sn_dma_alloc_coherent, 1229 .alloc_coherent = sn_dma_alloc_coherent,
1221 .free_coherent = sn_dma_free_coherent, 1230 .free_coherent = sn_dma_free_coherent,
1222 .map_page = sn_dma_map_page, 1231 .map_page = sn_dma_map_page,
1223diff -urNp linux-2.6.32.24/arch/m32r/lib/usercopy.c linux-2.6.32.24/arch/m32r/lib/usercopy.c 1232diff -urNp linux-2.6.35.7/arch/m32r/lib/usercopy.c linux-2.6.35.7/arch/m32r/lib/usercopy.c
1224--- linux-2.6.32.24/arch/m32r/lib/usercopy.c 2010-08-13 16:24:37.000000000 -0400 1233--- linux-2.6.35.7/arch/m32r/lib/usercopy.c 2010-08-26 19:47:12.000000000 -0400
1225+++ linux-2.6.32.24/arch/m32r/lib/usercopy.c 2010-10-23 19:59:19.000000000 -0400 1234+++ linux-2.6.35.7/arch/m32r/lib/usercopy.c 2010-09-17 20:12:09.000000000 -0400
1226@@ -14,6 +14,9 @@ 1235@@ -14,6 +14,9 @@
1227 unsigned long 1236 unsigned long
1228 __generic_copy_to_user(void __user *to, const void *from, unsigned long n) 1237 __generic_copy_to_user(void __user *to, const void *from, unsigned long n)
@@ -1243,10 +1252,143 @@ diff -urNp linux-2.6.32.24/arch/m32r/lib/usercopy.c linux-2.6.32.24/arch/m32r/li
1243 prefetchw(to); 1252 prefetchw(to);
1244 if (access_ok(VERIFY_READ, from, n)) 1253 if (access_ok(VERIFY_READ, from, n))
1245 __copy_user_zeroing(to,from,n); 1254 __copy_user_zeroing(to,from,n);
1246diff -urNp linux-2.6.32.24/arch/mips/alchemy/devboards/pm.c linux-2.6.32.24/arch/mips/alchemy/devboards/pm.c 1255diff -urNp linux-2.6.35.7/arch/microblaze/include/asm/device.h linux-2.6.35.7/arch/microblaze/include/asm/device.h
1247--- linux-2.6.32.24/arch/mips/alchemy/devboards/pm.c 2010-08-13 16:24:37.000000000 -0400 1256--- linux-2.6.35.7/arch/microblaze/include/asm/device.h 2010-08-26 19:47:12.000000000 -0400
1248+++ linux-2.6.32.24/arch/mips/alchemy/devboards/pm.c 2010-10-23 19:59:19.000000000 -0400 1257+++ linux-2.6.35.7/arch/microblaze/include/asm/device.h 2010-09-17 20:12:09.000000000 -0400
1249@@ -78,7 +78,7 @@ static void db1x_pm_end(void) 1258@@ -13,7 +13,7 @@ struct device_node;
1259
1260 struct dev_archdata {
1261 /* DMA operations on that device */
1262- struct dma_map_ops *dma_ops;
1263+ const struct dma_map_ops *dma_ops;
1264 void *dma_data;
1265 };
1266
1267diff -urNp linux-2.6.35.7/arch/microblaze/include/asm/dma-mapping.h linux-2.6.35.7/arch/microblaze/include/asm/dma-mapping.h
1268--- linux-2.6.35.7/arch/microblaze/include/asm/dma-mapping.h 2010-08-26 19:47:12.000000000 -0400
1269+++ linux-2.6.35.7/arch/microblaze/include/asm/dma-mapping.h 2010-09-17 20:12:09.000000000 -0400
1270@@ -43,14 +43,14 @@ static inline unsigned long device_to_ma
1271 return 0xfffffffful;
1272 }
1273
1274-extern struct dma_map_ops *dma_ops;
1275+extern const struct dma_map_ops *dma_ops;
1276
1277 /*
1278 * Available generic sets of operations
1279 */
1280-extern struct dma_map_ops dma_direct_ops;
1281+extern const struct dma_map_ops dma_direct_ops;
1282
1283-static inline struct dma_map_ops *get_dma_ops(struct device *dev)
1284+static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
1285 {
1286 /* We don't handle the NULL dev case for ISA for now. We could
1287 * do it via an out of line call but it is not needed for now. The
1288@@ -63,14 +63,14 @@ static inline struct dma_map_ops *get_dm
1289 return dev->archdata.dma_ops;
1290 }
1291
1292-static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
1293+static inline void set_dma_ops(struct device *dev, const struct dma_map_ops *ops)
1294 {
1295 dev->archdata.dma_ops = ops;
1296 }
1297
1298 static inline int dma_supported(struct device *dev, u64 mask)
1299 {
1300- struct dma_map_ops *ops = get_dma_ops(dev);
1301+ const struct dma_map_ops *ops = get_dma_ops(dev);
1302
1303 if (unlikely(!ops))
1304 return 0;
1305@@ -87,7 +87,7 @@ static inline int dma_supported(struct d
1306
1307 static inline int dma_set_mask(struct device *dev, u64 dma_mask)
1308 {
1309- struct dma_map_ops *ops = get_dma_ops(dev);
1310+ const struct dma_map_ops *ops = get_dma_ops(dev);
1311
1312 if (unlikely(ops == NULL))
1313 return -EIO;
1314@@ -103,7 +103,7 @@ static inline int dma_set_mask(struct de
1315
1316 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
1317 {
1318- struct dma_map_ops *ops = get_dma_ops(dev);
1319+ const struct dma_map_ops *ops = get_dma_ops(dev);
1320 if (ops->mapping_error)
1321 return ops->mapping_error(dev, dma_addr);
1322
1323@@ -117,7 +117,7 @@ static inline int dma_mapping_error(stru
1324 static inline void *dma_alloc_coherent(struct device *dev, size_t size,
1325 dma_addr_t *dma_handle, gfp_t flag)
1326 {
1327- struct dma_map_ops *ops = get_dma_ops(dev);
1328+ const struct dma_map_ops *ops = get_dma_ops(dev);
1329 void *memory;
1330
1331 BUG_ON(!ops);
1332@@ -131,7 +131,7 @@ static inline void *dma_alloc_coherent(s
1333 static inline void dma_free_coherent(struct device *dev, size_t size,
1334 void *cpu_addr, dma_addr_t dma_handle)
1335 {
1336- struct dma_map_ops *ops = get_dma_ops(dev);
1337+ const struct dma_map_ops *ops = get_dma_ops(dev);
1338
1339 BUG_ON(!ops);
1340 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
1341diff -urNp linux-2.6.35.7/arch/microblaze/include/asm/pci.h linux-2.6.35.7/arch/microblaze/include/asm/pci.h
1342--- linux-2.6.35.7/arch/microblaze/include/asm/pci.h 2010-08-26 19:47:12.000000000 -0400
1343+++ linux-2.6.35.7/arch/microblaze/include/asm/pci.h 2010-09-17 20:12:09.000000000 -0400
1344@@ -54,8 +54,8 @@ static inline void pcibios_penalize_isa_
1345 }
1346
1347 #ifdef CONFIG_PCI
1348-extern void set_pci_dma_ops(struct dma_map_ops *dma_ops);
1349-extern struct dma_map_ops *get_pci_dma_ops(void);
1350+extern void set_pci_dma_ops(const struct dma_map_ops *dma_ops);
1351+extern const struct dma_map_ops *get_pci_dma_ops(void);
1352 #else /* CONFIG_PCI */
1353 #define set_pci_dma_ops(d)
1354 #define get_pci_dma_ops() NULL
1355diff -urNp linux-2.6.35.7/arch/microblaze/kernel/dma.c linux-2.6.35.7/arch/microblaze/kernel/dma.c
1356--- linux-2.6.35.7/arch/microblaze/kernel/dma.c 2010-08-26 19:47:12.000000000 -0400
1357+++ linux-2.6.35.7/arch/microblaze/kernel/dma.c 2010-09-17 20:12:09.000000000 -0400
1358@@ -133,7 +133,7 @@ static inline void dma_direct_unmap_page
1359 __dma_sync_page(dma_address, 0 , size, direction);
1360 }
1361
1362-struct dma_map_ops dma_direct_ops = {
1363+const struct dma_map_ops dma_direct_ops = {
1364 .alloc_coherent = dma_direct_alloc_coherent,
1365 .free_coherent = dma_direct_free_coherent,
1366 .map_sg = dma_direct_map_sg,
1367diff -urNp linux-2.6.35.7/arch/microblaze/pci/pci-common.c linux-2.6.35.7/arch/microblaze/pci/pci-common.c
1368--- linux-2.6.35.7/arch/microblaze/pci/pci-common.c 2010-08-26 19:47:12.000000000 -0400
1369+++ linux-2.6.35.7/arch/microblaze/pci/pci-common.c 2010-09-17 20:12:09.000000000 -0400
1370@@ -46,14 +46,14 @@ resource_size_t isa_mem_base;
1371 /* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */
1372 unsigned int pci_flags;
1373
1374-static struct dma_map_ops *pci_dma_ops = &dma_direct_ops;
1375+static const struct dma_map_ops *pci_dma_ops = &dma_direct_ops;
1376
1377-void set_pci_dma_ops(struct dma_map_ops *dma_ops)
1378+void set_pci_dma_ops(const struct dma_map_ops *dma_ops)
1379 {
1380 pci_dma_ops = dma_ops;
1381 }
1382
1383-struct dma_map_ops *get_pci_dma_ops(void)
1384+const struct dma_map_ops *get_pci_dma_ops(void)
1385 {
1386 return pci_dma_ops;
1387 }
1388diff -urNp linux-2.6.35.7/arch/mips/alchemy/devboards/pm.c linux-2.6.35.7/arch/mips/alchemy/devboards/pm.c
1389--- linux-2.6.35.7/arch/mips/alchemy/devboards/pm.c 2010-08-26 19:47:12.000000000 -0400
1390+++ linux-2.6.35.7/arch/mips/alchemy/devboards/pm.c 2010-09-17 20:12:09.000000000 -0400
1391@@ -110,7 +110,7 @@ static void db1x_pm_end(void)
1250 1392
1251 } 1393 }
1252 1394
@@ -1255,10 +1397,10 @@ diff -urNp linux-2.6.32.24/arch/mips/alchemy/devboards/pm.c linux-2.6.32.24/arch
1255 .valid = suspend_valid_only_mem, 1397 .valid = suspend_valid_only_mem,
1256 .begin = db1x_pm_begin, 1398 .begin = db1x_pm_begin,
1257 .enter = db1x_pm_enter, 1399 .enter = db1x_pm_enter,
1258diff -urNp linux-2.6.32.24/arch/mips/include/asm/elf.h linux-2.6.32.24/arch/mips/include/asm/elf.h 1400diff -urNp linux-2.6.35.7/arch/mips/include/asm/elf.h linux-2.6.35.7/arch/mips/include/asm/elf.h
1259--- linux-2.6.32.24/arch/mips/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 1401--- linux-2.6.35.7/arch/mips/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
1260+++ linux-2.6.32.24/arch/mips/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 1402+++ linux-2.6.35.7/arch/mips/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
1261@@ -368,4 +368,11 @@ extern int dump_task_fpu(struct task_str 1403@@ -368,6 +368,13 @@ extern const char *__elf_platform;
1262 #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) 1404 #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
1263 #endif 1405 #endif
1264 1406
@@ -1269,10 +1411,12 @@ diff -urNp linux-2.6.32.24/arch/mips/include/asm/elf.h linux-2.6.32.24/arch/mips
1269+#define PAX_DELTA_STACK_LEN (test_thread_flag(TIF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT) 1411+#define PAX_DELTA_STACK_LEN (test_thread_flag(TIF_32BIT_ADDR) ? 27-PAGE_SHIFT : 36-PAGE_SHIFT)
1270+#endif 1412+#endif
1271+ 1413+
1272 #endif /* _ASM_ELF_H */ 1414 #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
1273diff -urNp linux-2.6.32.24/arch/mips/include/asm/page.h linux-2.6.32.24/arch/mips/include/asm/page.h 1415 struct linux_binprm;
1274--- linux-2.6.32.24/arch/mips/include/asm/page.h 2010-08-13 16:24:37.000000000 -0400 1416 extern int arch_setup_additional_pages(struct linux_binprm *bprm,
1275+++ linux-2.6.32.24/arch/mips/include/asm/page.h 2010-10-23 19:59:19.000000000 -0400 1417diff -urNp linux-2.6.35.7/arch/mips/include/asm/page.h linux-2.6.35.7/arch/mips/include/asm/page.h
1418--- linux-2.6.35.7/arch/mips/include/asm/page.h 2010-08-26 19:47:12.000000000 -0400
1419+++ linux-2.6.35.7/arch/mips/include/asm/page.h 2010-09-17 20:12:09.000000000 -0400
1276@@ -93,7 +93,7 @@ extern void copy_user_highpage(struct pa 1420@@ -93,7 +93,7 @@ extern void copy_user_highpage(struct pa
1277 #ifdef CONFIG_CPU_MIPS32 1421 #ifdef CONFIG_CPU_MIPS32
1278 typedef struct { unsigned long pte_low, pte_high; } pte_t; 1422 typedef struct { unsigned long pte_low, pte_high; } pte_t;
@@ -1282,10 +1426,10 @@ diff -urNp linux-2.6.32.24/arch/mips/include/asm/page.h linux-2.6.32.24/arch/mip
1282 #else 1426 #else
1283 typedef struct { unsigned long long pte; } pte_t; 1427 typedef struct { unsigned long long pte; } pte_t;
1284 #define pte_val(x) ((x).pte) 1428 #define pte_val(x) ((x).pte)
1285diff -urNp linux-2.6.32.24/arch/mips/include/asm/system.h linux-2.6.32.24/arch/mips/include/asm/system.h 1429diff -urNp linux-2.6.35.7/arch/mips/include/asm/system.h linux-2.6.35.7/arch/mips/include/asm/system.h
1286--- linux-2.6.32.24/arch/mips/include/asm/system.h 2010-08-13 16:24:37.000000000 -0400 1430--- linux-2.6.35.7/arch/mips/include/asm/system.h 2010-08-26 19:47:12.000000000 -0400
1287+++ linux-2.6.32.24/arch/mips/include/asm/system.h 2010-10-23 19:59:19.000000000 -0400 1431+++ linux-2.6.35.7/arch/mips/include/asm/system.h 2010-09-17 20:12:09.000000000 -0400
1288@@ -230,6 +230,6 @@ extern void per_cpu_trap_init(void); 1432@@ -234,6 +234,6 @@ extern void per_cpu_trap_init(void);
1289 */ 1433 */
1290 #define __ARCH_WANT_UNLOCKED_CTXSW 1434 #define __ARCH_WANT_UNLOCKED_CTXSW
1291 1435
@@ -1293,9 +1437,9 @@ diff -urNp linux-2.6.32.24/arch/mips/include/asm/system.h linux-2.6.32.24/arch/m
1293+#define arch_align_stack(x) ((x) & ALMASK) 1437+#define arch_align_stack(x) ((x) & ALMASK)
1294 1438
1295 #endif /* _ASM_SYSTEM_H */ 1439 #endif /* _ASM_SYSTEM_H */
1296diff -urNp linux-2.6.32.24/arch/mips/kernel/binfmt_elfn32.c linux-2.6.32.24/arch/mips/kernel/binfmt_elfn32.c 1440diff -urNp linux-2.6.35.7/arch/mips/kernel/binfmt_elfn32.c linux-2.6.35.7/arch/mips/kernel/binfmt_elfn32.c
1297--- linux-2.6.32.24/arch/mips/kernel/binfmt_elfn32.c 2010-08-13 16:24:37.000000000 -0400 1441--- linux-2.6.35.7/arch/mips/kernel/binfmt_elfn32.c 2010-08-26 19:47:12.000000000 -0400
1298+++ linux-2.6.32.24/arch/mips/kernel/binfmt_elfn32.c 2010-10-23 19:59:19.000000000 -0400 1442+++ linux-2.6.35.7/arch/mips/kernel/binfmt_elfn32.c 2010-09-17 20:12:09.000000000 -0400
1299@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N 1443@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
1300 #undef ELF_ET_DYN_BASE 1444 #undef ELF_ET_DYN_BASE
1301 #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) 1445 #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
@@ -1310,9 +1454,9 @@ diff -urNp linux-2.6.32.24/arch/mips/kernel/binfmt_elfn32.c linux-2.6.32.24/arch
1310 #include <asm/processor.h> 1454 #include <asm/processor.h>
1311 #include <linux/module.h> 1455 #include <linux/module.h>
1312 #include <linux/elfcore.h> 1456 #include <linux/elfcore.h>
1313diff -urNp linux-2.6.32.24/arch/mips/kernel/binfmt_elfo32.c linux-2.6.32.24/arch/mips/kernel/binfmt_elfo32.c 1457diff -urNp linux-2.6.35.7/arch/mips/kernel/binfmt_elfo32.c linux-2.6.35.7/arch/mips/kernel/binfmt_elfo32.c
1314--- linux-2.6.32.24/arch/mips/kernel/binfmt_elfo32.c 2010-08-13 16:24:37.000000000 -0400 1458--- linux-2.6.35.7/arch/mips/kernel/binfmt_elfo32.c 2010-08-26 19:47:12.000000000 -0400
1315+++ linux-2.6.32.24/arch/mips/kernel/binfmt_elfo32.c 2010-10-23 19:59:19.000000000 -0400 1459+++ linux-2.6.35.7/arch/mips/kernel/binfmt_elfo32.c 2010-09-17 20:12:09.000000000 -0400
1316@@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N 1460@@ -52,6 +52,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
1317 #undef ELF_ET_DYN_BASE 1461 #undef ELF_ET_DYN_BASE
1318 #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) 1462 #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
@@ -1327,21 +1471,21 @@ diff -urNp linux-2.6.32.24/arch/mips/kernel/binfmt_elfo32.c linux-2.6.32.24/arch
1327 #include <asm/processor.h> 1471 #include <asm/processor.h>
1328 1472
1329 /* 1473 /*
1330diff -urNp linux-2.6.32.24/arch/mips/kernel/kgdb.c linux-2.6.32.24/arch/mips/kernel/kgdb.c 1474diff -urNp linux-2.6.35.7/arch/mips/kernel/kgdb.c linux-2.6.35.7/arch/mips/kernel/kgdb.c
1331--- linux-2.6.32.24/arch/mips/kernel/kgdb.c 2010-08-13 16:24:37.000000000 -0400 1475--- linux-2.6.35.7/arch/mips/kernel/kgdb.c 2010-08-26 19:47:12.000000000 -0400
1332+++ linux-2.6.32.24/arch/mips/kernel/kgdb.c 2010-10-23 19:59:19.000000000 -0400 1476+++ linux-2.6.35.7/arch/mips/kernel/kgdb.c 2010-09-17 20:12:09.000000000 -0400
1333@@ -245,6 +245,7 @@ int kgdb_arch_handle_exception(int vecto 1477@@ -270,6 +270,7 @@ int kgdb_arch_handle_exception(int vecto
1334 return -1; 1478 return -1;
1335 } 1479 }
1336 1480
1337+/* cannot be const */ 1481+/* cannot be const, see kgdb_arch_init */
1338 struct kgdb_arch arch_kgdb_ops; 1482 struct kgdb_arch arch_kgdb_ops;
1339 1483
1340 /* 1484 /*
1341diff -urNp linux-2.6.32.24/arch/mips/kernel/process.c linux-2.6.32.24/arch/mips/kernel/process.c 1485diff -urNp linux-2.6.35.7/arch/mips/kernel/process.c linux-2.6.35.7/arch/mips/kernel/process.c
1342--- linux-2.6.32.24/arch/mips/kernel/process.c 2010-08-13 16:24:37.000000000 -0400 1486--- linux-2.6.35.7/arch/mips/kernel/process.c 2010-08-26 19:47:12.000000000 -0400
1343+++ linux-2.6.32.24/arch/mips/kernel/process.c 2010-10-23 19:59:19.000000000 -0400 1487+++ linux-2.6.35.7/arch/mips/kernel/process.c 2010-09-17 20:12:09.000000000 -0400
1344@@ -470,15 +470,3 @@ unsigned long get_wchan(struct task_stru 1488@@ -474,15 +474,3 @@ unsigned long get_wchan(struct task_stru
1345 out: 1489 out:
1346 return pc; 1490 return pc;
1347 } 1491 }
@@ -1357,10 +1501,10 @@ diff -urNp linux-2.6.32.24/arch/mips/kernel/process.c linux-2.6.32.24/arch/mips/
1357- 1501-
1358- return sp & ALMASK; 1502- return sp & ALMASK;
1359-} 1503-}
1360diff -urNp linux-2.6.32.24/arch/mips/kernel/syscall.c linux-2.6.32.24/arch/mips/kernel/syscall.c 1504diff -urNp linux-2.6.35.7/arch/mips/kernel/syscall.c linux-2.6.35.7/arch/mips/kernel/syscall.c
1361--- linux-2.6.32.24/arch/mips/kernel/syscall.c 2010-08-13 16:24:37.000000000 -0400 1505--- linux-2.6.35.7/arch/mips/kernel/syscall.c 2010-08-26 19:47:12.000000000 -0400
1362+++ linux-2.6.32.24/arch/mips/kernel/syscall.c 2010-10-23 19:59:19.000000000 -0400 1506+++ linux-2.6.35.7/arch/mips/kernel/syscall.c 2010-09-17 20:12:09.000000000 -0400
1363@@ -102,17 +102,21 @@ unsigned long arch_get_unmapped_area(str 1507@@ -106,17 +106,21 @@ unsigned long arch_get_unmapped_area(str
1364 do_color_align = 0; 1508 do_color_align = 0;
1365 if (filp || (flags & MAP_SHARED)) 1509 if (filp || (flags & MAP_SHARED))
1366 do_color_align = 1; 1510 do_color_align = 1;
@@ -1385,7 +1529,7 @@ diff -urNp linux-2.6.32.24/arch/mips/kernel/syscall.c linux-2.6.32.24/arch/mips/
1385 if (do_color_align) 1529 if (do_color_align)
1386 addr = COLOUR_ALIGN(addr, pgoff); 1530 addr = COLOUR_ALIGN(addr, pgoff);
1387 else 1531 else
1388@@ -122,7 +126,7 @@ unsigned long arch_get_unmapped_area(str 1532@@ -126,7 +130,7 @@ unsigned long arch_get_unmapped_area(str
1389 /* At this point: (!vmm || addr < vmm->vm_end). */ 1533 /* At this point: (!vmm || addr < vmm->vm_end). */
1390 if (task_size - len < addr) 1534 if (task_size - len < addr)
1391 return -ENOMEM; 1535 return -ENOMEM;
@@ -1394,9 +1538,21 @@ diff -urNp linux-2.6.32.24/arch/mips/kernel/syscall.c linux-2.6.32.24/arch/mips/
1394 return addr; 1538 return addr;
1395 addr = vmm->vm_end; 1539 addr = vmm->vm_end;
1396 if (do_color_align) 1540 if (do_color_align)
1397diff -urNp linux-2.6.32.24/arch/mips/mm/fault.c linux-2.6.32.24/arch/mips/mm/fault.c 1541diff -urNp linux-2.6.35.7/arch/mips/loongson/common/pm.c linux-2.6.35.7/arch/mips/loongson/common/pm.c
1398--- linux-2.6.32.24/arch/mips/mm/fault.c 2010-08-13 16:24:37.000000000 -0400 1542--- linux-2.6.35.7/arch/mips/loongson/common/pm.c 2010-08-26 19:47:12.000000000 -0400
1399+++ linux-2.6.32.24/arch/mips/mm/fault.c 2010-10-23 19:59:24.000000000 -0400 1543+++ linux-2.6.35.7/arch/mips/loongson/common/pm.c 2010-09-17 20:12:09.000000000 -0400
1544@@ -147,7 +147,7 @@ static int loongson_pm_valid_state(suspe
1545 }
1546 }
1547
1548-static struct platform_suspend_ops loongson_pm_ops = {
1549+static const struct platform_suspend_ops loongson_pm_ops = {
1550 .valid = loongson_pm_valid_state,
1551 .enter = loongson_pm_enter,
1552 };
1553diff -urNp linux-2.6.35.7/arch/mips/mm/fault.c linux-2.6.35.7/arch/mips/mm/fault.c
1554--- linux-2.6.35.7/arch/mips/mm/fault.c 2010-08-26 19:47:12.000000000 -0400
1555+++ linux-2.6.35.7/arch/mips/mm/fault.c 2010-10-11 22:41:44.000000000 -0400
1400@@ -26,6 +26,23 @@ 1556@@ -26,6 +26,23 @@
1401 #include <asm/ptrace.h> 1557 #include <asm/ptrace.h>
1402 #include <asm/highmem.h> /* For VMALLOC_END */ 1558 #include <asm/highmem.h> /* For VMALLOC_END */
@@ -1421,10 +1577,10 @@ diff -urNp linux-2.6.32.24/arch/mips/mm/fault.c linux-2.6.32.24/arch/mips/mm/fau
1421 /* 1577 /*
1422 * This routine handles page faults. It determines the address, 1578 * This routine handles page faults. It determines the address,
1423 * and the problem, and then passes it off to one of the appropriate 1579 * and the problem, and then passes it off to one of the appropriate
1424diff -urNp linux-2.6.32.24/arch/parisc/include/asm/elf.h linux-2.6.32.24/arch/parisc/include/asm/elf.h 1580diff -urNp linux-2.6.35.7/arch/parisc/include/asm/elf.h linux-2.6.35.7/arch/parisc/include/asm/elf.h
1425--- linux-2.6.32.24/arch/parisc/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 1581--- linux-2.6.35.7/arch/parisc/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
1426+++ linux-2.6.32.24/arch/parisc/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 1582+++ linux-2.6.35.7/arch/parisc/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
1427@@ -343,6 +343,13 @@ struct pt_regs; /* forward declaration.. 1583@@ -342,6 +342,13 @@ struct pt_regs; /* forward declaration..
1428 1584
1429 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000) 1585 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000)
1430 1586
@@ -1438,9 +1594,9 @@ diff -urNp linux-2.6.32.24/arch/parisc/include/asm/elf.h linux-2.6.32.24/arch/pa
1438 /* This yields a mask that user programs can use to figure out what 1594 /* This yields a mask that user programs can use to figure out what
1439 instruction set this CPU supports. This could be done in user space, 1595 instruction set this CPU supports. This could be done in user space,
1440 but it's not easy, and we've already done it here. */ 1596 but it's not easy, and we've already done it here. */
1441diff -urNp linux-2.6.32.24/arch/parisc/include/asm/pgtable.h linux-2.6.32.24/arch/parisc/include/asm/pgtable.h 1597diff -urNp linux-2.6.35.7/arch/parisc/include/asm/pgtable.h linux-2.6.35.7/arch/parisc/include/asm/pgtable.h
1442--- linux-2.6.32.24/arch/parisc/include/asm/pgtable.h 2010-08-13 16:24:37.000000000 -0400 1598--- linux-2.6.35.7/arch/parisc/include/asm/pgtable.h 2010-08-26 19:47:12.000000000 -0400
1443+++ linux-2.6.32.24/arch/parisc/include/asm/pgtable.h 2010-10-23 19:59:19.000000000 -0400 1599+++ linux-2.6.35.7/arch/parisc/include/asm/pgtable.h 2010-09-17 20:12:09.000000000 -0400
1444@@ -207,6 +207,17 @@ 1600@@ -207,6 +207,17 @@
1445 #define PAGE_EXECREAD __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED) 1601 #define PAGE_EXECREAD __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
1446 #define PAGE_COPY PAGE_EXECREAD 1602 #define PAGE_COPY PAGE_EXECREAD
@@ -1459,10 +1615,10 @@ diff -urNp linux-2.6.32.24/arch/parisc/include/asm/pgtable.h linux-2.6.32.24/arc
1459 #define PAGE_KERNEL __pgprot(_PAGE_KERNEL) 1615 #define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
1460 #define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE) 1616 #define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE)
1461 #define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) 1617 #define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
1462diff -urNp linux-2.6.32.24/arch/parisc/kernel/module.c linux-2.6.32.24/arch/parisc/kernel/module.c 1618diff -urNp linux-2.6.35.7/arch/parisc/kernel/module.c linux-2.6.35.7/arch/parisc/kernel/module.c
1463--- linux-2.6.32.24/arch/parisc/kernel/module.c 2010-08-13 16:24:37.000000000 -0400 1619--- linux-2.6.35.7/arch/parisc/kernel/module.c 2010-08-26 19:47:12.000000000 -0400
1464+++ linux-2.6.32.24/arch/parisc/kernel/module.c 2010-10-23 19:59:19.000000000 -0400 1620+++ linux-2.6.35.7/arch/parisc/kernel/module.c 2010-09-17 20:12:09.000000000 -0400
1465@@ -95,16 +95,38 @@ 1621@@ -96,16 +96,38 @@
1466 1622
1467 /* three functions to determine where in the module core 1623 /* three functions to determine where in the module core
1468 * or init pieces the location is */ 1624 * or init pieces the location is */
@@ -1505,7 +1661,7 @@ diff -urNp linux-2.6.32.24/arch/parisc/kernel/module.c linux-2.6.32.24/arch/pari
1505 } 1661 }
1506 1662
1507 static inline int in_local(struct module *me, void *loc) 1663 static inline int in_local(struct module *me, void *loc)
1508@@ -364,13 +386,13 @@ int module_frob_arch_sections(CONST Elf_ 1664@@ -365,13 +387,13 @@ int module_frob_arch_sections(CONST Elf_
1509 } 1665 }
1510 1666
1511 /* align things a bit */ 1667 /* align things a bit */
@@ -1526,7 +1682,7 @@ diff -urNp linux-2.6.32.24/arch/parisc/kernel/module.c linux-2.6.32.24/arch/pari
1526 1682
1527 me->arch.got_max = gots; 1683 me->arch.got_max = gots;
1528 me->arch.fdesc_max = fdescs; 1684 me->arch.fdesc_max = fdescs;
1529@@ -388,7 +410,7 @@ static Elf64_Word get_got(struct module 1685@@ -389,7 +411,7 @@ static Elf64_Word get_got(struct module
1530 1686
1531 BUG_ON(value == 0); 1687 BUG_ON(value == 0);
1532 1688
@@ -1535,7 +1691,7 @@ diff -urNp linux-2.6.32.24/arch/parisc/kernel/module.c linux-2.6.32.24/arch/pari
1535 for (i = 0; got[i].addr; i++) 1691 for (i = 0; got[i].addr; i++)
1536 if (got[i].addr == value) 1692 if (got[i].addr == value)
1537 goto out; 1693 goto out;
1538@@ -406,7 +428,7 @@ static Elf64_Word get_got(struct module 1694@@ -407,7 +429,7 @@ static Elf64_Word get_got(struct module
1539 #ifdef CONFIG_64BIT 1695 #ifdef CONFIG_64BIT
1540 static Elf_Addr get_fdesc(struct module *me, unsigned long value) 1696 static Elf_Addr get_fdesc(struct module *me, unsigned long value)
1541 { 1697 {
@@ -1544,7 +1700,7 @@ diff -urNp linux-2.6.32.24/arch/parisc/kernel/module.c linux-2.6.32.24/arch/pari
1544 1700
1545 if (!value) { 1701 if (!value) {
1546 printk(KERN_ERR "%s: zero OPD requested!\n", me->name); 1702 printk(KERN_ERR "%s: zero OPD requested!\n", me->name);
1547@@ -424,7 +446,7 @@ static Elf_Addr get_fdesc(struct module 1703@@ -425,7 +447,7 @@ static Elf_Addr get_fdesc(struct module
1548 1704
1549 /* Create new one */ 1705 /* Create new one */
1550 fdesc->addr = value; 1706 fdesc->addr = value;
@@ -1553,7 +1709,7 @@ diff -urNp linux-2.6.32.24/arch/parisc/kernel/module.c linux-2.6.32.24/arch/pari
1553 return (Elf_Addr)fdesc; 1709 return (Elf_Addr)fdesc;
1554 } 1710 }
1555 #endif /* CONFIG_64BIT */ 1711 #endif /* CONFIG_64BIT */
1556@@ -848,7 +870,7 @@ register_unwind_table(struct module *me, 1712@@ -849,7 +871,7 @@ register_unwind_table(struct module *me,
1557 1713
1558 table = (unsigned char *)sechdrs[me->arch.unwind_section].sh_addr; 1714 table = (unsigned char *)sechdrs[me->arch.unwind_section].sh_addr;
1559 end = table + sechdrs[me->arch.unwind_section].sh_size; 1715 end = table + sechdrs[me->arch.unwind_section].sh_size;
@@ -1562,9 +1718,9 @@ diff -urNp linux-2.6.32.24/arch/parisc/kernel/module.c linux-2.6.32.24/arch/pari
1562 1718
1563 DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n", 1719 DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n",
1564 me->arch.unwind_section, table, end, gp); 1720 me->arch.unwind_section, table, end, gp);
1565diff -urNp linux-2.6.32.24/arch/parisc/kernel/sys_parisc.c linux-2.6.32.24/arch/parisc/kernel/sys_parisc.c 1721diff -urNp linux-2.6.35.7/arch/parisc/kernel/sys_parisc.c linux-2.6.35.7/arch/parisc/kernel/sys_parisc.c
1566--- linux-2.6.32.24/arch/parisc/kernel/sys_parisc.c 2010-08-13 16:24:37.000000000 -0400 1722--- linux-2.6.35.7/arch/parisc/kernel/sys_parisc.c 2010-08-26 19:47:12.000000000 -0400
1567+++ linux-2.6.32.24/arch/parisc/kernel/sys_parisc.c 2010-10-23 19:59:19.000000000 -0400 1723+++ linux-2.6.35.7/arch/parisc/kernel/sys_parisc.c 2010-09-17 20:12:09.000000000 -0400
1568@@ -43,7 +43,7 @@ static unsigned long get_unshared_area(u 1724@@ -43,7 +43,7 @@ static unsigned long get_unshared_area(u
1569 /* At this point: (!vma || addr < vma->vm_end). */ 1725 /* At this point: (!vma || addr < vma->vm_end). */
1570 if (TASK_SIZE - len < addr) 1726 if (TASK_SIZE - len < addr)
@@ -1592,9 +1748,9 @@ diff -urNp linux-2.6.32.24/arch/parisc/kernel/sys_parisc.c linux-2.6.32.24/arch/
1592 1748
1593 if (filp) { 1749 if (filp) {
1594 addr = get_shared_area(filp->f_mapping, addr, len, pgoff); 1750 addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
1595diff -urNp linux-2.6.32.24/arch/parisc/kernel/traps.c linux-2.6.32.24/arch/parisc/kernel/traps.c 1751diff -urNp linux-2.6.35.7/arch/parisc/kernel/traps.c linux-2.6.35.7/arch/parisc/kernel/traps.c
1596--- linux-2.6.32.24/arch/parisc/kernel/traps.c 2010-08-13 16:24:37.000000000 -0400 1752--- linux-2.6.35.7/arch/parisc/kernel/traps.c 2010-08-26 19:47:12.000000000 -0400
1597+++ linux-2.6.32.24/arch/parisc/kernel/traps.c 2010-10-23 19:59:19.000000000 -0400 1753+++ linux-2.6.35.7/arch/parisc/kernel/traps.c 2010-09-17 20:12:09.000000000 -0400
1598@@ -733,9 +733,7 @@ void notrace handle_interruption(int cod 1754@@ -733,9 +733,7 @@ void notrace handle_interruption(int cod
1599 1755
1600 down_read(&current->mm->mmap_sem); 1756 down_read(&current->mm->mmap_sem);
@@ -1606,9 +1762,9 @@ diff -urNp linux-2.6.32.24/arch/parisc/kernel/traps.c linux-2.6.32.24/arch/paris
1606 fault_address = regs->iaoq[0]; 1762 fault_address = regs->iaoq[0];
1607 fault_space = regs->iasq[0]; 1763 fault_space = regs->iasq[0];
1608 1764
1609diff -urNp linux-2.6.32.24/arch/parisc/mm/fault.c linux-2.6.32.24/arch/parisc/mm/fault.c 1765diff -urNp linux-2.6.35.7/arch/parisc/mm/fault.c linux-2.6.35.7/arch/parisc/mm/fault.c
1610--- linux-2.6.32.24/arch/parisc/mm/fault.c 2010-08-13 16:24:37.000000000 -0400 1766--- linux-2.6.35.7/arch/parisc/mm/fault.c 2010-08-26 19:47:12.000000000 -0400
1611+++ linux-2.6.32.24/arch/parisc/mm/fault.c 2010-10-23 19:59:19.000000000 -0400 1767+++ linux-2.6.35.7/arch/parisc/mm/fault.c 2010-09-17 20:12:09.000000000 -0400
1612@@ -15,6 +15,7 @@ 1768@@ -15,6 +15,7 @@
1613 #include <linux/sched.h> 1769 #include <linux/sched.h>
1614 #include <linux/interrupt.h> 1770 #include <linux/interrupt.h>
@@ -1778,22 +1934,26 @@ diff -urNp linux-2.6.32.24/arch/parisc/mm/fault.c linux-2.6.32.24/arch/parisc/mm
1778 1934
1779 /* 1935 /*
1780 * If for any reason at all we couldn't handle the fault, make 1936 * If for any reason at all we couldn't handle the fault, make
1781diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/device.h linux-2.6.32.24/arch/powerpc/include/asm/device.h 1937diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/device.h linux-2.6.35.7/arch/powerpc/include/asm/device.h
1782--- linux-2.6.32.24/arch/powerpc/include/asm/device.h 2010-08-13 16:24:37.000000000 -0400 1938--- linux-2.6.35.7/arch/powerpc/include/asm/device.h 2010-08-26 19:47:12.000000000 -0400
1783+++ linux-2.6.32.24/arch/powerpc/include/asm/device.h 2010-10-23 19:59:19.000000000 -0400 1939+++ linux-2.6.35.7/arch/powerpc/include/asm/device.h 2010-09-17 20:12:09.000000000 -0400
1784@@ -14,7 +14,7 @@ struct dev_archdata { 1940@@ -11,7 +11,7 @@ struct device_node;
1785 struct device_node *of_node;
1786 1941
1942 struct dev_archdata {
1787 /* DMA operations on that device */ 1943 /* DMA operations on that device */
1788- struct dma_map_ops *dma_ops; 1944- struct dma_map_ops *dma_ops;
1789+ const struct dma_map_ops *dma_ops; 1945+ const struct dma_map_ops *dma_ops;
1790 1946
1791 /* 1947 /*
1792 * When an iommu is in use, dma_data is used as a ptr to the base of the 1948 * When an iommu is in use, dma_data is used as a ptr to the base of the
1793diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h 1949diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/dma-mapping.h linux-2.6.35.7/arch/powerpc/include/asm/dma-mapping.h
1794--- linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h 2010-08-13 16:24:37.000000000 -0400 1950--- linux-2.6.35.7/arch/powerpc/include/asm/dma-mapping.h 2010-08-26 19:47:12.000000000 -0400
1795+++ linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h 2010-10-23 19:59:19.000000000 -0400 1951+++ linux-2.6.35.7/arch/powerpc/include/asm/dma-mapping.h 2010-09-17 20:12:09.000000000 -0400
1796@@ -69,9 +69,9 @@ static inline unsigned long device_to_ma 1952@@ -66,12 +66,13 @@ static inline unsigned long device_to_ma
1953 /*
1954 * Available generic sets of operations
1955 */
1956+/* cannot be const */
1797 #ifdef CONFIG_PPC64 1957 #ifdef CONFIG_PPC64
1798 extern struct dma_map_ops dma_iommu_ops; 1958 extern struct dma_map_ops dma_iommu_ops;
1799 #endif 1959 #endif
@@ -1805,7 +1965,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.2
1805 { 1965 {
1806 /* We don't handle the NULL dev case for ISA for now. We could 1966 /* We don't handle the NULL dev case for ISA for now. We could
1807 * do it via an out of line call but it is not needed for now. The 1967 * do it via an out of line call but it is not needed for now. The
1808@@ -84,7 +84,7 @@ static inline struct dma_map_ops *get_dm 1968@@ -84,7 +85,7 @@ static inline struct dma_map_ops *get_dm
1809 return dev->archdata.dma_ops; 1969 return dev->archdata.dma_ops;
1810 } 1970 }
1811 1971
@@ -1814,7 +1974,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.2
1814 { 1974 {
1815 dev->archdata.dma_ops = ops; 1975 dev->archdata.dma_ops = ops;
1816 } 1976 }
1817@@ -118,7 +118,7 @@ static inline void set_dma_offset(struct 1977@@ -118,7 +119,7 @@ static inline void set_dma_offset(struct
1818 1978
1819 static inline int dma_supported(struct device *dev, u64 mask) 1979 static inline int dma_supported(struct device *dev, u64 mask)
1820 { 1980 {
@@ -1823,7 +1983,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.2
1823 1983
1824 if (unlikely(dma_ops == NULL)) 1984 if (unlikely(dma_ops == NULL))
1825 return 0; 1985 return 0;
1826@@ -132,7 +132,7 @@ static inline int dma_supported(struct d 1986@@ -129,7 +130,7 @@ static inline int dma_supported(struct d
1827 1987
1828 static inline int dma_set_mask(struct device *dev, u64 dma_mask) 1988 static inline int dma_set_mask(struct device *dev, u64 dma_mask)
1829 { 1989 {
@@ -1832,7 +1992,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.2
1832 1992
1833 if (unlikely(dma_ops == NULL)) 1993 if (unlikely(dma_ops == NULL))
1834 return -EIO; 1994 return -EIO;
1835@@ -147,7 +147,7 @@ static inline int dma_set_mask(struct de 1995@@ -144,7 +145,7 @@ static inline int dma_set_mask(struct de
1836 static inline void *dma_alloc_coherent(struct device *dev, size_t size, 1996 static inline void *dma_alloc_coherent(struct device *dev, size_t size,
1837 dma_addr_t *dma_handle, gfp_t flag) 1997 dma_addr_t *dma_handle, gfp_t flag)
1838 { 1998 {
@@ -1841,7 +2001,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.2
1841 void *cpu_addr; 2001 void *cpu_addr;
1842 2002
1843 BUG_ON(!dma_ops); 2003 BUG_ON(!dma_ops);
1844@@ -162,7 +162,7 @@ static inline void *dma_alloc_coherent(s 2004@@ -159,7 +160,7 @@ static inline void *dma_alloc_coherent(s
1845 static inline void dma_free_coherent(struct device *dev, size_t size, 2005 static inline void dma_free_coherent(struct device *dev, size_t size,
1846 void *cpu_addr, dma_addr_t dma_handle) 2006 void *cpu_addr, dma_addr_t dma_handle)
1847 { 2007 {
@@ -1850,7 +2010,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.2
1850 2010
1851 BUG_ON(!dma_ops); 2011 BUG_ON(!dma_ops);
1852 2012
1853@@ -173,7 +173,7 @@ static inline void dma_free_coherent(str 2013@@ -170,7 +171,7 @@ static inline void dma_free_coherent(str
1854 2014
1855 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 2015 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
1856 { 2016 {
@@ -1859,10 +2019,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/dma-mapping.h linux-2.6.32.2
1859 2019
1860 if (dma_ops->mapping_error) 2020 if (dma_ops->mapping_error)
1861 return dma_ops->mapping_error(dev, dma_addr); 2021 return dma_ops->mapping_error(dev, dma_addr);
1862diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/elf.h linux-2.6.32.24/arch/powerpc/include/asm/elf.h 2022diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/elf.h linux-2.6.35.7/arch/powerpc/include/asm/elf.h
1863--- linux-2.6.32.24/arch/powerpc/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 2023--- linux-2.6.35.7/arch/powerpc/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
1864+++ linux-2.6.32.24/arch/powerpc/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 2024+++ linux-2.6.35.7/arch/powerpc/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
1865@@ -179,8 +179,19 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[E 2025@@ -178,8 +178,19 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[E
1866 the loader. We need to make sure that it is out of the way of the program 2026 the loader. We need to make sure that it is out of the way of the program
1867 that it will "exec", and that there is sufficient room for the brk. */ 2027 that it will "exec", and that there is sufficient room for the brk. */
1868 2028
@@ -1884,7 +2044,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/elf.h linux-2.6.32.24/arch/p
1884 2044
1885 /* 2045 /*
1886 * Our registers are always unsigned longs, whether we're a 32 bit 2046 * Our registers are always unsigned longs, whether we're a 32 bit
1887@@ -275,9 +286,6 @@ extern int arch_setup_additional_pages(s 2047@@ -274,9 +285,6 @@ extern int arch_setup_additional_pages(s
1888 (0x7ff >> (PAGE_SHIFT - 12)) : \ 2048 (0x7ff >> (PAGE_SHIFT - 12)) : \
1889 (0x3ffff >> (PAGE_SHIFT - 12))) 2049 (0x3ffff >> (PAGE_SHIFT - 12)))
1890 2050
@@ -1894,9 +2054,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/elf.h linux-2.6.32.24/arch/p
1894 #endif /* __KERNEL__ */ 2054 #endif /* __KERNEL__ */
1895 2055
1896 /* 2056 /*
1897diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/iommu.h linux-2.6.32.24/arch/powerpc/include/asm/iommu.h 2057diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/iommu.h linux-2.6.35.7/arch/powerpc/include/asm/iommu.h
1898--- linux-2.6.32.24/arch/powerpc/include/asm/iommu.h 2010-08-13 16:24:37.000000000 -0400 2058--- linux-2.6.35.7/arch/powerpc/include/asm/iommu.h 2010-08-26 19:47:12.000000000 -0400
1899+++ linux-2.6.32.24/arch/powerpc/include/asm/iommu.h 2010-10-23 19:59:19.000000000 -0400 2059+++ linux-2.6.35.7/arch/powerpc/include/asm/iommu.h 2010-09-17 20:12:09.000000000 -0400
1900@@ -116,6 +116,9 @@ extern void iommu_init_early_iSeries(voi 2060@@ -116,6 +116,9 @@ extern void iommu_init_early_iSeries(voi
1901 extern void iommu_init_early_dart(void); 2061 extern void iommu_init_early_dart(void);
1902 extern void iommu_init_early_pasemi(void); 2062 extern void iommu_init_early_pasemi(void);
@@ -1907,21 +2067,21 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/iommu.h linux-2.6.32.24/arch
1907 #ifdef CONFIG_PCI 2067 #ifdef CONFIG_PCI
1908 extern void pci_iommu_init(void); 2068 extern void pci_iommu_init(void);
1909 extern void pci_direct_iommu_init(void); 2069 extern void pci_direct_iommu_init(void);
1910diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/kmap_types.h linux-2.6.32.24/arch/powerpc/include/asm/kmap_types.h 2070diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/kmap_types.h linux-2.6.35.7/arch/powerpc/include/asm/kmap_types.h
1911--- linux-2.6.32.24/arch/powerpc/include/asm/kmap_types.h 2010-08-13 16:24:37.000000000 -0400 2071--- linux-2.6.35.7/arch/powerpc/include/asm/kmap_types.h 2010-08-26 19:47:12.000000000 -0400
1912+++ linux-2.6.32.24/arch/powerpc/include/asm/kmap_types.h 2010-10-23 19:59:19.000000000 -0400 2072+++ linux-2.6.35.7/arch/powerpc/include/asm/kmap_types.h 2010-09-17 20:12:09.000000000 -0400
1913@@ -26,6 +26,7 @@ enum km_type { 2073@@ -27,6 +27,7 @@ enum km_type {
1914 KM_SOFTIRQ1,
1915 KM_PPC_SYNC_PAGE, 2074 KM_PPC_SYNC_PAGE,
1916 KM_PPC_SYNC_ICACHE, 2075 KM_PPC_SYNC_ICACHE,
2076 KM_KDB,
1917+ KM_CLEARPAGE, 2077+ KM_CLEARPAGE,
1918 KM_TYPE_NR 2078 KM_TYPE_NR
1919 }; 2079 };
1920 2080
1921diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/page_64.h linux-2.6.32.24/arch/powerpc/include/asm/page_64.h 2081diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/page_64.h linux-2.6.35.7/arch/powerpc/include/asm/page_64.h
1922--- linux-2.6.32.24/arch/powerpc/include/asm/page_64.h 2010-08-13 16:24:37.000000000 -0400 2082--- linux-2.6.35.7/arch/powerpc/include/asm/page_64.h 2010-08-26 19:47:12.000000000 -0400
1923+++ linux-2.6.32.24/arch/powerpc/include/asm/page_64.h 2010-10-23 19:59:19.000000000 -0400 2083+++ linux-2.6.35.7/arch/powerpc/include/asm/page_64.h 2010-09-17 20:12:09.000000000 -0400
1924@@ -180,15 +180,18 @@ do { \ 2084@@ -172,15 +172,18 @@ do { \
1925 * stack by default, so in the absense of a PT_GNU_STACK program header 2085 * stack by default, so in the absense of a PT_GNU_STACK program header
1926 * we turn execute permission off. 2086 * we turn execute permission off.
1927 */ 2087 */
@@ -1942,10 +2102,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/page_64.h linux-2.6.32.24/ar
1942 2102
1943 #include <asm-generic/getorder.h> 2103 #include <asm-generic/getorder.h>
1944 2104
1945diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/page.h linux-2.6.32.24/arch/powerpc/include/asm/page.h 2105diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/page.h linux-2.6.35.7/arch/powerpc/include/asm/page.h
1946--- linux-2.6.32.24/arch/powerpc/include/asm/page.h 2010-08-13 16:24:37.000000000 -0400 2106--- linux-2.6.35.7/arch/powerpc/include/asm/page.h 2010-08-26 19:47:12.000000000 -0400
1947+++ linux-2.6.32.24/arch/powerpc/include/asm/page.h 2010-10-23 19:59:19.000000000 -0400 2107+++ linux-2.6.35.7/arch/powerpc/include/asm/page.h 2010-09-17 20:12:09.000000000 -0400
1948@@ -116,8 +116,9 @@ extern phys_addr_t kernstart_addr; 2108@@ -129,8 +129,9 @@ extern phys_addr_t kernstart_addr;
1949 * and needs to be executable. This means the whole heap ends 2109 * and needs to be executable. This means the whole heap ends
1950 * up being executable. 2110 * up being executable.
1951 */ 2111 */
@@ -1957,7 +2117,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/page.h linux-2.6.32.24/arch/
1957 2117
1958 #define VM_DATA_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \ 2118 #define VM_DATA_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
1959 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 2119 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
1960@@ -145,6 +146,9 @@ extern phys_addr_t kernstart_addr; 2120@@ -158,6 +159,9 @@ extern phys_addr_t kernstart_addr;
1961 #define is_kernel_addr(x) ((x) >= PAGE_OFFSET) 2121 #define is_kernel_addr(x) ((x) >= PAGE_OFFSET)
1962 #endif 2122 #endif
1963 2123
@@ -1967,9 +2127,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/page.h linux-2.6.32.24/arch/
1967 #ifndef __ASSEMBLY__ 2127 #ifndef __ASSEMBLY__
1968 2128
1969 #undef STRICT_MM_TYPECHECKS 2129 #undef STRICT_MM_TYPECHECKS
1970diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/pci.h linux-2.6.32.24/arch/powerpc/include/asm/pci.h 2130diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/pci.h linux-2.6.35.7/arch/powerpc/include/asm/pci.h
1971--- linux-2.6.32.24/arch/powerpc/include/asm/pci.h 2010-08-13 16:24:37.000000000 -0400 2131--- linux-2.6.35.7/arch/powerpc/include/asm/pci.h 2010-08-26 19:47:12.000000000 -0400
1972+++ linux-2.6.32.24/arch/powerpc/include/asm/pci.h 2010-10-23 19:59:19.000000000 -0400 2132+++ linux-2.6.35.7/arch/powerpc/include/asm/pci.h 2010-09-17 20:12:09.000000000 -0400
1973@@ -65,8 +65,8 @@ static inline int pci_get_legacy_ide_irq 2133@@ -65,8 +65,8 @@ static inline int pci_get_legacy_ide_irq
1974 } 2134 }
1975 2135
@@ -1981,9 +2141,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/pci.h linux-2.6.32.24/arch/p
1981 #else /* CONFIG_PCI */ 2141 #else /* CONFIG_PCI */
1982 #define set_pci_dma_ops(d) 2142 #define set_pci_dma_ops(d)
1983 #define get_pci_dma_ops() NULL 2143 #define get_pci_dma_ops() NULL
1984diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/pte-hash32.h linux-2.6.32.24/arch/powerpc/include/asm/pte-hash32.h 2144diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/pte-hash32.h linux-2.6.35.7/arch/powerpc/include/asm/pte-hash32.h
1985--- linux-2.6.32.24/arch/powerpc/include/asm/pte-hash32.h 2010-08-13 16:24:37.000000000 -0400 2145--- linux-2.6.35.7/arch/powerpc/include/asm/pte-hash32.h 2010-08-26 19:47:12.000000000 -0400
1986+++ linux-2.6.32.24/arch/powerpc/include/asm/pte-hash32.h 2010-10-23 19:59:19.000000000 -0400 2146+++ linux-2.6.35.7/arch/powerpc/include/asm/pte-hash32.h 2010-09-17 20:12:09.000000000 -0400
1987@@ -21,6 +21,7 @@ 2147@@ -21,6 +21,7 @@
1988 #define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */ 2148 #define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */
1989 #define _PAGE_USER 0x004 /* usermode access allowed */ 2149 #define _PAGE_USER 0x004 /* usermode access allowed */
@@ -1992,9 +2152,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/pte-hash32.h linux-2.6.32.24
1992 #define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */ 2152 #define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
1993 #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */ 2153 #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
1994 #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */ 2154 #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
1995diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/reg.h linux-2.6.32.24/arch/powerpc/include/asm/reg.h 2155diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/reg.h linux-2.6.35.7/arch/powerpc/include/asm/reg.h
1996--- linux-2.6.32.24/arch/powerpc/include/asm/reg.h 2010-08-13 16:24:37.000000000 -0400 2156--- linux-2.6.35.7/arch/powerpc/include/asm/reg.h 2010-08-26 19:47:12.000000000 -0400
1997+++ linux-2.6.32.24/arch/powerpc/include/asm/reg.h 2010-10-23 19:59:19.000000000 -0400 2157+++ linux-2.6.35.7/arch/powerpc/include/asm/reg.h 2010-09-17 20:12:09.000000000 -0400
1998@@ -191,6 +191,7 @@ 2158@@ -191,6 +191,7 @@
1999 #define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */ 2159 #define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */
2000 #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ 2160 #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
@@ -2003,9 +2163,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/reg.h linux-2.6.32.24/arch/p
2003 #define DSISR_PROTFAULT 0x08000000 /* protection fault */ 2163 #define DSISR_PROTFAULT 0x08000000 /* protection fault */
2004 #define DSISR_ISSTORE 0x02000000 /* access was a store */ 2164 #define DSISR_ISSTORE 0x02000000 /* access was a store */
2005 #define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */ 2165 #define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */
2006diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/swiotlb.h linux-2.6.32.24/arch/powerpc/include/asm/swiotlb.h 2166diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/swiotlb.h linux-2.6.35.7/arch/powerpc/include/asm/swiotlb.h
2007--- linux-2.6.32.24/arch/powerpc/include/asm/swiotlb.h 2010-08-13 16:24:37.000000000 -0400 2167--- linux-2.6.35.7/arch/powerpc/include/asm/swiotlb.h 2010-08-26 19:47:12.000000000 -0400
2008+++ linux-2.6.32.24/arch/powerpc/include/asm/swiotlb.h 2010-10-23 19:59:19.000000000 -0400 2168+++ linux-2.6.35.7/arch/powerpc/include/asm/swiotlb.h 2010-09-17 20:12:09.000000000 -0400
2009@@ -13,7 +13,7 @@ 2169@@ -13,7 +13,7 @@
2010 2170
2011 #include <linux/swiotlb.h> 2171 #include <linux/swiotlb.h>
@@ -2015,9 +2175,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/swiotlb.h linux-2.6.32.24/ar
2015 2175
2016 static inline void dma_mark_clean(void *addr, size_t size) {} 2176 static inline void dma_mark_clean(void *addr, size_t size) {}
2017 2177
2018diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/uaccess.h linux-2.6.32.24/arch/powerpc/include/asm/uaccess.h 2178diff -urNp linux-2.6.35.7/arch/powerpc/include/asm/uaccess.h linux-2.6.35.7/arch/powerpc/include/asm/uaccess.h
2019--- linux-2.6.32.24/arch/powerpc/include/asm/uaccess.h 2010-08-13 16:24:37.000000000 -0400 2179--- linux-2.6.35.7/arch/powerpc/include/asm/uaccess.h 2010-08-26 19:47:12.000000000 -0400
2020+++ linux-2.6.32.24/arch/powerpc/include/asm/uaccess.h 2010-10-23 19:59:19.000000000 -0400 2180+++ linux-2.6.35.7/arch/powerpc/include/asm/uaccess.h 2010-09-17 20:12:09.000000000 -0400
2021@@ -13,6 +13,8 @@ 2181@@ -13,6 +13,8 @@
2022 #define VERIFY_READ 0 2182 #define VERIFY_READ 0
2023 #define VERIFY_WRITE 1 2183 #define VERIFY_WRITE 1
@@ -2195,22 +2355,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/include/asm/uaccess.h linux-2.6.32.24/ar
2195 extern unsigned long __clear_user(void __user *addr, unsigned long size); 2355 extern unsigned long __clear_user(void __user *addr, unsigned long size);
2196 2356
2197 static inline unsigned long clear_user(void __user *addr, unsigned long size) 2357 static inline unsigned long clear_user(void __user *addr, unsigned long size)
2198diff -urNp linux-2.6.32.24/arch/powerpc/kernel/cacheinfo.c linux-2.6.32.24/arch/powerpc/kernel/cacheinfo.c 2358diff -urNp linux-2.6.35.7/arch/powerpc/kernel/dma.c linux-2.6.35.7/arch/powerpc/kernel/dma.c
2199--- linux-2.6.32.24/arch/powerpc/kernel/cacheinfo.c 2010-08-13 16:24:37.000000000 -0400 2359--- linux-2.6.35.7/arch/powerpc/kernel/dma.c 2010-08-26 19:47:12.000000000 -0400
2200+++ linux-2.6.32.24/arch/powerpc/kernel/cacheinfo.c 2010-10-23 19:59:19.000000000 -0400 2360+++ linux-2.6.35.7/arch/powerpc/kernel/dma.c 2010-09-17 20:12:09.000000000 -0400
2201@@ -642,7 +642,7 @@ static struct kobj_attribute *cache_inde 2361@@ -135,7 +135,7 @@ static inline void dma_direct_sync_singl
2202 &cache_assoc_attr,
2203 };
2204
2205-static struct sysfs_ops cache_index_ops = {
2206+static const struct sysfs_ops cache_index_ops = {
2207 .show = cache_index_show,
2208 };
2209
2210diff -urNp linux-2.6.32.24/arch/powerpc/kernel/dma.c linux-2.6.32.24/arch/powerpc/kernel/dma.c
2211--- linux-2.6.32.24/arch/powerpc/kernel/dma.c 2010-08-13 16:24:37.000000000 -0400
2212+++ linux-2.6.32.24/arch/powerpc/kernel/dma.c 2010-10-23 19:59:19.000000000 -0400
2213@@ -134,7 +134,7 @@ static inline void dma_direct_sync_singl
2214 } 2362 }
2215 #endif 2363 #endif
2216 2364
@@ -2219,9 +2367,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/dma.c linux-2.6.32.24/arch/powerp
2219 .alloc_coherent = dma_direct_alloc_coherent, 2367 .alloc_coherent = dma_direct_alloc_coherent,
2220 .free_coherent = dma_direct_free_coherent, 2368 .free_coherent = dma_direct_free_coherent,
2221 .map_sg = dma_direct_map_sg, 2369 .map_sg = dma_direct_map_sg,
2222diff -urNp linux-2.6.32.24/arch/powerpc/kernel/dma-iommu.c linux-2.6.32.24/arch/powerpc/kernel/dma-iommu.c 2370diff -urNp linux-2.6.35.7/arch/powerpc/kernel/dma-iommu.c linux-2.6.35.7/arch/powerpc/kernel/dma-iommu.c
2223--- linux-2.6.32.24/arch/powerpc/kernel/dma-iommu.c 2010-08-13 16:24:37.000000000 -0400 2371--- linux-2.6.35.7/arch/powerpc/kernel/dma-iommu.c 2010-08-26 19:47:12.000000000 -0400
2224+++ linux-2.6.32.24/arch/powerpc/kernel/dma-iommu.c 2010-10-23 19:59:19.000000000 -0400 2372+++ linux-2.6.35.7/arch/powerpc/kernel/dma-iommu.c 2010-09-17 20:12:09.000000000 -0400
2225@@ -70,7 +70,7 @@ static void dma_iommu_unmap_sg(struct de 2373@@ -70,7 +70,7 @@ static void dma_iommu_unmap_sg(struct de
2226 } 2374 }
2227 2375
@@ -2231,9 +2379,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/dma-iommu.c linux-2.6.32.24/arch/
2231 { 2379 {
2232 struct iommu_table *tbl = get_iommu_table_base(dev); 2380 struct iommu_table *tbl = get_iommu_table_base(dev);
2233 2381
2234diff -urNp linux-2.6.32.24/arch/powerpc/kernel/dma-swiotlb.c linux-2.6.32.24/arch/powerpc/kernel/dma-swiotlb.c 2382diff -urNp linux-2.6.35.7/arch/powerpc/kernel/dma-swiotlb.c linux-2.6.35.7/arch/powerpc/kernel/dma-swiotlb.c
2235--- linux-2.6.32.24/arch/powerpc/kernel/dma-swiotlb.c 2010-08-13 16:24:37.000000000 -0400 2383--- linux-2.6.35.7/arch/powerpc/kernel/dma-swiotlb.c 2010-08-26 19:47:12.000000000 -0400
2236+++ linux-2.6.32.24/arch/powerpc/kernel/dma-swiotlb.c 2010-10-23 19:59:19.000000000 -0400 2384+++ linux-2.6.35.7/arch/powerpc/kernel/dma-swiotlb.c 2010-09-17 20:12:09.000000000 -0400
2237@@ -31,7 +31,7 @@ unsigned int ppc_swiotlb_enable; 2385@@ -31,7 +31,7 @@ unsigned int ppc_swiotlb_enable;
2238 * map_page, and unmap_page on highmem, use normal dma_ops 2386 * map_page, and unmap_page on highmem, use normal dma_ops
2239 * for everything else. 2387 * for everything else.
@@ -2243,9 +2391,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/dma-swiotlb.c linux-2.6.32.24/arc
2243 .alloc_coherent = dma_direct_alloc_coherent, 2391 .alloc_coherent = dma_direct_alloc_coherent,
2244 .free_coherent = dma_direct_free_coherent, 2392 .free_coherent = dma_direct_free_coherent,
2245 .map_sg = swiotlb_map_sg_attrs, 2393 .map_sg = swiotlb_map_sg_attrs,
2246diff -urNp linux-2.6.32.24/arch/powerpc/kernel/exceptions-64e.S linux-2.6.32.24/arch/powerpc/kernel/exceptions-64e.S 2394diff -urNp linux-2.6.35.7/arch/powerpc/kernel/exceptions-64e.S linux-2.6.35.7/arch/powerpc/kernel/exceptions-64e.S
2247--- linux-2.6.32.24/arch/powerpc/kernel/exceptions-64e.S 2010-08-13 16:24:37.000000000 -0400 2395--- linux-2.6.35.7/arch/powerpc/kernel/exceptions-64e.S 2010-08-26 19:47:12.000000000 -0400
2248+++ linux-2.6.32.24/arch/powerpc/kernel/exceptions-64e.S 2010-10-23 19:59:19.000000000 -0400 2396+++ linux-2.6.35.7/arch/powerpc/kernel/exceptions-64e.S 2010-09-17 20:12:09.000000000 -0400
2249@@ -455,6 +455,7 @@ storage_fault_common: 2397@@ -455,6 +455,7 @@ storage_fault_common:
2250 std r14,_DAR(r1) 2398 std r14,_DAR(r1)
2251 std r15,_DSISR(r1) 2399 std r15,_DSISR(r1)
@@ -2264,10 +2412,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/exceptions-64e.S linux-2.6.32.24/
2264 addi r3,r1,STACK_FRAME_OVERHEAD 2412 addi r3,r1,STACK_FRAME_OVERHEAD
2265 ld r4,_DAR(r1) 2413 ld r4,_DAR(r1)
2266 bl .bad_page_fault 2414 bl .bad_page_fault
2267diff -urNp linux-2.6.32.24/arch/powerpc/kernel/exceptions-64s.S linux-2.6.32.24/arch/powerpc/kernel/exceptions-64s.S 2415diff -urNp linux-2.6.35.7/arch/powerpc/kernel/exceptions-64s.S linux-2.6.35.7/arch/powerpc/kernel/exceptions-64s.S
2268--- linux-2.6.32.24/arch/powerpc/kernel/exceptions-64s.S 2010-08-13 16:24:37.000000000 -0400 2416--- linux-2.6.35.7/arch/powerpc/kernel/exceptions-64s.S 2010-08-26 19:47:12.000000000 -0400
2269+++ linux-2.6.32.24/arch/powerpc/kernel/exceptions-64s.S 2010-10-23 19:59:19.000000000 -0400 2417+++ linux-2.6.35.7/arch/powerpc/kernel/exceptions-64s.S 2010-09-17 20:12:09.000000000 -0400
2270@@ -818,10 +818,10 @@ handle_page_fault: 2418@@ -840,10 +840,10 @@ handle_page_fault:
2271 11: ld r4,_DAR(r1) 2419 11: ld r4,_DAR(r1)
2272 ld r5,_DSISR(r1) 2420 ld r5,_DSISR(r1)
2273 addi r3,r1,STACK_FRAME_OVERHEAD 2421 addi r3,r1,STACK_FRAME_OVERHEAD
@@ -2279,10 +2427,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/exceptions-64s.S linux-2.6.32.24/
2279 mr r5,r3 2427 mr r5,r3
2280 addi r3,r1,STACK_FRAME_OVERHEAD 2428 addi r3,r1,STACK_FRAME_OVERHEAD
2281 lwz r4,_DAR(r1) 2429 lwz r4,_DAR(r1)
2282diff -urNp linux-2.6.32.24/arch/powerpc/kernel/ibmebus.c linux-2.6.32.24/arch/powerpc/kernel/ibmebus.c 2430diff -urNp linux-2.6.35.7/arch/powerpc/kernel/ibmebus.c linux-2.6.35.7/arch/powerpc/kernel/ibmebus.c
2283--- linux-2.6.32.24/arch/powerpc/kernel/ibmebus.c 2010-08-13 16:24:37.000000000 -0400 2431--- linux-2.6.35.7/arch/powerpc/kernel/ibmebus.c 2010-08-26 19:47:12.000000000 -0400
2284+++ linux-2.6.32.24/arch/powerpc/kernel/ibmebus.c 2010-10-23 19:59:19.000000000 -0400 2432+++ linux-2.6.35.7/arch/powerpc/kernel/ibmebus.c 2010-09-17 20:12:09.000000000 -0400
2285@@ -127,7 +127,7 @@ static int ibmebus_dma_supported(struct 2433@@ -128,7 +128,7 @@ static int ibmebus_dma_supported(struct
2286 return 1; 2434 return 1;
2287 } 2435 }
2288 2436
@@ -2291,11 +2439,11 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/ibmebus.c linux-2.6.32.24/arch/po
2291 .alloc_coherent = ibmebus_alloc_coherent, 2439 .alloc_coherent = ibmebus_alloc_coherent,
2292 .free_coherent = ibmebus_free_coherent, 2440 .free_coherent = ibmebus_free_coherent,
2293 .map_sg = ibmebus_map_sg, 2441 .map_sg = ibmebus_map_sg,
2294diff -urNp linux-2.6.32.24/arch/powerpc/kernel/kgdb.c linux-2.6.32.24/arch/powerpc/kernel/kgdb.c 2442diff -urNp linux-2.6.35.7/arch/powerpc/kernel/kgdb.c linux-2.6.35.7/arch/powerpc/kernel/kgdb.c
2295--- linux-2.6.32.24/arch/powerpc/kernel/kgdb.c 2010-08-13 16:24:37.000000000 -0400 2443--- linux-2.6.35.7/arch/powerpc/kernel/kgdb.c 2010-08-26 19:47:12.000000000 -0400
2296+++ linux-2.6.32.24/arch/powerpc/kernel/kgdb.c 2010-10-23 19:59:19.000000000 -0400 2444+++ linux-2.6.35.7/arch/powerpc/kernel/kgdb.c 2010-09-17 20:12:09.000000000 -0400
2297@@ -126,7 +126,7 @@ static int kgdb_handle_breakpoint(struct 2445@@ -128,7 +128,7 @@ static int kgdb_handle_breakpoint(struct
2298 if (kgdb_handle_exception(0, SIGTRAP, 0, regs) != 0) 2446 if (kgdb_handle_exception(1, SIGTRAP, 0, regs) != 0)
2299 return 0; 2447 return 0;
2300 2448
2301- if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr)) 2449- if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr))
@@ -2303,7 +2451,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/kgdb.c linux-2.6.32.24/arch/power
2303 regs->nip += 4; 2451 regs->nip += 4;
2304 2452
2305 return 1; 2453 return 1;
2306@@ -353,7 +353,7 @@ int kgdb_arch_handle_exception(int vecto 2454@@ -360,7 +360,7 @@ int kgdb_arch_handle_exception(int vecto
2307 /* 2455 /*
2308 * Global data 2456 * Global data
2309 */ 2457 */
@@ -2312,9 +2460,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/kgdb.c linux-2.6.32.24/arch/power
2312 .gdb_bpt_instr = {0x7d, 0x82, 0x10, 0x08}, 2460 .gdb_bpt_instr = {0x7d, 0x82, 0x10, 0x08},
2313 }; 2461 };
2314 2462
2315diff -urNp linux-2.6.32.24/arch/powerpc/kernel/module_32.c linux-2.6.32.24/arch/powerpc/kernel/module_32.c 2463diff -urNp linux-2.6.35.7/arch/powerpc/kernel/module_32.c linux-2.6.35.7/arch/powerpc/kernel/module_32.c
2316--- linux-2.6.32.24/arch/powerpc/kernel/module_32.c 2010-08-13 16:24:37.000000000 -0400 2464--- linux-2.6.35.7/arch/powerpc/kernel/module_32.c 2010-08-26 19:47:12.000000000 -0400
2317+++ linux-2.6.32.24/arch/powerpc/kernel/module_32.c 2010-10-23 19:59:19.000000000 -0400 2465+++ linux-2.6.35.7/arch/powerpc/kernel/module_32.c 2010-09-17 20:12:09.000000000 -0400
2318@@ -162,7 +162,7 @@ int module_frob_arch_sections(Elf32_Ehdr 2466@@ -162,7 +162,7 @@ int module_frob_arch_sections(Elf32_Ehdr
2319 me->arch.core_plt_section = i; 2467 me->arch.core_plt_section = i;
2320 } 2468 }
@@ -2344,9 +2492,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/module_32.c linux-2.6.32.24/arch/
2344 2492
2345 /* Find this entry, or if that fails, the next avail. entry */ 2493 /* Find this entry, or if that fails, the next avail. entry */
2346 while (entry->jump[0]) { 2494 while (entry->jump[0]) {
2347diff -urNp linux-2.6.32.24/arch/powerpc/kernel/module.c linux-2.6.32.24/arch/powerpc/kernel/module.c 2495diff -urNp linux-2.6.35.7/arch/powerpc/kernel/module.c linux-2.6.35.7/arch/powerpc/kernel/module.c
2348--- linux-2.6.32.24/arch/powerpc/kernel/module.c 2010-08-13 16:24:37.000000000 -0400 2496--- linux-2.6.35.7/arch/powerpc/kernel/module.c 2010-08-26 19:47:12.000000000 -0400
2349+++ linux-2.6.32.24/arch/powerpc/kernel/module.c 2010-10-23 19:59:19.000000000 -0400 2497+++ linux-2.6.35.7/arch/powerpc/kernel/module.c 2010-09-17 20:12:09.000000000 -0400
2350@@ -31,11 +31,24 @@ 2498@@ -31,11 +31,24 @@
2351 2499
2352 LIST_HEAD(module_bug_list); 2500 LIST_HEAD(module_bug_list);
@@ -2386,10 +2534,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/module.c linux-2.6.32.24/arch/pow
2386 static const Elf_Shdr *find_section(const Elf_Ehdr *hdr, 2534 static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
2387 const Elf_Shdr *sechdrs, 2535 const Elf_Shdr *sechdrs,
2388 const char *name) 2536 const char *name)
2389diff -urNp linux-2.6.32.24/arch/powerpc/kernel/pci-common.c linux-2.6.32.24/arch/powerpc/kernel/pci-common.c 2537diff -urNp linux-2.6.35.7/arch/powerpc/kernel/pci-common.c linux-2.6.35.7/arch/powerpc/kernel/pci-common.c
2390--- linux-2.6.32.24/arch/powerpc/kernel/pci-common.c 2010-08-13 16:24:37.000000000 -0400 2538--- linux-2.6.35.7/arch/powerpc/kernel/pci-common.c 2010-08-26 19:47:12.000000000 -0400
2391+++ linux-2.6.32.24/arch/powerpc/kernel/pci-common.c 2010-10-23 19:59:19.000000000 -0400 2539+++ linux-2.6.35.7/arch/powerpc/kernel/pci-common.c 2010-09-17 20:12:09.000000000 -0400
2392@@ -50,14 +50,14 @@ resource_size_t isa_mem_base; 2540@@ -51,14 +51,14 @@ resource_size_t isa_mem_base;
2393 unsigned int ppc_pci_flags = 0; 2541 unsigned int ppc_pci_flags = 0;
2394 2542
2395 2543
@@ -2407,10 +2555,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/pci-common.c linux-2.6.32.24/arch
2407 { 2555 {
2408 return pci_dma_ops; 2556 return pci_dma_ops;
2409 } 2557 }
2410diff -urNp linux-2.6.32.24/arch/powerpc/kernel/process.c linux-2.6.32.24/arch/powerpc/kernel/process.c 2558diff -urNp linux-2.6.35.7/arch/powerpc/kernel/process.c linux-2.6.35.7/arch/powerpc/kernel/process.c
2411--- linux-2.6.32.24/arch/powerpc/kernel/process.c 2010-08-13 16:24:37.000000000 -0400 2559--- linux-2.6.35.7/arch/powerpc/kernel/process.c 2010-08-26 19:47:12.000000000 -0400
2412+++ linux-2.6.32.24/arch/powerpc/kernel/process.c 2010-10-23 19:59:19.000000000 -0400 2560+++ linux-2.6.35.7/arch/powerpc/kernel/process.c 2010-09-17 20:12:09.000000000 -0400
2413@@ -1141,51 +1141,3 @@ unsigned long arch_align_stack(unsigned 2561@@ -1215,51 +1215,3 @@ unsigned long arch_align_stack(unsigned
2414 sp -= get_random_int() & ~PAGE_MASK; 2562 sp -= get_random_int() & ~PAGE_MASK;
2415 return sp & ~0xf; 2563 return sp & ~0xf;
2416 } 2564 }
@@ -2462,9 +2610,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/process.c linux-2.6.32.24/arch/po
2462- 2610-
2463- return ret; 2611- return ret;
2464-} 2612-}
2465diff -urNp linux-2.6.32.24/arch/powerpc/kernel/signal_32.c linux-2.6.32.24/arch/powerpc/kernel/signal_32.c 2613diff -urNp linux-2.6.35.7/arch/powerpc/kernel/signal_32.c linux-2.6.35.7/arch/powerpc/kernel/signal_32.c
2466--- linux-2.6.32.24/arch/powerpc/kernel/signal_32.c 2010-08-13 16:24:37.000000000 -0400 2614--- linux-2.6.35.7/arch/powerpc/kernel/signal_32.c 2010-08-26 19:47:12.000000000 -0400
2467+++ linux-2.6.32.24/arch/powerpc/kernel/signal_32.c 2010-10-23 19:59:19.000000000 -0400 2615+++ linux-2.6.35.7/arch/powerpc/kernel/signal_32.c 2010-09-17 20:12:09.000000000 -0400
2468@@ -857,7 +857,7 @@ int handle_rt_signal32(unsigned long sig 2616@@ -857,7 +857,7 @@ int handle_rt_signal32(unsigned long sig
2469 /* Save user registers on the stack */ 2617 /* Save user registers on the stack */
2470 frame = &rt_sf->uc.uc_mcontext; 2618 frame = &rt_sf->uc.uc_mcontext;
@@ -2474,9 +2622,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/signal_32.c linux-2.6.32.24/arch/
2474 if (save_user_regs(regs, frame, 0, 1)) 2622 if (save_user_regs(regs, frame, 0, 1))
2475 goto badframe; 2623 goto badframe;
2476 regs->link = current->mm->context.vdso_base + vdso32_rt_sigtramp; 2624 regs->link = current->mm->context.vdso_base + vdso32_rt_sigtramp;
2477diff -urNp linux-2.6.32.24/arch/powerpc/kernel/signal_64.c linux-2.6.32.24/arch/powerpc/kernel/signal_64.c 2625diff -urNp linux-2.6.35.7/arch/powerpc/kernel/signal_64.c linux-2.6.35.7/arch/powerpc/kernel/signal_64.c
2478--- linux-2.6.32.24/arch/powerpc/kernel/signal_64.c 2010-08-13 16:24:37.000000000 -0400 2626--- linux-2.6.35.7/arch/powerpc/kernel/signal_64.c 2010-08-26 19:47:12.000000000 -0400
2479+++ linux-2.6.32.24/arch/powerpc/kernel/signal_64.c 2010-10-23 19:59:19.000000000 -0400 2627+++ linux-2.6.35.7/arch/powerpc/kernel/signal_64.c 2010-09-17 20:12:09.000000000 -0400
2480@@ -429,7 +429,7 @@ int handle_rt_signal64(int signr, struct 2628@@ -429,7 +429,7 @@ int handle_rt_signal64(int signr, struct
2481 current->thread.fpscr.val = 0; 2629 current->thread.fpscr.val = 0;
2482 2630
@@ -2486,25 +2634,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/signal_64.c linux-2.6.32.24/arch/
2486 regs->link = current->mm->context.vdso_base + vdso64_rt_sigtramp; 2634 regs->link = current->mm->context.vdso_base + vdso64_rt_sigtramp;
2487 } else { 2635 } else {
2488 err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); 2636 err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
2489diff -urNp linux-2.6.32.24/arch/powerpc/kernel/sys_ppc32.c linux-2.6.32.24/arch/powerpc/kernel/sys_ppc32.c 2637diff -urNp linux-2.6.35.7/arch/powerpc/kernel/vdso.c linux-2.6.35.7/arch/powerpc/kernel/vdso.c
2490--- linux-2.6.32.24/arch/powerpc/kernel/sys_ppc32.c 2010-08-13 16:24:37.000000000 -0400 2638--- linux-2.6.35.7/arch/powerpc/kernel/vdso.c 2010-08-26 19:47:12.000000000 -0400
2491+++ linux-2.6.32.24/arch/powerpc/kernel/sys_ppc32.c 2010-10-23 19:59:19.000000000 -0400 2639+++ linux-2.6.35.7/arch/powerpc/kernel/vdso.c 2010-09-17 20:12:09.000000000 -0400
2492@@ -563,10 +563,10 @@ asmlinkage long compat_sys_sysctl(struct
2493 if (oldlenp) {
2494 if (!error) {
2495 if (get_user(oldlen, oldlenp) ||
2496- put_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)))
2497+ put_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)) ||
2498+ copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)))
2499 error = -EFAULT;
2500 }
2501- copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused));
2502 }
2503 return error;
2504 }
2505diff -urNp linux-2.6.32.24/arch/powerpc/kernel/vdso.c linux-2.6.32.24/arch/powerpc/kernel/vdso.c
2506--- linux-2.6.32.24/arch/powerpc/kernel/vdso.c 2010-08-13 16:24:37.000000000 -0400
2507+++ linux-2.6.32.24/arch/powerpc/kernel/vdso.c 2010-10-23 19:59:19.000000000 -0400
2508@@ -36,6 +36,7 @@ 2640@@ -36,6 +36,7 @@
2509 #include <asm/firmware.h> 2641 #include <asm/firmware.h>
2510 #include <asm/vdso.h> 2642 #include <asm/vdso.h>
@@ -2531,10 +2663,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/vdso.c linux-2.6.32.24/arch/power
2531 if (IS_ERR_VALUE(vdso_base)) { 2663 if (IS_ERR_VALUE(vdso_base)) {
2532 rc = vdso_base; 2664 rc = vdso_base;
2533 goto fail_mmapsem; 2665 goto fail_mmapsem;
2534diff -urNp linux-2.6.32.24/arch/powerpc/kernel/vio.c linux-2.6.32.24/arch/powerpc/kernel/vio.c 2666diff -urNp linux-2.6.35.7/arch/powerpc/kernel/vio.c linux-2.6.35.7/arch/powerpc/kernel/vio.c
2535--- linux-2.6.32.24/arch/powerpc/kernel/vio.c 2010-08-13 16:24:37.000000000 -0400 2667--- linux-2.6.35.7/arch/powerpc/kernel/vio.c 2010-08-26 19:47:12.000000000 -0400
2536+++ linux-2.6.32.24/arch/powerpc/kernel/vio.c 2010-10-23 19:59:19.000000000 -0400 2668+++ linux-2.6.35.7/arch/powerpc/kernel/vio.c 2010-09-17 20:12:09.000000000 -0400
2537@@ -601,11 +601,12 @@ static void vio_dma_iommu_unmap_sg(struc 2669@@ -602,11 +602,12 @@ static void vio_dma_iommu_unmap_sg(struc
2538 vio_cmo_dealloc(viodev, alloc_size); 2670 vio_cmo_dealloc(viodev, alloc_size);
2539 } 2671 }
2540 2672
@@ -2548,7 +2680,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/vio.c linux-2.6.32.24/arch/powerp
2548 .map_page = vio_dma_iommu_map_page, 2680 .map_page = vio_dma_iommu_map_page,
2549 .unmap_page = vio_dma_iommu_unmap_page, 2681 .unmap_page = vio_dma_iommu_unmap_page,
2550 2682
2551@@ -857,7 +858,6 @@ static void vio_cmo_bus_remove(struct vi 2683@@ -860,7 +861,6 @@ static void vio_cmo_bus_remove(struct vi
2552 2684
2553 static void vio_cmo_set_dma_ops(struct vio_dev *viodev) 2685 static void vio_cmo_set_dma_ops(struct vio_dev *viodev)
2554 { 2686 {
@@ -2556,9 +2688,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/kernel/vio.c linux-2.6.32.24/arch/powerp
2556 viodev->dev.archdata.dma_ops = &vio_dma_mapping_ops; 2688 viodev->dev.archdata.dma_ops = &vio_dma_mapping_ops;
2557 } 2689 }
2558 2690
2559diff -urNp linux-2.6.32.24/arch/powerpc/lib/usercopy_64.c linux-2.6.32.24/arch/powerpc/lib/usercopy_64.c 2691diff -urNp linux-2.6.35.7/arch/powerpc/lib/usercopy_64.c linux-2.6.35.7/arch/powerpc/lib/usercopy_64.c
2560--- linux-2.6.32.24/arch/powerpc/lib/usercopy_64.c 2010-08-13 16:24:37.000000000 -0400 2692--- linux-2.6.35.7/arch/powerpc/lib/usercopy_64.c 2010-08-26 19:47:12.000000000 -0400
2561+++ linux-2.6.32.24/arch/powerpc/lib/usercopy_64.c 2010-10-23 19:59:19.000000000 -0400 2693+++ linux-2.6.35.7/arch/powerpc/lib/usercopy_64.c 2010-09-17 20:12:09.000000000 -0400
2562@@ -9,22 +9,6 @@ 2694@@ -9,22 +9,6 @@
2563 #include <linux/module.h> 2695 #include <linux/module.h>
2564 #include <asm/uaccess.h> 2696 #include <asm/uaccess.h>
@@ -2590,9 +2722,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/lib/usercopy_64.c linux-2.6.32.24/arch/p
2590-EXPORT_SYMBOL(copy_to_user); 2722-EXPORT_SYMBOL(copy_to_user);
2591 EXPORT_SYMBOL(copy_in_user); 2723 EXPORT_SYMBOL(copy_in_user);
2592 2724
2593diff -urNp linux-2.6.32.24/arch/powerpc/mm/fault.c linux-2.6.32.24/arch/powerpc/mm/fault.c 2725diff -urNp linux-2.6.35.7/arch/powerpc/mm/fault.c linux-2.6.35.7/arch/powerpc/mm/fault.c
2594--- linux-2.6.32.24/arch/powerpc/mm/fault.c 2010-08-13 16:24:37.000000000 -0400 2726--- linux-2.6.35.7/arch/powerpc/mm/fault.c 2010-08-26 19:47:12.000000000 -0400
2595+++ linux-2.6.32.24/arch/powerpc/mm/fault.c 2010-10-23 19:59:19.000000000 -0400 2727+++ linux-2.6.35.7/arch/powerpc/mm/fault.c 2010-09-17 20:12:09.000000000 -0400
2596@@ -30,6 +30,10 @@ 2728@@ -30,6 +30,10 @@
2597 #include <linux/kprobes.h> 2729 #include <linux/kprobes.h>
2598 #include <linux/kdebug.h> 2730 #include <linux/kdebug.h>
@@ -2604,14 +2736,14 @@ diff -urNp linux-2.6.32.24/arch/powerpc/mm/fault.c linux-2.6.32.24/arch/powerpc/
2604 2736
2605 #include <asm/firmware.h> 2737 #include <asm/firmware.h>
2606 #include <asm/page.h> 2738 #include <asm/page.h>
2607@@ -40,6 +44,7 @@ 2739@@ -41,6 +45,7 @@
2608 #include <asm/uaccess.h>
2609 #include <asm/tlbflush.h> 2740 #include <asm/tlbflush.h>
2610 #include <asm/siginfo.h> 2741 #include <asm/siginfo.h>
2742 #include <mm/mmu_decl.h>
2611+#include <asm/ptrace.h> 2743+#include <asm/ptrace.h>
2612 2744
2613
2614 #ifdef CONFIG_KPROBES 2745 #ifdef CONFIG_KPROBES
2746 static inline int notify_page_fault(struct pt_regs *regs)
2615@@ -64,6 +69,33 @@ static inline int notify_page_fault(stru 2747@@ -64,6 +69,33 @@ static inline int notify_page_fault(stru
2616 } 2748 }
2617 #endif 2749 #endif
@@ -2655,7 +2787,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/mm/fault.c linux-2.6.32.24/arch/powerpc/
2655 else 2787 else
2656 is_write = error_code & DSISR_ISSTORE; 2788 is_write = error_code & DSISR_ISSTORE;
2657 #else 2789 #else
2658@@ -250,7 +282,7 @@ good_area: 2790@@ -257,7 +289,7 @@ good_area:
2659 * "undefined". Of those that can be set, this is the only 2791 * "undefined". Of those that can be set, this is the only
2660 * one which seems bad. 2792 * one which seems bad.
2661 */ 2793 */
@@ -2664,7 +2796,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/mm/fault.c linux-2.6.32.24/arch/powerpc/
2664 /* Guarded storage error. */ 2796 /* Guarded storage error. */
2665 goto bad_area; 2797 goto bad_area;
2666 #endif /* CONFIG_8xx */ 2798 #endif /* CONFIG_8xx */
2667@@ -265,7 +297,7 @@ good_area: 2799@@ -272,7 +304,7 @@ good_area:
2668 * processors use the same I/D cache coherency mechanism 2800 * processors use the same I/D cache coherency mechanism
2669 * as embedded. 2801 * as embedded.
2670 */ 2802 */
@@ -2673,7 +2805,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/mm/fault.c linux-2.6.32.24/arch/powerpc/
2673 goto bad_area; 2805 goto bad_area;
2674 #endif /* CONFIG_PPC_STD_MMU */ 2806 #endif /* CONFIG_PPC_STD_MMU */
2675 2807
2676@@ -335,6 +367,23 @@ bad_area: 2808@@ -341,6 +373,23 @@ bad_area:
2677 bad_area_nosemaphore: 2809 bad_area_nosemaphore:
2678 /* User mode accesses cause a SIGSEGV */ 2810 /* User mode accesses cause a SIGSEGV */
2679 if (user_mode(regs)) { 2811 if (user_mode(regs)) {
@@ -2697,9 +2829,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/mm/fault.c linux-2.6.32.24/arch/powerpc/
2697 _exception(SIGSEGV, regs, code, address); 2829 _exception(SIGSEGV, regs, code, address);
2698 return 0; 2830 return 0;
2699 } 2831 }
2700diff -urNp linux-2.6.32.24/arch/powerpc/mm/mmap_64.c linux-2.6.32.24/arch/powerpc/mm/mmap_64.c 2832diff -urNp linux-2.6.35.7/arch/powerpc/mm/mmap_64.c linux-2.6.35.7/arch/powerpc/mm/mmap_64.c
2701--- linux-2.6.32.24/arch/powerpc/mm/mmap_64.c 2010-08-13 16:24:37.000000000 -0400 2833--- linux-2.6.35.7/arch/powerpc/mm/mmap_64.c 2010-08-26 19:47:12.000000000 -0400
2702+++ linux-2.6.32.24/arch/powerpc/mm/mmap_64.c 2010-10-23 19:59:19.000000000 -0400 2834+++ linux-2.6.35.7/arch/powerpc/mm/mmap_64.c 2010-09-17 20:12:09.000000000 -0400
2703@@ -99,10 +99,22 @@ void arch_pick_mmap_layout(struct mm_str 2835@@ -99,10 +99,22 @@ void arch_pick_mmap_layout(struct mm_str
2704 */ 2836 */
2705 if (mmap_is_legacy()) { 2837 if (mmap_is_legacy()) {
@@ -2723,9 +2855,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/mm/mmap_64.c linux-2.6.32.24/arch/powerp
2723 mm->get_unmapped_area = arch_get_unmapped_area_topdown; 2855 mm->get_unmapped_area = arch_get_unmapped_area_topdown;
2724 mm->unmap_area = arch_unmap_area_topdown; 2856 mm->unmap_area = arch_unmap_area_topdown;
2725 } 2857 }
2726diff -urNp linux-2.6.32.24/arch/powerpc/mm/slice.c linux-2.6.32.24/arch/powerpc/mm/slice.c 2858diff -urNp linux-2.6.35.7/arch/powerpc/mm/slice.c linux-2.6.35.7/arch/powerpc/mm/slice.c
2727--- linux-2.6.32.24/arch/powerpc/mm/slice.c 2010-08-13 16:24:37.000000000 -0400 2859--- linux-2.6.35.7/arch/powerpc/mm/slice.c 2010-08-26 19:47:12.000000000 -0400
2728+++ linux-2.6.32.24/arch/powerpc/mm/slice.c 2010-10-23 20:03:00.000000000 -0400 2860+++ linux-2.6.35.7/arch/powerpc/mm/slice.c 2010-10-23 20:08:39.000000000 -0400
2729@@ -98,7 +98,7 @@ static int slice_area_is_free(struct mm_ 2861@@ -98,7 +98,7 @@ static int slice_area_is_free(struct mm_
2730 if ((mm->task_size - len) < addr) 2862 if ((mm->task_size - len) < addr)
2731 return 0; 2863 return 0;
@@ -2765,9 +2897,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/mm/slice.c linux-2.6.32.24/arch/powerpc/
2765 /* If hint, make sure it matches our alignment restrictions */ 2897 /* If hint, make sure it matches our alignment restrictions */
2766 if (!fixed && addr) { 2898 if (!fixed && addr) {
2767 addr = _ALIGN_UP(addr, 1ul << pshift); 2899 addr = _ALIGN_UP(addr, 1ul << pshift);
2768diff -urNp linux-2.6.32.24/arch/powerpc/platforms/52xx/lite5200_pm.c linux-2.6.32.24/arch/powerpc/platforms/52xx/lite5200_pm.c 2900diff -urNp linux-2.6.35.7/arch/powerpc/platforms/52xx/lite5200_pm.c linux-2.6.35.7/arch/powerpc/platforms/52xx/lite5200_pm.c
2769--- linux-2.6.32.24/arch/powerpc/platforms/52xx/lite5200_pm.c 2010-08-13 16:24:37.000000000 -0400 2901--- linux-2.6.35.7/arch/powerpc/platforms/52xx/lite5200_pm.c 2010-08-26 19:47:12.000000000 -0400
2770+++ linux-2.6.32.24/arch/powerpc/platforms/52xx/lite5200_pm.c 2010-10-23 19:59:19.000000000 -0400 2902+++ linux-2.6.35.7/arch/powerpc/platforms/52xx/lite5200_pm.c 2010-09-17 20:12:09.000000000 -0400
2771@@ -235,7 +235,7 @@ static void lite5200_pm_end(void) 2903@@ -235,7 +235,7 @@ static void lite5200_pm_end(void)
2772 lite5200_pm_target_state = PM_SUSPEND_ON; 2904 lite5200_pm_target_state = PM_SUSPEND_ON;
2773 } 2905 }
@@ -2777,10 +2909,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/platforms/52xx/lite5200_pm.c linux-2.6.3
2777 .valid = lite5200_pm_valid, 2909 .valid = lite5200_pm_valid,
2778 .begin = lite5200_pm_begin, 2910 .begin = lite5200_pm_begin,
2779 .prepare = lite5200_pm_prepare, 2911 .prepare = lite5200_pm_prepare,
2780diff -urNp linux-2.6.32.24/arch/powerpc/platforms/52xx/mpc52xx_pm.c linux-2.6.32.24/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2912diff -urNp linux-2.6.35.7/arch/powerpc/platforms/52xx/mpc52xx_pm.c linux-2.6.35.7/arch/powerpc/platforms/52xx/mpc52xx_pm.c
2781--- linux-2.6.32.24/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2010-08-13 16:24:37.000000000 -0400 2913--- linux-2.6.35.7/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2010-08-26 19:47:12.000000000 -0400
2782+++ linux-2.6.32.24/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2010-10-23 19:59:19.000000000 -0400 2914+++ linux-2.6.35.7/arch/powerpc/platforms/52xx/mpc52xx_pm.c 2010-09-17 20:12:09.000000000 -0400
2783@@ -180,7 +180,7 @@ void mpc52xx_pm_finish(void) 2915@@ -189,7 +189,7 @@ void mpc52xx_pm_finish(void)
2784 iounmap(mbar); 2916 iounmap(mbar);
2785 } 2917 }
2786 2918
@@ -2789,10 +2921,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/platforms/52xx/mpc52xx_pm.c linux-2.6.32
2789 .valid = mpc52xx_pm_valid, 2921 .valid = mpc52xx_pm_valid,
2790 .prepare = mpc52xx_pm_prepare, 2922 .prepare = mpc52xx_pm_prepare,
2791 .enter = mpc52xx_pm_enter, 2923 .enter = mpc52xx_pm_enter,
2792diff -urNp linux-2.6.32.24/arch/powerpc/platforms/83xx/suspend.c linux-2.6.32.24/arch/powerpc/platforms/83xx/suspend.c 2924diff -urNp linux-2.6.35.7/arch/powerpc/platforms/83xx/suspend.c linux-2.6.35.7/arch/powerpc/platforms/83xx/suspend.c
2793--- linux-2.6.32.24/arch/powerpc/platforms/83xx/suspend.c 2010-08-13 16:24:37.000000000 -0400 2925--- linux-2.6.35.7/arch/powerpc/platforms/83xx/suspend.c 2010-08-26 19:47:12.000000000 -0400
2794+++ linux-2.6.32.24/arch/powerpc/platforms/83xx/suspend.c 2010-10-23 19:59:19.000000000 -0400 2926+++ linux-2.6.35.7/arch/powerpc/platforms/83xx/suspend.c 2010-09-17 20:12:09.000000000 -0400
2795@@ -273,7 +273,7 @@ static int mpc83xx_is_pci_agent(void) 2927@@ -311,7 +311,7 @@ static int mpc83xx_is_pci_agent(void)
2796 return ret; 2928 return ret;
2797 } 2929 }
2798 2930
@@ -2801,9 +2933,9 @@ diff -urNp linux-2.6.32.24/arch/powerpc/platforms/83xx/suspend.c linux-2.6.32.24
2801 .valid = mpc83xx_suspend_valid, 2933 .valid = mpc83xx_suspend_valid,
2802 .begin = mpc83xx_suspend_begin, 2934 .begin = mpc83xx_suspend_begin,
2803 .enter = mpc83xx_suspend_enter, 2935 .enter = mpc83xx_suspend_enter,
2804diff -urNp linux-2.6.32.24/arch/powerpc/platforms/cell/iommu.c linux-2.6.32.24/arch/powerpc/platforms/cell/iommu.c 2936diff -urNp linux-2.6.35.7/arch/powerpc/platforms/cell/iommu.c linux-2.6.35.7/arch/powerpc/platforms/cell/iommu.c
2805--- linux-2.6.32.24/arch/powerpc/platforms/cell/iommu.c 2010-08-13 16:24:37.000000000 -0400 2937--- linux-2.6.35.7/arch/powerpc/platforms/cell/iommu.c 2010-08-26 19:47:12.000000000 -0400
2806+++ linux-2.6.32.24/arch/powerpc/platforms/cell/iommu.c 2010-10-23 19:59:19.000000000 -0400 2938+++ linux-2.6.35.7/arch/powerpc/platforms/cell/iommu.c 2010-09-17 20:12:09.000000000 -0400
2807@@ -642,7 +642,7 @@ static int dma_fixed_dma_supported(struc 2939@@ -642,7 +642,7 @@ static int dma_fixed_dma_supported(struc
2808 2940
2809 static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); 2941 static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
@@ -2813,10 +2945,10 @@ diff -urNp linux-2.6.32.24/arch/powerpc/platforms/cell/iommu.c linux-2.6.32.24/a
2813 .alloc_coherent = dma_fixed_alloc_coherent, 2945 .alloc_coherent = dma_fixed_alloc_coherent,
2814 .free_coherent = dma_fixed_free_coherent, 2946 .free_coherent = dma_fixed_free_coherent,
2815 .map_sg = dma_fixed_map_sg, 2947 .map_sg = dma_fixed_map_sg,
2816diff -urNp linux-2.6.32.24/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.32.24/arch/powerpc/platforms/ps3/system-bus.c 2948diff -urNp linux-2.6.35.7/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.35.7/arch/powerpc/platforms/ps3/system-bus.c
2817--- linux-2.6.32.24/arch/powerpc/platforms/ps3/system-bus.c 2010-08-13 16:24:37.000000000 -0400 2949--- linux-2.6.35.7/arch/powerpc/platforms/ps3/system-bus.c 2010-08-26 19:47:12.000000000 -0400
2818+++ linux-2.6.32.24/arch/powerpc/platforms/ps3/system-bus.c 2010-10-23 19:59:19.000000000 -0400 2950+++ linux-2.6.35.7/arch/powerpc/platforms/ps3/system-bus.c 2010-09-17 20:12:09.000000000 -0400
2819@@ -694,7 +694,7 @@ static int ps3_dma_supported(struct devi 2951@@ -695,7 +695,7 @@ static int ps3_dma_supported(struct devi
2820 return mask >= DMA_BIT_MASK(32); 2952 return mask >= DMA_BIT_MASK(32);
2821 } 2953 }
2822 2954
@@ -2825,7 +2957,7 @@ diff -urNp linux-2.6.32.24/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.32.
2825 .alloc_coherent = ps3_alloc_coherent, 2957 .alloc_coherent = ps3_alloc_coherent,
2826 .free_coherent = ps3_free_coherent, 2958 .free_coherent = ps3_free_coherent,
2827 .map_sg = ps3_sb_map_sg, 2959 .map_sg = ps3_sb_map_sg,
2828@@ -704,7 +704,7 @@ static struct dma_map_ops ps3_sb_dma_ops 2960@@ -705,7 +705,7 @@ static struct dma_map_ops ps3_sb_dma_ops
2829 .unmap_page = ps3_unmap_page, 2961 .unmap_page = ps3_unmap_page,
2830 }; 2962 };
2831 2963
@@ -2834,22 +2966,22 @@ diff -urNp linux-2.6.32.24/arch/powerpc/platforms/ps3/system-bus.c linux-2.6.32.
2834 .alloc_coherent = ps3_alloc_coherent, 2966 .alloc_coherent = ps3_alloc_coherent,
2835 .free_coherent = ps3_free_coherent, 2967 .free_coherent = ps3_free_coherent,
2836 .map_sg = ps3_ioc0_map_sg, 2968 .map_sg = ps3_ioc0_map_sg,
2837diff -urNp linux-2.6.32.24/arch/powerpc/platforms/pseries/Kconfig linux-2.6.32.24/arch/powerpc/platforms/pseries/Kconfig 2969diff -urNp linux-2.6.35.7/arch/powerpc/sysdev/fsl_pmc.c linux-2.6.35.7/arch/powerpc/sysdev/fsl_pmc.c
2838--- linux-2.6.32.24/arch/powerpc/platforms/pseries/Kconfig 2010-08-13 16:24:37.000000000 -0400 2970--- linux-2.6.35.7/arch/powerpc/sysdev/fsl_pmc.c 2010-08-26 19:47:12.000000000 -0400
2839+++ linux-2.6.32.24/arch/powerpc/platforms/pseries/Kconfig 2010-10-23 19:59:19.000000000 -0400 2971+++ linux-2.6.35.7/arch/powerpc/sysdev/fsl_pmc.c 2010-09-17 20:12:09.000000000 -0400
2840@@ -2,6 +2,8 @@ config PPC_PSERIES 2972@@ -53,7 +53,7 @@ static int pmc_suspend_valid(suspend_sta
2841 depends on PPC64 && PPC_BOOK3S 2973 return 1;
2842 bool "IBM pSeries & new (POWER5-based) iSeries" 2974 }
2843 select MPIC 2975
2844+ select PCI_MSI 2976-static struct platform_suspend_ops pmc_suspend_ops = {
2845+ select XICS 2977+static const struct platform_suspend_ops pmc_suspend_ops = {
2846 select PPC_I8259 2978 .valid = pmc_suspend_valid,
2847 select PPC_RTAS 2979 .enter = pmc_suspend_enter,
2848 select RTAS_ERROR_LOGGING 2980 };
2849diff -urNp linux-2.6.32.24/arch/s390/include/asm/elf.h linux-2.6.32.24/arch/s390/include/asm/elf.h 2981diff -urNp linux-2.6.35.7/arch/s390/include/asm/elf.h linux-2.6.35.7/arch/s390/include/asm/elf.h
2850--- linux-2.6.32.24/arch/s390/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 2982--- linux-2.6.35.7/arch/s390/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
2851+++ linux-2.6.32.24/arch/s390/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 2983+++ linux-2.6.35.7/arch/s390/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
2852@@ -164,6 +164,13 @@ extern unsigned int vdso_enabled; 2984@@ -163,6 +163,13 @@ extern unsigned int vdso_enabled;
2853 that it will "exec", and that there is sufficient room for the brk. */ 2985 that it will "exec", and that there is sufficient room for the brk. */
2854 #define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2) 2986 #define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2)
2855 2987
@@ -2863,29 +2995,10 @@ diff -urNp linux-2.6.32.24/arch/s390/include/asm/elf.h linux-2.6.32.24/arch/s390
2863 /* This yields a mask that user programs can use to figure out what 2995 /* This yields a mask that user programs can use to figure out what
2864 instruction set this CPU supports. */ 2996 instruction set this CPU supports. */
2865 2997
2866diff -urNp linux-2.6.32.24/arch/s390/include/asm/setup.h linux-2.6.32.24/arch/s390/include/asm/setup.h 2998diff -urNp linux-2.6.35.7/arch/s390/include/asm/uaccess.h linux-2.6.35.7/arch/s390/include/asm/uaccess.h
2867--- linux-2.6.32.24/arch/s390/include/asm/setup.h 2010-08-13 16:24:37.000000000 -0400 2999--- linux-2.6.35.7/arch/s390/include/asm/uaccess.h 2010-08-26 19:47:12.000000000 -0400
2868+++ linux-2.6.32.24/arch/s390/include/asm/setup.h 2010-10-23 19:59:19.000000000 -0400 3000+++ linux-2.6.35.7/arch/s390/include/asm/uaccess.h 2010-09-17 20:12:09.000000000 -0400
2869@@ -50,13 +50,13 @@ extern unsigned long memory_end; 3001@@ -234,6 +234,10 @@ static inline unsigned long __must_check
2870 void detect_memory_layout(struct mem_chunk chunk[]);
2871
2872 #ifdef CONFIG_S390_SWITCH_AMODE
2873-extern unsigned int switch_amode;
2874+#define switch_amode (1)
2875 #else
2876 #define switch_amode (0)
2877 #endif
2878
2879 #ifdef CONFIG_S390_EXEC_PROTECT
2880-extern unsigned int s390_noexec;
2881+#define s390_noexec (1)
2882 #else
2883 #define s390_noexec (0)
2884 #endif
2885diff -urNp linux-2.6.32.24/arch/s390/include/asm/uaccess.h linux-2.6.32.24/arch/s390/include/asm/uaccess.h
2886--- linux-2.6.32.24/arch/s390/include/asm/uaccess.h 2010-08-13 16:24:37.000000000 -0400
2887+++ linux-2.6.32.24/arch/s390/include/asm/uaccess.h 2010-10-23 19:59:19.000000000 -0400
2888@@ -232,6 +232,10 @@ static inline unsigned long __must_check
2889 copy_to_user(void __user *to, const void *from, unsigned long n) 3002 copy_to_user(void __user *to, const void *from, unsigned long n)
2890 { 3003 {
2891 might_fault(); 3004 might_fault();
@@ -2896,7 +3009,7 @@ diff -urNp linux-2.6.32.24/arch/s390/include/asm/uaccess.h linux-2.6.32.24/arch/
2896 if (access_ok(VERIFY_WRITE, to, n)) 3009 if (access_ok(VERIFY_WRITE, to, n))
2897 n = __copy_to_user(to, from, n); 3010 n = __copy_to_user(to, from, n);
2898 return n; 3011 return n;
2899@@ -257,6 +261,9 @@ copy_to_user(void __user *to, const void 3012@@ -259,6 +263,9 @@ copy_to_user(void __user *to, const void
2900 static inline unsigned long __must_check 3013 static inline unsigned long __must_check
2901 __copy_from_user(void *to, const void __user *from, unsigned long n) 3014 __copy_from_user(void *to, const void __user *from, unsigned long n)
2902 { 3015 {
@@ -2906,61 +3019,42 @@ diff -urNp linux-2.6.32.24/arch/s390/include/asm/uaccess.h linux-2.6.32.24/arch/
2906 if (__builtin_constant_p(n) && (n <= 256)) 3019 if (__builtin_constant_p(n) && (n <= 256))
2907 return uaccess.copy_from_user_small(n, from, to); 3020 return uaccess.copy_from_user_small(n, from, to);
2908 else 3021 else
2909@@ -283,6 +290,10 @@ static inline unsigned long __must_check 3022@@ -293,6 +300,10 @@ copy_from_user(void *to, const void __us
2910 copy_from_user(void *to, const void __user *from, unsigned long n) 3023 unsigned int sz = __compiletime_object_size(to);
2911 { 3024
2912 might_fault(); 3025 might_fault();
2913+ 3026+
2914+ if ((long)n < 0) 3027+ if ((long)n < 0)
2915+ return n; 3028+ return n;
2916+ 3029+
2917 if (access_ok(VERIFY_READ, from, n)) 3030 if (unlikely(sz != -1 && sz < n)) {
2918 n = __copy_from_user(to, from, n); 3031 copy_from_user_overflow();
2919 else 3032 return n;
2920diff -urNp linux-2.6.32.24/arch/s390/Kconfig linux-2.6.32.24/arch/s390/Kconfig 3033diff -urNp linux-2.6.35.7/arch/s390/Kconfig linux-2.6.35.7/arch/s390/Kconfig
2921--- linux-2.6.32.24/arch/s390/Kconfig 2010-08-13 16:24:37.000000000 -0400 3034--- linux-2.6.35.7/arch/s390/Kconfig 2010-08-26 19:47:12.000000000 -0400
2922+++ linux-2.6.32.24/arch/s390/Kconfig 2010-10-23 19:59:19.000000000 -0400 3035+++ linux-2.6.35.7/arch/s390/Kconfig 2010-09-17 20:12:09.000000000 -0400
2923@@ -194,28 +194,26 @@ config AUDIT_ARCH 3036@@ -230,13 +230,12 @@ config AUDIT_ARCH
2924
2925 config S390_SWITCH_AMODE
2926 bool "Switch kernel/user addressing modes"
2927+ default y
2928 help
2929 This option allows to switch the addressing modes of kernel and user
2930- space. The kernel parameter switch_amode=on will enable this feature,
2931- default is disabled. Enabling this (via kernel parameter) on machines
2932- earlier than IBM System z9-109 EC/BC will reduce system performance.
2933+ space. Enabling this on machines earlier than IBM System z9-109 EC/BC
2934+ will reduce system performance.
2935
2936 Note that this option will also be selected by selecting the execute
2937- protection option below. Enabling the execute protection via the
2938- noexec kernel parameter will also switch the addressing modes,
2939- independent of the switch_amode kernel parameter.
2940+ protection option below. Enabling the execute protection will also
2941+ switch the addressing modes, independent of this option.
2942
2943 3037
2944 config S390_EXEC_PROTECT 3038 config S390_EXEC_PROTECT
2945 bool "Data execute protection" 3039 bool "Data execute protection"
2946+ default y 3040+ default y
2947 select S390_SWITCH_AMODE
2948 help 3041 help
2949 This option allows to enable a buffer overflow protection for user 3042 This option allows to enable a buffer overflow protection for user
2950 space programs and it also selects the addressing mode option above. 3043- space programs and it also selects the addressing mode option above.
2951- The kernel parameter noexec=on will enable this feature and also 3044- The kernel parameter noexec=on will enable this feature and also
2952- switch the addressing modes, default is disabled. Enabling this (via 3045- switch the addressing modes, default is disabled. Enabling this (via
2953- kernel parameter) on machines earlier than IBM System z9-109 EC/BC 3046- kernel parameter) on machines earlier than IBM System z9-109 EC/BC
2954- will reduce system performance. 3047- will reduce system performance.
3048+ space programs.
2955+ Enabling this on machines earlier than IBM System z9-109 EC/BC will 3049+ Enabling this on machines earlier than IBM System z9-109 EC/BC will
2956+ reduce system performance. 3050+ reduce system performance.
2957 3051
2958 comment "Code generation options" 3052 comment "Code generation options"
2959 3053
2960diff -urNp linux-2.6.32.24/arch/s390/kernel/module.c linux-2.6.32.24/arch/s390/kernel/module.c 3054diff -urNp linux-2.6.35.7/arch/s390/kernel/module.c linux-2.6.35.7/arch/s390/kernel/module.c
2961--- linux-2.6.32.24/arch/s390/kernel/module.c 2010-08-13 16:24:37.000000000 -0400 3055--- linux-2.6.35.7/arch/s390/kernel/module.c 2010-08-26 19:47:12.000000000 -0400
2962+++ linux-2.6.32.24/arch/s390/kernel/module.c 2010-10-23 19:59:19.000000000 -0400 3056+++ linux-2.6.35.7/arch/s390/kernel/module.c 2010-09-17 20:12:09.000000000 -0400
2963@@ -166,11 +166,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr, 3057@@ -168,11 +168,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr,
2964 3058
2965 /* Increase core size by size of got & plt and set start 3059 /* Increase core size by size of got & plt and set start
2966 offsets for got and plt. */ 3060 offsets for got and plt. */
@@ -2977,7 +3071,7 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/module.c linux-2.6.32.24/arch/s390/k
2977 return 0; 3071 return 0;
2978 } 3072 }
2979 3073
2980@@ -256,7 +256,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base 3074@@ -258,7 +258,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
2981 if (info->got_initialized == 0) { 3075 if (info->got_initialized == 0) {
2982 Elf_Addr *gotent; 3076 Elf_Addr *gotent;
2983 3077
@@ -2986,7 +3080,7 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/module.c linux-2.6.32.24/arch/s390/k
2986 info->got_offset; 3080 info->got_offset;
2987 *gotent = val; 3081 *gotent = val;
2988 info->got_initialized = 1; 3082 info->got_initialized = 1;
2989@@ -280,7 +280,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base 3083@@ -282,7 +282,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
2990 else if (r_type == R_390_GOTENT || 3084 else if (r_type == R_390_GOTENT ||
2991 r_type == R_390_GOTPLTENT) 3085 r_type == R_390_GOTPLTENT)
2992 *(unsigned int *) loc = 3086 *(unsigned int *) loc =
@@ -2995,7 +3089,7 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/module.c linux-2.6.32.24/arch/s390/k
2995 else if (r_type == R_390_GOT64 || 3089 else if (r_type == R_390_GOT64 ||
2996 r_type == R_390_GOTPLT64) 3090 r_type == R_390_GOTPLT64)
2997 *(unsigned long *) loc = val; 3091 *(unsigned long *) loc = val;
2998@@ -294,7 +294,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base 3092@@ -296,7 +296,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
2999 case R_390_PLTOFF64: /* 16 bit offset from GOT to PLT. */ 3093 case R_390_PLTOFF64: /* 16 bit offset from GOT to PLT. */
3000 if (info->plt_initialized == 0) { 3094 if (info->plt_initialized == 0) {
3001 unsigned int *ip; 3095 unsigned int *ip;
@@ -3004,7 +3098,7 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/module.c linux-2.6.32.24/arch/s390/k
3004 info->plt_offset; 3098 info->plt_offset;
3005 #ifndef CONFIG_64BIT 3099 #ifndef CONFIG_64BIT
3006 ip[0] = 0x0d105810; /* basr 1,0; l 1,6(1); br 1 */ 3100 ip[0] = 0x0d105810; /* basr 1,0; l 1,6(1); br 1 */
3007@@ -319,7 +319,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base 3101@@ -321,7 +321,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
3008 val - loc + 0xffffUL < 0x1ffffeUL) || 3102 val - loc + 0xffffUL < 0x1ffffeUL) ||
3009 (r_type == R_390_PLT32DBL && 3103 (r_type == R_390_PLT32DBL &&
3010 val - loc + 0xffffffffULL < 0x1fffffffeULL))) 3104 val - loc + 0xffffffffULL < 0x1fffffffeULL)))
@@ -3013,7 +3107,7 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/module.c linux-2.6.32.24/arch/s390/k
3013 me->arch.plt_offset + 3107 me->arch.plt_offset +
3014 info->plt_offset; 3108 info->plt_offset;
3015 val += rela->r_addend - loc; 3109 val += rela->r_addend - loc;
3016@@ -341,7 +341,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base 3110@@ -343,7 +343,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
3017 case R_390_GOTOFF32: /* 32 bit offset to GOT. */ 3111 case R_390_GOTOFF32: /* 32 bit offset to GOT. */
3018 case R_390_GOTOFF64: /* 64 bit offset to GOT. */ 3112 case R_390_GOTOFF64: /* 64 bit offset to GOT. */
3019 val = val + rela->r_addend - 3113 val = val + rela->r_addend -
@@ -3022,7 +3116,7 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/module.c linux-2.6.32.24/arch/s390/k
3022 if (r_type == R_390_GOTOFF16) 3116 if (r_type == R_390_GOTOFF16)
3023 *(unsigned short *) loc = val; 3117 *(unsigned short *) loc = val;
3024 else if (r_type == R_390_GOTOFF32) 3118 else if (r_type == R_390_GOTOFF32)
3025@@ -351,7 +351,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base 3119@@ -353,7 +353,7 @@ apply_rela(Elf_Rela *rela, Elf_Addr base
3026 break; 3120 break;
3027 case R_390_GOTPC: /* 32 bit PC relative offset to GOT. */ 3121 case R_390_GOTPC: /* 32 bit PC relative offset to GOT. */
3028 case R_390_GOTPCDBL: /* 32 bit PC rel. off. to GOT shifted by 1. */ 3122 case R_390_GOTPCDBL: /* 32 bit PC rel. off. to GOT shifted by 1. */
@@ -3031,45 +3125,41 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/module.c linux-2.6.32.24/arch/s390/k
3031 rela->r_addend - loc; 3125 rela->r_addend - loc;
3032 if (r_type == R_390_GOTPC) 3126 if (r_type == R_390_GOTPC)
3033 *(unsigned int *) loc = val; 3127 *(unsigned int *) loc = val;
3034diff -urNp linux-2.6.32.24/arch/s390/kernel/setup.c linux-2.6.32.24/arch/s390/kernel/setup.c 3128diff -urNp linux-2.6.35.7/arch/s390/kernel/setup.c linux-2.6.35.7/arch/s390/kernel/setup.c
3035--- linux-2.6.32.24/arch/s390/kernel/setup.c 2010-08-13 16:24:37.000000000 -0400 3129--- linux-2.6.35.7/arch/s390/kernel/setup.c 2010-08-26 19:47:12.000000000 -0400
3036+++ linux-2.6.32.24/arch/s390/kernel/setup.c 2010-10-23 19:59:19.000000000 -0400 3130+++ linux-2.6.35.7/arch/s390/kernel/setup.c 2010-09-17 20:12:09.000000000 -0400
3037@@ -306,9 +306,6 @@ static int __init early_parse_mem(char * 3131@@ -281,7 +281,7 @@ static int __init early_parse_mem(char *
3132 }
3038 early_param("mem", early_parse_mem); 3133 early_param("mem", early_parse_mem);
3039 3134
3040 #ifdef CONFIG_S390_SWITCH_AMODE 3135-unsigned int user_mode = HOME_SPACE_MODE;
3041-unsigned int switch_amode = 0; 3136+unsigned int user_mode = SECONDARY_SPACE_MODE;
3042-EXPORT_SYMBOL_GPL(switch_amode); 3137 EXPORT_SYMBOL_GPL(user_mode);
3043- 3138
3044 static int set_amode_and_uaccess(unsigned long user_amode, 3139 static int set_amode_and_uaccess(unsigned long user_amode,
3045 unsigned long user32_amode) 3140@@ -310,17 +310,6 @@ static int set_amode_and_uaccess(unsigne
3046 {
3047@@ -334,17 +331,6 @@ static int set_amode_and_uaccess(unsigne
3048 return 0;
3049 } 3141 }
3050 } 3142 }
3051- 3143
3052-/* 3144-/*
3053- * Switch kernel/user addressing modes? 3145- * Switch kernel/user addressing modes?
3054- */ 3146- */
3055-static int __init early_parse_switch_amode(char *p) 3147-static int __init early_parse_switch_amode(char *p)
3056-{ 3148-{
3057- switch_amode = 1; 3149- if (user_mode != SECONDARY_SPACE_MODE)
3150- user_mode = PRIMARY_SPACE_MODE;
3058- return 0; 3151- return 0;
3059-} 3152-}
3060-early_param("switch_amode", early_parse_switch_amode); 3153-early_param("switch_amode", early_parse_switch_amode);
3061- 3154-
3062 #else /* CONFIG_S390_SWITCH_AMODE */ 3155 static int __init early_parse_user_mode(char *p)
3063 static inline int set_amode_and_uaccess(unsigned long user_amode, 3156 {
3064 unsigned long user32_amode) 3157 if (p && strcmp(p, "primary") == 0)
3065@@ -353,24 +339,6 @@ static inline int set_amode_and_uaccess( 3158@@ -337,20 +326,6 @@ static int __init early_parse_user_mode(
3066 } 3159 }
3067 #endif /* CONFIG_S390_SWITCH_AMODE */ 3160 early_param("user_mode", early_parse_user_mode);
3068 3161
3069-#ifdef CONFIG_S390_EXEC_PROTECT 3162-#ifdef CONFIG_S390_EXEC_PROTECT
3070-unsigned int s390_noexec = 0;
3071-EXPORT_SYMBOL_GPL(s390_noexec);
3072-
3073-/* 3163-/*
3074- * Enable execute protection? 3164- * Enable execute protection?
3075- */ 3165- */
@@ -3077,8 +3167,7 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/setup.c linux-2.6.32.24/arch/s390/ke
3077-{ 3167-{
3078- if (!strncmp(p, "off", 3)) 3168- if (!strncmp(p, "off", 3))
3079- return 0; 3169- return 0;
3080- switch_amode = 1; 3170- user_mode = SECONDARY_SPACE_MODE;
3081- s390_noexec = 1;
3082- return 0; 3171- return 0;
3083-} 3172-}
3084-early_param("noexec", early_parse_noexec); 3173-early_param("noexec", early_parse_noexec);
@@ -3086,10 +3175,22 @@ diff -urNp linux-2.6.32.24/arch/s390/kernel/setup.c linux-2.6.32.24/arch/s390/ke
3086- 3175-
3087 static void setup_addressing_mode(void) 3176 static void setup_addressing_mode(void)
3088 { 3177 {
3089 if (s390_noexec) { 3178 if (user_mode == SECONDARY_SPACE_MODE) {
3090diff -urNp linux-2.6.32.24/arch/s390/mm/mmap.c linux-2.6.32.24/arch/s390/mm/mmap.c 3179diff -urNp linux-2.6.35.7/arch/s390/mm/maccess.c linux-2.6.35.7/arch/s390/mm/maccess.c
3091--- linux-2.6.32.24/arch/s390/mm/mmap.c 2010-08-13 16:24:37.000000000 -0400 3180--- linux-2.6.35.7/arch/s390/mm/maccess.c 2010-08-26 19:47:12.000000000 -0400
3092+++ linux-2.6.32.24/arch/s390/mm/mmap.c 2010-10-23 19:59:19.000000000 -0400 3181+++ linux-2.6.35.7/arch/s390/mm/maccess.c 2010-09-17 20:12:09.000000000 -0400
3182@@ -45,7 +45,7 @@ static long probe_kernel_write_odd(void
3183 return rc ? rc : count;
3184 }
3185
3186-long probe_kernel_write(void *dst, void *src, size_t size)
3187+long probe_kernel_write(void *dst, const void *src, size_t size)
3188 {
3189 long copied = 0;
3190
3191diff -urNp linux-2.6.35.7/arch/s390/mm/mmap.c linux-2.6.35.7/arch/s390/mm/mmap.c
3192--- linux-2.6.35.7/arch/s390/mm/mmap.c 2010-08-26 19:47:12.000000000 -0400
3193+++ linux-2.6.35.7/arch/s390/mm/mmap.c 2010-09-17 20:12:09.000000000 -0400
3093@@ -78,10 +78,22 @@ void arch_pick_mmap_layout(struct mm_str 3194@@ -78,10 +78,22 @@ void arch_pick_mmap_layout(struct mm_str
3094 */ 3195 */
3095 if (mmap_is_legacy()) { 3196 if (mmap_is_legacy()) {
@@ -3136,9 +3237,9 @@ diff -urNp linux-2.6.32.24/arch/s390/mm/mmap.c linux-2.6.32.24/arch/s390/mm/mmap
3136 mm->get_unmapped_area = s390_get_unmapped_area_topdown; 3237 mm->get_unmapped_area = s390_get_unmapped_area_topdown;
3137 mm->unmap_area = arch_unmap_area_topdown; 3238 mm->unmap_area = arch_unmap_area_topdown;
3138 } 3239 }
3139diff -urNp linux-2.6.32.24/arch/sh/boards/mach-hp6xx/pm.c linux-2.6.32.24/arch/sh/boards/mach-hp6xx/pm.c 3240diff -urNp linux-2.6.35.7/arch/sh/boards/mach-hp6xx/pm.c linux-2.6.35.7/arch/sh/boards/mach-hp6xx/pm.c
3140--- linux-2.6.32.24/arch/sh/boards/mach-hp6xx/pm.c 2010-08-13 16:24:37.000000000 -0400 3241--- linux-2.6.35.7/arch/sh/boards/mach-hp6xx/pm.c 2010-08-26 19:47:12.000000000 -0400
3141+++ linux-2.6.32.24/arch/sh/boards/mach-hp6xx/pm.c 2010-10-23 19:59:19.000000000 -0400 3242+++ linux-2.6.35.7/arch/sh/boards/mach-hp6xx/pm.c 2010-09-17 20:12:09.000000000 -0400
3142@@ -143,7 +143,7 @@ static int hp6x0_pm_enter(suspend_state_ 3243@@ -143,7 +143,7 @@ static int hp6x0_pm_enter(suspend_state_
3143 return 0; 3244 return 0;
3144 } 3245 }
@@ -3148,22 +3249,71 @@ diff -urNp linux-2.6.32.24/arch/sh/boards/mach-hp6xx/pm.c linux-2.6.32.24/arch/s
3148 .enter = hp6x0_pm_enter, 3249 .enter = hp6x0_pm_enter,
3149 .valid = suspend_valid_only_mem, 3250 .valid = suspend_valid_only_mem,
3150 }; 3251 };
3151diff -urNp linux-2.6.32.24/arch/sh/kernel/cpu/sh4/sq.c linux-2.6.32.24/arch/sh/kernel/cpu/sh4/sq.c 3252diff -urNp linux-2.6.35.7/arch/sh/include/asm/dma-mapping.h linux-2.6.35.7/arch/sh/include/asm/dma-mapping.h
3152--- linux-2.6.32.24/arch/sh/kernel/cpu/sh4/sq.c 2010-08-13 16:24:37.000000000 -0400 3253--- linux-2.6.35.7/arch/sh/include/asm/dma-mapping.h 2010-08-26 19:47:12.000000000 -0400
3153+++ linux-2.6.32.24/arch/sh/kernel/cpu/sh4/sq.c 2010-10-23 19:59:19.000000000 -0400 3254+++ linux-2.6.35.7/arch/sh/include/asm/dma-mapping.h 2010-09-17 20:12:09.000000000 -0400
3154@@ -327,7 +327,7 @@ static struct attribute *sq_sysfs_attrs[ 3255@@ -1,10 +1,10 @@
3155 NULL, 3256 #ifndef __ASM_SH_DMA_MAPPING_H
3156 }; 3257 #define __ASM_SH_DMA_MAPPING_H
3157 3258
3158-static struct sysfs_ops sq_sysfs_ops = { 3259-extern struct dma_map_ops *dma_ops;
3159+static const struct sysfs_ops sq_sysfs_ops = { 3260+extern const struct dma_map_ops *dma_ops;
3160 .show = sq_sysfs_show, 3261 extern void no_iommu_init(void);
3161 .store = sq_sysfs_store, 3262
3162 }; 3263-static inline struct dma_map_ops *get_dma_ops(struct device *dev)
3163diff -urNp linux-2.6.32.24/arch/sh/kernel/cpu/shmobile/pm.c linux-2.6.32.24/arch/sh/kernel/cpu/shmobile/pm.c 3264+static inline const struct dma_map_ops *get_dma_ops(struct device *dev)
3164--- linux-2.6.32.24/arch/sh/kernel/cpu/shmobile/pm.c 2010-08-13 16:24:37.000000000 -0400 3265 {
3165+++ linux-2.6.32.24/arch/sh/kernel/cpu/shmobile/pm.c 2010-10-23 19:59:19.000000000 -0400 3266 return dma_ops;
3166@@ -58,7 +58,7 @@ static int sh_pm_enter(suspend_state_t s 3267 }
3268@@ -14,7 +14,7 @@ static inline struct dma_map_ops *get_dm
3269
3270 static inline int dma_supported(struct device *dev, u64 mask)
3271 {
3272- struct dma_map_ops *ops = get_dma_ops(dev);
3273+ const struct dma_map_ops *ops = get_dma_ops(dev);
3274
3275 if (ops->dma_supported)
3276 return ops->dma_supported(dev, mask);
3277@@ -24,7 +24,7 @@ static inline int dma_supported(struct d
3278
3279 static inline int dma_set_mask(struct device *dev, u64 mask)
3280 {
3281- struct dma_map_ops *ops = get_dma_ops(dev);
3282+ const struct dma_map_ops *ops = get_dma_ops(dev);
3283
3284 if (!dev->dma_mask || !dma_supported(dev, mask))
3285 return -EIO;
3286@@ -59,7 +59,7 @@ static inline int dma_get_cache_alignmen
3287
3288 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
3289 {
3290- struct dma_map_ops *ops = get_dma_ops(dev);
3291+ const struct dma_map_ops *ops = get_dma_ops(dev);
3292
3293 if (ops->mapping_error)
3294 return ops->mapping_error(dev, dma_addr);
3295@@ -70,7 +70,7 @@ static inline int dma_mapping_error(stru
3296 static inline void *dma_alloc_coherent(struct device *dev, size_t size,
3297 dma_addr_t *dma_handle, gfp_t gfp)
3298 {
3299- struct dma_map_ops *ops = get_dma_ops(dev);
3300+ const struct dma_map_ops *ops = get_dma_ops(dev);
3301 void *memory;
3302
3303 if (dma_alloc_from_coherent(dev, size, dma_handle, &memory))
3304@@ -87,7 +87,7 @@ static inline void *dma_alloc_coherent(s
3305 static inline void dma_free_coherent(struct device *dev, size_t size,
3306 void *vaddr, dma_addr_t dma_handle)
3307 {
3308- struct dma_map_ops *ops = get_dma_ops(dev);
3309+ const struct dma_map_ops *ops = get_dma_ops(dev);
3310
3311 if (dma_release_from_coherent(dev, get_order(size), vaddr))
3312 return;
3313diff -urNp linux-2.6.35.7/arch/sh/kernel/cpu/shmobile/pm.c linux-2.6.35.7/arch/sh/kernel/cpu/shmobile/pm.c
3314--- linux-2.6.35.7/arch/sh/kernel/cpu/shmobile/pm.c 2010-08-26 19:47:12.000000000 -0400
3315+++ linux-2.6.35.7/arch/sh/kernel/cpu/shmobile/pm.c 2010-09-17 20:12:09.000000000 -0400
3316@@ -141,7 +141,7 @@ static int sh_pm_enter(suspend_state_t s
3167 return 0; 3317 return 0;
3168 } 3318 }
3169 3319
@@ -3172,11 +3322,23 @@ diff -urNp linux-2.6.32.24/arch/sh/kernel/cpu/shmobile/pm.c linux-2.6.32.24/arch
3172 .enter = sh_pm_enter, 3322 .enter = sh_pm_enter,
3173 .valid = suspend_valid_only_mem, 3323 .valid = suspend_valid_only_mem,
3174 }; 3324 };
3175diff -urNp linux-2.6.32.24/arch/sh/kernel/kgdb.c linux-2.6.32.24/arch/sh/kernel/kgdb.c 3325diff -urNp linux-2.6.35.7/arch/sh/kernel/dma-nommu.c linux-2.6.35.7/arch/sh/kernel/dma-nommu.c
3176--- linux-2.6.32.24/arch/sh/kernel/kgdb.c 2010-08-13 16:24:37.000000000 -0400 3326--- linux-2.6.35.7/arch/sh/kernel/dma-nommu.c 2010-08-26 19:47:12.000000000 -0400
3177+++ linux-2.6.32.24/arch/sh/kernel/kgdb.c 2010-10-23 19:59:19.000000000 -0400 3327+++ linux-2.6.35.7/arch/sh/kernel/dma-nommu.c 2010-09-17 20:12:09.000000000 -0400
3178@@ -271,7 +271,7 @@ void kgdb_arch_exit(void) 3328@@ -62,7 +62,7 @@ static void nommu_sync_sg(struct device
3179 { 3329 }
3330 #endif
3331
3332-struct dma_map_ops nommu_dma_ops = {
3333+const struct dma_map_ops nommu_dma_ops = {
3334 .alloc_coherent = dma_generic_alloc_coherent,
3335 .free_coherent = dma_generic_free_coherent,
3336 .map_page = nommu_map_page,
3337diff -urNp linux-2.6.35.7/arch/sh/kernel/kgdb.c linux-2.6.35.7/arch/sh/kernel/kgdb.c
3338--- linux-2.6.35.7/arch/sh/kernel/kgdb.c 2010-08-26 19:47:12.000000000 -0400
3339+++ linux-2.6.35.7/arch/sh/kernel/kgdb.c 2010-09-17 20:12:09.000000000 -0400
3340@@ -319,7 +319,7 @@ void kgdb_arch_exit(void)
3341 unregister_die_notifier(&kgdb_notifier);
3180 } 3342 }
3181 3343
3182-struct kgdb_arch arch_kgdb_ops = { 3344-struct kgdb_arch arch_kgdb_ops = {
@@ -3184,9 +3346,21 @@ diff -urNp linux-2.6.32.24/arch/sh/kernel/kgdb.c linux-2.6.32.24/arch/sh/kernel/
3184 /* Breakpoint instruction: trapa #0x3c */ 3346 /* Breakpoint instruction: trapa #0x3c */
3185 #ifdef CONFIG_CPU_LITTLE_ENDIAN 3347 #ifdef CONFIG_CPU_LITTLE_ENDIAN
3186 .gdb_bpt_instr = { 0x3c, 0xc3 }, 3348 .gdb_bpt_instr = { 0x3c, 0xc3 },
3187diff -urNp linux-2.6.32.24/arch/sh/mm/mmap.c linux-2.6.32.24/arch/sh/mm/mmap.c 3349diff -urNp linux-2.6.35.7/arch/sh/mm/consistent.c linux-2.6.35.7/arch/sh/mm/consistent.c
3188--- linux-2.6.32.24/arch/sh/mm/mmap.c 2010-08-13 16:24:37.000000000 -0400 3350--- linux-2.6.35.7/arch/sh/mm/consistent.c 2010-08-26 19:47:12.000000000 -0400
3189+++ linux-2.6.32.24/arch/sh/mm/mmap.c 2010-10-23 19:59:19.000000000 -0400 3351+++ linux-2.6.35.7/arch/sh/mm/consistent.c 2010-09-17 20:12:09.000000000 -0400
3352@@ -22,7 +22,7 @@
3353
3354 #define PREALLOC_DMA_DEBUG_ENTRIES 4096
3355
3356-struct dma_map_ops *dma_ops;
3357+const struct dma_map_ops *dma_ops;
3358 EXPORT_SYMBOL(dma_ops);
3359
3360 static int __init dma_init(void)
3361diff -urNp linux-2.6.35.7/arch/sh/mm/mmap.c linux-2.6.35.7/arch/sh/mm/mmap.c
3362--- linux-2.6.35.7/arch/sh/mm/mmap.c 2010-08-26 19:47:12.000000000 -0400
3363+++ linux-2.6.35.7/arch/sh/mm/mmap.c 2010-09-17 20:12:09.000000000 -0400
3190@@ -74,8 +74,7 @@ unsigned long arch_get_unmapped_area(str 3364@@ -74,8 +74,7 @@ unsigned long arch_get_unmapped_area(str
3191 addr = PAGE_ALIGN(addr); 3365 addr = PAGE_ALIGN(addr);
3192 3366
@@ -3234,18 +3408,18 @@ diff -urNp linux-2.6.32.24/arch/sh/mm/mmap.c linux-2.6.32.24/arch/sh/mm/mmap.c
3234 /* remember the address as a hint for next time */ 3408 /* remember the address as a hint for next time */
3235 return (mm->free_area_cache = addr); 3409 return (mm->free_area_cache = addr);
3236 } 3410 }
3237diff -urNp linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h 3411diff -urNp linux-2.6.35.7/arch/sparc/include/asm/atomic_64.h linux-2.6.35.7/arch/sparc/include/asm/atomic_64.h
3238--- linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h 2010-08-29 21:08:20.000000000 -0400 3412--- linux-2.6.35.7/arch/sparc/include/asm/atomic_64.h 2010-08-26 19:47:12.000000000 -0400
3239+++ linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h 2010-10-23 19:59:19.000000000 -0400 3413+++ linux-2.6.35.7/arch/sparc/include/asm/atomic_64.h 2010-10-11 22:41:44.000000000 -0400
3240@@ -14,18 +14,40 @@ 3414@@ -14,18 +14,40 @@
3241 #define ATOMIC64_INIT(i) { (i) } 3415 #define ATOMIC64_INIT(i) { (i) }
3242 3416
3243 #define atomic_read(v) ((v)->counter) 3417 #define atomic_read(v) (*(volatile int *)&(v)->counter)
3244+static inline int atomic_read_unchecked(const atomic_unchecked_t *v) 3418+static inline int atomic_read_unchecked(const atomic_unchecked_t *v)
3245+{ 3419+{
3246+ return v->counter; 3420+ return v->counter;
3247+} 3421+}
3248 #define atomic64_read(v) ((v)->counter) 3422 #define atomic64_read(v) (*(volatile long *)&(v)->counter)
3249+static inline long atomic64_read_unchecked(const atomic64_unchecked_t *v) 3423+static inline long atomic64_read_unchecked(const atomic64_unchecked_t *v)
3250+{ 3424+{
3251+ return v->counter; 3425+ return v->counter;
@@ -3278,7 +3452,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h linux-2.6.32.24/ar
3278 extern int atomic_sub_ret(int, atomic_t *); 3452 extern int atomic_sub_ret(int, atomic_t *);
3279 extern long atomic64_sub_ret(long, atomic64_t *); 3453 extern long atomic64_sub_ret(long, atomic64_t *);
3280 3454
3281@@ -33,7 +55,15 @@ extern long atomic64_sub_ret(long, atomi 3455@@ -33,12 +55,24 @@ extern long atomic64_sub_ret(long, atomi
3282 #define atomic64_dec_return(v) atomic64_sub_ret(1, v) 3456 #define atomic64_dec_return(v) atomic64_sub_ret(1, v)
3283 3457
3284 #define atomic_inc_return(v) atomic_add_ret(1, v) 3458 #define atomic_inc_return(v) atomic_add_ret(1, v)
@@ -3294,7 +3468,16 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h linux-2.6.32.24/ar
3294 3468
3295 #define atomic_sub_return(i, v) atomic_sub_ret(i, v) 3469 #define atomic_sub_return(i, v) atomic_sub_ret(i, v)
3296 #define atomic64_sub_return(i, v) atomic64_sub_ret(i, v) 3470 #define atomic64_sub_return(i, v) atomic64_sub_ret(i, v)
3297@@ -59,10 +89,26 @@ extern long atomic64_sub_ret(long, atomi 3471
3472 #define atomic_add_return(i, v) atomic_add_ret(i, v)
3473+static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
3474+{
3475+ return atomic_add_ret_unchecked(i, v);
3476+}
3477 #define atomic64_add_return(i, v) atomic64_add_ret(i, v)
3478
3479 /*
3480@@ -59,10 +93,26 @@ extern long atomic64_sub_ret(long, atomi
3298 #define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0) 3481 #define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0)
3299 3482
3300 #define atomic_inc(v) atomic_add(1, v) 3483 #define atomic_inc(v) atomic_add(1, v)
@@ -3321,7 +3504,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h linux-2.6.32.24/ar
3321 3504
3322 #define atomic_add_negative(i, v) (atomic_add_ret(i, v) < 0) 3505 #define atomic_add_negative(i, v) (atomic_add_ret(i, v) < 0)
3323 #define atomic64_add_negative(i, v) (atomic64_add_ret(i, v) < 0) 3506 #define atomic64_add_negative(i, v) (atomic64_add_ret(i, v) < 0)
3324@@ -72,17 +118,28 @@ extern long atomic64_sub_ret(long, atomi 3507@@ -72,17 +122,28 @@ extern long atomic64_sub_ret(long, atomi
3325 3508
3326 static inline int atomic_add_unless(atomic_t *v, int a, int u) 3509 static inline int atomic_add_unless(atomic_t *v, int a, int u)
3327 { 3510 {
@@ -3354,7 +3537,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h linux-2.6.32.24/ar
3354 } 3537 }
3355 3538
3356 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 3539 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
3357@@ -93,17 +150,28 @@ static inline int atomic_add_unless(atom 3540@@ -93,17 +154,28 @@ static inline int atomic_add_unless(atom
3358 3541
3359 static inline long atomic64_add_unless(atomic64_t *v, long a, long u) 3542 static inline long atomic64_add_unless(atomic64_t *v, long a, long u)
3360 { 3543 {
@@ -3387,10 +3570,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/atomic_64.h linux-2.6.32.24/ar
3387 } 3570 }
3388 3571
3389 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) 3572 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
3390diff -urNp linux-2.6.32.24/arch/sparc/include/asm/dma-mapping.h linux-2.6.32.24/arch/sparc/include/asm/dma-mapping.h 3573diff -urNp linux-2.6.35.7/arch/sparc/include/asm/dma-mapping.h linux-2.6.35.7/arch/sparc/include/asm/dma-mapping.h
3391--- linux-2.6.32.24/arch/sparc/include/asm/dma-mapping.h 2010-08-13 16:24:37.000000000 -0400 3574--- linux-2.6.35.7/arch/sparc/include/asm/dma-mapping.h 2010-08-26 19:47:12.000000000 -0400
3392+++ linux-2.6.32.24/arch/sparc/include/asm/dma-mapping.h 2010-10-23 19:59:19.000000000 -0400 3575+++ linux-2.6.35.7/arch/sparc/include/asm/dma-mapping.h 2010-09-17 20:12:09.000000000 -0400
3393@@ -14,10 +14,10 @@ extern int dma_set_mask(struct device *d 3576@@ -13,10 +13,10 @@ extern int dma_supported(struct device *
3394 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 3577 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
3395 #define dma_is_consistent(d, h) (1) 3578 #define dma_is_consistent(d, h) (1)
3396 3579
@@ -3403,7 +3586,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/dma-mapping.h linux-2.6.32.24/
3403 { 3586 {
3404 #if defined(CONFIG_SPARC32) && defined(CONFIG_PCI) 3587 #if defined(CONFIG_SPARC32) && defined(CONFIG_PCI)
3405 if (dev->bus == &pci_bus_type) 3588 if (dev->bus == &pci_bus_type)
3406@@ -31,7 +31,7 @@ static inline struct dma_map_ops *get_dm 3589@@ -30,7 +30,7 @@ static inline struct dma_map_ops *get_dm
3407 static inline void *dma_alloc_coherent(struct device *dev, size_t size, 3590 static inline void *dma_alloc_coherent(struct device *dev, size_t size,
3408 dma_addr_t *dma_handle, gfp_t flag) 3591 dma_addr_t *dma_handle, gfp_t flag)
3409 { 3592 {
@@ -3412,7 +3595,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/dma-mapping.h linux-2.6.32.24/
3412 void *cpu_addr; 3595 void *cpu_addr;
3413 3596
3414 cpu_addr = ops->alloc_coherent(dev, size, dma_handle, flag); 3597 cpu_addr = ops->alloc_coherent(dev, size, dma_handle, flag);
3415@@ -42,7 +42,7 @@ static inline void *dma_alloc_coherent(s 3598@@ -41,7 +41,7 @@ static inline void *dma_alloc_coherent(s
3416 static inline void dma_free_coherent(struct device *dev, size_t size, 3599 static inline void dma_free_coherent(struct device *dev, size_t size,
3417 void *cpu_addr, dma_addr_t dma_handle) 3600 void *cpu_addr, dma_addr_t dma_handle)
3418 { 3601 {
@@ -3421,10 +3604,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/dma-mapping.h linux-2.6.32.24/
3421 3604
3422 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); 3605 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
3423 ops->free_coherent(dev, size, cpu_addr, dma_handle); 3606 ops->free_coherent(dev, size, cpu_addr, dma_handle);
3424diff -urNp linux-2.6.32.24/arch/sparc/include/asm/elf_32.h linux-2.6.32.24/arch/sparc/include/asm/elf_32.h 3607diff -urNp linux-2.6.35.7/arch/sparc/include/asm/elf_32.h linux-2.6.35.7/arch/sparc/include/asm/elf_32.h
3425--- linux-2.6.32.24/arch/sparc/include/asm/elf_32.h 2010-08-13 16:24:37.000000000 -0400 3608--- linux-2.6.35.7/arch/sparc/include/asm/elf_32.h 2010-08-26 19:47:12.000000000 -0400
3426+++ linux-2.6.32.24/arch/sparc/include/asm/elf_32.h 2010-10-23 19:59:19.000000000 -0400 3609+++ linux-2.6.35.7/arch/sparc/include/asm/elf_32.h 2010-09-17 20:12:09.000000000 -0400
3427@@ -116,6 +116,13 @@ typedef struct { 3610@@ -114,6 +114,13 @@ typedef struct {
3428 3611
3429 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE) 3612 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE)
3430 3613
@@ -3438,10 +3621,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/elf_32.h linux-2.6.32.24/arch/
3438 /* This yields a mask that user programs can use to figure out what 3621 /* This yields a mask that user programs can use to figure out what
3439 instruction set this cpu supports. This can NOT be done in userspace 3622 instruction set this cpu supports. This can NOT be done in userspace
3440 on Sparc. */ 3623 on Sparc. */
3441diff -urNp linux-2.6.32.24/arch/sparc/include/asm/elf_64.h linux-2.6.32.24/arch/sparc/include/asm/elf_64.h 3624diff -urNp linux-2.6.35.7/arch/sparc/include/asm/elf_64.h linux-2.6.35.7/arch/sparc/include/asm/elf_64.h
3442--- linux-2.6.32.24/arch/sparc/include/asm/elf_64.h 2010-08-13 16:24:37.000000000 -0400 3625--- linux-2.6.35.7/arch/sparc/include/asm/elf_64.h 2010-08-26 19:47:12.000000000 -0400
3443+++ linux-2.6.32.24/arch/sparc/include/asm/elf_64.h 2010-10-23 19:59:19.000000000 -0400 3626+++ linux-2.6.35.7/arch/sparc/include/asm/elf_64.h 2010-09-17 20:12:09.000000000 -0400
3444@@ -163,6 +163,12 @@ typedef struct { 3627@@ -162,6 +162,12 @@ typedef struct {
3445 #define ELF_ET_DYN_BASE 0x0000010000000000UL 3628 #define ELF_ET_DYN_BASE 0x0000010000000000UL
3446 #define COMPAT_ELF_ET_DYN_BASE 0x0000000070000000UL 3629 #define COMPAT_ELF_ET_DYN_BASE 0x0000000070000000UL
3447 3630
@@ -3454,9 +3637,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/elf_64.h linux-2.6.32.24/arch/
3454 3637
3455 /* This yields a mask that user programs can use to figure out what 3638 /* This yields a mask that user programs can use to figure out what
3456 instruction set this cpu supports. */ 3639 instruction set this cpu supports. */
3457diff -urNp linux-2.6.32.24/arch/sparc/include/asm/pgtable_32.h linux-2.6.32.24/arch/sparc/include/asm/pgtable_32.h 3640diff -urNp linux-2.6.35.7/arch/sparc/include/asm/pgtable_32.h linux-2.6.35.7/arch/sparc/include/asm/pgtable_32.h
3458--- linux-2.6.32.24/arch/sparc/include/asm/pgtable_32.h 2010-08-13 16:24:37.000000000 -0400 3641--- linux-2.6.35.7/arch/sparc/include/asm/pgtable_32.h 2010-08-26 19:47:12.000000000 -0400
3459+++ linux-2.6.32.24/arch/sparc/include/asm/pgtable_32.h 2010-10-23 19:59:19.000000000 -0400 3642+++ linux-2.6.35.7/arch/sparc/include/asm/pgtable_32.h 2010-09-17 20:12:09.000000000 -0400
3460@@ -43,6 +43,13 @@ BTFIXUPDEF_SIMM13(user_ptrs_per_pgd) 3643@@ -43,6 +43,13 @@ BTFIXUPDEF_SIMM13(user_ptrs_per_pgd)
3461 BTFIXUPDEF_INT(page_none) 3644 BTFIXUPDEF_INT(page_none)
3462 BTFIXUPDEF_INT(page_copy) 3645 BTFIXUPDEF_INT(page_copy)
@@ -3488,9 +3671,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/pgtable_32.h linux-2.6.32.24/a
3488 extern unsigned long page_kernel; 3671 extern unsigned long page_kernel;
3489 3672
3490 #ifdef MODULE 3673 #ifdef MODULE
3491diff -urNp linux-2.6.32.24/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.32.24/arch/sparc/include/asm/pgtsrmmu.h 3674diff -urNp linux-2.6.35.7/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.35.7/arch/sparc/include/asm/pgtsrmmu.h
3492--- linux-2.6.32.24/arch/sparc/include/asm/pgtsrmmu.h 2010-08-13 16:24:37.000000000 -0400 3675--- linux-2.6.35.7/arch/sparc/include/asm/pgtsrmmu.h 2010-08-26 19:47:12.000000000 -0400
3493+++ linux-2.6.32.24/arch/sparc/include/asm/pgtsrmmu.h 2010-10-23 19:59:19.000000000 -0400 3676+++ linux-2.6.35.7/arch/sparc/include/asm/pgtsrmmu.h 2010-09-17 20:12:09.000000000 -0400
3494@@ -115,6 +115,13 @@ 3677@@ -115,6 +115,13 @@
3495 SRMMU_EXEC | SRMMU_REF) 3678 SRMMU_EXEC | SRMMU_REF)
3496 #define SRMMU_PAGE_RDONLY __pgprot(SRMMU_VALID | SRMMU_CACHE | \ 3679 #define SRMMU_PAGE_RDONLY __pgprot(SRMMU_VALID | SRMMU_CACHE | \
@@ -3505,10 +3688,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.32.24/arc
3505 #define SRMMU_PAGE_KERNEL __pgprot(SRMMU_VALID | SRMMU_CACHE | SRMMU_PRIV | \ 3688 #define SRMMU_PAGE_KERNEL __pgprot(SRMMU_VALID | SRMMU_CACHE | SRMMU_PRIV | \
3506 SRMMU_DIRTY | SRMMU_REF) 3689 SRMMU_DIRTY | SRMMU_REF)
3507 3690
3508diff -urNp linux-2.6.32.24/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.24/arch/sparc/include/asm/spinlock_64.h 3691diff -urNp linux-2.6.35.7/arch/sparc/include/asm/spinlock_64.h linux-2.6.35.7/arch/sparc/include/asm/spinlock_64.h
3509--- linux-2.6.32.24/arch/sparc/include/asm/spinlock_64.h 2010-08-13 16:24:37.000000000 -0400 3692--- linux-2.6.35.7/arch/sparc/include/asm/spinlock_64.h 2010-08-26 19:47:12.000000000 -0400
3510+++ linux-2.6.32.24/arch/sparc/include/asm/spinlock_64.h 2010-10-23 19:59:19.000000000 -0400 3693+++ linux-2.6.35.7/arch/sparc/include/asm/spinlock_64.h 2010-09-17 20:12:09.000000000 -0400
3511@@ -99,7 +99,12 @@ static void inline arch_read_lock(raw_rw 3694@@ -99,7 +99,12 @@ static void inline arch_read_lock(arch_r
3512 __asm__ __volatile__ ( 3695 __asm__ __volatile__ (
3513 "1: ldsw [%2], %0\n" 3696 "1: ldsw [%2], %0\n"
3514 " brlz,pn %0, 2f\n" 3697 " brlz,pn %0, 2f\n"
@@ -3522,7 +3705,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.24/
3522 " cas [%2], %0, %1\n" 3705 " cas [%2], %0, %1\n"
3523 " cmp %0, %1\n" 3706 " cmp %0, %1\n"
3524 " bne,pn %%icc, 1b\n" 3707 " bne,pn %%icc, 1b\n"
3525@@ -112,7 +117,7 @@ static void inline arch_read_lock(raw_rw 3708@@ -112,7 +117,7 @@ static void inline arch_read_lock(arch_r
3526 " .previous" 3709 " .previous"
3527 : "=&r" (tmp1), "=&r" (tmp2) 3710 : "=&r" (tmp1), "=&r" (tmp2)
3528 : "r" (lock) 3711 : "r" (lock)
@@ -3530,8 +3713,8 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.24/
3530+ : "memory", "cc"); 3713+ : "memory", "cc");
3531 } 3714 }
3532 3715
3533 static int inline arch_read_trylock(raw_rwlock_t *lock) 3716 static int inline arch_read_trylock(arch_rwlock_t *lock)
3534@@ -123,7 +128,12 @@ static int inline arch_read_trylock(raw_ 3717@@ -123,7 +128,12 @@ static int inline arch_read_trylock(arch
3535 "1: ldsw [%2], %0\n" 3718 "1: ldsw [%2], %0\n"
3536 " brlz,a,pn %0, 2f\n" 3719 " brlz,a,pn %0, 2f\n"
3537 " mov 0, %0\n" 3720 " mov 0, %0\n"
@@ -3545,7 +3728,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.24/
3545 " cas [%2], %0, %1\n" 3728 " cas [%2], %0, %1\n"
3546 " cmp %0, %1\n" 3729 " cmp %0, %1\n"
3547 " bne,pn %%icc, 1b\n" 3730 " bne,pn %%icc, 1b\n"
3548@@ -142,7 +152,12 @@ static void inline arch_read_unlock(raw_ 3731@@ -142,7 +152,12 @@ static void inline arch_read_unlock(arch
3549 3732
3550 __asm__ __volatile__( 3733 __asm__ __volatile__(
3551 "1: lduw [%2], %0\n" 3734 "1: lduw [%2], %0\n"
@@ -3559,10 +3742,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.24/
3559 " cas [%2], %0, %1\n" 3742 " cas [%2], %0, %1\n"
3560 " cmp %0, %1\n" 3743 " cmp %0, %1\n"
3561 " bne,pn %%xcc, 1b\n" 3744 " bne,pn %%xcc, 1b\n"
3562diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess_32.h linux-2.6.32.24/arch/sparc/include/asm/uaccess_32.h 3745diff -urNp linux-2.6.35.7/arch/sparc/include/asm/uaccess_32.h linux-2.6.35.7/arch/sparc/include/asm/uaccess_32.h
3563--- linux-2.6.32.24/arch/sparc/include/asm/uaccess_32.h 2010-08-13 16:24:37.000000000 -0400 3746--- linux-2.6.35.7/arch/sparc/include/asm/uaccess_32.h 2010-08-26 19:47:12.000000000 -0400
3564+++ linux-2.6.32.24/arch/sparc/include/asm/uaccess_32.h 2010-10-23 19:59:19.000000000 -0400 3747+++ linux-2.6.35.7/arch/sparc/include/asm/uaccess_32.h 2010-09-17 20:12:09.000000000 -0400
3565@@ -249,27 +249,46 @@ extern unsigned long __copy_user(void __ 3748@@ -249,14 +249,25 @@ extern unsigned long __copy_user(void __
3566 3749
3567 static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) 3750 static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
3568 { 3751 {
@@ -3590,12 +3773,19 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess_32.h linux-2.6.32.24/a
3590 return __copy_user(to, (__force void __user *) from, n); 3773 return __copy_user(to, (__force void __user *) from, n);
3591 } 3774 }
3592 3775
3593 static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) 3776@@ -272,19 +283,27 @@ static inline unsigned long copy_from_us
3594 { 3777 {
3595- if (n && __access_ok((unsigned long) from, n)) 3778 int sz = __compiletime_object_size(to);
3779
3596+ if ((long)n < 0) 3780+ if ((long)n < 0)
3597+ return n; 3781+ return n;
3598+ 3782+
3783 if (unlikely(sz != -1 && sz < n)) {
3784 copy_from_user_overflow();
3785 return n;
3786 }
3787
3788- if (n && __access_ok((unsigned long) from, n))
3599+ if (n && __access_ok((unsigned long) from, n)) { 3789+ if (n && __access_ok((unsigned long) from, n)) {
3600+ if (!__builtin_constant_p(n)) 3790+ if (!__builtin_constant_p(n))
3601+ check_object_size(to, n, false); 3791+ check_object_size(to, n, false);
@@ -3613,10 +3803,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess_32.h linux-2.6.32.24/a
3613 return __copy_user((__force void __user *) to, from, n); 3803 return __copy_user((__force void __user *) to, from, n);
3614 } 3804 }
3615 3805
3616diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess_64.h linux-2.6.32.24/arch/sparc/include/asm/uaccess_64.h 3806diff -urNp linux-2.6.35.7/arch/sparc/include/asm/uaccess_64.h linux-2.6.35.7/arch/sparc/include/asm/uaccess_64.h
3617--- linux-2.6.32.24/arch/sparc/include/asm/uaccess_64.h 2010-08-13 16:24:37.000000000 -0400 3807--- linux-2.6.35.7/arch/sparc/include/asm/uaccess_64.h 2010-08-26 19:47:12.000000000 -0400
3618+++ linux-2.6.32.24/arch/sparc/include/asm/uaccess_64.h 2010-10-23 19:59:19.000000000 -0400 3808+++ linux-2.6.35.7/arch/sparc/include/asm/uaccess_64.h 2010-09-17 20:12:09.000000000 -0400
3619@@ -9,6 +9,7 @@ 3809@@ -10,6 +10,7 @@
3620 #include <linux/compiler.h> 3810 #include <linux/compiler.h>
3621 #include <linux/string.h> 3811 #include <linux/string.h>
3622 #include <linux/thread_info.h> 3812 #include <linux/thread_info.h>
@@ -3624,12 +3814,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess_64.h linux-2.6.32.24/a
3624 #include <asm/asi.h> 3814 #include <asm/asi.h>
3625 #include <asm/system.h> 3815 #include <asm/system.h>
3626 #include <asm/spitfire.h> 3816 #include <asm/spitfire.h>
3627@@ -212,8 +213,15 @@ extern unsigned long copy_from_user_fixu 3817@@ -224,6 +225,12 @@ copy_from_user(void *to, const void __us
3628 static inline unsigned long __must_check 3818 int sz = __compiletime_object_size(to);
3629 copy_from_user(void *to, const void __user *from, unsigned long size) 3819 unsigned long ret = size;
3630 {
3631- unsigned long ret = ___copy_from_user(to, from, size);
3632+ unsigned long ret;
3633 3820
3634+ if ((long)size < 0 || size > INT_MAX) 3821+ if ((long)size < 0 || size > INT_MAX)
3635+ return size; 3822+ return size;
@@ -3637,11 +3824,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess_64.h linux-2.6.32.24/a
3637+ if (!__builtin_constant_p(size)) 3824+ if (!__builtin_constant_p(size))
3638+ check_object_size(to, size, false); 3825+ check_object_size(to, size, false);
3639+ 3826+
3640+ ret = ___copy_from_user(to, from, size); 3827 if (likely(sz == -1 || sz >= size)) {
3641 if (unlikely(ret)) 3828 ret = ___copy_from_user(to, from, size);
3642 ret = copy_from_user_fixup(to, from, size); 3829 if (unlikely(ret))
3643 return ret; 3830@@ -243,8 +250,15 @@ extern unsigned long copy_to_user_fixup(
3644@@ -228,8 +236,15 @@ extern unsigned long copy_to_user_fixup(
3645 static inline unsigned long __must_check 3831 static inline unsigned long __must_check
3646 copy_to_user(void __user *to, const void *from, unsigned long size) 3832 copy_to_user(void __user *to, const void *from, unsigned long size)
3647 { 3833 {
@@ -3658,9 +3844,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess_64.h linux-2.6.32.24/a
3658 if (unlikely(ret)) 3844 if (unlikely(ret))
3659 ret = copy_to_user_fixup(to, from, size); 3845 ret = copy_to_user_fixup(to, from, size);
3660 return ret; 3846 return ret;
3661diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess.h linux-2.6.32.24/arch/sparc/include/asm/uaccess.h 3847diff -urNp linux-2.6.35.7/arch/sparc/include/asm/uaccess.h linux-2.6.35.7/arch/sparc/include/asm/uaccess.h
3662--- linux-2.6.32.24/arch/sparc/include/asm/uaccess.h 2010-08-13 16:24:37.000000000 -0400 3848--- linux-2.6.35.7/arch/sparc/include/asm/uaccess.h 2010-08-26 19:47:12.000000000 -0400
3663+++ linux-2.6.32.24/arch/sparc/include/asm/uaccess.h 2010-10-23 19:59:19.000000000 -0400 3849+++ linux-2.6.35.7/arch/sparc/include/asm/uaccess.h 2010-09-17 20:12:09.000000000 -0400
3664@@ -1,5 +1,13 @@ 3850@@ -1,5 +1,13 @@
3665 #ifndef ___ASM_SPARC_UACCESS_H 3851 #ifndef ___ASM_SPARC_UACCESS_H
3666 #define ___ASM_SPARC_UACCESS_H 3852 #define ___ASM_SPARC_UACCESS_H
@@ -3675,10 +3861,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/include/asm/uaccess.h linux-2.6.32.24/arch
3675 #if defined(__sparc__) && defined(__arch64__) 3861 #if defined(__sparc__) && defined(__arch64__)
3676 #include <asm/uaccess_64.h> 3862 #include <asm/uaccess_64.h>
3677 #else 3863 #else
3678diff -urNp linux-2.6.32.24/arch/sparc/kernel/iommu.c linux-2.6.32.24/arch/sparc/kernel/iommu.c 3864diff -urNp linux-2.6.35.7/arch/sparc/kernel/iommu.c linux-2.6.35.7/arch/sparc/kernel/iommu.c
3679--- linux-2.6.32.24/arch/sparc/kernel/iommu.c 2010-08-13 16:24:37.000000000 -0400 3865--- linux-2.6.35.7/arch/sparc/kernel/iommu.c 2010-08-26 19:47:12.000000000 -0400
3680+++ linux-2.6.32.24/arch/sparc/kernel/iommu.c 2010-10-23 19:59:19.000000000 -0400 3866+++ linux-2.6.35.7/arch/sparc/kernel/iommu.c 2010-09-17 20:12:09.000000000 -0400
3681@@ -826,7 +826,7 @@ static void dma_4u_sync_sg_for_cpu(struc 3867@@ -828,7 +828,7 @@ static void dma_4u_sync_sg_for_cpu(struc
3682 spin_unlock_irqrestore(&iommu->lock, flags); 3868 spin_unlock_irqrestore(&iommu->lock, flags);
3683 } 3869 }
3684 3870
@@ -3687,7 +3873,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/iommu.c linux-2.6.32.24/arch/sparc/
3687 .alloc_coherent = dma_4u_alloc_coherent, 3873 .alloc_coherent = dma_4u_alloc_coherent,
3688 .free_coherent = dma_4u_free_coherent, 3874 .free_coherent = dma_4u_free_coherent,
3689 .map_page = dma_4u_map_page, 3875 .map_page = dma_4u_map_page,
3690@@ -837,7 +837,7 @@ static struct dma_map_ops sun4u_dma_ops 3876@@ -839,7 +839,7 @@ static struct dma_map_ops sun4u_dma_ops
3691 .sync_sg_for_cpu = dma_4u_sync_sg_for_cpu, 3877 .sync_sg_for_cpu = dma_4u_sync_sg_for_cpu,
3692 }; 3878 };
3693 3879
@@ -3696,10 +3882,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/iommu.c linux-2.6.32.24/arch/sparc/
3696 EXPORT_SYMBOL(dma_ops); 3882 EXPORT_SYMBOL(dma_ops);
3697 3883
3698 extern int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask); 3884 extern int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask);
3699diff -urNp linux-2.6.32.24/arch/sparc/kernel/ioport.c linux-2.6.32.24/arch/sparc/kernel/ioport.c 3885diff -urNp linux-2.6.35.7/arch/sparc/kernel/ioport.c linux-2.6.35.7/arch/sparc/kernel/ioport.c
3700--- linux-2.6.32.24/arch/sparc/kernel/ioport.c 2010-08-13 16:24:37.000000000 -0400 3886--- linux-2.6.35.7/arch/sparc/kernel/ioport.c 2010-08-26 19:47:12.000000000 -0400
3701+++ linux-2.6.32.24/arch/sparc/kernel/ioport.c 2010-10-23 19:59:19.000000000 -0400 3887+++ linux-2.6.35.7/arch/sparc/kernel/ioport.c 2010-09-17 20:12:09.000000000 -0400
3702@@ -392,7 +392,7 @@ static void sbus_sync_sg_for_device(stru 3888@@ -397,7 +397,7 @@ static void sbus_sync_sg_for_device(stru
3703 BUG(); 3889 BUG();
3704 } 3890 }
3705 3891
@@ -3708,7 +3894,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/ioport.c linux-2.6.32.24/arch/sparc
3708 .alloc_coherent = sbus_alloc_coherent, 3894 .alloc_coherent = sbus_alloc_coherent,
3709 .free_coherent = sbus_free_coherent, 3895 .free_coherent = sbus_free_coherent,
3710 .map_page = sbus_map_page, 3896 .map_page = sbus_map_page,
3711@@ -403,7 +403,7 @@ struct dma_map_ops sbus_dma_ops = { 3897@@ -408,7 +408,7 @@ struct dma_map_ops sbus_dma_ops = {
3712 .sync_sg_for_device = sbus_sync_sg_for_device, 3898 .sync_sg_for_device = sbus_sync_sg_for_device,
3713 }; 3899 };
3714 3900
@@ -3717,7 +3903,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/ioport.c linux-2.6.32.24/arch/sparc
3717 EXPORT_SYMBOL(dma_ops); 3903 EXPORT_SYMBOL(dma_ops);
3718 3904
3719 static int __init sparc_register_ioport(void) 3905 static int __init sparc_register_ioport(void)
3720@@ -640,7 +640,7 @@ static void pci32_sync_sg_for_device(str 3906@@ -645,7 +645,7 @@ static void pci32_sync_sg_for_device(str
3721 } 3907 }
3722 } 3908 }
3723 3909
@@ -3726,11 +3912,11 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/ioport.c linux-2.6.32.24/arch/sparc
3726 .alloc_coherent = pci32_alloc_coherent, 3912 .alloc_coherent = pci32_alloc_coherent,
3727 .free_coherent = pci32_free_coherent, 3913 .free_coherent = pci32_free_coherent,
3728 .map_page = pci32_map_page, 3914 .map_page = pci32_map_page,
3729diff -urNp linux-2.6.32.24/arch/sparc/kernel/kgdb_32.c linux-2.6.32.24/arch/sparc/kernel/kgdb_32.c 3915diff -urNp linux-2.6.35.7/arch/sparc/kernel/kgdb_32.c linux-2.6.35.7/arch/sparc/kernel/kgdb_32.c
3730--- linux-2.6.32.24/arch/sparc/kernel/kgdb_32.c 2010-08-13 16:24:37.000000000 -0400 3916--- linux-2.6.35.7/arch/sparc/kernel/kgdb_32.c 2010-08-26 19:47:12.000000000 -0400
3731+++ linux-2.6.32.24/arch/sparc/kernel/kgdb_32.c 2010-10-23 19:59:19.000000000 -0400 3917+++ linux-2.6.35.7/arch/sparc/kernel/kgdb_32.c 2010-09-17 20:12:09.000000000 -0400
3732@@ -158,7 +158,7 @@ void kgdb_arch_exit(void) 3918@@ -164,7 +164,7 @@ void kgdb_arch_set_pc(struct pt_regs *re
3733 { 3919 regs->npc = regs->pc + 4;
3734 } 3920 }
3735 3921
3736-struct kgdb_arch arch_kgdb_ops = { 3922-struct kgdb_arch arch_kgdb_ops = {
@@ -3738,11 +3924,11 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/kgdb_32.c linux-2.6.32.24/arch/spar
3738 /* Breakpoint instruction: ta 0x7d */ 3924 /* Breakpoint instruction: ta 0x7d */
3739 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d }, 3925 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d },
3740 }; 3926 };
3741diff -urNp linux-2.6.32.24/arch/sparc/kernel/kgdb_64.c linux-2.6.32.24/arch/sparc/kernel/kgdb_64.c 3927diff -urNp linux-2.6.35.7/arch/sparc/kernel/kgdb_64.c linux-2.6.35.7/arch/sparc/kernel/kgdb_64.c
3742--- linux-2.6.32.24/arch/sparc/kernel/kgdb_64.c 2010-08-13 16:24:37.000000000 -0400 3928--- linux-2.6.35.7/arch/sparc/kernel/kgdb_64.c 2010-08-26 19:47:12.000000000 -0400
3743+++ linux-2.6.32.24/arch/sparc/kernel/kgdb_64.c 2010-10-23 19:59:19.000000000 -0400 3929+++ linux-2.6.35.7/arch/sparc/kernel/kgdb_64.c 2010-09-17 20:12:09.000000000 -0400
3744@@ -180,7 +180,7 @@ void kgdb_arch_exit(void) 3930@@ -187,7 +187,7 @@ void kgdb_arch_set_pc(struct pt_regs *re
3745 { 3931 regs->tnpc = regs->tpc + 4;
3746 } 3932 }
3747 3933
3748-struct kgdb_arch arch_kgdb_ops = { 3934-struct kgdb_arch arch_kgdb_ops = {
@@ -3750,9 +3936,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/kgdb_64.c linux-2.6.32.24/arch/spar
3750 /* Breakpoint instruction: ta 0x72 */ 3936 /* Breakpoint instruction: ta 0x72 */
3751 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 }, 3937 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 },
3752 }; 3938 };
3753diff -urNp linux-2.6.32.24/arch/sparc/kernel/Makefile linux-2.6.32.24/arch/sparc/kernel/Makefile 3939diff -urNp linux-2.6.35.7/arch/sparc/kernel/Makefile linux-2.6.35.7/arch/sparc/kernel/Makefile
3754--- linux-2.6.32.24/arch/sparc/kernel/Makefile 2010-08-13 16:24:37.000000000 -0400 3940--- linux-2.6.35.7/arch/sparc/kernel/Makefile 2010-08-26 19:47:12.000000000 -0400
3755+++ linux-2.6.32.24/arch/sparc/kernel/Makefile 2010-10-23 19:59:19.000000000 -0400 3941+++ linux-2.6.35.7/arch/sparc/kernel/Makefile 2010-09-17 20:12:09.000000000 -0400
3756@@ -3,7 +3,7 @@ 3942@@ -3,7 +3,7 @@
3757 # 3943 #
3758 3944
@@ -3762,9 +3948,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/Makefile linux-2.6.32.24/arch/sparc
3762 3948
3763 extra-y := head_$(BITS).o 3949 extra-y := head_$(BITS).o
3764 extra-y += init_task.o 3950 extra-y += init_task.o
3765diff -urNp linux-2.6.32.24/arch/sparc/kernel/pci_sun4v.c linux-2.6.32.24/arch/sparc/kernel/pci_sun4v.c 3951diff -urNp linux-2.6.35.7/arch/sparc/kernel/pci_sun4v.c linux-2.6.35.7/arch/sparc/kernel/pci_sun4v.c
3766--- linux-2.6.32.24/arch/sparc/kernel/pci_sun4v.c 2010-08-13 16:24:37.000000000 -0400 3952--- linux-2.6.35.7/arch/sparc/kernel/pci_sun4v.c 2010-08-26 19:47:12.000000000 -0400
3767+++ linux-2.6.32.24/arch/sparc/kernel/pci_sun4v.c 2010-10-23 19:59:19.000000000 -0400 3953+++ linux-2.6.35.7/arch/sparc/kernel/pci_sun4v.c 2010-09-17 20:12:09.000000000 -0400
3768@@ -525,7 +525,7 @@ static void dma_4v_unmap_sg(struct devic 3954@@ -525,7 +525,7 @@ static void dma_4v_unmap_sg(struct devic
3769 spin_unlock_irqrestore(&iommu->lock, flags); 3955 spin_unlock_irqrestore(&iommu->lock, flags);
3770 } 3956 }
@@ -3774,9 +3960,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/pci_sun4v.c linux-2.6.32.24/arch/sp
3774 .alloc_coherent = dma_4v_alloc_coherent, 3960 .alloc_coherent = dma_4v_alloc_coherent,
3775 .free_coherent = dma_4v_free_coherent, 3961 .free_coherent = dma_4v_free_coherent,
3776 .map_page = dma_4v_map_page, 3962 .map_page = dma_4v_map_page,
3777diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_32.c linux-2.6.32.24/arch/sparc/kernel/sys_sparc_32.c 3963diff -urNp linux-2.6.35.7/arch/sparc/kernel/sys_sparc_32.c linux-2.6.35.7/arch/sparc/kernel/sys_sparc_32.c
3778--- linux-2.6.32.24/arch/sparc/kernel/sys_sparc_32.c 2010-08-13 16:24:37.000000000 -0400 3964--- linux-2.6.35.7/arch/sparc/kernel/sys_sparc_32.c 2010-08-26 19:47:12.000000000 -0400
3779+++ linux-2.6.32.24/arch/sparc/kernel/sys_sparc_32.c 2010-10-23 19:59:19.000000000 -0400 3965+++ linux-2.6.35.7/arch/sparc/kernel/sys_sparc_32.c 2010-09-17 20:12:09.000000000 -0400
3780@@ -57,7 +57,7 @@ unsigned long arch_get_unmapped_area(str 3966@@ -57,7 +57,7 @@ unsigned long arch_get_unmapped_area(str
3781 if (ARCH_SUN4C && len > 0x20000000) 3967 if (ARCH_SUN4C && len > 0x20000000)
3782 return -ENOMEM; 3968 return -ENOMEM;
@@ -3795,10 +3981,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_32.c linux-2.6.32.24/arch
3795 return addr; 3981 return addr;
3796 addr = vmm->vm_end; 3982 addr = vmm->vm_end;
3797 if (flags & MAP_SHARED) 3983 if (flags & MAP_SHARED)
3798diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c 3984diff -urNp linux-2.6.35.7/arch/sparc/kernel/sys_sparc_64.c linux-2.6.35.7/arch/sparc/kernel/sys_sparc_64.c
3799--- linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c 2010-08-13 16:24:37.000000000 -0400 3985--- linux-2.6.35.7/arch/sparc/kernel/sys_sparc_64.c 2010-08-26 19:47:12.000000000 -0400
3800+++ linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c 2010-10-23 19:59:19.000000000 -0400 3986+++ linux-2.6.35.7/arch/sparc/kernel/sys_sparc_64.c 2010-09-17 20:12:09.000000000 -0400
3801@@ -125,7 +125,7 @@ unsigned long arch_get_unmapped_area(str 3987@@ -124,7 +124,7 @@ unsigned long arch_get_unmapped_area(str
3802 /* We do not accept a shared mapping if it would violate 3988 /* We do not accept a shared mapping if it would violate
3803 * cache aliasing constraints. 3989 * cache aliasing constraints.
3804 */ 3990 */
@@ -3807,7 +3993,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3807 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))) 3993 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
3808 return -EINVAL; 3994 return -EINVAL;
3809 return addr; 3995 return addr;
3810@@ -140,6 +140,10 @@ unsigned long arch_get_unmapped_area(str 3996@@ -139,6 +139,10 @@ unsigned long arch_get_unmapped_area(str
3811 if (filp || (flags & MAP_SHARED)) 3997 if (filp || (flags & MAP_SHARED))
3812 do_color_align = 1; 3998 do_color_align = 1;
3813 3999
@@ -3818,7 +4004,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3818 if (addr) { 4004 if (addr) {
3819 if (do_color_align) 4005 if (do_color_align)
3820 addr = COLOUR_ALIGN(addr, pgoff); 4006 addr = COLOUR_ALIGN(addr, pgoff);
3821@@ -147,15 +151,14 @@ unsigned long arch_get_unmapped_area(str 4007@@ -146,15 +150,14 @@ unsigned long arch_get_unmapped_area(str
3822 addr = PAGE_ALIGN(addr); 4008 addr = PAGE_ALIGN(addr);
3823 4009
3824 vma = find_vma(mm, addr); 4010 vma = find_vma(mm, addr);
@@ -3837,7 +4023,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3837 mm->cached_hole_size = 0; 4023 mm->cached_hole_size = 0;
3838 } 4024 }
3839 4025
3840@@ -175,14 +178,14 @@ full_search: 4026@@ -174,14 +177,14 @@ full_search:
3841 vma = find_vma(mm, VA_EXCLUDE_END); 4027 vma = find_vma(mm, VA_EXCLUDE_END);
3842 } 4028 }
3843 if (unlikely(task_size < addr)) { 4029 if (unlikely(task_size < addr)) {
@@ -3855,7 +4041,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3855 /* 4041 /*
3856 * Remember the place where we stopped the search: 4042 * Remember the place where we stopped the search:
3857 */ 4043 */
3858@@ -216,7 +219,7 @@ arch_get_unmapped_area_topdown(struct fi 4044@@ -215,7 +218,7 @@ arch_get_unmapped_area_topdown(struct fi
3859 /* We do not accept a shared mapping if it would violate 4045 /* We do not accept a shared mapping if it would violate
3860 * cache aliasing constraints. 4046 * cache aliasing constraints.
3861 */ 4047 */
@@ -3864,7 +4050,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3864 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))) 4050 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
3865 return -EINVAL; 4051 return -EINVAL;
3866 return addr; 4052 return addr;
3867@@ -237,8 +240,7 @@ arch_get_unmapped_area_topdown(struct fi 4053@@ -236,8 +239,7 @@ arch_get_unmapped_area_topdown(struct fi
3868 addr = PAGE_ALIGN(addr); 4054 addr = PAGE_ALIGN(addr);
3869 4055
3870 vma = find_vma(mm, addr); 4056 vma = find_vma(mm, addr);
@@ -3874,7 +4060,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3874 return addr; 4060 return addr;
3875 } 4061 }
3876 4062
3877@@ -259,7 +261,7 @@ arch_get_unmapped_area_topdown(struct fi 4063@@ -258,7 +260,7 @@ arch_get_unmapped_area_topdown(struct fi
3878 /* make sure it can fit in the remaining address space */ 4064 /* make sure it can fit in the remaining address space */
3879 if (likely(addr > len)) { 4065 if (likely(addr > len)) {
3880 vma = find_vma(mm, addr-len); 4066 vma = find_vma(mm, addr-len);
@@ -3883,7 +4069,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3883 /* remember the address as a hint for next time */ 4069 /* remember the address as a hint for next time */
3884 return (mm->free_area_cache = addr-len); 4070 return (mm->free_area_cache = addr-len);
3885 } 4071 }
3886@@ -279,7 +281,7 @@ arch_get_unmapped_area_topdown(struct fi 4072@@ -278,7 +280,7 @@ arch_get_unmapped_area_topdown(struct fi
3887 * return with success: 4073 * return with success:
3888 */ 4074 */
3889 vma = find_vma(mm, addr); 4075 vma = find_vma(mm, addr);
@@ -3892,8 +4078,8 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3892 /* remember the address as a hint for next time */ 4078 /* remember the address as a hint for next time */
3893 return (mm->free_area_cache = addr); 4079 return (mm->free_area_cache = addr);
3894 } 4080 }
3895@@ -384,6 +386,12 @@ void arch_pick_mmap_layout(struct mm_str 4081@@ -385,6 +387,12 @@ void arch_pick_mmap_layout(struct mm_str
3896 current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY || 4082 gap == RLIM_INFINITY ||
3897 sysctl_legacy_va_layout) { 4083 sysctl_legacy_va_layout) {
3898 mm->mmap_base = TASK_UNMAPPED_BASE + random_factor; 4084 mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
3899+ 4085+
@@ -3905,7 +4091,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3905 mm->get_unmapped_area = arch_get_unmapped_area; 4091 mm->get_unmapped_area = arch_get_unmapped_area;
3906 mm->unmap_area = arch_unmap_area; 4092 mm->unmap_area = arch_unmap_area;
3907 } else { 4093 } else {
3908@@ -398,6 +406,12 @@ void arch_pick_mmap_layout(struct mm_str 4094@@ -397,6 +405,12 @@ void arch_pick_mmap_layout(struct mm_str
3909 gap = (task_size / 6 * 5); 4095 gap = (task_size / 6 * 5);
3910 4096
3911 mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor); 4097 mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor);
@@ -3918,10 +4104,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/sys_sparc_64.c linux-2.6.32.24/arch
3918 mm->get_unmapped_area = arch_get_unmapped_area_topdown; 4104 mm->get_unmapped_area = arch_get_unmapped_area_topdown;
3919 mm->unmap_area = arch_unmap_area_topdown; 4105 mm->unmap_area = arch_unmap_area_topdown;
3920 } 4106 }
3921diff -urNp linux-2.6.32.24/arch/sparc/kernel/traps_64.c linux-2.6.32.24/arch/sparc/kernel/traps_64.c 4107diff -urNp linux-2.6.35.7/arch/sparc/kernel/traps_64.c linux-2.6.35.7/arch/sparc/kernel/traps_64.c
3922--- linux-2.6.32.24/arch/sparc/kernel/traps_64.c 2010-08-13 16:24:37.000000000 -0400 4108--- linux-2.6.35.7/arch/sparc/kernel/traps_64.c 2010-08-26 19:47:12.000000000 -0400
3923+++ linux-2.6.32.24/arch/sparc/kernel/traps_64.c 2010-10-23 19:59:19.000000000 -0400 4109+++ linux-2.6.35.7/arch/sparc/kernel/traps_64.c 2010-09-17 20:12:09.000000000 -0400
3924@@ -93,6 +93,12 @@ void bad_trap(struct pt_regs *regs, long 4110@@ -95,6 +95,12 @@ void bad_trap(struct pt_regs *regs, long
3925 4111
3926 lvl -= 0x100; 4112 lvl -= 0x100;
3927 if (regs->tstate & TSTATE_PRIV) { 4113 if (regs->tstate & TSTATE_PRIV) {
@@ -3934,7 +4120,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/traps_64.c linux-2.6.32.24/arch/spa
3934 sprintf(buffer, "Kernel bad sw trap %lx", lvl); 4120 sprintf(buffer, "Kernel bad sw trap %lx", lvl);
3935 die_if_kernel(buffer, regs); 4121 die_if_kernel(buffer, regs);
3936 } 4122 }
3937@@ -111,11 +117,16 @@ void bad_trap(struct pt_regs *regs, long 4123@@ -113,11 +119,16 @@ void bad_trap(struct pt_regs *regs, long
3938 void bad_trap_tl1(struct pt_regs *regs, long lvl) 4124 void bad_trap_tl1(struct pt_regs *regs, long lvl)
3939 { 4125 {
3940 char buffer[32]; 4126 char buffer[32];
@@ -3952,9 +4138,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/kernel/traps_64.c linux-2.6.32.24/arch/spa
3952 dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); 4138 dump_tl1_traplog((struct tl1_traplog *)(regs + 1));
3953 4139
3954 sprintf (buffer, "Bad trap %lx at tl>0", lvl); 4140 sprintf (buffer, "Bad trap %lx at tl>0", lvl);
3955diff -urNp linux-2.6.32.24/arch/sparc/lib/atomic_64.S linux-2.6.32.24/arch/sparc/lib/atomic_64.S 4141diff -urNp linux-2.6.35.7/arch/sparc/lib/atomic_64.S linux-2.6.35.7/arch/sparc/lib/atomic_64.S
3956--- linux-2.6.32.24/arch/sparc/lib/atomic_64.S 2010-08-13 16:24:37.000000000 -0400 4142--- linux-2.6.35.7/arch/sparc/lib/atomic_64.S 2010-08-26 19:47:12.000000000 -0400
3957+++ linux-2.6.32.24/arch/sparc/lib/atomic_64.S 2010-10-23 19:59:19.000000000 -0400 4143+++ linux-2.6.35.7/arch/sparc/lib/atomic_64.S 2010-09-26 22:04:10.000000000 -0400
3958@@ -18,7 +18,12 @@ 4144@@ -18,7 +18,12 @@
3959 atomic_add: /* %o0 = increment, %o1 = atomic_ptr */ 4145 atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
3960 BACKOFF_SETUP(%o2) 4146 BACKOFF_SETUP(%o2)
@@ -4189,10 +4375,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/lib/atomic_64.S linux-2.6.32.24/arch/sparc
4189 casx [%o1], %g1, %g7 4375 casx [%o1], %g1, %g7
4190 cmp %g1, %g7 4376 cmp %g1, %g7
4191 bne,pn %xcc, 2f 4377 bne,pn %xcc, 2f
4192diff -urNp linux-2.6.32.24/arch/sparc/lib/ksyms.c linux-2.6.32.24/arch/sparc/lib/ksyms.c 4378diff -urNp linux-2.6.35.7/arch/sparc/lib/ksyms.c linux-2.6.35.7/arch/sparc/lib/ksyms.c
4193--- linux-2.6.32.24/arch/sparc/lib/ksyms.c 2010-08-13 16:24:37.000000000 -0400 4379--- linux-2.6.35.7/arch/sparc/lib/ksyms.c 2010-08-26 19:47:12.000000000 -0400
4194+++ linux-2.6.32.24/arch/sparc/lib/ksyms.c 2010-10-23 19:59:19.000000000 -0400 4380+++ linux-2.6.35.7/arch/sparc/lib/ksyms.c 2010-09-17 20:12:09.000000000 -0400
4195@@ -144,12 +144,17 @@ EXPORT_SYMBOL(__downgrade_write); 4381@@ -142,12 +142,17 @@ EXPORT_SYMBOL(__downgrade_write);
4196 4382
4197 /* Atomic counter implementation. */ 4383 /* Atomic counter implementation. */
4198 EXPORT_SYMBOL(atomic_add); 4384 EXPORT_SYMBOL(atomic_add);
@@ -4210,9 +4396,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/lib/ksyms.c linux-2.6.32.24/arch/sparc/lib
4210 EXPORT_SYMBOL(atomic64_sub_ret); 4396 EXPORT_SYMBOL(atomic64_sub_ret);
4211 4397
4212 /* Atomic bit operations. */ 4398 /* Atomic bit operations. */
4213diff -urNp linux-2.6.32.24/arch/sparc/lib/rwsem_64.S linux-2.6.32.24/arch/sparc/lib/rwsem_64.S 4399diff -urNp linux-2.6.35.7/arch/sparc/lib/rwsem_64.S linux-2.6.35.7/arch/sparc/lib/rwsem_64.S
4214--- linux-2.6.32.24/arch/sparc/lib/rwsem_64.S 2010-08-13 16:24:37.000000000 -0400 4400--- linux-2.6.35.7/arch/sparc/lib/rwsem_64.S 2010-08-26 19:47:12.000000000 -0400
4215+++ linux-2.6.32.24/arch/sparc/lib/rwsem_64.S 2010-10-23 19:59:19.000000000 -0400 4401+++ linux-2.6.35.7/arch/sparc/lib/rwsem_64.S 2010-09-17 20:12:09.000000000 -0400
4216@@ -11,7 +11,12 @@ 4402@@ -11,7 +11,12 @@
4217 .globl __down_read 4403 .globl __down_read
4218 __down_read: 4404 __down_read:
@@ -4311,9 +4497,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/lib/rwsem_64.S linux-2.6.32.24/arch/sparc/
4311 cas [%o0], %g3, %g7 4497 cas [%o0], %g3, %g7
4312 cmp %g3, %g7 4498 cmp %g3, %g7
4313 bne,pn %icc, 1b 4499 bne,pn %icc, 1b
4314diff -urNp linux-2.6.32.24/arch/sparc/Makefile linux-2.6.32.24/arch/sparc/Makefile 4500diff -urNp linux-2.6.35.7/arch/sparc/Makefile linux-2.6.35.7/arch/sparc/Makefile
4315--- linux-2.6.32.24/arch/sparc/Makefile 2010-08-13 16:24:37.000000000 -0400 4501--- linux-2.6.35.7/arch/sparc/Makefile 2010-08-26 19:47:12.000000000 -0400
4316+++ linux-2.6.32.24/arch/sparc/Makefile 2010-10-23 19:59:19.000000000 -0400 4502+++ linux-2.6.35.7/arch/sparc/Makefile 2010-09-17 20:12:37.000000000 -0400
4317@@ -75,7 +75,7 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc 4503@@ -75,7 +75,7 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc
4318 # Export what is needed by arch/sparc/boot/Makefile 4504 # Export what is needed by arch/sparc/boot/Makefile
4319 export VMLINUX_INIT VMLINUX_MAIN 4505 export VMLINUX_INIT VMLINUX_MAIN
@@ -4323,10 +4509,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/Makefile linux-2.6.32.24/arch/sparc/Makefi
4323 VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y) 4509 VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
4324 VMLINUX_MAIN += $(drivers-y) $(net-y) 4510 VMLINUX_MAIN += $(drivers-y) $(net-y)
4325 4511
4326diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_32.c linux-2.6.32.24/arch/sparc/mm/fault_32.c 4512diff -urNp linux-2.6.35.7/arch/sparc/mm/fault_32.c linux-2.6.35.7/arch/sparc/mm/fault_32.c
4327--- linux-2.6.32.24/arch/sparc/mm/fault_32.c 2010-08-13 16:24:37.000000000 -0400 4513--- linux-2.6.35.7/arch/sparc/mm/fault_32.c 2010-08-26 19:47:12.000000000 -0400
4328+++ linux-2.6.32.24/arch/sparc/mm/fault_32.c 2010-10-23 19:59:19.000000000 -0400 4514+++ linux-2.6.35.7/arch/sparc/mm/fault_32.c 2010-09-17 20:12:09.000000000 -0400
4329@@ -21,6 +21,9 @@ 4515@@ -22,6 +22,9 @@
4330 #include <linux/interrupt.h> 4516 #include <linux/interrupt.h>
4331 #include <linux/module.h> 4517 #include <linux/module.h>
4332 #include <linux/kdebug.h> 4518 #include <linux/kdebug.h>
@@ -4336,7 +4522,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_32.c linux-2.6.32.24/arch/sparc/m
4336 4522
4337 #include <asm/system.h> 4523 #include <asm/system.h>
4338 #include <asm/page.h> 4524 #include <asm/page.h>
4339@@ -167,6 +170,267 @@ static unsigned long compute_si_addr(str 4525@@ -209,6 +212,268 @@ static unsigned long compute_si_addr(str
4340 return safe_compute_effective_address(regs, insn); 4526 return safe_compute_effective_address(regs, insn);
4341 } 4527 }
4342 4528
@@ -4372,6 +4558,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_32.c linux-2.6.32.24/arch/sparc/m
4372+{ 4558+{
4373+ int ret; 4559+ int ret;
4374+ 4560+
4561+ INIT_LIST_HEAD(&vma->anon_vma_chain);
4375+ vma->vm_mm = current->mm; 4562+ vma->vm_mm = current->mm;
4376+ vma->vm_start = addr; 4563+ vma->vm_start = addr;
4377+ vma->vm_end = addr + PAGE_SIZE; 4564+ vma->vm_end = addr + PAGE_SIZE;
@@ -4601,10 +4788,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_32.c linux-2.6.32.24/arch/sparc/m
4601+} 4788+}
4602+#endif 4789+#endif
4603+ 4790+
4604 asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write, 4791 static noinline void do_fault_siginfo(int code, int sig, struct pt_regs *regs,
4605 unsigned long address) 4792 int text_fault)
4606 { 4793 {
4607@@ -231,6 +495,24 @@ good_area: 4794@@ -282,6 +547,24 @@ good_area:
4608 if(!(vma->vm_flags & VM_WRITE)) 4795 if(!(vma->vm_flags & VM_WRITE))
4609 goto bad_area; 4796 goto bad_area;
4610 } else { 4797 } else {
@@ -4629,10 +4816,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_32.c linux-2.6.32.24/arch/sparc/m
4629 /* Allow reads even for write-only mappings */ 4816 /* Allow reads even for write-only mappings */
4630 if(!(vma->vm_flags & (VM_READ | VM_EXEC))) 4817 if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
4631 goto bad_area; 4818 goto bad_area;
4632diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_64.c linux-2.6.32.24/arch/sparc/mm/fault_64.c 4819diff -urNp linux-2.6.35.7/arch/sparc/mm/fault_64.c linux-2.6.35.7/arch/sparc/mm/fault_64.c
4633--- linux-2.6.32.24/arch/sparc/mm/fault_64.c 2010-08-13 16:24:37.000000000 -0400 4820--- linux-2.6.35.7/arch/sparc/mm/fault_64.c 2010-08-26 19:47:12.000000000 -0400
4634+++ linux-2.6.32.24/arch/sparc/mm/fault_64.c 2010-10-23 19:59:19.000000000 -0400 4821+++ linux-2.6.35.7/arch/sparc/mm/fault_64.c 2010-09-17 20:12:09.000000000 -0400
4635@@ -20,6 +20,9 @@ 4822@@ -21,6 +21,9 @@
4636 #include <linux/kprobes.h> 4823 #include <linux/kprobes.h>
4637 #include <linux/kdebug.h> 4824 #include <linux/kdebug.h>
4638 #include <linux/percpu.h> 4825 #include <linux/percpu.h>
@@ -4642,7 +4829,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_64.c linux-2.6.32.24/arch/sparc/m
4642 4829
4643 #include <asm/page.h> 4830 #include <asm/page.h>
4644 #include <asm/pgtable.h> 4831 #include <asm/pgtable.h>
4645@@ -249,6 +252,456 @@ static void noinline bogus_32bit_fault_a 4832@@ -272,6 +275,457 @@ static void noinline __kprobes bogus_32b
4646 show_regs(regs); 4833 show_regs(regs);
4647 } 4834 }
4648 4835
@@ -4678,6 +4865,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_64.c linux-2.6.32.24/arch/sparc/m
4678+{ 4865+{
4679+ int ret; 4866+ int ret;
4680+ 4867+
4868+ INIT_LIST_HEAD(&vma->anon_vma_chain);
4681+ vma->vm_mm = current->mm; 4869+ vma->vm_mm = current->mm;
4682+ vma->vm_start = addr; 4870+ vma->vm_start = addr;
4683+ vma->vm_end = addr + PAGE_SIZE; 4871+ vma->vm_end = addr + PAGE_SIZE;
@@ -5099,7 +5287,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_64.c linux-2.6.32.24/arch/sparc/m
5099 asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) 5287 asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
5100 { 5288 {
5101 struct mm_struct *mm = current->mm; 5289 struct mm_struct *mm = current->mm;
5102@@ -315,6 +768,29 @@ asmlinkage void __kprobes do_sparc64_fau 5290@@ -340,6 +794,29 @@ asmlinkage void __kprobes do_sparc64_fau
5103 if (!vma) 5291 if (!vma)
5104 goto bad_area; 5292 goto bad_area;
5105 5293
@@ -5129,10 +5317,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/fault_64.c linux-2.6.32.24/arch/sparc/m
5129 /* Pure DTLB misses do not tell us whether the fault causing 5317 /* Pure DTLB misses do not tell us whether the fault causing
5130 * load/store/atomic was a write or not, it only says that there 5318 * load/store/atomic was a write or not, it only says that there
5131 * was no match. So in such a case we (carefully) read the 5319 * was no match. So in such a case we (carefully) read the
5132diff -urNp linux-2.6.32.24/arch/sparc/mm/hugetlbpage.c linux-2.6.32.24/arch/sparc/mm/hugetlbpage.c 5320diff -urNp linux-2.6.35.7/arch/sparc/mm/hugetlbpage.c linux-2.6.35.7/arch/sparc/mm/hugetlbpage.c
5133--- linux-2.6.32.24/arch/sparc/mm/hugetlbpage.c 2010-08-13 16:24:37.000000000 -0400 5321--- linux-2.6.35.7/arch/sparc/mm/hugetlbpage.c 2010-08-26 19:47:12.000000000 -0400
5134+++ linux-2.6.32.24/arch/sparc/mm/hugetlbpage.c 2010-10-23 19:59:19.000000000 -0400 5322+++ linux-2.6.35.7/arch/sparc/mm/hugetlbpage.c 2010-09-17 20:12:09.000000000 -0400
5135@@ -69,7 +69,7 @@ full_search: 5323@@ -68,7 +68,7 @@ full_search:
5136 } 5324 }
5137 return -ENOMEM; 5325 return -ENOMEM;
5138 } 5326 }
@@ -5141,7 +5329,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/hugetlbpage.c linux-2.6.32.24/arch/spar
5141 /* 5329 /*
5142 * Remember the place where we stopped the search: 5330 * Remember the place where we stopped the search:
5143 */ 5331 */
5144@@ -108,7 +108,7 @@ hugetlb_get_unmapped_area_topdown(struct 5332@@ -107,7 +107,7 @@ hugetlb_get_unmapped_area_topdown(struct
5145 /* make sure it can fit in the remaining address space */ 5333 /* make sure it can fit in the remaining address space */
5146 if (likely(addr > len)) { 5334 if (likely(addr > len)) {
5147 vma = find_vma(mm, addr-len); 5335 vma = find_vma(mm, addr-len);
@@ -5150,7 +5338,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/hugetlbpage.c linux-2.6.32.24/arch/spar
5150 /* remember the address as a hint for next time */ 5338 /* remember the address as a hint for next time */
5151 return (mm->free_area_cache = addr-len); 5339 return (mm->free_area_cache = addr-len);
5152 } 5340 }
5153@@ -126,7 +126,7 @@ hugetlb_get_unmapped_area_topdown(struct 5341@@ -125,7 +125,7 @@ hugetlb_get_unmapped_area_topdown(struct
5154 * return with success: 5342 * return with success:
5155 */ 5343 */
5156 vma = find_vma(mm, addr); 5344 vma = find_vma(mm, addr);
@@ -5159,7 +5347,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/hugetlbpage.c linux-2.6.32.24/arch/spar
5159 /* remember the address as a hint for next time */ 5347 /* remember the address as a hint for next time */
5160 return (mm->free_area_cache = addr); 5348 return (mm->free_area_cache = addr);
5161 } 5349 }
5162@@ -183,8 +183,7 @@ hugetlb_get_unmapped_area(struct file *f 5350@@ -182,8 +182,7 @@ hugetlb_get_unmapped_area(struct file *f
5163 if (addr) { 5351 if (addr) {
5164 addr = ALIGN(addr, HPAGE_SIZE); 5352 addr = ALIGN(addr, HPAGE_SIZE);
5165 vma = find_vma(mm, addr); 5353 vma = find_vma(mm, addr);
@@ -5169,10 +5357,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/hugetlbpage.c linux-2.6.32.24/arch/spar
5169 return addr; 5357 return addr;
5170 } 5358 }
5171 if (mm->get_unmapped_area == arch_get_unmapped_area) 5359 if (mm->get_unmapped_area == arch_get_unmapped_area)
5172diff -urNp linux-2.6.32.24/arch/sparc/mm/init_32.c linux-2.6.32.24/arch/sparc/mm/init_32.c 5360diff -urNp linux-2.6.35.7/arch/sparc/mm/init_32.c linux-2.6.35.7/arch/sparc/mm/init_32.c
5173--- linux-2.6.32.24/arch/sparc/mm/init_32.c 2010-08-13 16:24:37.000000000 -0400 5361--- linux-2.6.35.7/arch/sparc/mm/init_32.c 2010-08-26 19:47:12.000000000 -0400
5174+++ linux-2.6.32.24/arch/sparc/mm/init_32.c 2010-10-23 19:59:19.000000000 -0400 5362+++ linux-2.6.35.7/arch/sparc/mm/init_32.c 2010-09-17 20:12:09.000000000 -0400
5175@@ -317,6 +317,9 @@ extern void device_scan(void); 5363@@ -318,6 +318,9 @@ extern void device_scan(void);
5176 pgprot_t PAGE_SHARED __read_mostly; 5364 pgprot_t PAGE_SHARED __read_mostly;
5177 EXPORT_SYMBOL(PAGE_SHARED); 5365 EXPORT_SYMBOL(PAGE_SHARED);
5178 5366
@@ -5182,7 +5370,7 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/init_32.c linux-2.6.32.24/arch/sparc/mm
5182 void __init paging_init(void) 5370 void __init paging_init(void)
5183 { 5371 {
5184 switch(sparc_cpu_model) { 5372 switch(sparc_cpu_model) {
5185@@ -345,17 +348,17 @@ void __init paging_init(void) 5373@@ -346,17 +349,17 @@ void __init paging_init(void)
5186 5374
5187 /* Initialize the protection map with non-constant, MMU dependent values. */ 5375 /* Initialize the protection map with non-constant, MMU dependent values. */
5188 protection_map[0] = PAGE_NONE; 5376 protection_map[0] = PAGE_NONE;
@@ -5206,9 +5394,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/init_32.c linux-2.6.32.24/arch/sparc/mm
5206 protection_map[12] = PAGE_READONLY; 5394 protection_map[12] = PAGE_READONLY;
5207 protection_map[13] = PAGE_READONLY; 5395 protection_map[13] = PAGE_READONLY;
5208 protection_map[14] = PAGE_SHARED; 5396 protection_map[14] = PAGE_SHARED;
5209diff -urNp linux-2.6.32.24/arch/sparc/mm/Makefile linux-2.6.32.24/arch/sparc/mm/Makefile 5397diff -urNp linux-2.6.35.7/arch/sparc/mm/Makefile linux-2.6.35.7/arch/sparc/mm/Makefile
5210--- linux-2.6.32.24/arch/sparc/mm/Makefile 2010-08-13 16:24:37.000000000 -0400 5398--- linux-2.6.35.7/arch/sparc/mm/Makefile 2010-08-26 19:47:12.000000000 -0400
5211+++ linux-2.6.32.24/arch/sparc/mm/Makefile 2010-10-23 19:59:19.000000000 -0400 5399+++ linux-2.6.35.7/arch/sparc/mm/Makefile 2010-09-17 20:12:09.000000000 -0400
5212@@ -2,7 +2,7 @@ 5400@@ -2,7 +2,7 @@
5213 # 5401 #
5214 5402
@@ -5218,10 +5406,10 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/Makefile linux-2.6.32.24/arch/sparc/mm/
5218 5406
5219 obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o 5407 obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o
5220 obj-y += fault_$(BITS).o 5408 obj-y += fault_$(BITS).o
5221diff -urNp linux-2.6.32.24/arch/sparc/mm/srmmu.c linux-2.6.32.24/arch/sparc/mm/srmmu.c 5409diff -urNp linux-2.6.35.7/arch/sparc/mm/srmmu.c linux-2.6.35.7/arch/sparc/mm/srmmu.c
5222--- linux-2.6.32.24/arch/sparc/mm/srmmu.c 2010-08-13 16:24:37.000000000 -0400 5410--- linux-2.6.35.7/arch/sparc/mm/srmmu.c 2010-08-26 19:47:12.000000000 -0400
5223+++ linux-2.6.32.24/arch/sparc/mm/srmmu.c 2010-10-23 19:59:19.000000000 -0400 5411+++ linux-2.6.35.7/arch/sparc/mm/srmmu.c 2010-09-17 20:12:09.000000000 -0400
5224@@ -2200,6 +2200,13 @@ void __init ld_mmu_srmmu(void) 5412@@ -2198,6 +2198,13 @@ void __init ld_mmu_srmmu(void)
5225 PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED); 5413 PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED);
5226 BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY)); 5414 BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));
5227 BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY)); 5415 BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY));
@@ -5235,9 +5423,9 @@ diff -urNp linux-2.6.32.24/arch/sparc/mm/srmmu.c linux-2.6.32.24/arch/sparc/mm/s
5235 BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL)); 5423 BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
5236 page_kernel = pgprot_val(SRMMU_PAGE_KERNEL); 5424 page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
5237 5425
5238diff -urNp linux-2.6.32.24/arch/um/include/asm/kmap_types.h linux-2.6.32.24/arch/um/include/asm/kmap_types.h 5426diff -urNp linux-2.6.35.7/arch/um/include/asm/kmap_types.h linux-2.6.35.7/arch/um/include/asm/kmap_types.h
5239--- linux-2.6.32.24/arch/um/include/asm/kmap_types.h 2010-08-13 16:24:37.000000000 -0400 5427--- linux-2.6.35.7/arch/um/include/asm/kmap_types.h 2010-08-26 19:47:12.000000000 -0400
5240+++ linux-2.6.32.24/arch/um/include/asm/kmap_types.h 2010-10-23 19:59:19.000000000 -0400 5428+++ linux-2.6.35.7/arch/um/include/asm/kmap_types.h 2010-09-17 20:12:09.000000000 -0400
5241@@ -23,6 +23,7 @@ enum km_type { 5429@@ -23,6 +23,7 @@ enum km_type {
5242 KM_IRQ1, 5430 KM_IRQ1,
5243 KM_SOFTIRQ0, 5431 KM_SOFTIRQ0,
@@ -5246,9 +5434,9 @@ diff -urNp linux-2.6.32.24/arch/um/include/asm/kmap_types.h linux-2.6.32.24/arch
5246 KM_TYPE_NR 5434 KM_TYPE_NR
5247 }; 5435 };
5248 5436
5249diff -urNp linux-2.6.32.24/arch/um/include/asm/page.h linux-2.6.32.24/arch/um/include/asm/page.h 5437diff -urNp linux-2.6.35.7/arch/um/include/asm/page.h linux-2.6.35.7/arch/um/include/asm/page.h
5250--- linux-2.6.32.24/arch/um/include/asm/page.h 2010-08-13 16:24:37.000000000 -0400 5438--- linux-2.6.35.7/arch/um/include/asm/page.h 2010-08-26 19:47:12.000000000 -0400
5251+++ linux-2.6.32.24/arch/um/include/asm/page.h 2010-10-23 19:59:19.000000000 -0400 5439+++ linux-2.6.35.7/arch/um/include/asm/page.h 2010-09-17 20:12:09.000000000 -0400
5252@@ -14,6 +14,9 @@ 5440@@ -14,6 +14,9 @@
5253 #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) 5441 #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
5254 #define PAGE_MASK (~(PAGE_SIZE-1)) 5442 #define PAGE_MASK (~(PAGE_SIZE-1))
@@ -5259,9 +5447,9 @@ diff -urNp linux-2.6.32.24/arch/um/include/asm/page.h linux-2.6.32.24/arch/um/in
5259 #ifndef __ASSEMBLY__ 5447 #ifndef __ASSEMBLY__
5260 5448
5261 struct page; 5449 struct page;
5262diff -urNp linux-2.6.32.24/arch/um/sys-i386/syscalls.c linux-2.6.32.24/arch/um/sys-i386/syscalls.c 5450diff -urNp linux-2.6.35.7/arch/um/sys-i386/syscalls.c linux-2.6.35.7/arch/um/sys-i386/syscalls.c
5263--- linux-2.6.32.24/arch/um/sys-i386/syscalls.c 2010-08-13 16:24:37.000000000 -0400 5451--- linux-2.6.35.7/arch/um/sys-i386/syscalls.c 2010-08-26 19:47:12.000000000 -0400
5264+++ linux-2.6.32.24/arch/um/sys-i386/syscalls.c 2010-10-23 19:59:19.000000000 -0400 5452+++ linux-2.6.35.7/arch/um/sys-i386/syscalls.c 2010-09-17 20:12:09.000000000 -0400
5265@@ -11,6 +11,21 @@ 5453@@ -11,6 +11,21 @@
5266 #include "asm/uaccess.h" 5454 #include "asm/uaccess.h"
5267 #include "asm/unistd.h" 5455 #include "asm/unistd.h"
@@ -5282,11 +5470,11 @@ diff -urNp linux-2.6.32.24/arch/um/sys-i386/syscalls.c linux-2.6.32.24/arch/um/s
5282+} 5470+}
5283+ 5471+
5284 /* 5472 /*
5285 * Perform the select(nd, in, out, ex, tv) and mmap() system 5473 * The prototype on i386 is:
5286 * calls. Linux/i386 didn't use to be able to handle more than 5474 *
5287diff -urNp linux-2.6.32.24/arch/x86/boot/bitops.h linux-2.6.32.24/arch/x86/boot/bitops.h 5475diff -urNp linux-2.6.35.7/arch/x86/boot/bitops.h linux-2.6.35.7/arch/x86/boot/bitops.h
5288--- linux-2.6.32.24/arch/x86/boot/bitops.h 2010-08-13 16:24:37.000000000 -0400 5476--- linux-2.6.35.7/arch/x86/boot/bitops.h 2010-08-26 19:47:12.000000000 -0400
5289+++ linux-2.6.32.24/arch/x86/boot/bitops.h 2010-10-23 19:59:19.000000000 -0400 5477+++ linux-2.6.35.7/arch/x86/boot/bitops.h 2010-09-17 20:12:09.000000000 -0400
5290@@ -26,7 +26,7 @@ static inline int variable_test_bit(int 5478@@ -26,7 +26,7 @@ static inline int variable_test_bit(int
5291 u8 v; 5479 u8 v;
5292 const u32 *p = (const u32 *)addr; 5480 const u32 *p = (const u32 *)addr;
@@ -5305,9 +5493,9 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/bitops.h linux-2.6.32.24/arch/x86/boot/
5305 } 5493 }
5306 5494
5307 #endif /* BOOT_BITOPS_H */ 5495 #endif /* BOOT_BITOPS_H */
5308diff -urNp linux-2.6.32.24/arch/x86/boot/boot.h linux-2.6.32.24/arch/x86/boot/boot.h 5496diff -urNp linux-2.6.35.7/arch/x86/boot/boot.h linux-2.6.35.7/arch/x86/boot/boot.h
5309--- linux-2.6.32.24/arch/x86/boot/boot.h 2010-08-13 16:24:37.000000000 -0400 5497--- linux-2.6.35.7/arch/x86/boot/boot.h 2010-08-26 19:47:12.000000000 -0400
5310+++ linux-2.6.32.24/arch/x86/boot/boot.h 2010-10-23 19:59:19.000000000 -0400 5498+++ linux-2.6.35.7/arch/x86/boot/boot.h 2010-09-17 20:12:09.000000000 -0400
5311@@ -82,7 +82,7 @@ static inline void io_delay(void) 5499@@ -82,7 +82,7 @@ static inline void io_delay(void)
5312 static inline u16 ds(void) 5500 static inline u16 ds(void)
5313 { 5501 {
@@ -5326,9 +5514,9 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/boot.h linux-2.6.32.24/arch/x86/boot/bo
5326 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); 5514 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
5327 return diff; 5515 return diff;
5328 } 5516 }
5329diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/head_32.S linux-2.6.32.24/arch/x86/boot/compressed/head_32.S 5517diff -urNp linux-2.6.35.7/arch/x86/boot/compressed/head_32.S linux-2.6.35.7/arch/x86/boot/compressed/head_32.S
5330--- linux-2.6.32.24/arch/x86/boot/compressed/head_32.S 2010-08-13 16:24:37.000000000 -0400 5518--- linux-2.6.35.7/arch/x86/boot/compressed/head_32.S 2010-08-26 19:47:12.000000000 -0400
5331+++ linux-2.6.32.24/arch/x86/boot/compressed/head_32.S 2010-10-23 19:59:19.000000000 -0400 5519+++ linux-2.6.35.7/arch/x86/boot/compressed/head_32.S 2010-09-17 20:12:09.000000000 -0400
5332@@ -76,7 +76,7 @@ ENTRY(startup_32) 5520@@ -76,7 +76,7 @@ ENTRY(startup_32)
5333 notl %eax 5521 notl %eax
5334 andl %eax, %ebx 5522 andl %eax, %ebx
@@ -5357,9 +5545,9 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/head_32.S linux-2.6.32.24/ar
5357 addl %ebx, -__PAGE_OFFSET(%ebx, %ecx) 5545 addl %ebx, -__PAGE_OFFSET(%ebx, %ecx)
5358 jmp 1b 5546 jmp 1b
5359 2: 5547 2:
5360diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/head_64.S linux-2.6.32.24/arch/x86/boot/compressed/head_64.S 5548diff -urNp linux-2.6.35.7/arch/x86/boot/compressed/head_64.S linux-2.6.35.7/arch/x86/boot/compressed/head_64.S
5361--- linux-2.6.32.24/arch/x86/boot/compressed/head_64.S 2010-08-13 16:24:37.000000000 -0400 5549--- linux-2.6.35.7/arch/x86/boot/compressed/head_64.S 2010-08-26 19:47:12.000000000 -0400
5362+++ linux-2.6.32.24/arch/x86/boot/compressed/head_64.S 2010-10-23 19:59:19.000000000 -0400 5550+++ linux-2.6.35.7/arch/x86/boot/compressed/head_64.S 2010-09-17 20:12:09.000000000 -0400
5363@@ -91,7 +91,7 @@ ENTRY(startup_32) 5551@@ -91,7 +91,7 @@ ENTRY(startup_32)
5364 notl %eax 5552 notl %eax
5365 andl %eax, %ebx 5553 andl %eax, %ebx
@@ -5369,7 +5557,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/head_64.S linux-2.6.32.24/ar
5369 #endif 5557 #endif
5370 5558
5371 /* Target address to relocate to for decompression */ 5559 /* Target address to relocate to for decompression */
5372@@ -234,7 +234,7 @@ ENTRY(startup_64) 5560@@ -233,7 +233,7 @@ ENTRY(startup_64)
5373 notq %rax 5561 notq %rax
5374 andq %rax, %rbp 5562 andq %rax, %rbp
5375 #else 5563 #else
@@ -5378,10 +5566,10 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/head_64.S linux-2.6.32.24/ar
5378 #endif 5566 #endif
5379 5567
5380 /* Target address to relocate to for decompression */ 5568 /* Target address to relocate to for decompression */
5381diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/misc.c linux-2.6.32.24/arch/x86/boot/compressed/misc.c 5569diff -urNp linux-2.6.35.7/arch/x86/boot/compressed/misc.c linux-2.6.35.7/arch/x86/boot/compressed/misc.c
5382--- linux-2.6.32.24/arch/x86/boot/compressed/misc.c 2010-08-13 16:24:37.000000000 -0400 5570--- linux-2.6.35.7/arch/x86/boot/compressed/misc.c 2010-08-26 19:47:12.000000000 -0400
5383+++ linux-2.6.32.24/arch/x86/boot/compressed/misc.c 2010-10-23 19:59:19.000000000 -0400 5571+++ linux-2.6.35.7/arch/x86/boot/compressed/misc.c 2010-09-17 20:12:09.000000000 -0400
5384@@ -288,7 +288,7 @@ static void parse_elf(void *output) 5572@@ -285,7 +285,7 @@ static void parse_elf(void *output)
5385 case PT_LOAD: 5573 case PT_LOAD:
5386 #ifdef CONFIG_RELOCATABLE 5574 #ifdef CONFIG_RELOCATABLE
5387 dest = output; 5575 dest = output;
@@ -5390,7 +5578,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/misc.c linux-2.6.32.24/arch/
5390 #else 5578 #else
5391 dest = (void *)(phdr->p_paddr); 5579 dest = (void *)(phdr->p_paddr);
5392 #endif 5580 #endif
5393@@ -335,7 +335,7 @@ asmlinkage void decompress_kernel(void * 5581@@ -332,7 +332,7 @@ asmlinkage void decompress_kernel(void *
5394 error("Destination address too large"); 5582 error("Destination address too large");
5395 #endif 5583 #endif
5396 #ifndef CONFIG_RELOCATABLE 5584 #ifndef CONFIG_RELOCATABLE
@@ -5399,9 +5587,9 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/misc.c linux-2.6.32.24/arch/
5399 error("Wrong destination address"); 5587 error("Wrong destination address");
5400 #endif 5588 #endif
5401 5589
5402diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/mkpiggy.c linux-2.6.32.24/arch/x86/boot/compressed/mkpiggy.c 5590diff -urNp linux-2.6.35.7/arch/x86/boot/compressed/mkpiggy.c linux-2.6.35.7/arch/x86/boot/compressed/mkpiggy.c
5403--- linux-2.6.32.24/arch/x86/boot/compressed/mkpiggy.c 2010-08-13 16:24:37.000000000 -0400 5591--- linux-2.6.35.7/arch/x86/boot/compressed/mkpiggy.c 2010-08-26 19:47:12.000000000 -0400
5404+++ linux-2.6.32.24/arch/x86/boot/compressed/mkpiggy.c 2010-10-23 19:59:19.000000000 -0400 5592+++ linux-2.6.35.7/arch/x86/boot/compressed/mkpiggy.c 2010-09-17 20:12:09.000000000 -0400
5405@@ -74,7 +74,7 @@ int main(int argc, char *argv[]) 5593@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
5406 5594
5407 offs = (olen > ilen) ? olen - ilen : 0; 5595 offs = (olen > ilen) ? olen - ilen : 0;
@@ -5410,15 +5598,15 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/mkpiggy.c linux-2.6.32.24/ar
5410+ offs += 64*1024; /* Add 64K bytes slack */ 5598+ offs += 64*1024; /* Add 64K bytes slack */
5411 offs = (offs+4095) & ~4095; /* Round to a 4K boundary */ 5599 offs = (offs+4095) & ~4095; /* Round to a 4K boundary */
5412 5600
5413 printf(".section \".rodata.compressed\",\"a\",@progbits\n"); 5601 printf(".section \".rodata..compressed\",\"a\",@progbits\n");
5414diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arch/x86/boot/compressed/relocs.c 5602diff -urNp linux-2.6.35.7/arch/x86/boot/compressed/relocs.c linux-2.6.35.7/arch/x86/boot/compressed/relocs.c
5415--- linux-2.6.32.24/arch/x86/boot/compressed/relocs.c 2010-08-13 16:24:37.000000000 -0400 5603--- linux-2.6.35.7/arch/x86/boot/compressed/relocs.c 2010-08-26 19:47:12.000000000 -0400
5416+++ linux-2.6.32.24/arch/x86/boot/compressed/relocs.c 2010-10-23 19:59:19.000000000 -0400 5604+++ linux-2.6.35.7/arch/x86/boot/compressed/relocs.c 2010-09-17 20:12:09.000000000 -0400
5417@@ -10,8 +10,11 @@ 5605@@ -13,8 +13,11 @@
5418 #define USE_BSD
5419 #include <endian.h>
5420 5606
5421+#include "../../../../include/linux/autoconf.h" 5607 static void die(char *fmt, ...);
5608
5609+#include "../../../../include/generated/autoconf.h"
5422+ 5610+
5423 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 5611 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
5424 static Elf32_Ehdr ehdr; 5612 static Elf32_Ehdr ehdr;
@@ -5426,16 +5614,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5426 static unsigned long reloc_count, reloc_idx; 5614 static unsigned long reloc_count, reloc_idx;
5427 static unsigned long *relocs; 5615 static unsigned long *relocs;
5428 5616
5429@@ -37,7 +40,7 @@ static const char* safe_abs_relocs[] = { 5617@@ -270,9 +273,39 @@ static void read_ehdr(FILE *fp)
5430
5431 static int is_safe_abs_reloc(const char* sym_name)
5432 {
5433- int i;
5434+ unsigned int i;
5435
5436 for (i = 0; i < ARRAY_SIZE(safe_abs_relocs); i++) {
5437 if (!strcmp(sym_name, safe_abs_relocs[i]))
5438@@ -245,9 +248,39 @@ static void read_ehdr(FILE *fp)
5439 } 5618 }
5440 } 5619 }
5441 5620
@@ -5476,7 +5655,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5476 Elf32_Shdr shdr; 5655 Elf32_Shdr shdr;
5477 5656
5478 secs = calloc(ehdr.e_shnum, sizeof(struct section)); 5657 secs = calloc(ehdr.e_shnum, sizeof(struct section));
5479@@ -282,7 +315,7 @@ static void read_shdrs(FILE *fp) 5658@@ -307,7 +340,7 @@ static void read_shdrs(FILE *fp)
5480 5659
5481 static void read_strtabs(FILE *fp) 5660 static void read_strtabs(FILE *fp)
5482 { 5661 {
@@ -5485,7 +5664,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5485 for (i = 0; i < ehdr.e_shnum; i++) { 5664 for (i = 0; i < ehdr.e_shnum; i++) {
5486 struct section *sec = &secs[i]; 5665 struct section *sec = &secs[i];
5487 if (sec->shdr.sh_type != SHT_STRTAB) { 5666 if (sec->shdr.sh_type != SHT_STRTAB) {
5488@@ -307,7 +340,7 @@ static void read_strtabs(FILE *fp) 5667@@ -332,7 +365,7 @@ static void read_strtabs(FILE *fp)
5489 5668
5490 static void read_symtabs(FILE *fp) 5669 static void read_symtabs(FILE *fp)
5491 { 5670 {
@@ -5494,7 +5673,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5494 for (i = 0; i < ehdr.e_shnum; i++) { 5673 for (i = 0; i < ehdr.e_shnum; i++) {
5495 struct section *sec = &secs[i]; 5674 struct section *sec = &secs[i];
5496 if (sec->shdr.sh_type != SHT_SYMTAB) { 5675 if (sec->shdr.sh_type != SHT_SYMTAB) {
5497@@ -340,7 +373,9 @@ static void read_symtabs(FILE *fp) 5676@@ -365,7 +398,9 @@ static void read_symtabs(FILE *fp)
5498 5677
5499 static void read_relocs(FILE *fp) 5678 static void read_relocs(FILE *fp)
5500 { 5679 {
@@ -5505,7 +5684,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5505 for (i = 0; i < ehdr.e_shnum; i++) { 5684 for (i = 0; i < ehdr.e_shnum; i++) {
5506 struct section *sec = &secs[i]; 5685 struct section *sec = &secs[i];
5507 if (sec->shdr.sh_type != SHT_REL) { 5686 if (sec->shdr.sh_type != SHT_REL) {
5508@@ -360,9 +395,18 @@ static void read_relocs(FILE *fp) 5687@@ -385,9 +420,18 @@ static void read_relocs(FILE *fp)
5509 die("Cannot read symbol table: %s\n", 5688 die("Cannot read symbol table: %s\n",
5510 strerror(errno)); 5689 strerror(errno));
5511 } 5690 }
@@ -5525,7 +5704,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5525 rel->r_info = elf32_to_cpu(rel->r_info); 5704 rel->r_info = elf32_to_cpu(rel->r_info);
5526 } 5705 }
5527 } 5706 }
5528@@ -371,14 +415,14 @@ static void read_relocs(FILE *fp) 5707@@ -396,14 +440,14 @@ static void read_relocs(FILE *fp)
5529 5708
5530 static void print_absolute_symbols(void) 5709 static void print_absolute_symbols(void)
5531 { 5710 {
@@ -5542,7 +5721,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5542 5721
5543 if (sec->shdr.sh_type != SHT_SYMTAB) { 5722 if (sec->shdr.sh_type != SHT_SYMTAB) {
5544 continue; 5723 continue;
5545@@ -406,14 +450,14 @@ static void print_absolute_symbols(void) 5724@@ -431,14 +475,14 @@ static void print_absolute_symbols(void)
5546 5725
5547 static void print_absolute_relocs(void) 5726 static void print_absolute_relocs(void)
5548 { 5727 {
@@ -5559,7 +5738,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5559 if (sec->shdr.sh_type != SHT_REL) { 5738 if (sec->shdr.sh_type != SHT_REL) {
5560 continue; 5739 continue;
5561 } 5740 }
5562@@ -474,13 +518,13 @@ static void print_absolute_relocs(void) 5741@@ -499,13 +543,13 @@ static void print_absolute_relocs(void)
5563 5742
5564 static void walk_relocs(void (*visit)(Elf32_Rel *rel, Elf32_Sym *sym)) 5743 static void walk_relocs(void (*visit)(Elf32_Rel *rel, Elf32_Sym *sym))
5565 { 5744 {
@@ -5575,12 +5754,12 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5575 struct section *sec = &secs[i]; 5754 struct section *sec = &secs[i];
5576 5755
5577 if (sec->shdr.sh_type != SHT_REL) { 5756 if (sec->shdr.sh_type != SHT_REL) {
5578@@ -504,6 +548,21 @@ static void walk_relocs(void (*visit)(El 5757@@ -530,6 +574,22 @@ static void walk_relocs(void (*visit)(El
5579 if (sym->st_shndx == SHN_ABS) { 5758 !is_rel_reloc(sym_name(sym_strtab, sym))) {
5580 continue; 5759 continue;
5581 } 5760 }
5582+ /* Don't relocate actual per-cpu variables, they are absolute indices, not addresses */ 5761+ /* Don't relocate actual per-cpu variables, they are absolute indices, not addresses */
5583+ if (!strcmp(sec_name(sym->st_shndx), ".data.percpu") && strcmp(sym_name(sym_strtab, sym), "__per_cpu_load")) 5762+ if (!strcmp(sec_name(sym->st_shndx), ".data..percpu") && strcmp(sym_name(sym_strtab, sym), "__per_cpu_load"))
5584+ continue; 5763+ continue;
5585+ 5764+
5586+#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_X86_32) 5765+#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_X86_32)
@@ -5594,10 +5773,11 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5594+ if (!strcmp(sec_name(sym->st_shndx), ".text") && strcmp(sym_name(sym_strtab, sym), "__LOAD_PHYSICAL_ADDR")) 5773+ if (!strcmp(sec_name(sym->st_shndx), ".text") && strcmp(sym_name(sym_strtab, sym), "__LOAD_PHYSICAL_ADDR"))
5595+ continue; 5774+ continue;
5596+#endif 5775+#endif
5597 if (r_type == R_386_NONE || r_type == R_386_PC32) { 5776+
5598 /* 5777 switch (r_type) {
5599 * NONE can be ignored and and PC relative 5778 case R_386_NONE:
5600@@ -541,7 +600,7 @@ static int cmp_relocs(const void *va, co 5779 case R_386_PC32:
5780@@ -571,7 +631,7 @@ static int cmp_relocs(const void *va, co
5601 5781
5602 static void emit_relocs(int as_text) 5782 static void emit_relocs(int as_text)
5603 { 5783 {
@@ -5606,7 +5786,7 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5606 /* Count how many relocations I have and allocate space for them. */ 5786 /* Count how many relocations I have and allocate space for them. */
5607 reloc_count = 0; 5787 reloc_count = 0;
5608 walk_relocs(count_reloc); 5788 walk_relocs(count_reloc);
5609@@ -634,6 +693,7 @@ int main(int argc, char **argv) 5789@@ -665,6 +725,7 @@ int main(int argc, char **argv)
5610 fname, strerror(errno)); 5790 fname, strerror(errno));
5611 } 5791 }
5612 read_ehdr(fp); 5792 read_ehdr(fp);
@@ -5614,9 +5794,9 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/compressed/relocs.c linux-2.6.32.24/arc
5614 read_shdrs(fp); 5794 read_shdrs(fp);
5615 read_strtabs(fp); 5795 read_strtabs(fp);
5616 read_symtabs(fp); 5796 read_symtabs(fp);
5617diff -urNp linux-2.6.32.24/arch/x86/boot/cpucheck.c linux-2.6.32.24/arch/x86/boot/cpucheck.c 5797diff -urNp linux-2.6.35.7/arch/x86/boot/cpucheck.c linux-2.6.35.7/arch/x86/boot/cpucheck.c
5618--- linux-2.6.32.24/arch/x86/boot/cpucheck.c 2010-08-13 16:24:37.000000000 -0400 5798--- linux-2.6.35.7/arch/x86/boot/cpucheck.c 2010-08-26 19:47:12.000000000 -0400
5619+++ linux-2.6.32.24/arch/x86/boot/cpucheck.c 2010-10-23 19:59:19.000000000 -0400 5799+++ linux-2.6.35.7/arch/x86/boot/cpucheck.c 2010-09-17 20:12:09.000000000 -0400
5620@@ -74,7 +74,7 @@ static int has_fpu(void) 5800@@ -74,7 +74,7 @@ static int has_fpu(void)
5621 u16 fcw = -1, fsw = -1; 5801 u16 fcw = -1, fsw = -1;
5622 u32 cr0; 5802 u32 cr0;
@@ -5712,9 +5892,9 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/cpucheck.c linux-2.6.32.24/arch/x86/boo
5712 5892
5713 err = check_flags(); 5893 err = check_flags();
5714 } 5894 }
5715diff -urNp linux-2.6.32.24/arch/x86/boot/header.S linux-2.6.32.24/arch/x86/boot/header.S 5895diff -urNp linux-2.6.35.7/arch/x86/boot/header.S linux-2.6.35.7/arch/x86/boot/header.S
5716--- linux-2.6.32.24/arch/x86/boot/header.S 2010-08-13 16:24:37.000000000 -0400 5896--- linux-2.6.35.7/arch/x86/boot/header.S 2010-08-26 19:47:12.000000000 -0400
5717+++ linux-2.6.32.24/arch/x86/boot/header.S 2010-10-23 19:59:19.000000000 -0400 5897+++ linux-2.6.35.7/arch/x86/boot/header.S 2010-09-17 20:12:09.000000000 -0400
5718@@ -224,7 +224,7 @@ setup_data: .quad 0 # 64-bit physical 5898@@ -224,7 +224,7 @@ setup_data: .quad 0 # 64-bit physical
5719 # single linked list of 5899 # single linked list of
5720 # struct setup_data 5900 # struct setup_data
@@ -5724,9 +5904,9 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/header.S linux-2.6.32.24/arch/x86/boot/
5724 5904
5725 #define ZO_INIT_SIZE (ZO__end - ZO_startup_32 + ZO_z_extract_offset) 5905 #define ZO_INIT_SIZE (ZO__end - ZO_startup_32 + ZO_z_extract_offset)
5726 #define VO_INIT_SIZE (VO__end - VO__text) 5906 #define VO_INIT_SIZE (VO__end - VO__text)
5727diff -urNp linux-2.6.32.24/arch/x86/boot/memory.c linux-2.6.32.24/arch/x86/boot/memory.c 5907diff -urNp linux-2.6.35.7/arch/x86/boot/memory.c linux-2.6.35.7/arch/x86/boot/memory.c
5728--- linux-2.6.32.24/arch/x86/boot/memory.c 2010-08-13 16:24:37.000000000 -0400 5908--- linux-2.6.35.7/arch/x86/boot/memory.c 2010-08-26 19:47:12.000000000 -0400
5729+++ linux-2.6.32.24/arch/x86/boot/memory.c 2010-10-23 19:59:19.000000000 -0400 5909+++ linux-2.6.35.7/arch/x86/boot/memory.c 2010-09-17 20:12:09.000000000 -0400
5730@@ -19,7 +19,7 @@ 5910@@ -19,7 +19,7 @@
5731 5911
5732 static int detect_memory_e820(void) 5912 static int detect_memory_e820(void)
@@ -5736,10 +5916,10 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/memory.c linux-2.6.32.24/arch/x86/boot/
5736 struct biosregs ireg, oreg; 5916 struct biosregs ireg, oreg;
5737 struct e820entry *desc = boot_params.e820_map; 5917 struct e820entry *desc = boot_params.e820_map;
5738 static struct e820entry buf; /* static so it is zeroed */ 5918 static struct e820entry buf; /* static so it is zeroed */
5739diff -urNp linux-2.6.32.24/arch/x86/boot/video.c linux-2.6.32.24/arch/x86/boot/video.c 5919diff -urNp linux-2.6.35.7/arch/x86/boot/video.c linux-2.6.35.7/arch/x86/boot/video.c
5740--- linux-2.6.32.24/arch/x86/boot/video.c 2010-08-13 16:24:37.000000000 -0400 5920--- linux-2.6.35.7/arch/x86/boot/video.c 2010-08-26 19:47:12.000000000 -0400
5741+++ linux-2.6.32.24/arch/x86/boot/video.c 2010-10-23 19:59:19.000000000 -0400 5921+++ linux-2.6.35.7/arch/x86/boot/video.c 2010-09-17 20:12:09.000000000 -0400
5742@@ -90,7 +90,7 @@ static void store_mode_params(void) 5922@@ -96,7 +96,7 @@ static void store_mode_params(void)
5743 static unsigned int get_entry(void) 5923 static unsigned int get_entry(void)
5744 { 5924 {
5745 char entry_buf[4]; 5925 char entry_buf[4];
@@ -5748,9 +5928,9 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/video.c linux-2.6.32.24/arch/x86/boot/v
5748 int key; 5928 int key;
5749 unsigned int v; 5929 unsigned int v;
5750 5930
5751diff -urNp linux-2.6.32.24/arch/x86/boot/video-vesa.c linux-2.6.32.24/arch/x86/boot/video-vesa.c 5931diff -urNp linux-2.6.35.7/arch/x86/boot/video-vesa.c linux-2.6.35.7/arch/x86/boot/video-vesa.c
5752--- linux-2.6.32.24/arch/x86/boot/video-vesa.c 2010-08-13 16:24:37.000000000 -0400 5932--- linux-2.6.35.7/arch/x86/boot/video-vesa.c 2010-08-26 19:47:12.000000000 -0400
5753+++ linux-2.6.32.24/arch/x86/boot/video-vesa.c 2010-10-23 19:59:19.000000000 -0400 5933+++ linux-2.6.35.7/arch/x86/boot/video-vesa.c 2010-09-17 20:12:09.000000000 -0400
5754@@ -200,6 +200,7 @@ static void vesa_store_pm_info(void) 5934@@ -200,6 +200,7 @@ static void vesa_store_pm_info(void)
5755 5935
5756 boot_params.screen_info.vesapm_seg = oreg.es; 5936 boot_params.screen_info.vesapm_seg = oreg.es;
@@ -5759,10 +5939,10 @@ diff -urNp linux-2.6.32.24/arch/x86/boot/video-vesa.c linux-2.6.32.24/arch/x86/b
5759 } 5939 }
5760 5940
5761 /* 5941 /*
5762diff -urNp linux-2.6.32.24/arch/x86/ia32/ia32_aout.c linux-2.6.32.24/arch/x86/ia32/ia32_aout.c 5942diff -urNp linux-2.6.35.7/arch/x86/ia32/ia32_aout.c linux-2.6.35.7/arch/x86/ia32/ia32_aout.c
5763--- linux-2.6.32.24/arch/x86/ia32/ia32_aout.c 2010-08-13 16:24:37.000000000 -0400 5943--- linux-2.6.35.7/arch/x86/ia32/ia32_aout.c 2010-08-26 19:47:12.000000000 -0400
5764+++ linux-2.6.32.24/arch/x86/ia32/ia32_aout.c 2010-10-23 19:59:19.000000000 -0400 5944+++ linux-2.6.35.7/arch/x86/ia32/ia32_aout.c 2010-09-23 20:32:33.000000000 -0400
5765@@ -169,6 +169,8 @@ static int aout_core_dump(long signr, st 5945@@ -168,6 +168,8 @@ static int aout_core_dump(long signr, st
5766 unsigned long dump_start, dump_size; 5946 unsigned long dump_start, dump_size;
5767 struct user32 dump; 5947 struct user32 dump;
5768 5948
@@ -5771,7 +5951,7 @@ diff -urNp linux-2.6.32.24/arch/x86/ia32/ia32_aout.c linux-2.6.32.24/arch/x86/ia
5771 fs = get_fs(); 5951 fs = get_fs();
5772 set_fs(KERNEL_DS); 5952 set_fs(KERNEL_DS);
5773 has_dumped = 1; 5953 has_dumped = 1;
5774@@ -218,12 +220,6 @@ static int aout_core_dump(long signr, st 5954@@ -217,12 +219,6 @@ static int aout_core_dump(long signr, st
5775 dump_size = dump.u_ssize << PAGE_SHIFT; 5955 dump_size = dump.u_ssize << PAGE_SHIFT;
5776 DUMP_WRITE(dump_start, dump_size); 5956 DUMP_WRITE(dump_start, dump_size);
5777 } 5957 }
@@ -5784,9 +5964,9 @@ diff -urNp linux-2.6.32.24/arch/x86/ia32/ia32_aout.c linux-2.6.32.24/arch/x86/ia
5784 end_coredump: 5964 end_coredump:
5785 set_fs(fs); 5965 set_fs(fs);
5786 return has_dumped; 5966 return has_dumped;
5787diff -urNp linux-2.6.32.24/arch/x86/ia32/ia32entry.S linux-2.6.32.24/arch/x86/ia32/ia32entry.S 5967diff -urNp linux-2.6.35.7/arch/x86/ia32/ia32entry.S linux-2.6.35.7/arch/x86/ia32/ia32entry.S
5788--- linux-2.6.32.24/arch/x86/ia32/ia32entry.S 2010-09-20 17:26:42.000000000 -0400 5968--- linux-2.6.35.7/arch/x86/ia32/ia32entry.S 2010-09-20 17:33:09.000000000 -0400
5789+++ linux-2.6.32.24/arch/x86/ia32/ia32entry.S 2010-10-23 19:59:19.000000000 -0400 5969+++ linux-2.6.35.7/arch/x86/ia32/ia32entry.S 2010-09-17 20:12:37.000000000 -0400
5790@@ -13,6 +13,7 @@ 5970@@ -13,6 +13,7 @@
5791 #include <asm/thread_info.h> 5971 #include <asm/thread_info.h>
5792 #include <asm/segment.h> 5972 #include <asm/segment.h>
@@ -5881,9 +6061,9 @@ diff -urNp linux-2.6.32.24/arch/x86/ia32/ia32entry.S linux-2.6.32.24/arch/x86/ia
5881 /* 6061 /*
5882 * No need to follow this irqs on/off section: the syscall 6062 * No need to follow this irqs on/off section: the syscall
5883 * disabled irqs and here we enable it straight after entry: 6063 * disabled irqs and here we enable it straight after entry:
5884diff -urNp linux-2.6.32.24/arch/x86/ia32/ia32_signal.c linux-2.6.32.24/arch/x86/ia32/ia32_signal.c 6064diff -urNp linux-2.6.35.7/arch/x86/ia32/ia32_signal.c linux-2.6.35.7/arch/x86/ia32/ia32_signal.c
5885--- linux-2.6.32.24/arch/x86/ia32/ia32_signal.c 2010-08-13 16:24:37.000000000 -0400 6065--- linux-2.6.35.7/arch/x86/ia32/ia32_signal.c 2010-08-26 19:47:12.000000000 -0400
5886+++ linux-2.6.32.24/arch/x86/ia32/ia32_signal.c 2010-10-23 19:59:24.000000000 -0400 6066+++ linux-2.6.35.7/arch/x86/ia32/ia32_signal.c 2010-10-11 22:41:44.000000000 -0400
5887@@ -403,7 +403,7 @@ static void __user *get_sigframe(struct 6067@@ -403,7 +403,7 @@ static void __user *get_sigframe(struct
5888 sp -= frame_size; 6068 sp -= frame_size;
5889 /* Align the stack pointer according to the i386 ABI, 6069 /* Align the stack pointer according to the i386 ABI,
@@ -5902,35 +6082,35 @@ diff -urNp linux-2.6.32.24/arch/x86/ia32/ia32_signal.c linux-2.6.32.24/arch/x86/
5902 }; 6082 };
5903 6083
5904 frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate); 6084 frame = get_sigframe(ka, regs, sizeof(*frame), &fpstate);
5905@@ -533,9 +533,11 @@ int ia32_setup_rt_frame(int sig, struct 6085@@ -534,8 +534,11 @@ int ia32_setup_rt_frame(int sig, struct
5906
5907 if (ka->sa.sa_flags & SA_RESTORER) 6086 if (ka->sa.sa_flags & SA_RESTORER)
5908 restorer = ka->sa.sa_restorer; 6087 restorer = ka->sa.sa_restorer;
5909+ else if (current->mm->context.vdso)
5910+ /* Return stub is in 32bit vsyscall page */
5911+ restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
5912 else 6088 else
5913- restorer = VDSO32_SYMBOL(current->mm->context.vdso, 6089- restorer = VDSO32_SYMBOL(current->mm->context.vdso,
5914- rt_sigreturn); 6090- rt_sigreturn);
5915+ restorer = &frame->retcode; 6091+ /* Return stub is in 32bit vsyscall page */
6092+ if (current->mm->context.vdso)
6093+ restorer = VDSO32_SYMBOL(current->mm->context.vdso, rt_sigreturn);
6094+ else
6095+ restorer = &frame->retcode;
5916 put_user_ex(ptr_to_compat(restorer), &frame->pretcode); 6096 put_user_ex(ptr_to_compat(restorer), &frame->pretcode);
5917 6097
5918 /* 6098 /*
5919diff -urNp linux-2.6.32.24/arch/x86/include/asm/alternative.h linux-2.6.32.24/arch/x86/include/asm/alternative.h 6099diff -urNp linux-2.6.35.7/arch/x86/include/asm/alternative.h linux-2.6.35.7/arch/x86/include/asm/alternative.h
5920--- linux-2.6.32.24/arch/x86/include/asm/alternative.h 2010-08-13 16:24:37.000000000 -0400 6100--- linux-2.6.35.7/arch/x86/include/asm/alternative.h 2010-08-26 19:47:12.000000000 -0400
5921+++ linux-2.6.32.24/arch/x86/include/asm/alternative.h 2010-10-23 19:59:19.000000000 -0400 6101+++ linux-2.6.35.7/arch/x86/include/asm/alternative.h 2010-09-17 20:12:09.000000000 -0400
5922@@ -85,7 +85,7 @@ static inline void alternatives_smp_swit 6102@@ -91,7 +91,7 @@ static inline int alternatives_text_rese
5923 " .byte 662b-661b\n" /* sourcelen */ \
5924 " .byte 664f-663f\n" /* replacementlen */ \ 6103 " .byte 664f-663f\n" /* replacementlen */ \
6104 " .byte 0xff + (664f-663f) - (662b-661b)\n" /* rlen <= slen */ \
5925 ".previous\n" \ 6105 ".previous\n" \
5926- ".section .altinstr_replacement, \"ax\"\n" \ 6106- ".section .altinstr_replacement, \"ax\"\n" \
5927+ ".section .altinstr_replacement, \"a\"\n" \ 6107+ ".section .altinstr_replacement, \"a\"\n" \
5928 "663:\n\t" newinstr "\n664:\n" /* replacement */ \ 6108 "663:\n\t" newinstr "\n664:\n" /* replacement */ \
5929 ".previous" 6109 ".previous"
5930 6110
5931diff -urNp linux-2.6.32.24/arch/x86/include/asm/apm.h linux-2.6.32.24/arch/x86/include/asm/apm.h 6111diff -urNp linux-2.6.35.7/arch/x86/include/asm/apm.h linux-2.6.35.7/arch/x86/include/asm/apm.h
5932--- linux-2.6.32.24/arch/x86/include/asm/apm.h 2010-08-13 16:24:37.000000000 -0400 6112--- linux-2.6.35.7/arch/x86/include/asm/apm.h 2010-08-26 19:47:12.000000000 -0400
5933+++ linux-2.6.32.24/arch/x86/include/asm/apm.h 2010-10-23 19:59:19.000000000 -0400 6113+++ linux-2.6.35.7/arch/x86/include/asm/apm.h 2010-09-17 20:12:09.000000000 -0400
5934@@ -34,7 +34,7 @@ static inline void apm_bios_call_asm(u32 6114@@ -34,7 +34,7 @@ static inline void apm_bios_call_asm(u32
5935 __asm__ __volatile__(APM_DO_ZERO_SEGS 6115 __asm__ __volatile__(APM_DO_ZERO_SEGS
5936 "pushl %%edi\n\t" 6116 "pushl %%edi\n\t"
@@ -5949,323 +6129,327 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/apm.h linux-2.6.32.24/arch/x86/i
5949 "setc %%bl\n\t" 6129 "setc %%bl\n\t"
5950 "popl %%ebp\n\t" 6130 "popl %%ebp\n\t"
5951 "popl %%edi\n\t" 6131 "popl %%edi\n\t"
5952diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_32.h linux-2.6.32.24/arch/x86/include/asm/atomic_32.h 6132diff -urNp linux-2.6.35.7/arch/x86/include/asm/asm.h linux-2.6.35.7/arch/x86/include/asm/asm.h
5953--- linux-2.6.32.24/arch/x86/include/asm/atomic_32.h 2010-08-13 16:24:37.000000000 -0400 6133--- linux-2.6.35.7/arch/x86/include/asm/asm.h 2010-08-26 19:47:12.000000000 -0400
5954+++ linux-2.6.32.24/arch/x86/include/asm/atomic_32.h 2010-10-23 19:59:19.000000000 -0400 6134+++ linux-2.6.35.7/arch/x86/include/asm/asm.h 2010-09-17 20:12:09.000000000 -0400
5955@@ -25,6 +25,17 @@ static inline int atomic_read(const atom 6135@@ -37,6 +37,12 @@
6136 #define _ASM_SI __ASM_REG(si)
6137 #define _ASM_DI __ASM_REG(di)
6138
6139+#ifdef CONFIG_X86_32
6140+#define _ASM_INTO "into"
6141+#else
6142+#define _ASM_INTO "int $4"
6143+#endif
6144+
6145 /* Exception table entry */
6146 #ifdef __ASSEMBLY__
6147 # define _ASM_EXTABLE(from,to) \
6148diff -urNp linux-2.6.35.7/arch/x86/include/asm/atomic64_32.h linux-2.6.35.7/arch/x86/include/asm/atomic64_32.h
6149--- linux-2.6.35.7/arch/x86/include/asm/atomic64_32.h 2010-08-26 19:47:12.000000000 -0400
6150+++ linux-2.6.35.7/arch/x86/include/asm/atomic64_32.h 2010-09-17 20:12:09.000000000 -0400
6151@@ -12,6 +12,14 @@ typedef struct {
6152 u64 __aligned(8) counter;
6153 } atomic64_t;
6154
6155+#ifdef CONFIG_PAX_REFCOUNT
6156+typedef struct {
6157+ u64 __aligned(8) counter;
6158+} atomic64_unchecked_t;
6159+#else
6160+typedef atomic64_t atomic64_unchecked_t;
6161+#endif
6162+
6163 #define ATOMIC64_INIT(val) { (val) }
6164
6165 #ifdef CONFIG_X86_CMPXCHG64
6166diff -urNp linux-2.6.35.7/arch/x86/include/asm/atomic64_64.h linux-2.6.35.7/arch/x86/include/asm/atomic64_64.h
6167--- linux-2.6.35.7/arch/x86/include/asm/atomic64_64.h 2010-08-26 19:47:12.000000000 -0400
6168+++ linux-2.6.35.7/arch/x86/include/asm/atomic64_64.h 2010-09-26 22:02:10.000000000 -0400
6169@@ -22,6 +22,18 @@ static inline long atomic64_read(const a
5956 } 6170 }
5957 6171
5958 /** 6172 /**
5959+ * atomic_read_unchecked - read atomic variable 6173+ * atomic64_read_unchecked - read atomic64 variable
5960+ * @v: pointer of type atomic_unchecked_t 6174+ * @v: pointer of type atomic64_unchecked_t
5961+ * 6175+ *
5962+ * Atomically reads the value of @v. 6176+ * Atomically reads the value of @v.
6177+ * Doesn't imply a read memory barrier.
5963+ */ 6178+ */
5964+static inline int atomic_read_unchecked(const atomic_unchecked_t *v) 6179+static inline long atomic64_read_unchecked(const atomic64_unchecked_t *v)
5965+{ 6180+{
5966+ return v->counter; 6181+ return v->counter;
5967+} 6182+}
5968+ 6183+
5969+/** 6184+/**
5970 * atomic_set - set atomic variable 6185 * atomic64_set - set atomic64 variable
5971 * @v: pointer of type atomic_t 6186 * @v: pointer to type atomic64_t
5972 * @i: required value 6187 * @i: required value
5973@@ -37,6 +48,18 @@ static inline void atomic_set(atomic_t * 6188@@ -34,6 +46,18 @@ static inline void atomic64_set(atomic64
5974 } 6189 }
5975 6190
5976 /** 6191 /**
5977+ * atomic_set_unchecked - set atomic variable 6192+ * atomic64_set_unchecked - set atomic64 variable
5978+ * @v: pointer of type atomic_unchecked_t 6193+ * @v: pointer to type atomic64_unchecked_t
5979+ * @i: required value 6194+ * @i: required value
5980+ * 6195+ *
5981+ * Atomically sets the value of @v to @i. 6196+ * Atomically sets the value of @v to @i.
5982+ */ 6197+ */
5983+static inline void atomic_set_unchecked(atomic_unchecked_t *v, int i) 6198+static inline void atomic64_set_unchecked(atomic64_unchecked_t *v, long i)
5984+{ 6199+{
5985+ v->counter = i; 6200+ v->counter = i;
5986+} 6201+}
5987+ 6202+
5988+/** 6203+/**
5989 * atomic_add - add integer to atomic variable 6204 * atomic64_add - add integer to atomic64 variable
5990 * @i: integer value to add 6205 * @i: integer value to add
5991 * @v: pointer of type atomic_t 6206 * @v: pointer to type atomic64_t
5992@@ -45,7 +68,29 @@ static inline void atomic_set(atomic_t * 6207@@ -42,6 +66,28 @@ static inline void atomic64_set(atomic64
5993 */ 6208 */
5994 static inline void atomic_add(int i, atomic_t *v) 6209 static inline void atomic64_add(long i, atomic64_t *v)
5995 { 6210 {
5996- asm volatile(LOCK_PREFIX "addl %1,%0" 6211+ asm volatile(LOCK_PREFIX "addq %1,%0\n"
5997+ asm volatile(LOCK_PREFIX "addl %1,%0\n"
5998+ 6212+
5999+#ifdef CONFIG_PAX_REFCOUNT 6213+#ifdef CONFIG_PAX_REFCOUNT
6000+ "jno 0f\n" 6214+ "jno 0f\n"
6001+ LOCK_PREFIX "subl %1,%0\n" 6215+ LOCK_PREFIX "subq %1,%0\n"
6002+ "into\n0:\n" 6216+ "int $4\n0:\n"
6003+ _ASM_EXTABLE(0b, 0b) 6217+ _ASM_EXTABLE(0b, 0b)
6004+#endif 6218+#endif
6005+ 6219+
6006+ : "+m" (v->counter) 6220+ : "=m" (v->counter)
6007+ : "ir" (i)); 6221+ : "er" (i), "m" (v->counter));
6008+} 6222+}
6009+ 6223+
6010+/** 6224+/**
6011+ * atomic_add_unchecked - add integer to atomic variable 6225+ * atomic64_add_unchecked - add integer to atomic64 variable
6012+ * @i: integer value to add 6226+ * @i: integer value to add
6013+ * @v: pointer of type atomic_unchecked_t 6227+ * @v: pointer to type atomic64_unchecked_t
6014+ * 6228+ *
6015+ * Atomically adds @i to @v. 6229+ * Atomically adds @i to @v.
6016+ */ 6230+ */
6017+static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v) 6231+static inline void atomic64_add_unchecked(long i, atomic64_unchecked_t *v)
6018+{ 6232+{
6019+ asm volatile(LOCK_PREFIX "addl %1,%0\n" 6233 asm volatile(LOCK_PREFIX "addq %1,%0"
6020 : "+m" (v->counter) 6234 : "=m" (v->counter)
6021 : "ir" (i)); 6235 : "er" (i), "m" (v->counter));
6022 } 6236@@ -56,7 +102,15 @@ static inline void atomic64_add(long i,
6023@@ -59,7 +104,29 @@ static inline void atomic_add(int i, ato
6024 */ 6237 */
6025 static inline void atomic_sub(int i, atomic_t *v) 6238 static inline void atomic64_sub(long i, atomic64_t *v)
6026 { 6239 {
6027- asm volatile(LOCK_PREFIX "subl %1,%0" 6240- asm volatile(LOCK_PREFIX "subq %1,%0"
6028+ asm volatile(LOCK_PREFIX "subl %1,%0\n" 6241+ asm volatile(LOCK_PREFIX "subq %1,%0\n"
6029+ 6242+
6030+#ifdef CONFIG_PAX_REFCOUNT 6243+#ifdef CONFIG_PAX_REFCOUNT
6031+ "jno 0f\n" 6244+ "jno 0f\n"
6032+ LOCK_PREFIX "addl %1,%0\n" 6245+ LOCK_PREFIX "addq %1,%0\n"
6033+ "into\n0:\n" 6246+ "int $4\n0:\n"
6034+ _ASM_EXTABLE(0b, 0b) 6247+ _ASM_EXTABLE(0b, 0b)
6035+#endif 6248+#endif
6036+ 6249+
6037+ : "+m" (v->counter) 6250 : "=m" (v->counter)
6038+ : "ir" (i)); 6251 : "er" (i), "m" (v->counter));
6039+}
6040+
6041+/**
6042+ * atomic_sub_unchecked - subtract integer from atomic variable
6043+ * @i: integer value to subtract
6044+ * @v: pointer of type atomic_t
6045+ *
6046+ * Atomically subtracts @i from @v.
6047+ */
6048+static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
6049+{
6050+ asm volatile(LOCK_PREFIX "subl %1,%0\n"
6051 : "+m" (v->counter)
6052 : "ir" (i));
6053 } 6252 }
6054@@ -77,7 +144,16 @@ static inline int atomic_sub_and_test(in 6253@@ -74,7 +128,16 @@ static inline int atomic64_sub_and_test(
6055 { 6254 {
6056 unsigned char c; 6255 unsigned char c;
6057 6256
6058- asm volatile(LOCK_PREFIX "subl %2,%0; sete %1" 6257- asm volatile(LOCK_PREFIX "subq %2,%0; sete %1"
6059+ asm volatile(LOCK_PREFIX "subl %2,%0\n" 6258+ asm volatile(LOCK_PREFIX "subq %2,%0\n"
6060+ 6259+
6061+#ifdef CONFIG_PAX_REFCOUNT 6260+#ifdef CONFIG_PAX_REFCOUNT
6062+ "jno 0f\n" 6261+ "jno 0f\n"
6063+ LOCK_PREFIX "addl %2,%0\n" 6262+ LOCK_PREFIX "addq %2,%0\n"
6064+ "into\n0:\n" 6263+ "int $4\n0:\n"
6065+ _ASM_EXTABLE(0b, 0b) 6264+ _ASM_EXTABLE(0b, 0b)
6066+#endif 6265+#endif
6067+ 6266+
6068+ "sete %1\n" 6267+ "sete %1\n"
6069 : "+m" (v->counter), "=qm" (c) 6268 : "=m" (v->counter), "=qm" (c)
6070 : "ir" (i) : "memory"); 6269 : "er" (i), "m" (v->counter) : "memory");
6071 return c; 6270 return c;
6072@@ -91,7 +167,30 @@ static inline int atomic_sub_and_test(in 6271@@ -88,6 +151,27 @@ static inline int atomic64_sub_and_test(
6073 */ 6272 */
6074 static inline void atomic_inc(atomic_t *v) 6273 static inline void atomic64_inc(atomic64_t *v)
6075 { 6274 {
6076- asm volatile(LOCK_PREFIX "incl %0" 6275+ asm volatile(LOCK_PREFIX "incq %0\n"
6077+ asm volatile(LOCK_PREFIX "incl %0\n"
6078+ 6276+
6079+#ifdef CONFIG_PAX_REFCOUNT 6277+#ifdef CONFIG_PAX_REFCOUNT
6080+ "into\n0:\n" 6278+ "jno 0f\n"
6081+ ".pushsection .fixup,\"ax\"\n" 6279+ LOCK_PREFIX "decq %0\n"
6082+ "1:\n" 6280+ "int $4\n0:\n"
6083+ LOCK_PREFIX "decl %0\n" 6281+ _ASM_EXTABLE(0b, 0b)
6084+ "jmp 0b\n"
6085+ ".popsection\n"
6086+ _ASM_EXTABLE(0b, 1b)
6087+#endif 6282+#endif
6088+ 6283+
6089+ : "+m" (v->counter)); 6284+ : "=m" (v->counter)
6285+ : "m" (v->counter));
6090+} 6286+}
6091+ 6287+
6092+/** 6288+/**
6093+ * atomic_inc_unchecked - increment atomic variable 6289+ * atomic64_inc_unchecked - increment atomic64 variable
6094+ * @v: pointer of type atomic_unchecked_t 6290+ * @v: pointer to type atomic64_unchecked_t
6095+ * 6291+ *
6096+ * Atomically increments @v by 1. 6292+ * Atomically increments @v by 1.
6097+ */ 6293+ */
6098+static inline void atomic_inc_unchecked(atomic_unchecked_t *v) 6294+static inline void atomic64_inc_unchecked(atomic64_unchecked_t *v)
6099+{ 6295+{
6100+ asm volatile(LOCK_PREFIX "incl %0\n" 6296 asm volatile(LOCK_PREFIX "incq %0"
6101 : "+m" (v->counter)); 6297 : "=m" (v->counter)
6102 } 6298 : "m" (v->counter));
6103 6299@@ -101,7 +185,28 @@ static inline void atomic64_inc(atomic64
6104@@ -103,7 +202,30 @@ static inline void atomic_inc(atomic_t *
6105 */ 6300 */
6106 static inline void atomic_dec(atomic_t *v) 6301 static inline void atomic64_dec(atomic64_t *v)
6107 { 6302 {
6108- asm volatile(LOCK_PREFIX "decl %0" 6303- asm volatile(LOCK_PREFIX "decq %0"
6109+ asm volatile(LOCK_PREFIX "decl %0\n" 6304+ asm volatile(LOCK_PREFIX "decq %0\n"
6110+ 6305+
6111+#ifdef CONFIG_PAX_REFCOUNT 6306+#ifdef CONFIG_PAX_REFCOUNT
6112+ "into\n0:\n" 6307+ "jno 0f\n"
6113+ ".pushsection .fixup,\"ax\"\n" 6308+ LOCK_PREFIX "incq %0\n"
6114+ "1: \n" 6309+ "int $4\n0:\n"
6115+ LOCK_PREFIX "incl %0\n" 6310+ _ASM_EXTABLE(0b, 0b)
6116+ "jmp 0b\n"
6117+ ".popsection\n"
6118+ _ASM_EXTABLE(0b, 1b)
6119+#endif 6311+#endif
6120+ 6312+
6121+ : "+m" (v->counter)); 6313+ : "=m" (v->counter)
6314+ : "m" (v->counter));
6122+} 6315+}
6123+ 6316+
6124+/** 6317+/**
6125+ * atomic_dec_unchecked - decrement atomic variable 6318+ * atomic64_dec_unchecked - decrement atomic64 variable
6126+ * @v: pointer of type atomic_t 6319+ * @v: pointer to type atomic64_t
6127+ * 6320+ *
6128+ * Atomically decrements @v by 1. 6321+ * Atomically decrements @v by 1.
6129+ */ 6322+ */
6130+static inline void atomic_dec_unchecked(atomic_unchecked_t *v) 6323+static inline void atomic64_dec_unchecked(atomic64_unchecked_t *v)
6131+{ 6324+{
6132+ asm volatile(LOCK_PREFIX "decl %0\n" 6325+ asm volatile(LOCK_PREFIX "decq %0\n"
6133 : "+m" (v->counter)); 6326 : "=m" (v->counter)
6327 : "m" (v->counter));
6134 } 6328 }
6135 6329@@ -118,7 +223,16 @@ static inline int atomic64_dec_and_test(
6136@@ -119,7 +241,19 @@ static inline int atomic_dec_and_test(at
6137 { 6330 {
6138 unsigned char c; 6331 unsigned char c;
6139 6332
6140- asm volatile(LOCK_PREFIX "decl %0; sete %1" 6333- asm volatile(LOCK_PREFIX "decq %0; sete %1"
6141+ asm volatile(LOCK_PREFIX "decl %0\n" 6334+ asm volatile(LOCK_PREFIX "decq %0\n"
6142+ 6335+
6143+#ifdef CONFIG_PAX_REFCOUNT 6336+#ifdef CONFIG_PAX_REFCOUNT
6144+ "into\n0:\n" 6337+ "jno 0f\n"
6145+ ".pushsection .fixup,\"ax\"\n" 6338+ LOCK_PREFIX "incq %0\n"
6146+ "1: \n" 6339+ "int $4\n0:\n"
6147+ LOCK_PREFIX "incl %0\n" 6340+ _ASM_EXTABLE(0b, 0b)
6148+ "jmp 0b\n"
6149+ ".popsection\n"
6150+ _ASM_EXTABLE(0b, 1b)
6151+#endif 6341+#endif
6152+ 6342+
6153+ "sete %1\n" 6343+ "sete %1\n"
6154 : "+m" (v->counter), "=qm" (c) 6344 : "=m" (v->counter), "=qm" (c)
6155 : : "memory"); 6345 : "m" (v->counter) : "memory");
6156 return c != 0; 6346 return c != 0;
6157@@ -137,7 +271,19 @@ static inline int atomic_inc_and_test(at 6347@@ -136,7 +250,16 @@ static inline int atomic64_inc_and_test(
6158 { 6348 {
6159 unsigned char c; 6349 unsigned char c;
6160 6350
6161- asm volatile(LOCK_PREFIX "incl %0; sete %1" 6351- asm volatile(LOCK_PREFIX "incq %0; sete %1"
6162+ asm volatile(LOCK_PREFIX "incl %0\n" 6352+ asm volatile(LOCK_PREFIX "incq %0\n"
6163+ 6353+
6164+#ifdef CONFIG_PAX_REFCOUNT 6354+#ifdef CONFIG_PAX_REFCOUNT
6165+ "into\n0:\n" 6355+ "jno 0f\n"
6166+ ".pushsection .fixup,\"ax\"\n" 6356+ LOCK_PREFIX "decq %0\n"
6167+ "1: \n" 6357+ "int $4\n0:\n"
6168+ LOCK_PREFIX "decl %0\n" 6358+ _ASM_EXTABLE(0b, 0b)
6169+ "jmp 0b\n"
6170+ ".popsection\n"
6171+ _ASM_EXTABLE(0b, 1b)
6172+#endif 6359+#endif
6173+ 6360+
6174+ "sete %1\n" 6361+ "sete %1\n"
6175 : "+m" (v->counter), "=qm" (c) 6362 : "=m" (v->counter), "=qm" (c)
6176 : : "memory"); 6363 : "m" (v->counter) : "memory");
6177 return c != 0; 6364 return c != 0;
6178@@ -156,7 +302,16 @@ static inline int atomic_add_negative(in 6365@@ -155,7 +278,16 @@ static inline int atomic64_add_negative(
6179 { 6366 {
6180 unsigned char c; 6367 unsigned char c;
6181 6368
6182- asm volatile(LOCK_PREFIX "addl %2,%0; sets %1" 6369- asm volatile(LOCK_PREFIX "addq %2,%0; sets %1"
6183+ asm volatile(LOCK_PREFIX "addl %2,%0\n" 6370+ asm volatile(LOCK_PREFIX "addq %2,%0\n"
6184+ 6371+
6185+#ifdef CONFIG_PAX_REFCOUNT 6372+#ifdef CONFIG_PAX_REFCOUNT
6186+ "jno 0f\n" 6373+ "jno 0f\n"
6187+ LOCK_PREFIX "subl %2,%0\n" 6374+ LOCK_PREFIX "subq %2,%0\n"
6188+ "into\n0:\n" 6375+ "int $4\n0:\n"
6189+ _ASM_EXTABLE(0b, 0b) 6376+ _ASM_EXTABLE(0b, 0b)
6190+#endif 6377+#endif
6191+ 6378+
6192+ "sets %1\n" 6379+ "sets %1\n"
6193 : "+m" (v->counter), "=qm" (c) 6380 : "=m" (v->counter), "=qm" (c)
6194 : "ir" (i) : "memory"); 6381 : "er" (i), "m" (v->counter) : "memory");
6195 return c; 6382 return c;
6196@@ -179,6 +334,46 @@ static inline int atomic_add_return(int 6383@@ -171,7 +303,31 @@ static inline int atomic64_add_negative(
6197 #endif 6384 static inline long atomic64_add_return(long i, atomic64_t *v)
6198 /* Modern 486+ processor */ 6385 {
6199 __i = i; 6386 long __i = i;
6200+ asm volatile(LOCK_PREFIX "xaddl %0, %1\n" 6387- asm volatile(LOCK_PREFIX "xaddq %0, %1;"
6388+ asm volatile(LOCK_PREFIX "xaddq %0, %1\n"
6201+ 6389+
6202+#ifdef CONFIG_PAX_REFCOUNT 6390+#ifdef CONFIG_PAX_REFCOUNT
6203+ "jno 0f\n" 6391+ "jno 0f\n"
6204+ "movl %0, %1\n" 6392+ "movq %0, %1\n"
6205+ "into\n0:\n" 6393+ "int $4\n0:\n"
6206+ _ASM_EXTABLE(0b, 0b) 6394+ _ASM_EXTABLE(0b, 0b)
6207+#endif 6395+#endif
6208+ 6396+
6209+ : "+r" (i), "+m" (v->counter) 6397+ : "+r" (i), "+m" (v->counter)
6210+ : : "memory"); 6398+ : : "memory");
6211+ return i + __i; 6399+ return i + __i;
6212+
6213+#ifdef CONFIG_M386
6214+no_xadd: /* Legacy 386 processor */
6215+ local_irq_save(flags);
6216+ __i = atomic_read(v);
6217+ atomic_set(v, i + __i);
6218+ local_irq_restore(flags);
6219+ return i + __i;
6220+#endif
6221+} 6400+}
6222+ 6401+
6223+/** 6402+/**
6224+ * atomic_add_return_unchecked - add integer and return 6403+ * atomic64_add_return_unchecked - add and return
6225+ * @v: pointer of type atomic_unchecked_t
6226+ * @i: integer value to add 6404+ * @i: integer value to add
6405+ * @v: pointer to type atomic64_unchecked_t
6227+ * 6406+ *
6228+ * Atomically adds @i to @v and returns @i + @v 6407+ * Atomically adds @i to @v and returns @i + @v
6229+ */ 6408+ */
6230+static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v) 6409+static inline long atomic64_add_return_unchecked(long i, atomic64_unchecked_t *v)
6231+{ 6410+{
6232+ int __i; 6411+ long __i = i;
6233+#ifdef CONFIG_M386 6412+ asm volatile(LOCK_PREFIX "xaddq %0, %1"
6234+ unsigned long flags;
6235+ if (unlikely(boot_cpu_data.x86 <= 3))
6236+ goto no_xadd;
6237+#endif
6238+ /* Modern 486+ processor */
6239+ __i = i;
6240 asm volatile(LOCK_PREFIX "xaddl %0, %1"
6241 : "+r" (i), "+m" (v->counter) 6413 : "+r" (i), "+m" (v->counter)
6242 : : "memory"); 6414 : : "memory");
6243@@ -227,22 +422,39 @@ static inline int atomic_xchg(atomic_t * 6415 return i + __i;
6416@@ -183,6 +339,10 @@ static inline long atomic64_sub_return(l
6417 }
6418
6419 #define atomic64_inc_return(v) (atomic64_add_return(1, (v)))
6420+static inline long atomic64_inc_return_unchecked(atomic64_unchecked_t *v)
6421+{
6422+ return atomic64_add_return_unchecked(1, v);
6423+}
6424 #define atomic64_dec_return(v) (atomic64_sub_return(1, (v)))
6425
6426 static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new)
6427@@ -206,17 +366,30 @@ static inline long atomic64_xchg(atomic6
6244 */ 6428 */
6245 static inline int atomic_add_unless(atomic_t *v, int a, int u) 6429 static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
6246 { 6430 {
6247- int c, old; 6431- long c, old;
6248+ int c, old, new; 6432+ long c, old, new;
6249 c = atomic_read(v); 6433 c = atomic64_read(v);
6250 for (;;) { 6434 for (;;) {
6251- if (unlikely(c == (u))) 6435- if (unlikely(c == (u)))
6252+ if (unlikely(c == u)) 6436+ if (unlikely(c == u))
6253 break; 6437 break;
6254- old = atomic_cmpxchg((v), c, c + (a)); 6438- old = atomic64_cmpxchg((v), c, c + (a));
6255+ 6439+
6256+ asm volatile("addl %2,%0\n" 6440+ asm volatile("add %2,%0\n"
6257+ 6441+
6258+#ifdef CONFIG_PAX_REFCOUNT 6442+#ifdef CONFIG_PAX_REFCOUNT
6259+ "jno 0f\n" 6443+ "jno 0f\n"
6260+ "subl %2,%0\n" 6444+ "sub %2,%0\n"
6261+ "into\n0:\n" 6445+ "int $4\n0:\n"
6262+ _ASM_EXTABLE(0b, 0b) 6446+ _ASM_EXTABLE(0b, 0b)
6263+#endif 6447+#endif
6264+ 6448+
6265+ : "=r" (new) 6449+ : "=r" (new)
6266+ : "0" (c), "ir" (a)); 6450+ : "0" (c), "ir" (a));
6267+ 6451+
6268+ old = atomic_cmpxchg(v, c, new); 6452+ old = atomic64_cmpxchg(v, c, new);
6269 if (likely(old == c)) 6453 if (likely(old == c))
6270 break; 6454 break;
6271 c = old; 6455 c = old;
@@ -6274,35 +6458,11 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_32.h linux-2.6.32.24/arch
6274+ return c != u; 6458+ return c != u;
6275 } 6459 }
6276 6460
6277 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 6461 #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
6278 6462diff -urNp linux-2.6.35.7/arch/x86/include/asm/atomic.h linux-2.6.35.7/arch/x86/include/asm/atomic.h
6279 #define atomic_inc_return(v) (atomic_add_return(1, v)) 6463--- linux-2.6.35.7/arch/x86/include/asm/atomic.h 2010-08-26 19:47:12.000000000 -0400
6280+static inline int atomic_inc_return_unchecked(atomic_unchecked_t *v) 6464+++ linux-2.6.35.7/arch/x86/include/asm/atomic.h 2010-09-26 22:02:10.000000000 -0400
6281+{ 6465@@ -26,6 +26,17 @@ static inline int atomic_read(const atom
6282+ return atomic_add_return_unchecked(1, v);
6283+}
6284 #define atomic_dec_return(v) (atomic_sub_return(1, v))
6285
6286 /* These are x86-specific, used by some header files */
6287@@ -266,6 +478,14 @@ typedef struct {
6288 u64 __aligned(8) counter;
6289 } atomic64_t;
6290
6291+#ifdef CONFIG_PAX_REFCOUNT
6292+typedef struct {
6293+ u64 __aligned(8) counter;
6294+} atomic64_unchecked_t;
6295+#else
6296+typedef atomic64_t atomic64_unchecked_t;
6297+#endif
6298+
6299 #define ATOMIC64_INIT(val) { (val) }
6300
6301 extern u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old_val, u64 new_val);
6302diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch/x86/include/asm/atomic_64.h
6303--- linux-2.6.32.24/arch/x86/include/asm/atomic_64.h 2010-08-13 16:24:37.000000000 -0400
6304+++ linux-2.6.32.24/arch/x86/include/asm/atomic_64.h 2010-10-23 19:59:19.000000000 -0400
6305@@ -24,6 +24,17 @@ static inline int atomic_read(const atom
6306 } 6466 }
6307 6467
6308 /** 6468 /**
@@ -6320,7 +6480,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6320 * atomic_set - set atomic variable 6480 * atomic_set - set atomic variable
6321 * @v: pointer of type atomic_t 6481 * @v: pointer of type atomic_t
6322 * @i: required value 6482 * @i: required value
6323@@ -36,6 +47,18 @@ static inline void atomic_set(atomic_t * 6483@@ -38,6 +49,18 @@ static inline void atomic_set(atomic_t *
6324 } 6484 }
6325 6485
6326 /** 6486 /**
@@ -6339,7 +6499,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6339 * atomic_add - add integer to atomic variable 6499 * atomic_add - add integer to atomic variable
6340 * @i: integer value to add 6500 * @i: integer value to add
6341 * @v: pointer of type atomic_t 6501 * @v: pointer of type atomic_t
6342@@ -44,7 +67,29 @@ static inline void atomic_set(atomic_t * 6502@@ -46,7 +69,29 @@ static inline void atomic_set(atomic_t *
6343 */ 6503 */
6344 static inline void atomic_add(int i, atomic_t *v) 6504 static inline void atomic_add(int i, atomic_t *v)
6345 { 6505 {
@@ -6349,12 +6509,12 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6349+#ifdef CONFIG_PAX_REFCOUNT 6509+#ifdef CONFIG_PAX_REFCOUNT
6350+ "jno 0f\n" 6510+ "jno 0f\n"
6351+ LOCK_PREFIX "subl %1,%0\n" 6511+ LOCK_PREFIX "subl %1,%0\n"
6352+ "int $4\n0:\n" 6512+ _ASM_INTO "\n0:\n"
6353+ _ASM_EXTABLE(0b, 0b) 6513+ _ASM_EXTABLE(0b, 0b)
6354+#endif 6514+#endif
6355+ 6515+
6356+ : "=m" (v->counter) 6516+ : "+m" (v->counter)
6357+ : "ir" (i), "m" (v->counter)); 6517+ : "ir" (i));
6358+} 6518+}
6359+ 6519+
6360+/** 6520+/**
@@ -6367,10 +6527,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6367+static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v) 6527+static inline void atomic_add_unchecked(int i, atomic_unchecked_t *v)
6368+{ 6528+{
6369+ asm volatile(LOCK_PREFIX "addl %1,%0\n" 6529+ asm volatile(LOCK_PREFIX "addl %1,%0\n"
6370 : "=m" (v->counter) 6530 : "+m" (v->counter)
6371 : "ir" (i), "m" (v->counter)); 6531 : "ir" (i));
6372 } 6532 }
6373@@ -58,7 +103,29 @@ static inline void atomic_add(int i, ato 6533@@ -60,7 +105,29 @@ static inline void atomic_add(int i, ato
6374 */ 6534 */
6375 static inline void atomic_sub(int i, atomic_t *v) 6535 static inline void atomic_sub(int i, atomic_t *v)
6376 { 6536 {
@@ -6380,28 +6540,28 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6380+#ifdef CONFIG_PAX_REFCOUNT 6540+#ifdef CONFIG_PAX_REFCOUNT
6381+ "jno 0f\n" 6541+ "jno 0f\n"
6382+ LOCK_PREFIX "addl %1,%0\n" 6542+ LOCK_PREFIX "addl %1,%0\n"
6383+ "int $4\n0:\n" 6543+ _ASM_INTO "\n0:\n"
6384+ _ASM_EXTABLE(0b, 0b) 6544+ _ASM_EXTABLE(0b, 0b)
6385+#endif 6545+#endif
6386+ 6546+
6387+ : "=m" (v->counter) 6547+ : "+m" (v->counter)
6388+ : "ir" (i), "m" (v->counter)); 6548+ : "ir" (i));
6389+} 6549+}
6390+ 6550+
6391+/** 6551+/**
6392+ * atomic_sub_unchecked - subtract the atomic variable 6552+ * atomic_sub_unchecked - subtract integer from atomic variable
6393+ * @i: integer value to subtract 6553+ * @i: integer value to subtract
6394+ * @v: pointer of type atomic_unchecked_t 6554+ * @v: pointer of type atomic_t
6395+ * 6555+ *
6396+ * Atomically subtracts @i from @v. 6556+ * Atomically subtracts @i from @v.
6397+ */ 6557+ */
6398+static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v) 6558+static inline void atomic_sub_unchecked(int i, atomic_unchecked_t *v)
6399+{ 6559+{
6400+ asm volatile(LOCK_PREFIX "subl %1,%0\n" 6560+ asm volatile(LOCK_PREFIX "subl %1,%0\n"
6401 : "=m" (v->counter) 6561 : "+m" (v->counter)
6402 : "ir" (i), "m" (v->counter)); 6562 : "ir" (i));
6403 } 6563 }
6404@@ -76,7 +143,16 @@ static inline int atomic_sub_and_test(in 6564@@ -78,7 +145,16 @@ static inline int atomic_sub_and_test(in
6405 { 6565 {
6406 unsigned char c; 6566 unsigned char c;
6407 6567
@@ -6411,15 +6571,15 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6411+#ifdef CONFIG_PAX_REFCOUNT 6571+#ifdef CONFIG_PAX_REFCOUNT
6412+ "jno 0f\n" 6572+ "jno 0f\n"
6413+ LOCK_PREFIX "addl %2,%0\n" 6573+ LOCK_PREFIX "addl %2,%0\n"
6414+ "int $4\n0:\n" 6574+ _ASM_INTO "\n0:\n"
6415+ _ASM_EXTABLE(0b, 0b) 6575+ _ASM_EXTABLE(0b, 0b)
6416+#endif 6576+#endif
6417+ 6577+
6418+ "sete %1\n" 6578+ "sete %1\n"
6419 : "=m" (v->counter), "=qm" (c) 6579 : "+m" (v->counter), "=qm" (c)
6420 : "ir" (i), "m" (v->counter) : "memory"); 6580 : "ir" (i) : "memory");
6421 return c; 6581 return c;
6422@@ -90,7 +166,28 @@ static inline int atomic_sub_and_test(in 6582@@ -92,7 +168,27 @@ static inline int atomic_sub_and_test(in
6423 */ 6583 */
6424 static inline void atomic_inc(atomic_t *v) 6584 static inline void atomic_inc(atomic_t *v)
6425 { 6585 {
@@ -6429,12 +6589,11 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6429+#ifdef CONFIG_PAX_REFCOUNT 6589+#ifdef CONFIG_PAX_REFCOUNT
6430+ "jno 0f\n" 6590+ "jno 0f\n"
6431+ LOCK_PREFIX "decl %0\n" 6591+ LOCK_PREFIX "decl %0\n"
6432+ "int $4\n0:\n" 6592+ _ASM_INTO "\n0:\n"
6433+ _ASM_EXTABLE(0b, 0b) 6593+ _ASM_EXTABLE(0b, 0b)
6434+#endif 6594+#endif
6435+ 6595+
6436+ : "=m" (v->counter) 6596+ : "+m" (v->counter));
6437+ : "m" (v->counter));
6438+} 6597+}
6439+ 6598+
6440+/** 6599+/**
@@ -6446,10 +6605,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6446+static inline void atomic_inc_unchecked(atomic_unchecked_t *v) 6605+static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
6447+{ 6606+{
6448+ asm volatile(LOCK_PREFIX "incl %0\n" 6607+ asm volatile(LOCK_PREFIX "incl %0\n"
6449 : "=m" (v->counter) 6608 : "+m" (v->counter));
6450 : "m" (v->counter));
6451 } 6609 }
6452@@ -103,7 +200,28 @@ static inline void atomic_inc(atomic_t * 6610
6611@@ -104,7 +200,27 @@ static inline void atomic_inc(atomic_t *
6453 */ 6612 */
6454 static inline void atomic_dec(atomic_t *v) 6613 static inline void atomic_dec(atomic_t *v)
6455 { 6614 {
@@ -6459,12 +6618,11 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6459+#ifdef CONFIG_PAX_REFCOUNT 6618+#ifdef CONFIG_PAX_REFCOUNT
6460+ "jno 0f\n" 6619+ "jno 0f\n"
6461+ LOCK_PREFIX "incl %0\n" 6620+ LOCK_PREFIX "incl %0\n"
6462+ "int $4\n0:\n" 6621+ _ASM_INTO "\n0:\n"
6463+ _ASM_EXTABLE(0b, 0b) 6622+ _ASM_EXTABLE(0b, 0b)
6464+#endif 6623+#endif
6465+ 6624+
6466+ : "=m" (v->counter) 6625+ : "+m" (v->counter));
6467+ : "m" (v->counter));
6468+} 6626+}
6469+ 6627+
6470+/** 6628+/**
@@ -6476,10 +6634,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6476+static inline void atomic_dec_unchecked(atomic_unchecked_t *v) 6634+static inline void atomic_dec_unchecked(atomic_unchecked_t *v)
6477+{ 6635+{
6478+ asm volatile(LOCK_PREFIX "decl %0\n" 6636+ asm volatile(LOCK_PREFIX "decl %0\n"
6479 : "=m" (v->counter) 6637 : "+m" (v->counter));
6480 : "m" (v->counter));
6481 } 6638 }
6482@@ -120,7 +238,16 @@ static inline int atomic_dec_and_test(at 6639
6640@@ -120,7 +236,16 @@ static inline int atomic_dec_and_test(at
6483 { 6641 {
6484 unsigned char c; 6642 unsigned char c;
6485 6643
@@ -6489,15 +6647,15 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6489+#ifdef CONFIG_PAX_REFCOUNT 6647+#ifdef CONFIG_PAX_REFCOUNT
6490+ "jno 0f\n" 6648+ "jno 0f\n"
6491+ LOCK_PREFIX "incl %0\n" 6649+ LOCK_PREFIX "incl %0\n"
6492+ "int $4\n0:\n" 6650+ _ASM_INTO "\n0:\n"
6493+ _ASM_EXTABLE(0b, 0b) 6651+ _ASM_EXTABLE(0b, 0b)
6494+#endif 6652+#endif
6495+ 6653+
6496+ "sete %1\n" 6654+ "sete %1\n"
6497 : "=m" (v->counter), "=qm" (c) 6655 : "+m" (v->counter), "=qm" (c)
6498 : "m" (v->counter) : "memory"); 6656 : : "memory");
6499 return c != 0; 6657 return c != 0;
6500@@ -138,7 +265,16 @@ static inline int atomic_inc_and_test(at 6658@@ -138,7 +263,16 @@ static inline int atomic_inc_and_test(at
6501 { 6659 {
6502 unsigned char c; 6660 unsigned char c;
6503 6661
@@ -6507,15 +6665,15 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6507+#ifdef CONFIG_PAX_REFCOUNT 6665+#ifdef CONFIG_PAX_REFCOUNT
6508+ "jno 0f\n" 6666+ "jno 0f\n"
6509+ LOCK_PREFIX "decl %0\n" 6667+ LOCK_PREFIX "decl %0\n"
6510+ "int $4\n0:\n" 6668+ _ASM_INTO "\n0:\n"
6511+ _ASM_EXTABLE(0b, 0b) 6669+ _ASM_EXTABLE(0b, 0b)
6512+#endif 6670+#endif
6513+ 6671+
6514+ "sete %1\n" 6672+ "sete %1\n"
6515 : "=m" (v->counter), "=qm" (c) 6673 : "+m" (v->counter), "=qm" (c)
6516 : "m" (v->counter) : "memory"); 6674 : : "memory");
6517 return c != 0; 6675 return c != 0;
6518@@ -157,7 +293,16 @@ static inline int atomic_add_negative(in 6676@@ -157,7 +291,16 @@ static inline int atomic_add_negative(in
6519 { 6677 {
6520 unsigned char c; 6678 unsigned char c;
6521 6679
@@ -6525,48 +6683,62 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6525+#ifdef CONFIG_PAX_REFCOUNT 6683+#ifdef CONFIG_PAX_REFCOUNT
6526+ "jno 0f\n" 6684+ "jno 0f\n"
6527+ LOCK_PREFIX "subl %2,%0\n" 6685+ LOCK_PREFIX "subl %2,%0\n"
6528+ "int $4\n0:\n" 6686+ _ASM_INTO "\n0:\n"
6529+ _ASM_EXTABLE(0b, 0b) 6687+ _ASM_EXTABLE(0b, 0b)
6530+#endif 6688+#endif
6531+ 6689+
6532+ "sets %1\n" 6690+ "sets %1\n"
6533 : "=m" (v->counter), "=qm" (c) 6691 : "+m" (v->counter), "=qm" (c)
6534 : "ir" (i), "m" (v->counter) : "memory"); 6692 : "ir" (i) : "memory");
6535 return c; 6693 return c;
6536@@ -173,7 +318,31 @@ static inline int atomic_add_negative(in 6694@@ -180,6 +323,46 @@ static inline int atomic_add_return(int
6537 static inline int atomic_add_return(int i, atomic_t *v) 6695 #endif
6538 { 6696 /* Modern 486+ processor */
6539 int __i = i; 6697 __i = i;
6540- asm volatile(LOCK_PREFIX "xaddl %0, %1"
6541+ asm volatile(LOCK_PREFIX "xaddl %0, %1\n" 6698+ asm volatile(LOCK_PREFIX "xaddl %0, %1\n"
6542+ 6699+
6543+#ifdef CONFIG_PAX_REFCOUNT 6700+#ifdef CONFIG_PAX_REFCOUNT
6544+ "jno 0f\n" 6701+ "jno 0f\n"
6545+ "movl %0, %1\n" 6702+ "movl %0, %1\n"
6546+ "int $4\n0:\n" 6703+ _ASM_INTO "\n0:\n"
6547+ _ASM_EXTABLE(0b, 0b) 6704+ _ASM_EXTABLE(0b, 0b)
6548+#endif 6705+#endif
6549+ 6706+
6550+ : "+r" (i), "+m" (v->counter) 6707+ : "+r" (i), "+m" (v->counter)
6551+ : : "memory"); 6708+ : : "memory");
6552+ return i + __i; 6709+ return i + __i;
6710+
6711+#ifdef CONFIG_M386
6712+no_xadd: /* Legacy 386 processor */
6713+ local_irq_save(flags);
6714+ __i = atomic_read(v);
6715+ atomic_set(v, i + __i);
6716+ local_irq_restore(flags);
6717+ return i + __i;
6718+#endif
6553+} 6719+}
6554+ 6720+
6555+/** 6721+/**
6556+ * atomic_add_return_unchecked - add and return 6722+ * atomic_add_return_unchecked - add integer and return
6557+ * @i: integer value to add
6558+ * @v: pointer of type atomic_unchecked_t 6723+ * @v: pointer of type atomic_unchecked_t
6724+ * @i: integer value to add
6559+ * 6725+ *
6560+ * Atomically adds @i to @v and returns @i + @v 6726+ * Atomically adds @i to @v and returns @i + @v
6561+ */ 6727+ */
6562+static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v) 6728+static inline int atomic_add_return_unchecked(int i, atomic_unchecked_t *v)
6563+{ 6729+{
6564+ int __i = i; 6730+ int __i;
6565+ asm volatile(LOCK_PREFIX "xaddl %0, %1\n" 6731+#ifdef CONFIG_M386
6732+ unsigned long flags;
6733+ if (unlikely(boot_cpu_data.x86 <= 3))
6734+ goto no_xadd;
6735+#endif
6736+ /* Modern 486+ processor */
6737+ __i = i;
6738 asm volatile(LOCK_PREFIX "xaddl %0, %1"
6566 : "+r" (i), "+m" (v->counter) 6739 : "+r" (i), "+m" (v->counter)
6567 : : "memory"); 6740 : : "memory");
6568 return i + __i; 6741@@ -208,6 +391,10 @@ static inline int atomic_sub_return(int
6569@@ -185,6 +354,10 @@ static inline int atomic_sub_return(int
6570 } 6742 }
6571 6743
6572 #define atomic_inc_return(v) (atomic_add_return(1, v)) 6744 #define atomic_inc_return(v) (atomic_add_return(1, v))
@@ -6576,266 +6748,8 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6576+} 6748+}
6577 #define atomic_dec_return(v) (atomic_sub_return(1, v)) 6749 #define atomic_dec_return(v) (atomic_sub_return(1, v))
6578 6750
6579 /* The 64-bit atomic type */ 6751 static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
6580@@ -204,6 +377,18 @@ static inline long atomic64_read(const a 6752@@ -231,17 +418,30 @@ static inline int atomic_xchg(atomic_t *
6581 }
6582
6583 /**
6584+ * atomic64_read_unchecked - read atomic64 variable
6585+ * @v: pointer of type atomic64_unchecked_t
6586+ *
6587+ * Atomically reads the value of @v.
6588+ * Doesn't imply a read memory barrier.
6589+ */
6590+static inline long atomic64_read_unchecked(const atomic64_unchecked_t *v)
6591+{
6592+ return v->counter;
6593+}
6594+
6595+/**
6596 * atomic64_set - set atomic64 variable
6597 * @v: pointer to type atomic64_t
6598 * @i: required value
6599@@ -216,6 +401,18 @@ static inline void atomic64_set(atomic64
6600 }
6601
6602 /**
6603+ * atomic64_set_unchecked - set atomic64 variable
6604+ * @v: pointer to type atomic64_unchecked_t
6605+ * @i: required value
6606+ *
6607+ * Atomically sets the value of @v to @i.
6608+ */
6609+static inline void atomic64_set_unchecked(atomic64_unchecked_t *v, long i)
6610+{
6611+ v->counter = i;
6612+}
6613+
6614+/**
6615 * atomic64_add - add integer to atomic64 variable
6616 * @i: integer value to add
6617 * @v: pointer to type atomic64_t
6618@@ -224,6 +421,28 @@ static inline void atomic64_set(atomic64
6619 */
6620 static inline void atomic64_add(long i, atomic64_t *v)
6621 {
6622+ asm volatile(LOCK_PREFIX "addq %1,%0\n"
6623+
6624+#ifdef CONFIG_PAX_REFCOUNT
6625+ "jno 0f\n"
6626+ LOCK_PREFIX "subq %1,%0\n"
6627+ "int $4\n0:\n"
6628+ _ASM_EXTABLE(0b, 0b)
6629+#endif
6630+
6631+ : "=m" (v->counter)
6632+ : "er" (i), "m" (v->counter));
6633+}
6634+
6635+/**
6636+ * atomic64_add_unchecked - add integer to atomic64 variable
6637+ * @i: integer value to add
6638+ * @v: pointer to type atomic64_unchecked_t
6639+ *
6640+ * Atomically adds @i to @v.
6641+ */
6642+static inline void atomic64_add_unchecked(long i, atomic64_unchecked_t *v)
6643+{
6644 asm volatile(LOCK_PREFIX "addq %1,%0"
6645 : "=m" (v->counter)
6646 : "er" (i), "m" (v->counter));
6647@@ -238,7 +457,15 @@ static inline void atomic64_add(long i,
6648 */
6649 static inline void atomic64_sub(long i, atomic64_t *v)
6650 {
6651- asm volatile(LOCK_PREFIX "subq %1,%0"
6652+ asm volatile(LOCK_PREFIX "subq %1,%0\n"
6653+
6654+#ifdef CONFIG_PAX_REFCOUNT
6655+ "jno 0f\n"
6656+ LOCK_PREFIX "addq %1,%0\n"
6657+ "int $4\n0:\n"
6658+ _ASM_EXTABLE(0b, 0b)
6659+#endif
6660+
6661 : "=m" (v->counter)
6662 : "er" (i), "m" (v->counter));
6663 }
6664@@ -256,7 +483,16 @@ static inline int atomic64_sub_and_test(
6665 {
6666 unsigned char c;
6667
6668- asm volatile(LOCK_PREFIX "subq %2,%0; sete %1"
6669+ asm volatile(LOCK_PREFIX "subq %2,%0\n"
6670+
6671+#ifdef CONFIG_PAX_REFCOUNT
6672+ "jno 0f\n"
6673+ LOCK_PREFIX "addq %2,%0\n"
6674+ "int $4\n0:\n"
6675+ _ASM_EXTABLE(0b, 0b)
6676+#endif
6677+
6678+ "sete %1\n"
6679 : "=m" (v->counter), "=qm" (c)
6680 : "er" (i), "m" (v->counter) : "memory");
6681 return c;
6682@@ -270,6 +506,27 @@ static inline int atomic64_sub_and_test(
6683 */
6684 static inline void atomic64_inc(atomic64_t *v)
6685 {
6686+ asm volatile(LOCK_PREFIX "incq %0\n"
6687+
6688+#ifdef CONFIG_PAX_REFCOUNT
6689+ "jno 0f\n"
6690+ LOCK_PREFIX "decq %0\n"
6691+ "int $4\n0:\n"
6692+ _ASM_EXTABLE(0b, 0b)
6693+#endif
6694+
6695+ : "=m" (v->counter)
6696+ : "m" (v->counter));
6697+}
6698+
6699+/**
6700+ * atomic64_inc_unchecked - increment atomic64 variable
6701+ * @v: pointer to type atomic64_unchecked_t
6702+ *
6703+ * Atomically increments @v by 1.
6704+ */
6705+static inline void atomic64_inc_unchecked(atomic64_unchecked_t *v)
6706+{
6707 asm volatile(LOCK_PREFIX "incq %0"
6708 : "=m" (v->counter)
6709 : "m" (v->counter));
6710@@ -283,7 +540,28 @@ static inline void atomic64_inc(atomic64
6711 */
6712 static inline void atomic64_dec(atomic64_t *v)
6713 {
6714- asm volatile(LOCK_PREFIX "decq %0"
6715+ asm volatile(LOCK_PREFIX "decq %0\n"
6716+
6717+#ifdef CONFIG_PAX_REFCOUNT
6718+ "jno 0f\n"
6719+ LOCK_PREFIX "incq %0\n"
6720+ "int $4\n0:\n"
6721+ _ASM_EXTABLE(0b, 0b)
6722+#endif
6723+
6724+ : "=m" (v->counter)
6725+ : "m" (v->counter));
6726+}
6727+
6728+/**
6729+ * atomic64_dec_unchecked - decrement atomic64 variable
6730+ * @v: pointer to type atomic64_t
6731+ *
6732+ * Atomically decrements @v by 1.
6733+ */
6734+static inline void atomic64_dec_unchecked(atomic64_unchecked_t *v)
6735+{
6736+ asm volatile(LOCK_PREFIX "decq %0\n"
6737 : "=m" (v->counter)
6738 : "m" (v->counter));
6739 }
6740@@ -300,7 +578,16 @@ static inline int atomic64_dec_and_test(
6741 {
6742 unsigned char c;
6743
6744- asm volatile(LOCK_PREFIX "decq %0; sete %1"
6745+ asm volatile(LOCK_PREFIX "decq %0\n"
6746+
6747+#ifdef CONFIG_PAX_REFCOUNT
6748+ "jno 0f\n"
6749+ LOCK_PREFIX "incq %0\n"
6750+ "int $4\n0:\n"
6751+ _ASM_EXTABLE(0b, 0b)
6752+#endif
6753+
6754+ "sete %1\n"
6755 : "=m" (v->counter), "=qm" (c)
6756 : "m" (v->counter) : "memory");
6757 return c != 0;
6758@@ -318,7 +605,16 @@ static inline int atomic64_inc_and_test(
6759 {
6760 unsigned char c;
6761
6762- asm volatile(LOCK_PREFIX "incq %0; sete %1"
6763+ asm volatile(LOCK_PREFIX "incq %0\n"
6764+
6765+#ifdef CONFIG_PAX_REFCOUNT
6766+ "jno 0f\n"
6767+ LOCK_PREFIX "decq %0\n"
6768+ "int $4\n0:\n"
6769+ _ASM_EXTABLE(0b, 0b)
6770+#endif
6771+
6772+ "sete %1\n"
6773 : "=m" (v->counter), "=qm" (c)
6774 : "m" (v->counter) : "memory");
6775 return c != 0;
6776@@ -337,7 +633,16 @@ static inline int atomic64_add_negative(
6777 {
6778 unsigned char c;
6779
6780- asm volatile(LOCK_PREFIX "addq %2,%0; sets %1"
6781+ asm volatile(LOCK_PREFIX "addq %2,%0\n"
6782+
6783+#ifdef CONFIG_PAX_REFCOUNT
6784+ "jno 0f\n"
6785+ LOCK_PREFIX "subq %2,%0\n"
6786+ "int $4\n0:\n"
6787+ _ASM_EXTABLE(0b, 0b)
6788+#endif
6789+
6790+ "sets %1\n"
6791 : "=m" (v->counter), "=qm" (c)
6792 : "er" (i), "m" (v->counter) : "memory");
6793 return c;
6794@@ -353,7 +658,31 @@ static inline int atomic64_add_negative(
6795 static inline long atomic64_add_return(long i, atomic64_t *v)
6796 {
6797 long __i = i;
6798- asm volatile(LOCK_PREFIX "xaddq %0, %1;"
6799+ asm volatile(LOCK_PREFIX "xaddq %0, %1\n"
6800+
6801+#ifdef CONFIG_PAX_REFCOUNT
6802+ "jno 0f\n"
6803+ "movq %0, %1\n"
6804+ "int $4\n0:\n"
6805+ _ASM_EXTABLE(0b, 0b)
6806+#endif
6807+
6808+ : "+r" (i), "+m" (v->counter)
6809+ : : "memory");
6810+ return i + __i;
6811+}
6812+
6813+/**
6814+ * atomic64_add_return_unchecked - add and return
6815+ * @i: integer value to add
6816+ * @v: pointer to type atomic64_unchecked_t
6817+ *
6818+ * Atomically adds @i to @v and returns @i + @v
6819+ */
6820+static inline long atomic64_add_return_unchecked(long i, atomic64_unchecked_t *v)
6821+{
6822+ long __i = i;
6823+ asm volatile(LOCK_PREFIX "xaddq %0, %1"
6824 : "+r" (i), "+m" (v->counter)
6825 : : "memory");
6826 return i + __i;
6827@@ -365,6 +694,10 @@ static inline long atomic64_sub_return(l
6828 }
6829
6830 #define atomic64_inc_return(v) (atomic64_add_return(1, (v)))
6831+static inline long atomic64_inc_return_unchecked(atomic64_unchecked_t *v)
6832+{
6833+ return atomic64_add_return_unchecked(1, v);
6834+}
6835 #define atomic64_dec_return(v) (atomic64_sub_return(1, (v)))
6836
6837 static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new)
6838@@ -398,17 +731,30 @@ static inline long atomic_xchg(atomic_t
6839 */ 6753 */
6840 static inline int atomic_add_unless(atomic_t *v, int a, int u) 6754 static inline int atomic_add_unless(atomic_t *v, int a, int u)
6841 { 6755 {
@@ -6853,7 +6767,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6853+#ifdef CONFIG_PAX_REFCOUNT 6767+#ifdef CONFIG_PAX_REFCOUNT
6854+ "jno 0f\n" 6768+ "jno 0f\n"
6855+ "subl %2,%0\n" 6769+ "subl %2,%0\n"
6856+ "int $4\n0:\n" 6770+ _ASM_INTO "\n0:\n"
6857+ _ASM_EXTABLE(0b, 0b) 6771+ _ASM_EXTABLE(0b, 0b)
6858+#endif 6772+#endif
6859+ 6773+
@@ -6870,44 +6784,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/atomic_64.h linux-2.6.32.24/arch
6870 } 6784 }
6871 6785
6872 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 6786 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
6873@@ -424,17 +770,30 @@ static inline int atomic_add_unless(atom 6787diff -urNp linux-2.6.35.7/arch/x86/include/asm/boot.h linux-2.6.35.7/arch/x86/include/asm/boot.h
6874 */ 6788--- linux-2.6.35.7/arch/x86/include/asm/boot.h 2010-08-26 19:47:12.000000000 -0400
6875 static inline int atomic64_add_unless(atomic64_t *v, long a, long u) 6789+++ linux-2.6.35.7/arch/x86/include/asm/boot.h 2010-09-17 20:12:09.000000000 -0400
6876 {
6877- long c, old;
6878+ long c, old, new;
6879 c = atomic64_read(v);
6880 for (;;) {
6881- if (unlikely(c == (u)))
6882+ if (unlikely(c == u))
6883 break;
6884- old = atomic64_cmpxchg((v), c, c + (a));
6885+
6886+ asm volatile("addq %2,%0\n"
6887+
6888+#ifdef CONFIG_PAX_REFCOUNT
6889+ "jno 0f\n"
6890+ "subq %2,%0\n"
6891+ "int $4\n0:\n"
6892+ _ASM_EXTABLE(0b, 0b)
6893+#endif
6894+
6895+ : "=r" (new)
6896+ : "0" (c), "er" (a));
6897+
6898+ old = atomic64_cmpxchg(v, c, new);
6899 if (likely(old == c))
6900 break;
6901 c = old;
6902 }
6903- return c != (u);
6904+ return c != u;
6905 }
6906
6907 /**
6908diff -urNp linux-2.6.32.24/arch/x86/include/asm/boot.h linux-2.6.32.24/arch/x86/include/asm/boot.h
6909--- linux-2.6.32.24/arch/x86/include/asm/boot.h 2010-08-13 16:24:37.000000000 -0400
6910+++ linux-2.6.32.24/arch/x86/include/asm/boot.h 2010-10-23 19:59:19.000000000 -0400
6911@@ -11,10 +11,15 @@ 6790@@ -11,10 +11,15 @@
6912 #include <asm/pgtable_types.h> 6791 #include <asm/pgtable_types.h>
6913 6792
@@ -6925,41 +6804,32 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/boot.h linux-2.6.32.24/arch/x86/
6925 /* Minimum kernel alignment, as a power of two */ 6804 /* Minimum kernel alignment, as a power of two */
6926 #ifdef CONFIG_X86_64 6805 #ifdef CONFIG_X86_64
6927 #define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT 6806 #define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
6928diff -urNp linux-2.6.32.24/arch/x86/include/asm/cacheflush.h linux-2.6.32.24/arch/x86/include/asm/cacheflush.h 6807diff -urNp linux-2.6.35.7/arch/x86/include/asm/cacheflush.h linux-2.6.35.7/arch/x86/include/asm/cacheflush.h
6929--- linux-2.6.32.24/arch/x86/include/asm/cacheflush.h 2010-08-13 16:24:37.000000000 -0400 6808--- linux-2.6.35.7/arch/x86/include/asm/cacheflush.h 2010-08-26 19:47:12.000000000 -0400
6930+++ linux-2.6.32.24/arch/x86/include/asm/cacheflush.h 2010-10-23 19:59:19.000000000 -0400 6809+++ linux-2.6.35.7/arch/x86/include/asm/cacheflush.h 2010-09-17 20:12:09.000000000 -0400
6931@@ -60,7 +60,7 @@ PAGEFLAG(WC, WC) 6810@@ -66,7 +66,7 @@ static inline unsigned long get_page_mem
6932 static inline unsigned long get_page_memtype(struct page *pg) 6811 unsigned long pg_flags = pg->flags & _PGMT_MASK;
6933 { 6812
6934 if (!PageUncached(pg) && !PageWC(pg)) 6813 if (pg_flags == _PGMT_DEFAULT)
6935- return -1; 6814- return -1;
6936+ return ~0UL; 6815+ return ~0UL;
6937 else if (!PageUncached(pg) && PageWC(pg)) 6816 else if (pg_flags == _PGMT_WC)
6938 return _PAGE_CACHE_WC; 6817 return _PAGE_CACHE_WC;
6939 else if (PageUncached(pg) && !PageWC(pg)) 6818 else if (pg_flags == _PGMT_UC_MINUS)
6940@@ -85,7 +85,7 @@ static inline void set_page_memtype(stru 6819diff -urNp linux-2.6.35.7/arch/x86/include/asm/cache.h linux-2.6.35.7/arch/x86/include/asm/cache.h
6941 SetPageWC(pg); 6820--- linux-2.6.35.7/arch/x86/include/asm/cache.h 2010-08-26 19:47:12.000000000 -0400
6942 break; 6821+++ linux-2.6.35.7/arch/x86/include/asm/cache.h 2010-09-17 20:12:09.000000000 -0400
6943 default:
6944- case -1:
6945+ case ~0UL:
6946 ClearPageUncached(pg);
6947 ClearPageWC(pg);
6948 break;
6949diff -urNp linux-2.6.32.24/arch/x86/include/asm/cache.h linux-2.6.32.24/arch/x86/include/asm/cache.h
6950--- linux-2.6.32.24/arch/x86/include/asm/cache.h 2010-08-13 16:24:37.000000000 -0400
6951+++ linux-2.6.32.24/arch/x86/include/asm/cache.h 2010-10-23 19:59:19.000000000 -0400
6952@@ -8,6 +8,7 @@ 6822@@ -8,6 +8,7 @@
6953 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 6823 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
6954 6824
6955 #define __read_mostly __attribute__((__section__(".data.read_mostly"))) 6825 #define __read_mostly __attribute__((__section__(".data..read_mostly")))
6956+#define __read_only __attribute__((__section__(".data.read_only"))) 6826+#define __read_only __attribute__((__section__(".data..read_only")))
6957 6827
6958 #ifdef CONFIG_X86_VSMP 6828 #define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT
6959 /* vSMP Internode cacheline shift */ 6829 #define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
6960diff -urNp linux-2.6.32.24/arch/x86/include/asm/checksum_32.h linux-2.6.32.24/arch/x86/include/asm/checksum_32.h 6830diff -urNp linux-2.6.35.7/arch/x86/include/asm/checksum_32.h linux-2.6.35.7/arch/x86/include/asm/checksum_32.h
6961--- linux-2.6.32.24/arch/x86/include/asm/checksum_32.h 2010-08-13 16:24:37.000000000 -0400 6831--- linux-2.6.35.7/arch/x86/include/asm/checksum_32.h 2010-08-26 19:47:12.000000000 -0400
6962+++ linux-2.6.32.24/arch/x86/include/asm/checksum_32.h 2010-10-23 19:59:19.000000000 -0400 6832+++ linux-2.6.35.7/arch/x86/include/asm/checksum_32.h 2010-09-17 20:12:09.000000000 -0400
6963@@ -31,6 +31,14 @@ asmlinkage __wsum csum_partial_copy_gene 6833@@ -31,6 +31,14 @@ asmlinkage __wsum csum_partial_copy_gene
6964 int len, __wsum sum, 6834 int len, __wsum sum,
6965 int *src_err_ptr, int *dst_err_ptr); 6835 int *src_err_ptr, int *dst_err_ptr);
@@ -6993,9 +6863,21 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/checksum_32.h linux-2.6.32.24/ar
6993 len, sum, NULL, err_ptr); 6863 len, sum, NULL, err_ptr);
6994 6864
6995 if (len) 6865 if (len)
6996diff -urNp linux-2.6.32.24/arch/x86/include/asm/desc.h linux-2.6.32.24/arch/x86/include/asm/desc.h 6866diff -urNp linux-2.6.35.7/arch/x86/include/asm/cpufeature.h linux-2.6.35.7/arch/x86/include/asm/cpufeature.h
6997--- linux-2.6.32.24/arch/x86/include/asm/desc.h 2010-08-13 16:24:37.000000000 -0400 6867--- linux-2.6.35.7/arch/x86/include/asm/cpufeature.h 2010-08-26 19:47:12.000000000 -0400
6998+++ linux-2.6.32.24/arch/x86/include/asm/desc.h 2010-10-23 19:59:19.000000000 -0400 6868+++ linux-2.6.35.7/arch/x86/include/asm/cpufeature.h 2010-09-17 20:12:09.000000000 -0400
6869@@ -323,7 +323,7 @@ static __always_inline __pure bool __sta
6870 " .byte 4f - 3f\n" /* replacement len */
6871 " .byte 0xff + (4f-3f) - (2b-1b)\n" /* padding */
6872 ".previous\n"
6873- ".section .altinstr_replacement,\"ax\"\n"
6874+ ".section .altinstr_replacement,\"a\"\n"
6875 "3: movb $1,%0\n"
6876 "4:\n"
6877 ".previous\n"
6878diff -urNp linux-2.6.35.7/arch/x86/include/asm/desc.h linux-2.6.35.7/arch/x86/include/asm/desc.h
6879--- linux-2.6.35.7/arch/x86/include/asm/desc.h 2010-08-26 19:47:12.000000000 -0400
6880+++ linux-2.6.35.7/arch/x86/include/asm/desc.h 2010-09-17 20:12:09.000000000 -0400
6999@@ -4,6 +4,7 @@ 6881@@ -4,6 +4,7 @@
7000 #include <asm/desc_defs.h> 6882 #include <asm/desc_defs.h>
7001 #include <asm/ldt.h> 6883 #include <asm/ldt.h>
@@ -7165,9 +7047,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/desc.h linux-2.6.32.24/arch/x86/
7165+#endif 7047+#endif
7166+ 7048+
7167 #endif /* _ASM_X86_DESC_H */ 7049 #endif /* _ASM_X86_DESC_H */
7168diff -urNp linux-2.6.32.24/arch/x86/include/asm/device.h linux-2.6.32.24/arch/x86/include/asm/device.h 7050diff -urNp linux-2.6.35.7/arch/x86/include/asm/device.h linux-2.6.35.7/arch/x86/include/asm/device.h
7169--- linux-2.6.32.24/arch/x86/include/asm/device.h 2010-08-13 16:24:37.000000000 -0400 7051--- linux-2.6.35.7/arch/x86/include/asm/device.h 2010-08-26 19:47:12.000000000 -0400
7170+++ linux-2.6.32.24/arch/x86/include/asm/device.h 2010-10-23 19:59:19.000000000 -0400 7052+++ linux-2.6.35.7/arch/x86/include/asm/device.h 2010-09-17 20:12:09.000000000 -0400
7171@@ -6,7 +6,7 @@ struct dev_archdata { 7053@@ -6,7 +6,7 @@ struct dev_archdata {
7172 void *acpi_handle; 7054 void *acpi_handle;
7173 #endif 7055 #endif
@@ -7175,12 +7057,12 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/device.h linux-2.6.32.24/arch/x8
7175-struct dma_map_ops *dma_ops; 7057-struct dma_map_ops *dma_ops;
7176+ const struct dma_map_ops *dma_ops; 7058+ const struct dma_map_ops *dma_ops;
7177 #endif 7059 #endif
7178 #ifdef CONFIG_DMAR 7060 #if defined(CONFIG_DMAR) || defined(CONFIG_AMD_IOMMU)
7179 void *iommu; /* hook for IOMMU specific extension */ 7061 void *iommu; /* hook for IOMMU specific extension */
7180diff -urNp linux-2.6.32.24/arch/x86/include/asm/dma-mapping.h linux-2.6.32.24/arch/x86/include/asm/dma-mapping.h 7062diff -urNp linux-2.6.35.7/arch/x86/include/asm/dma-mapping.h linux-2.6.35.7/arch/x86/include/asm/dma-mapping.h
7181--- linux-2.6.32.24/arch/x86/include/asm/dma-mapping.h 2010-08-13 16:24:37.000000000 -0400 7063--- linux-2.6.35.7/arch/x86/include/asm/dma-mapping.h 2010-08-26 19:47:12.000000000 -0400
7182+++ linux-2.6.32.24/arch/x86/include/asm/dma-mapping.h 2010-10-23 19:59:19.000000000 -0400 7064+++ linux-2.6.35.7/arch/x86/include/asm/dma-mapping.h 2010-09-17 20:12:09.000000000 -0400
7183@@ -25,9 +25,9 @@ extern int iommu_merge; 7065@@ -26,9 +26,9 @@ extern int iommu_merge;
7184 extern struct device x86_dma_fallback_dev; 7066 extern struct device x86_dma_fallback_dev;
7185 extern int panic_on_overflow; 7067 extern int panic_on_overflow;
7186 7068
@@ -7192,7 +7074,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/dma-mapping.h linux-2.6.32.24/ar
7192 { 7074 {
7193 #ifdef CONFIG_X86_32 7075 #ifdef CONFIG_X86_32
7194 return dma_ops; 7076 return dma_ops;
7195@@ -44,7 +44,7 @@ static inline struct dma_map_ops *get_dm 7077@@ -45,7 +45,7 @@ static inline struct dma_map_ops *get_dm
7196 /* Make sure we keep the same behaviour */ 7078 /* Make sure we keep the same behaviour */
7197 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 7079 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
7198 { 7080 {
@@ -7201,7 +7083,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/dma-mapping.h linux-2.6.32.24/ar
7201 if (ops->mapping_error) 7083 if (ops->mapping_error)
7202 return ops->mapping_error(dev, dma_addr); 7084 return ops->mapping_error(dev, dma_addr);
7203 7085
7204@@ -122,7 +122,7 @@ static inline void * 7086@@ -123,7 +123,7 @@ static inline void *
7205 dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, 7087 dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
7206 gfp_t gfp) 7088 gfp_t gfp)
7207 { 7089 {
@@ -7210,7 +7092,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/dma-mapping.h linux-2.6.32.24/ar
7210 void *memory; 7092 void *memory;
7211 7093
7212 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); 7094 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
7213@@ -149,7 +149,7 @@ dma_alloc_coherent(struct device *dev, s 7095@@ -150,7 +150,7 @@ dma_alloc_coherent(struct device *dev, s
7214 static inline void dma_free_coherent(struct device *dev, size_t size, 7096 static inline void dma_free_coherent(struct device *dev, size_t size,
7215 void *vaddr, dma_addr_t bus) 7097 void *vaddr, dma_addr_t bus)
7216 { 7098 {
@@ -7219,22 +7101,22 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/dma-mapping.h linux-2.6.32.24/ar
7219 7101
7220 WARN_ON(irqs_disabled()); /* for portability */ 7102 WARN_ON(irqs_disabled()); /* for portability */
7221 7103
7222diff -urNp linux-2.6.32.24/arch/x86/include/asm/e820.h linux-2.6.32.24/arch/x86/include/asm/e820.h 7104diff -urNp linux-2.6.35.7/arch/x86/include/asm/e820.h linux-2.6.35.7/arch/x86/include/asm/e820.h
7223--- linux-2.6.32.24/arch/x86/include/asm/e820.h 2010-08-13 16:24:37.000000000 -0400 7105--- linux-2.6.35.7/arch/x86/include/asm/e820.h 2010-08-26 19:47:12.000000000 -0400
7224+++ linux-2.6.32.24/arch/x86/include/asm/e820.h 2010-10-23 19:59:19.000000000 -0400 7106+++ linux-2.6.35.7/arch/x86/include/asm/e820.h 2010-09-17 20:12:09.000000000 -0400
7225@@ -133,7 +133,7 @@ extern char *default_machine_specific_me 7107@@ -69,7 +69,7 @@ struct e820map {
7108 #define ISA_START_ADDRESS 0xa0000
7226 #define ISA_END_ADDRESS 0x100000 7109 #define ISA_END_ADDRESS 0x100000
7227 #define is_ISA_range(s, e) ((s) >= ISA_START_ADDRESS && (e) < ISA_END_ADDRESS)
7228 7110
7229-#define BIOS_BEGIN 0x000a0000 7111-#define BIOS_BEGIN 0x000a0000
7230+#define BIOS_BEGIN 0x000c0000 7112+#define BIOS_BEGIN 0x000c0000
7231 #define BIOS_END 0x00100000 7113 #define BIOS_END 0x00100000
7232 7114
7233 #ifdef __KERNEL__ 7115 #ifdef __KERNEL__
7234diff -urNp linux-2.6.32.24/arch/x86/include/asm/elf.h linux-2.6.32.24/arch/x86/include/asm/elf.h 7116diff -urNp linux-2.6.35.7/arch/x86/include/asm/elf.h linux-2.6.35.7/arch/x86/include/asm/elf.h
7235--- linux-2.6.32.24/arch/x86/include/asm/elf.h 2010-08-13 16:24:37.000000000 -0400 7117--- linux-2.6.35.7/arch/x86/include/asm/elf.h 2010-08-26 19:47:12.000000000 -0400
7236+++ linux-2.6.32.24/arch/x86/include/asm/elf.h 2010-10-23 19:59:19.000000000 -0400 7118+++ linux-2.6.35.7/arch/x86/include/asm/elf.h 2010-09-17 20:12:09.000000000 -0400
7237@@ -257,7 +257,25 @@ extern int force_personality32; 7119@@ -237,7 +237,25 @@ extern int force_personality32;
7238 the loader. We need to make sure that it is out of the way of the program 7120 the loader. We need to make sure that it is out of the way of the program
7239 that it will "exec", and that there is sufficient room for the brk. */ 7121 that it will "exec", and that there is sufficient room for the brk. */
7240 7122
@@ -7260,7 +7142,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/elf.h linux-2.6.32.24/arch/x86/i
7260 7142
7261 /* This yields a mask that user programs can use to figure out what 7143 /* This yields a mask that user programs can use to figure out what
7262 instruction set this CPU supports. This could be done in user space, 7144 instruction set this CPU supports. This could be done in user space,
7263@@ -311,8 +329,7 @@ do { \ 7145@@ -291,8 +309,7 @@ do { \
7264 #define ARCH_DLINFO \ 7146 #define ARCH_DLINFO \
7265 do { \ 7147 do { \
7266 if (vdso_enabled) \ 7148 if (vdso_enabled) \
@@ -7270,7 +7152,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/elf.h linux-2.6.32.24/arch/x86/i
7270 } while (0) 7152 } while (0)
7271 7153
7272 #define AT_SYSINFO 32 7154 #define AT_SYSINFO 32
7273@@ -323,7 +340,7 @@ do { \ 7155@@ -303,7 +320,7 @@ do { \
7274 7156
7275 #endif /* !CONFIG_X86_32 */ 7157 #endif /* !CONFIG_X86_32 */
7276 7158
@@ -7279,7 +7161,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/elf.h linux-2.6.32.24/arch/x86/i
7279 7161
7280 #define VDSO_ENTRY \ 7162 #define VDSO_ENTRY \
7281 ((unsigned long)VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall)) 7163 ((unsigned long)VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall))
7282@@ -337,7 +354,4 @@ extern int arch_setup_additional_pages(s 7164@@ -317,7 +334,4 @@ extern int arch_setup_additional_pages(s
7283 extern int syscall32_setup_pages(struct linux_binprm *, int exstack); 7165 extern int syscall32_setup_pages(struct linux_binprm *, int exstack);
7284 #define compat_arch_setup_additional_pages syscall32_setup_pages 7166 #define compat_arch_setup_additional_pages syscall32_setup_pages
7285 7167
@@ -7287,9 +7169,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/elf.h linux-2.6.32.24/arch/x86/i
7287-#define arch_randomize_brk arch_randomize_brk 7169-#define arch_randomize_brk arch_randomize_brk
7288- 7170-
7289 #endif /* _ASM_X86_ELF_H */ 7171 #endif /* _ASM_X86_ELF_H */
7290diff -urNp linux-2.6.32.24/arch/x86/include/asm/futex.h linux-2.6.32.24/arch/x86/include/asm/futex.h 7172diff -urNp linux-2.6.35.7/arch/x86/include/asm/futex.h linux-2.6.35.7/arch/x86/include/asm/futex.h
7291--- linux-2.6.32.24/arch/x86/include/asm/futex.h 2010-08-13 16:24:37.000000000 -0400 7173--- linux-2.6.35.7/arch/x86/include/asm/futex.h 2010-08-26 19:47:12.000000000 -0400
7292+++ linux-2.6.32.24/arch/x86/include/asm/futex.h 2010-10-23 19:59:19.000000000 -0400 7174+++ linux-2.6.35.7/arch/x86/include/asm/futex.h 2010-09-17 20:12:09.000000000 -0400
7293@@ -11,17 +11,54 @@ 7175@@ -11,17 +11,54 @@
7294 #include <asm/processor.h> 7176 #include <asm/processor.h>
7295 #include <asm/system.h> 7177 #include <asm/system.h>
@@ -7426,10 +7308,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/futex.h linux-2.6.32.24/arch/x86
7426 : "memory" 7308 : "memory"
7427 ); 7309 );
7428 7310
7429diff -urNp linux-2.6.32.24/arch/x86/include/asm/i387.h linux-2.6.32.24/arch/x86/include/asm/i387.h 7311diff -urNp linux-2.6.35.7/arch/x86/include/asm/i387.h linux-2.6.35.7/arch/x86/include/asm/i387.h
7430--- linux-2.6.32.24/arch/x86/include/asm/i387.h 2010-08-13 16:24:37.000000000 -0400 7312--- linux-2.6.35.7/arch/x86/include/asm/i387.h 2010-08-26 19:47:12.000000000 -0400
7431+++ linux-2.6.32.24/arch/x86/include/asm/i387.h 2010-10-23 19:59:19.000000000 -0400 7313+++ linux-2.6.35.7/arch/x86/include/asm/i387.h 2010-09-17 20:12:09.000000000 -0400
7432@@ -60,6 +60,11 @@ static inline int fxrstor_checking(struc 7314@@ -77,6 +77,11 @@ static inline int fxrstor_checking(struc
7433 { 7315 {
7434 int err; 7316 int err;
7435 7317
@@ -7441,7 +7323,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/i387.h linux-2.6.32.24/arch/x86/
7441 asm volatile("1: rex64/fxrstor (%[fx])\n\t" 7323 asm volatile("1: rex64/fxrstor (%[fx])\n\t"
7442 "2:\n" 7324 "2:\n"
7443 ".section .fixup,\"ax\"\n" 7325 ".section .fixup,\"ax\"\n"
7444@@ -105,6 +110,11 @@ static inline int fxsave_user(struct i38 7326@@ -127,6 +132,11 @@ static inline int fxsave_user(struct i38
7445 { 7327 {
7446 int err; 7328 int err;
7447 7329
@@ -7453,7 +7335,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/i387.h linux-2.6.32.24/arch/x86/
7453 asm volatile("1: rex64/fxsave (%[fx])\n\t" 7335 asm volatile("1: rex64/fxsave (%[fx])\n\t"
7454 "2:\n" 7336 "2:\n"
7455 ".section .fixup,\"ax\"\n" 7337 ".section .fixup,\"ax\"\n"
7456@@ -195,13 +205,8 @@ static inline int fxrstor_checking(struc 7338@@ -220,13 +230,8 @@ static inline int fxrstor_checking(struc
7457 } 7339 }
7458 7340
7459 /* We need a safe address that is cheap to find and that is already 7341 /* We need a safe address that is cheap to find and that is already
@@ -7469,10 +7351,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/i387.h linux-2.6.32.24/arch/x86/
7469 7351
7470 /* 7352 /*
7471 * These must be called with preempt disabled 7353 * These must be called with preempt disabled
7472diff -urNp linux-2.6.32.24/arch/x86/include/asm/io_64.h linux-2.6.32.24/arch/x86/include/asm/io_64.h 7354diff -urNp linux-2.6.35.7/arch/x86/include/asm/io.h linux-2.6.35.7/arch/x86/include/asm/io.h
7473--- linux-2.6.32.24/arch/x86/include/asm/io_64.h 2010-08-13 16:24:37.000000000 -0400 7355--- linux-2.6.35.7/arch/x86/include/asm/io.h 2010-08-26 19:47:12.000000000 -0400
7474+++ linux-2.6.32.24/arch/x86/include/asm/io_64.h 2010-10-23 19:59:19.000000000 -0400 7356+++ linux-2.6.35.7/arch/x86/include/asm/io.h 2010-09-17 20:12:09.000000000 -0400
7475@@ -140,6 +140,17 @@ __OUTS(l) 7357@@ -213,6 +213,17 @@ extern void iounmap(volatile void __iome
7476 7358
7477 #include <linux/vmalloc.h> 7359 #include <linux/vmalloc.h>
7478 7360
@@ -7487,24 +7369,24 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/io_64.h linux-2.6.32.24/arch/x86
7487+ return (pfn + (count >> PAGE_SHIFT)) < (1 << (boot_cpu_data.x86_phys_bits - PAGE_SHIFT)) ? 1 : 0; 7369+ return (pfn + (count >> PAGE_SHIFT)) < (1 << (boot_cpu_data.x86_phys_bits - PAGE_SHIFT)) ? 1 : 0;
7488+} 7370+}
7489+ 7371+
7490 #include <asm-generic/iomap.h> 7372 /*
7491 7373 * Convert a virtual cached pointer to an uncached pointer
7492 void __memcpy_fromio(void *, unsigned long, unsigned); 7374 */
7493diff -urNp linux-2.6.32.24/arch/x86/include/asm/iommu.h linux-2.6.32.24/arch/x86/include/asm/iommu.h 7375diff -urNp linux-2.6.35.7/arch/x86/include/asm/iommu.h linux-2.6.35.7/arch/x86/include/asm/iommu.h
7494--- linux-2.6.32.24/arch/x86/include/asm/iommu.h 2010-08-13 16:24:37.000000000 -0400 7376--- linux-2.6.35.7/arch/x86/include/asm/iommu.h 2010-08-26 19:47:12.000000000 -0400
7495+++ linux-2.6.32.24/arch/x86/include/asm/iommu.h 2010-10-23 19:59:19.000000000 -0400 7377+++ linux-2.6.35.7/arch/x86/include/asm/iommu.h 2010-09-17 20:12:09.000000000 -0400
7496@@ -3,7 +3,7 @@ 7378@@ -1,7 +1,7 @@
7379 #ifndef _ASM_X86_IOMMU_H
7380 #define _ASM_X86_IOMMU_H
7497 7381
7498 extern void pci_iommu_shutdown(void);
7499 extern void no_iommu_init(void);
7500-extern struct dma_map_ops nommu_dma_ops; 7382-extern struct dma_map_ops nommu_dma_ops;
7501+extern const struct dma_map_ops nommu_dma_ops; 7383+extern const struct dma_map_ops nommu_dma_ops;
7502 extern int force_iommu, no_iommu; 7384 extern int force_iommu, no_iommu;
7503 extern int iommu_detected; 7385 extern int iommu_detected;
7504 extern int iommu_pass_through; 7386 extern int iommu_pass_through;
7505diff -urNp linux-2.6.32.24/arch/x86/include/asm/irqflags.h linux-2.6.32.24/arch/x86/include/asm/irqflags.h 7387diff -urNp linux-2.6.35.7/arch/x86/include/asm/irqflags.h linux-2.6.35.7/arch/x86/include/asm/irqflags.h
7506--- linux-2.6.32.24/arch/x86/include/asm/irqflags.h 2010-08-13 16:24:37.000000000 -0400 7388--- linux-2.6.35.7/arch/x86/include/asm/irqflags.h 2010-08-26 19:47:12.000000000 -0400
7507+++ linux-2.6.32.24/arch/x86/include/asm/irqflags.h 2010-10-23 19:59:19.000000000 -0400 7389+++ linux-2.6.35.7/arch/x86/include/asm/irqflags.h 2010-09-17 20:12:09.000000000 -0400
7508@@ -142,6 +142,11 @@ static inline unsigned long __raw_local_ 7390@@ -142,6 +142,11 @@ static inline unsigned long __raw_local_
7509 sti; \ 7391 sti; \
7510 sysexit 7392 sysexit
@@ -7517,10 +7399,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/irqflags.h linux-2.6.32.24/arch/
7517 #else 7399 #else
7518 #define INTERRUPT_RETURN iret 7400 #define INTERRUPT_RETURN iret
7519 #define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit 7401 #define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
7520diff -urNp linux-2.6.32.24/arch/x86/include/asm/kvm_host.h linux-2.6.32.24/arch/x86/include/asm/kvm_host.h 7402diff -urNp linux-2.6.35.7/arch/x86/include/asm/kvm_host.h linux-2.6.35.7/arch/x86/include/asm/kvm_host.h
7521--- linux-2.6.32.24/arch/x86/include/asm/kvm_host.h 2010-08-13 16:24:37.000000000 -0400 7403--- linux-2.6.35.7/arch/x86/include/asm/kvm_host.h 2010-08-26 19:47:12.000000000 -0400
7522+++ linux-2.6.32.24/arch/x86/include/asm/kvm_host.h 2010-10-23 19:59:19.000000000 -0400 7404+++ linux-2.6.35.7/arch/x86/include/asm/kvm_host.h 2010-09-17 20:12:09.000000000 -0400
7523@@ -533,7 +533,7 @@ struct kvm_x86_ops { 7405@@ -536,7 +536,7 @@ struct kvm_x86_ops {
7524 const struct trace_print_flags *exit_reasons_str; 7406 const struct trace_print_flags *exit_reasons_str;
7525 }; 7407 };
7526 7408
@@ -7529,9 +7411,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/kvm_host.h linux-2.6.32.24/arch/
7529 7411
7530 int kvm_mmu_module_init(void); 7412 int kvm_mmu_module_init(void);
7531 void kvm_mmu_module_exit(void); 7413 void kvm_mmu_module_exit(void);
7532diff -urNp linux-2.6.32.24/arch/x86/include/asm/local.h linux-2.6.32.24/arch/x86/include/asm/local.h 7414diff -urNp linux-2.6.35.7/arch/x86/include/asm/local.h linux-2.6.35.7/arch/x86/include/asm/local.h
7533--- linux-2.6.32.24/arch/x86/include/asm/local.h 2010-08-13 16:24:37.000000000 -0400 7415--- linux-2.6.35.7/arch/x86/include/asm/local.h 2010-08-26 19:47:12.000000000 -0400
7534+++ linux-2.6.32.24/arch/x86/include/asm/local.h 2010-10-23 19:59:19.000000000 -0400 7416+++ linux-2.6.35.7/arch/x86/include/asm/local.h 2010-09-17 20:12:09.000000000 -0400
7535@@ -18,26 +18,90 @@ typedef struct { 7417@@ -18,26 +18,90 @@ typedef struct {
7536 7418
7537 static inline void local_inc(local_t *l) 7419 static inline void local_inc(local_t *l)
@@ -7756,9 +7638,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/local.h linux-2.6.32.24/arch/x86
7756 : "+r" (i), "+m" (l->a.counter) 7638 : "+r" (i), "+m" (l->a.counter)
7757 : : "memory"); 7639 : : "memory");
7758 return i + __i; 7640 return i + __i;
7759diff -urNp linux-2.6.32.24/arch/x86/include/asm/mc146818rtc.h linux-2.6.32.24/arch/x86/include/asm/mc146818rtc.h 7641diff -urNp linux-2.6.35.7/arch/x86/include/asm/mc146818rtc.h linux-2.6.35.7/arch/x86/include/asm/mc146818rtc.h
7760--- linux-2.6.32.24/arch/x86/include/asm/mc146818rtc.h 2010-08-13 16:24:37.000000000 -0400 7642--- linux-2.6.35.7/arch/x86/include/asm/mc146818rtc.h 2010-08-26 19:47:12.000000000 -0400
7761+++ linux-2.6.32.24/arch/x86/include/asm/mc146818rtc.h 2010-10-23 19:59:19.000000000 -0400 7643+++ linux-2.6.35.7/arch/x86/include/asm/mc146818rtc.h 2010-09-17 20:12:09.000000000 -0400
7762@@ -81,8 +81,8 @@ static inline unsigned char current_lock 7644@@ -81,8 +81,8 @@ static inline unsigned char current_lock
7763 #else 7645 #else
7764 #define lock_cmos_prefix(reg) do {} while (0) 7646 #define lock_cmos_prefix(reg) do {} while (0)
@@ -7770,9 +7652,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/mc146818rtc.h linux-2.6.32.24/ar
7770 #define do_i_have_lock_cmos() 0 7652 #define do_i_have_lock_cmos() 0
7771 #define current_lock_cmos_reg() 0 7653 #define current_lock_cmos_reg() 0
7772 #endif 7654 #endif
7773diff -urNp linux-2.6.32.24/arch/x86/include/asm/microcode.h linux-2.6.32.24/arch/x86/include/asm/microcode.h 7655diff -urNp linux-2.6.35.7/arch/x86/include/asm/microcode.h linux-2.6.35.7/arch/x86/include/asm/microcode.h
7774--- linux-2.6.32.24/arch/x86/include/asm/microcode.h 2010-08-13 16:24:37.000000000 -0400 7656--- linux-2.6.35.7/arch/x86/include/asm/microcode.h 2010-08-26 19:47:12.000000000 -0400
7775+++ linux-2.6.32.24/arch/x86/include/asm/microcode.h 2010-10-23 19:59:19.000000000 -0400 7657+++ linux-2.6.35.7/arch/x86/include/asm/microcode.h 2010-09-17 20:12:09.000000000 -0400
7776@@ -12,13 +12,13 @@ struct device; 7658@@ -12,13 +12,13 @@ struct device;
7777 enum ucode_state { UCODE_ERROR, UCODE_OK, UCODE_NFOUND }; 7659 enum ucode_state { UCODE_ERROR, UCODE_OK, UCODE_NFOUND };
7778 7660
@@ -7813,9 +7695,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/microcode.h linux-2.6.32.24/arch
7813 { 7695 {
7814 return NULL; 7696 return NULL;
7815 } 7697 }
7816diff -urNp linux-2.6.32.24/arch/x86/include/asm/mman.h linux-2.6.32.24/arch/x86/include/asm/mman.h 7698diff -urNp linux-2.6.35.7/arch/x86/include/asm/mman.h linux-2.6.35.7/arch/x86/include/asm/mman.h
7817--- linux-2.6.32.24/arch/x86/include/asm/mman.h 2010-08-13 16:24:37.000000000 -0400 7699--- linux-2.6.35.7/arch/x86/include/asm/mman.h 2010-08-26 19:47:12.000000000 -0400
7818+++ linux-2.6.32.24/arch/x86/include/asm/mman.h 2010-10-23 19:59:19.000000000 -0400 7700+++ linux-2.6.35.7/arch/x86/include/asm/mman.h 2010-09-17 20:12:09.000000000 -0400
7819@@ -5,4 +5,14 @@ 7701@@ -5,4 +5,14 @@
7820 7702
7821 #include <asm-generic/mman.h> 7703 #include <asm-generic/mman.h>
@@ -7831,9 +7713,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/mman.h linux-2.6.32.24/arch/x86/
7831+#endif 7713+#endif
7832+ 7714+
7833 #endif /* _ASM_X86_MMAN_H */ 7715 #endif /* _ASM_X86_MMAN_H */
7834diff -urNp linux-2.6.32.24/arch/x86/include/asm/mmu_context.h linux-2.6.32.24/arch/x86/include/asm/mmu_context.h 7716diff -urNp linux-2.6.35.7/arch/x86/include/asm/mmu_context.h linux-2.6.35.7/arch/x86/include/asm/mmu_context.h
7835--- linux-2.6.32.24/arch/x86/include/asm/mmu_context.h 2010-08-13 16:24:37.000000000 -0400 7717--- linux-2.6.35.7/arch/x86/include/asm/mmu_context.h 2010-08-26 19:47:12.000000000 -0400
7836+++ linux-2.6.32.24/arch/x86/include/asm/mmu_context.h 2010-10-23 19:59:19.000000000 -0400 7718+++ linux-2.6.35.7/arch/x86/include/asm/mmu_context.h 2010-09-17 20:12:09.000000000 -0400
7837@@ -24,6 +24,21 @@ void destroy_context(struct mm_struct *m 7719@@ -24,6 +24,21 @@ void destroy_context(struct mm_struct *m
7838 7720
7839 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 7721 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
@@ -7895,7 +7777,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/mmu_context.h linux-2.6.32.24/ar
7895- } 7777- }
7896+ 7778+
7897+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP) 7779+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_SMP)
7898+ if (!nx_enabled) { 7780+ if (!(__supported_pte_mask & _PAGE_NX)) {
7899+ smp_mb__before_clear_bit(); 7781+ smp_mb__before_clear_bit();
7900+ cpu_clear(cpu, prev->context.cpu_user_cs_mask); 7782+ cpu_clear(cpu, prev->context.cpu_user_cs_mask);
7901+ smp_mb__after_clear_bit(); 7783+ smp_mb__after_clear_bit();
@@ -7940,13 +7822,13 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/mmu_context.h linux-2.6.32.24/ar
7940 load_LDT_nolock(&next->context); 7822 load_LDT_nolock(&next->context);
7941+ 7823+
7942+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_PAGEEXEC) 7824+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_PAGEEXEC)
7943+ if (!nx_enabled) 7825+ if (!(__supported_pte_mask & _PAGE_NX))
7944+ cpu_set(cpu, next->context.cpu_user_cs_mask); 7826+ cpu_set(cpu, next->context.cpu_user_cs_mask);
7945+#endif 7827+#endif
7946+ 7828+
7947+#if defined(CONFIG_X86_32) && (defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)) 7829+#if defined(CONFIG_X86_32) && (defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC))
7948+#ifdef CONFIG_PAX_PAGEEXEC 7830+#ifdef CONFIG_PAX_PAGEEXEC
7949+ if (!((next->pax_flags & MF_PAX_PAGEEXEC) && nx_enabled)) 7831+ if (!((next->pax_flags & MF_PAX_PAGEEXEC) && (__supported_pte_mask & _PAGE_NX)))
7950+#endif 7832+#endif
7951+ set_user_cs(next->context.user_cs_base, next->context.user_cs_limit, cpu); 7833+ set_user_cs(next->context.user_cs_base, next->context.user_cs_limit, cpu);
7952+#endif 7834+#endif
@@ -7958,9 +7840,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/mmu_context.h linux-2.6.32.24/ar
7958 } 7840 }
7959 7841
7960 #define activate_mm(prev, next) \ 7842 #define activate_mm(prev, next) \
7961diff -urNp linux-2.6.32.24/arch/x86/include/asm/mmu.h linux-2.6.32.24/arch/x86/include/asm/mmu.h 7843diff -urNp linux-2.6.35.7/arch/x86/include/asm/mmu.h linux-2.6.35.7/arch/x86/include/asm/mmu.h
7962--- linux-2.6.32.24/arch/x86/include/asm/mmu.h 2010-08-13 16:24:37.000000000 -0400 7844--- linux-2.6.35.7/arch/x86/include/asm/mmu.h 2010-08-26 19:47:12.000000000 -0400
7963+++ linux-2.6.32.24/arch/x86/include/asm/mmu.h 2010-10-23 19:59:19.000000000 -0400 7845+++ linux-2.6.35.7/arch/x86/include/asm/mmu.h 2010-09-17 20:12:09.000000000 -0400
7964@@ -9,10 +9,23 @@ 7846@@ -9,10 +9,23 @@
7965 * we put the segment information here. 7847 * we put the segment information here.
7966 */ 7848 */
@@ -7987,9 +7869,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/mmu.h linux-2.6.32.24/arch/x86/i
7987 } mm_context_t; 7869 } mm_context_t;
7988 7870
7989 #ifdef CONFIG_SMP 7871 #ifdef CONFIG_SMP
7990diff -urNp linux-2.6.32.24/arch/x86/include/asm/module.h linux-2.6.32.24/arch/x86/include/asm/module.h 7872diff -urNp linux-2.6.35.7/arch/x86/include/asm/module.h linux-2.6.35.7/arch/x86/include/asm/module.h
7991--- linux-2.6.32.24/arch/x86/include/asm/module.h 2010-08-13 16:24:37.000000000 -0400 7873--- linux-2.6.35.7/arch/x86/include/asm/module.h 2010-08-26 19:47:12.000000000 -0400
7992+++ linux-2.6.32.24/arch/x86/include/asm/module.h 2010-10-23 19:59:19.000000000 -0400 7874+++ linux-2.6.35.7/arch/x86/include/asm/module.h 2010-09-17 20:12:37.000000000 -0400
7993@@ -59,13 +59,31 @@ 7875@@ -59,13 +59,31 @@
7994 #error unknown processor family 7876 #error unknown processor family
7995 #endif 7877 #endif
@@ -8023,9 +7905,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/module.h linux-2.6.32.24/arch/x8
8023 #endif 7905 #endif
8024 7906
8025 #endif /* _ASM_X86_MODULE_H */ 7907 #endif /* _ASM_X86_MODULE_H */
8026diff -urNp linux-2.6.32.24/arch/x86/include/asm/page_32_types.h linux-2.6.32.24/arch/x86/include/asm/page_32_types.h 7908diff -urNp linux-2.6.35.7/arch/x86/include/asm/page_32_types.h linux-2.6.35.7/arch/x86/include/asm/page_32_types.h
8027--- linux-2.6.32.24/arch/x86/include/asm/page_32_types.h 2010-08-13 16:24:37.000000000 -0400 7909--- linux-2.6.35.7/arch/x86/include/asm/page_32_types.h 2010-08-26 19:47:12.000000000 -0400
8028+++ linux-2.6.32.24/arch/x86/include/asm/page_32_types.h 2010-10-23 19:59:19.000000000 -0400 7910+++ linux-2.6.35.7/arch/x86/include/asm/page_32_types.h 2010-09-17 20:12:09.000000000 -0400
8029@@ -15,6 +15,10 @@ 7911@@ -15,6 +15,10 @@
8030 */ 7912 */
8031 #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) 7913 #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
@@ -8037,10 +7919,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/page_32_types.h linux-2.6.32.24/
8037 #ifdef CONFIG_4KSTACKS 7919 #ifdef CONFIG_4KSTACKS
8038 #define THREAD_ORDER 0 7920 #define THREAD_ORDER 0
8039 #else 7921 #else
8040diff -urNp linux-2.6.32.24/arch/x86/include/asm/paravirt.h linux-2.6.32.24/arch/x86/include/asm/paravirt.h 7922diff -urNp linux-2.6.35.7/arch/x86/include/asm/paravirt.h linux-2.6.35.7/arch/x86/include/asm/paravirt.h
8041--- linux-2.6.32.24/arch/x86/include/asm/paravirt.h 2010-08-13 16:24:37.000000000 -0400 7923--- linux-2.6.35.7/arch/x86/include/asm/paravirt.h 2010-08-26 19:47:12.000000000 -0400
8042+++ linux-2.6.32.24/arch/x86/include/asm/paravirt.h 2010-10-23 19:59:19.000000000 -0400 7924+++ linux-2.6.35.7/arch/x86/include/asm/paravirt.h 2010-09-17 20:12:09.000000000 -0400
8043@@ -729,6 +729,21 @@ static inline void __set_fixmap(unsigned 7925@@ -720,6 +720,21 @@ static inline void __set_fixmap(unsigned
8044 pv_mmu_ops.set_fixmap(idx, phys, flags); 7926 pv_mmu_ops.set_fixmap(idx, phys, flags);
8045 } 7927 }
8046 7928
@@ -8061,8 +7943,8 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/paravirt.h linux-2.6.32.24/arch/
8061+ 7943+
8062 #if defined(CONFIG_SMP) && defined(CONFIG_PARAVIRT_SPINLOCKS) 7944 #if defined(CONFIG_SMP) && defined(CONFIG_PARAVIRT_SPINLOCKS)
8063 7945
8064 static inline int __raw_spin_is_locked(struct raw_spinlock *lock) 7946 static inline int arch_spin_is_locked(struct arch_spinlock *lock)
8065@@ -945,7 +960,7 @@ extern void default_banner(void); 7947@@ -936,7 +951,7 @@ extern void default_banner(void);
8066 7948
8067 #define PARA_PATCH(struct, off) ((PARAVIRT_PATCH_##struct + (off)) / 4) 7949 #define PARA_PATCH(struct, off) ((PARAVIRT_PATCH_##struct + (off)) / 4)
8068 #define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .long, 4) 7950 #define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .long, 4)
@@ -8071,7 +7953,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/paravirt.h linux-2.6.32.24/arch/
8071 #endif 7953 #endif
8072 7954
8073 #define INTERRUPT_RETURN \ 7955 #define INTERRUPT_RETURN \
8074@@ -1022,6 +1037,21 @@ extern void default_banner(void); 7956@@ -1013,6 +1028,21 @@ extern void default_banner(void);
8075 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_irq_enable_sysexit), \ 7957 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_irq_enable_sysexit), \
8076 CLBR_NONE, \ 7958 CLBR_NONE, \
8077 jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_irq_enable_sysexit)) 7959 jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_irq_enable_sysexit))
@@ -8093,10 +7975,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/paravirt.h linux-2.6.32.24/arch/
8093 #endif /* CONFIG_X86_32 */ 7975 #endif /* CONFIG_X86_32 */
8094 7976
8095 #endif /* __ASSEMBLY__ */ 7977 #endif /* __ASSEMBLY__ */
8096diff -urNp linux-2.6.32.24/arch/x86/include/asm/paravirt_types.h linux-2.6.32.24/arch/x86/include/asm/paravirt_types.h 7978diff -urNp linux-2.6.35.7/arch/x86/include/asm/paravirt_types.h linux-2.6.35.7/arch/x86/include/asm/paravirt_types.h
8097--- linux-2.6.32.24/arch/x86/include/asm/paravirt_types.h 2010-08-13 16:24:37.000000000 -0400 7979--- linux-2.6.35.7/arch/x86/include/asm/paravirt_types.h 2010-08-26 19:47:12.000000000 -0400
8098+++ linux-2.6.32.24/arch/x86/include/asm/paravirt_types.h 2010-10-23 19:59:19.000000000 -0400 7980+++ linux-2.6.35.7/arch/x86/include/asm/paravirt_types.h 2010-09-17 20:12:09.000000000 -0400
8099@@ -316,6 +316,12 @@ struct pv_mmu_ops { 7981@@ -312,6 +312,12 @@ struct pv_mmu_ops {
8100 an mfn. We can tell which is which from the index. */ 7982 an mfn. We can tell which is which from the index. */
8101 void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx, 7983 void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
8102 phys_addr_t phys, pgprot_t flags); 7984 phys_addr_t phys, pgprot_t flags);
@@ -8108,11 +7990,11 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/paravirt_types.h linux-2.6.32.24
8108+ 7990+
8109 }; 7991 };
8110 7992
8111 struct raw_spinlock; 7993 struct arch_spinlock;
8112diff -urNp linux-2.6.32.24/arch/x86/include/asm/pci_x86.h linux-2.6.32.24/arch/x86/include/asm/pci_x86.h 7994diff -urNp linux-2.6.35.7/arch/x86/include/asm/pci_x86.h linux-2.6.35.7/arch/x86/include/asm/pci_x86.h
8113--- linux-2.6.32.24/arch/x86/include/asm/pci_x86.h 2010-08-13 16:24:37.000000000 -0400 7995--- linux-2.6.35.7/arch/x86/include/asm/pci_x86.h 2010-08-26 19:47:12.000000000 -0400
8114+++ linux-2.6.32.24/arch/x86/include/asm/pci_x86.h 2010-10-23 19:59:19.000000000 -0400 7996+++ linux-2.6.35.7/arch/x86/include/asm/pci_x86.h 2010-09-17 20:12:09.000000000 -0400
8115@@ -89,16 +89,16 @@ extern int (*pcibios_enable_irq)(struct 7997@@ -91,16 +91,16 @@ extern int (*pcibios_enable_irq)(struct
8116 extern void (*pcibios_disable_irq)(struct pci_dev *dev); 7998 extern void (*pcibios_disable_irq)(struct pci_dev *dev);
8117 7999
8118 struct pci_raw_ops { 8000 struct pci_raw_ops {
@@ -8134,9 +8016,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pci_x86.h linux-2.6.32.24/arch/x
8134 extern bool port_cf9_safe; 8016 extern bool port_cf9_safe;
8135 8017
8136 /* arch_initcall level */ 8018 /* arch_initcall level */
8137diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgalloc.h linux-2.6.32.24/arch/x86/include/asm/pgalloc.h 8019diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgalloc.h linux-2.6.35.7/arch/x86/include/asm/pgalloc.h
8138--- linux-2.6.32.24/arch/x86/include/asm/pgalloc.h 2010-08-13 16:24:37.000000000 -0400 8020--- linux-2.6.35.7/arch/x86/include/asm/pgalloc.h 2010-08-26 19:47:12.000000000 -0400
8139+++ linux-2.6.32.24/arch/x86/include/asm/pgalloc.h 2010-10-23 19:59:19.000000000 -0400 8021+++ linux-2.6.35.7/arch/x86/include/asm/pgalloc.h 2010-09-17 20:12:09.000000000 -0400
8140@@ -63,6 +63,13 @@ static inline void pmd_populate_kernel(s 8022@@ -63,6 +63,13 @@ static inline void pmd_populate_kernel(s
8141 pmd_t *pmd, pte_t *pte) 8023 pmd_t *pmd, pte_t *pte)
8142 { 8024 {
@@ -8151,9 +8033,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgalloc.h linux-2.6.32.24/arch/x
8151 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); 8033 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE));
8152 } 8034 }
8153 8035
8154diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable-2level.h linux-2.6.32.24/arch/x86/include/asm/pgtable-2level.h 8036diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgtable-2level.h linux-2.6.35.7/arch/x86/include/asm/pgtable-2level.h
8155--- linux-2.6.32.24/arch/x86/include/asm/pgtable-2level.h 2010-08-13 16:24:37.000000000 -0400 8037--- linux-2.6.35.7/arch/x86/include/asm/pgtable-2level.h 2010-08-26 19:47:12.000000000 -0400
8156+++ linux-2.6.32.24/arch/x86/include/asm/pgtable-2level.h 2010-10-23 19:59:19.000000000 -0400 8038+++ linux-2.6.35.7/arch/x86/include/asm/pgtable-2level.h 2010-09-17 20:12:09.000000000 -0400
8157@@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t 8039@@ -18,7 +18,9 @@ static inline void native_set_pte(pte_t
8158 8040
8159 static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) 8041 static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
@@ -8164,10 +8046,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable-2level.h linux-2.6.32.24
8164 } 8046 }
8165 8047
8166 static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) 8048 static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
8167diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_32.h linux-2.6.32.24/arch/x86/include/asm/pgtable_32.h 8049diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgtable_32.h linux-2.6.35.7/arch/x86/include/asm/pgtable_32.h
8168--- linux-2.6.32.24/arch/x86/include/asm/pgtable_32.h 2010-08-13 16:24:37.000000000 -0400 8050--- linux-2.6.35.7/arch/x86/include/asm/pgtable_32.h 2010-08-26 19:47:12.000000000 -0400
8169+++ linux-2.6.32.24/arch/x86/include/asm/pgtable_32.h 2010-10-23 19:59:19.000000000 -0400 8051+++ linux-2.6.35.7/arch/x86/include/asm/pgtable_32.h 2010-09-17 20:12:09.000000000 -0400
8170@@ -26,8 +26,6 @@ 8052@@ -25,8 +25,6 @@
8171 struct mm_struct; 8053 struct mm_struct;
8172 struct vm_area_struct; 8054 struct vm_area_struct;
8173 8055
@@ -8176,7 +8058,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_32.h linux-2.6.32.24/arc
8176 static inline void pgtable_cache_init(void) { } 8058 static inline void pgtable_cache_init(void) { }
8177 static inline void check_pgt_cache(void) { } 8059 static inline void check_pgt_cache(void) { }
8178 void paging_init(void); 8060 void paging_init(void);
8179@@ -48,6 +46,11 @@ extern void set_pmd_pfn(unsigned long, u 8061@@ -47,6 +45,11 @@ extern void set_pmd_pfn(unsigned long, u
8180 # include <asm/pgtable-2level.h> 8062 # include <asm/pgtable-2level.h>
8181 #endif 8063 #endif
8182 8064
@@ -8188,7 +8070,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_32.h linux-2.6.32.24/arc
8188 #if defined(CONFIG_HIGHPTE) 8070 #if defined(CONFIG_HIGHPTE)
8189 #define __KM_PTE \ 8071 #define __KM_PTE \
8190 (in_nmi() ? KM_NMI_PTE : \ 8072 (in_nmi() ? KM_NMI_PTE : \
8191@@ -72,7 +75,9 @@ extern void set_pmd_pfn(unsigned long, u 8073@@ -71,7 +74,9 @@ extern void set_pmd_pfn(unsigned long, u
8192 /* Clear a kernel PTE and flush it from the TLB */ 8074 /* Clear a kernel PTE and flush it from the TLB */
8193 #define kpte_clear_flush(ptep, vaddr) \ 8075 #define kpte_clear_flush(ptep, vaddr) \
8194 do { \ 8076 do { \
@@ -8198,7 +8080,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_32.h linux-2.6.32.24/arc
8198 __flush_tlb_one((vaddr)); \ 8080 __flush_tlb_one((vaddr)); \
8199 } while (0) 8081 } while (0)
8200 8082
8201@@ -84,6 +89,9 @@ do { \ 8083@@ -83,6 +88,9 @@ do { \
8202 8084
8203 #endif /* !__ASSEMBLY__ */ 8085 #endif /* !__ASSEMBLY__ */
8204 8086
@@ -8208,9 +8090,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_32.h linux-2.6.32.24/arc
8208 /* 8090 /*
8209 * kern_addr_valid() is (1) for FLATMEM and (0) for 8091 * kern_addr_valid() is (1) for FLATMEM and (0) for
8210 * SPARSEMEM and DISCONTIGMEM 8092 * SPARSEMEM and DISCONTIGMEM
8211diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_32_types.h linux-2.6.32.24/arch/x86/include/asm/pgtable_32_types.h 8093diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgtable_32_types.h linux-2.6.35.7/arch/x86/include/asm/pgtable_32_types.h
8212--- linux-2.6.32.24/arch/x86/include/asm/pgtable_32_types.h 2010-08-13 16:24:37.000000000 -0400 8094--- linux-2.6.35.7/arch/x86/include/asm/pgtable_32_types.h 2010-08-26 19:47:12.000000000 -0400
8213+++ linux-2.6.32.24/arch/x86/include/asm/pgtable_32_types.h 2010-10-23 19:59:19.000000000 -0400 8095+++ linux-2.6.35.7/arch/x86/include/asm/pgtable_32_types.h 2010-09-17 20:12:09.000000000 -0400
8214@@ -8,7 +8,7 @@ 8096@@ -8,7 +8,7 @@
8215 */ 8097 */
8216 #ifdef CONFIG_X86_PAE 8098 #ifdef CONFIG_X86_PAE
@@ -8240,9 +8122,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_32_types.h linux-2.6.32.
8240 #define MODULES_VADDR VMALLOC_START 8122 #define MODULES_VADDR VMALLOC_START
8241 #define MODULES_END VMALLOC_END 8123 #define MODULES_END VMALLOC_END
8242 #define MODULES_LEN (MODULES_VADDR - MODULES_END) 8124 #define MODULES_LEN (MODULES_VADDR - MODULES_END)
8243diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable-3level.h linux-2.6.32.24/arch/x86/include/asm/pgtable-3level.h 8125diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgtable-3level.h linux-2.6.35.7/arch/x86/include/asm/pgtable-3level.h
8244--- linux-2.6.32.24/arch/x86/include/asm/pgtable-3level.h 2010-08-13 16:24:37.000000000 -0400 8126--- linux-2.6.35.7/arch/x86/include/asm/pgtable-3level.h 2010-08-26 19:47:12.000000000 -0400
8245+++ linux-2.6.32.24/arch/x86/include/asm/pgtable-3level.h 2010-10-23 19:59:19.000000000 -0400 8127+++ linux-2.6.35.7/arch/x86/include/asm/pgtable-3level.h 2010-09-17 20:12:09.000000000 -0400
8246@@ -38,12 +38,16 @@ static inline void native_set_pte_atomic 8128@@ -38,12 +38,16 @@ static inline void native_set_pte_atomic
8247 8129
8248 static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) 8130 static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
@@ -8260,9 +8142,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable-3level.h linux-2.6.32.24
8260 } 8142 }
8261 8143
8262 /* 8144 /*
8263diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_64.h linux-2.6.32.24/arch/x86/include/asm/pgtable_64.h 8145diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgtable_64.h linux-2.6.35.7/arch/x86/include/asm/pgtable_64.h
8264--- linux-2.6.32.24/arch/x86/include/asm/pgtable_64.h 2010-08-13 16:24:37.000000000 -0400 8146--- linux-2.6.35.7/arch/x86/include/asm/pgtable_64.h 2010-08-26 19:47:12.000000000 -0400
8265+++ linux-2.6.32.24/arch/x86/include/asm/pgtable_64.h 2010-10-23 19:59:19.000000000 -0400 8147+++ linux-2.6.35.7/arch/x86/include/asm/pgtable_64.h 2010-09-17 20:12:09.000000000 -0400
8266@@ -16,10 +16,13 @@ 8148@@ -16,10 +16,13 @@
8267 8149
8268 extern pud_t level3_kernel_pgt[512]; 8150 extern pud_t level3_kernel_pgt[512];
@@ -8299,9 +8181,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_64.h linux-2.6.32.24/arc
8299 } 8181 }
8300 8182
8301 static inline void native_pgd_clear(pgd_t *pgd) 8183 static inline void native_pgd_clear(pgd_t *pgd)
8302diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_64_types.h linux-2.6.32.24/arch/x86/include/asm/pgtable_64_types.h 8184diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgtable_64_types.h linux-2.6.35.7/arch/x86/include/asm/pgtable_64_types.h
8303--- linux-2.6.32.24/arch/x86/include/asm/pgtable_64_types.h 2010-08-13 16:24:37.000000000 -0400 8185--- linux-2.6.35.7/arch/x86/include/asm/pgtable_64_types.h 2010-08-26 19:47:12.000000000 -0400
8304+++ linux-2.6.32.24/arch/x86/include/asm/pgtable_64_types.h 2010-10-23 19:59:19.000000000 -0400 8186+++ linux-2.6.35.7/arch/x86/include/asm/pgtable_64_types.h 2010-09-17 20:12:09.000000000 -0400
8305@@ -59,5 +59,10 @@ typedef struct { pteval_t pte; } pte_t; 8187@@ -59,5 +59,10 @@ typedef struct { pteval_t pte; } pte_t;
8306 #define MODULES_VADDR _AC(0xffffffffa0000000, UL) 8188 #define MODULES_VADDR _AC(0xffffffffa0000000, UL)
8307 #define MODULES_END _AC(0xffffffffff000000, UL) 8189 #define MODULES_END _AC(0xffffffffff000000, UL)
@@ -8313,10 +8195,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_64_types.h linux-2.6.32.
8313+#define ktva_ktla(addr) (addr) 8195+#define ktva_ktla(addr) (addr)
8314 8196
8315 #endif /* _ASM_X86_PGTABLE_64_DEFS_H */ 8197 #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
8316diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable.h linux-2.6.32.24/arch/x86/include/asm/pgtable.h 8198diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgtable.h linux-2.6.35.7/arch/x86/include/asm/pgtable.h
8317--- linux-2.6.32.24/arch/x86/include/asm/pgtable.h 2010-08-13 16:24:37.000000000 -0400 8199--- linux-2.6.35.7/arch/x86/include/asm/pgtable.h 2010-08-26 19:47:12.000000000 -0400
8318+++ linux-2.6.32.24/arch/x86/include/asm/pgtable.h 2010-10-23 19:59:19.000000000 -0400 8200+++ linux-2.6.35.7/arch/x86/include/asm/pgtable.h 2010-09-17 20:12:09.000000000 -0400
8319@@ -74,12 +74,51 @@ extern struct list_head pgd_list; 8201@@ -76,12 +76,51 @@ extern struct list_head pgd_list;
8320 8202
8321 #define arch_end_context_switch(prev) do {} while(0) 8203 #define arch_end_context_switch(prev) do {} while(0)
8322 8204
@@ -8368,7 +8250,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable.h linux-2.6.32.24/arch/x
8368 static inline int pte_dirty(pte_t pte) 8250 static inline int pte_dirty(pte_t pte)
8369 { 8251 {
8370 return pte_flags(pte) & _PAGE_DIRTY; 8252 return pte_flags(pte) & _PAGE_DIRTY;
8371@@ -167,9 +206,29 @@ static inline pte_t pte_wrprotect(pte_t 8253@@ -169,9 +208,29 @@ static inline pte_t pte_wrprotect(pte_t
8372 return pte_clear_flags(pte, _PAGE_RW); 8254 return pte_clear_flags(pte, _PAGE_RW);
8373 } 8255 }
8374 8256
@@ -8399,7 +8281,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable.h linux-2.6.32.24/arch/x
8399 } 8281 }
8400 8282
8401 static inline pte_t pte_mkdirty(pte_t pte) 8283 static inline pte_t pte_mkdirty(pte_t pte)
8402@@ -302,6 +361,15 @@ pte_t *populate_extra_pte(unsigned long 8284@@ -304,6 +363,15 @@ pte_t *populate_extra_pte(unsigned long
8403 #endif 8285 #endif
8404 8286
8405 #ifndef __ASSEMBLY__ 8287 #ifndef __ASSEMBLY__
@@ -8415,7 +8297,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable.h linux-2.6.32.24/arch/x
8415 #include <linux/mm_types.h> 8297 #include <linux/mm_types.h>
8416 8298
8417 static inline int pte_none(pte_t pte) 8299 static inline int pte_none(pte_t pte)
8418@@ -472,7 +540,7 @@ static inline pud_t *pud_offset(pgd_t *p 8300@@ -474,7 +542,7 @@ static inline pud_t *pud_offset(pgd_t *p
8419 8301
8420 static inline int pgd_bad(pgd_t pgd) 8302 static inline int pgd_bad(pgd_t pgd)
8421 { 8303 {
@@ -8424,7 +8306,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable.h linux-2.6.32.24/arch/x
8424 } 8306 }
8425 8307
8426 static inline int pgd_none(pgd_t pgd) 8308 static inline int pgd_none(pgd_t pgd)
8427@@ -495,7 +563,12 @@ static inline int pgd_none(pgd_t pgd) 8309@@ -497,7 +565,12 @@ static inline int pgd_none(pgd_t pgd)
8428 * pgd_offset() returns a (pgd_t *) 8310 * pgd_offset() returns a (pgd_t *)
8429 * pgd_index() is used get the offset into the pgd page's array of pgd_t's; 8311 * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
8430 */ 8312 */
@@ -8438,7 +8320,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable.h linux-2.6.32.24/arch/x
8438 /* 8320 /*
8439 * a shortcut which implies the use of the kernel's pgd, instead 8321 * a shortcut which implies the use of the kernel's pgd, instead
8440 * of a process's 8322 * of a process's
8441@@ -506,6 +579,20 @@ static inline int pgd_none(pgd_t pgd) 8323@@ -508,6 +581,20 @@ static inline int pgd_none(pgd_t pgd)
8442 #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET) 8324 #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)
8443 #define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY) 8325 #define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY)
8444 8326
@@ -8459,7 +8341,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable.h linux-2.6.32.24/arch/x
8459 #ifndef __ASSEMBLY__ 8341 #ifndef __ASSEMBLY__
8460 8342
8461 extern int direct_gbpages; 8343 extern int direct_gbpages;
8462@@ -611,11 +698,23 @@ static inline void ptep_set_wrprotect(st 8344@@ -613,11 +700,23 @@ static inline void ptep_set_wrprotect(st
8463 * dst and src can be on the same page, but the range must not overlap, 8345 * dst and src can be on the same page, but the range must not overlap,
8464 * and must not cross a page boundary. 8346 * and must not cross a page boundary.
8465 */ 8347 */
@@ -8485,9 +8367,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable.h linux-2.6.32.24/arch/x
8485 8367
8486 #include <asm-generic/pgtable.h> 8368 #include <asm-generic/pgtable.h>
8487 #endif /* __ASSEMBLY__ */ 8369 #endif /* __ASSEMBLY__ */
8488diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_types.h linux-2.6.32.24/arch/x86/include/asm/pgtable_types.h 8370diff -urNp linux-2.6.35.7/arch/x86/include/asm/pgtable_types.h linux-2.6.35.7/arch/x86/include/asm/pgtable_types.h
8489--- linux-2.6.32.24/arch/x86/include/asm/pgtable_types.h 2010-08-13 16:24:37.000000000 -0400 8371--- linux-2.6.35.7/arch/x86/include/asm/pgtable_types.h 2010-08-26 19:47:12.000000000 -0400
8490+++ linux-2.6.32.24/arch/x86/include/asm/pgtable_types.h 2010-10-23 19:59:19.000000000 -0400 8372+++ linux-2.6.35.7/arch/x86/include/asm/pgtable_types.h 2010-09-17 20:12:09.000000000 -0400
8491@@ -16,12 +16,11 @@ 8373@@ -16,12 +16,11 @@
8492 #define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */ 8374 #define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
8493 #define _PAGE_BIT_PAT 7 /* on 4KB pages */ 8375 #define _PAGE_BIT_PAT 7 /* on 4KB pages */
@@ -8591,27 +8473,18 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/pgtable_types.h linux-2.6.32.24/
8591 static inline pmdval_t native_pmd_val(pmd_t pmd) 8473 static inline pmdval_t native_pmd_val(pmd_t pmd)
8592 { 8474 {
8593 return native_pgd_val(pmd.pud.pgd); 8475 return native_pgd_val(pmd.pud.pgd);
8594@@ -278,7 +287,16 @@ typedef struct page *pgtable_t; 8476@@ -278,7 +287,6 @@ typedef struct page *pgtable_t;
8595 8477
8596 extern pteval_t __supported_pte_mask; 8478 extern pteval_t __supported_pte_mask;
8597 extern void set_nx(void); 8479 extern void set_nx(void);
8598+ 8480-extern int nx_enabled;
8599+#ifdef CONFIG_X86_32
8600+#ifdef CONFIG_X86_PAE
8601 extern int nx_enabled;
8602+#else
8603+#define nx_enabled (0)
8604+#endif
8605+#else
8606+#define nx_enabled (1)
8607+#endif
8608 8481
8609 #define pgprot_writecombine pgprot_writecombine 8482 #define pgprot_writecombine pgprot_writecombine
8610 extern pgprot_t pgprot_writecombine(pgprot_t prot); 8483 extern pgprot_t pgprot_writecombine(pgprot_t prot);
8611diff -urNp linux-2.6.32.24/arch/x86/include/asm/processor.h linux-2.6.32.24/arch/x86/include/asm/processor.h 8484diff -urNp linux-2.6.35.7/arch/x86/include/asm/processor.h linux-2.6.35.7/arch/x86/include/asm/processor.h
8612--- linux-2.6.32.24/arch/x86/include/asm/processor.h 2010-08-13 16:24:37.000000000 -0400 8485--- linux-2.6.35.7/arch/x86/include/asm/processor.h 2010-08-26 19:47:12.000000000 -0400
8613+++ linux-2.6.32.24/arch/x86/include/asm/processor.h 2010-10-23 19:59:19.000000000 -0400 8486+++ linux-2.6.35.7/arch/x86/include/asm/processor.h 2010-09-17 20:12:09.000000000 -0400
8614@@ -272,7 +272,7 @@ struct tss_struct { 8487@@ -269,7 +269,7 @@ struct tss_struct {
8615 8488
8616 } ____cacheline_aligned; 8489 } ____cacheline_aligned;
8617 8490
@@ -8620,7 +8493,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/processor.h linux-2.6.32.24/arch
8620 8493
8621 /* 8494 /*
8622 * Save the original ist values for checking stack pointers during debugging 8495 * Save the original ist values for checking stack pointers during debugging
8623@@ -911,8 +911,15 @@ static inline void spin_lock_prefetch(co 8496@@ -884,8 +884,15 @@ static inline void spin_lock_prefetch(co
8624 */ 8497 */
8625 #define TASK_SIZE PAGE_OFFSET 8498 #define TASK_SIZE PAGE_OFFSET
8626 #define TASK_SIZE_MAX TASK_SIZE 8499 #define TASK_SIZE_MAX TASK_SIZE
@@ -8637,7 +8510,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/processor.h linux-2.6.32.24/arch
8637 8510
8638 #define INIT_THREAD { \ 8511 #define INIT_THREAD { \
8639 .sp0 = sizeof(init_stack) + (long)&init_stack, \ 8512 .sp0 = sizeof(init_stack) + (long)&init_stack, \
8640@@ -929,7 +936,7 @@ static inline void spin_lock_prefetch(co 8513@@ -902,7 +909,7 @@ static inline void spin_lock_prefetch(co
8641 */ 8514 */
8642 #define INIT_TSS { \ 8515 #define INIT_TSS { \
8643 .x86_tss = { \ 8516 .x86_tss = { \
@@ -8646,7 +8519,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/processor.h linux-2.6.32.24/arch
8646 .ss0 = __KERNEL_DS, \ 8519 .ss0 = __KERNEL_DS, \
8647 .ss1 = __KERNEL_CS, \ 8520 .ss1 = __KERNEL_CS, \
8648 .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \ 8521 .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \
8649@@ -940,11 +947,7 @@ static inline void spin_lock_prefetch(co 8522@@ -913,11 +920,7 @@ static inline void spin_lock_prefetch(co
8650 extern unsigned long thread_saved_pc(struct task_struct *tsk); 8523 extern unsigned long thread_saved_pc(struct task_struct *tsk);
8651 8524
8652 #define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long)) 8525 #define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
@@ -8659,7 +8532,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/processor.h linux-2.6.32.24/arch
8659 8532
8660 /* 8533 /*
8661 * The below -8 is to reserve 8 bytes on top of the ring0 stack. 8534 * The below -8 is to reserve 8 bytes on top of the ring0 stack.
8662@@ -959,7 +962,7 @@ extern unsigned long thread_saved_pc(str 8535@@ -932,7 +935,7 @@ extern unsigned long thread_saved_pc(str
8663 #define task_pt_regs(task) \ 8536 #define task_pt_regs(task) \
8664 ({ \ 8537 ({ \
8665 struct pt_regs *__regs__; \ 8538 struct pt_regs *__regs__; \
@@ -8668,7 +8541,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/processor.h linux-2.6.32.24/arch
8668 __regs__ - 1; \ 8541 __regs__ - 1; \
8669 }) 8542 })
8670 8543
8671@@ -969,13 +972,13 @@ extern unsigned long thread_saved_pc(str 8544@@ -942,13 +945,13 @@ extern unsigned long thread_saved_pc(str
8672 /* 8545 /*
8673 * User space process size. 47bits minus one guard page. 8546 * User space process size. 47bits minus one guard page.
8674 */ 8547 */
@@ -8684,7 +8557,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/processor.h linux-2.6.32.24/arch
8684 8557
8685 #define TASK_SIZE (test_thread_flag(TIF_IA32) ? \ 8558 #define TASK_SIZE (test_thread_flag(TIF_IA32) ? \
8686 IA32_PAGE_OFFSET : TASK_SIZE_MAX) 8559 IA32_PAGE_OFFSET : TASK_SIZE_MAX)
8687@@ -1012,6 +1015,10 @@ extern void start_thread(struct pt_regs 8560@@ -985,6 +988,10 @@ extern void start_thread(struct pt_regs
8688 */ 8561 */
8689 #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) 8562 #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
8690 8563
@@ -8695,10 +8568,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/processor.h linux-2.6.32.24/arch
8695 #define KSTK_EIP(task) (task_pt_regs(task)->ip) 8568 #define KSTK_EIP(task) (task_pt_regs(task)->ip)
8696 8569
8697 /* Get/set a process' ability to use the timestamp counter instruction */ 8570 /* Get/set a process' ability to use the timestamp counter instruction */
8698diff -urNp linux-2.6.32.24/arch/x86/include/asm/ptrace.h linux-2.6.32.24/arch/x86/include/asm/ptrace.h 8571diff -urNp linux-2.6.35.7/arch/x86/include/asm/ptrace.h linux-2.6.35.7/arch/x86/include/asm/ptrace.h
8699--- linux-2.6.32.24/arch/x86/include/asm/ptrace.h 2010-08-13 16:24:37.000000000 -0400 8572--- linux-2.6.35.7/arch/x86/include/asm/ptrace.h 2010-08-26 19:47:12.000000000 -0400
8700+++ linux-2.6.32.24/arch/x86/include/asm/ptrace.h 2010-10-23 19:59:19.000000000 -0400 8573+++ linux-2.6.35.7/arch/x86/include/asm/ptrace.h 2010-09-17 20:12:09.000000000 -0400
8701@@ -151,28 +151,29 @@ static inline unsigned long regs_return_ 8574@@ -152,28 +152,29 @@ static inline unsigned long regs_return_
8702 } 8575 }
8703 8576
8704 /* 8577 /*
@@ -8734,9 +8607,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/ptrace.h linux-2.6.32.24/arch/x8
8734 #endif 8607 #endif
8735 } 8608 }
8736 8609
8737diff -urNp linux-2.6.32.24/arch/x86/include/asm/reboot.h linux-2.6.32.24/arch/x86/include/asm/reboot.h 8610diff -urNp linux-2.6.35.7/arch/x86/include/asm/reboot.h linux-2.6.35.7/arch/x86/include/asm/reboot.h
8738--- linux-2.6.32.24/arch/x86/include/asm/reboot.h 2010-08-13 16:24:37.000000000 -0400 8611--- linux-2.6.35.7/arch/x86/include/asm/reboot.h 2010-08-26 19:47:12.000000000 -0400
8739+++ linux-2.6.32.24/arch/x86/include/asm/reboot.h 2010-10-23 19:59:19.000000000 -0400 8612+++ linux-2.6.35.7/arch/x86/include/asm/reboot.h 2010-09-17 20:12:09.000000000 -0400
8740@@ -18,7 +18,7 @@ extern struct machine_ops machine_ops; 8613@@ -18,7 +18,7 @@ extern struct machine_ops machine_ops;
8741 8614
8742 void native_machine_crash_shutdown(struct pt_regs *regs); 8615 void native_machine_crash_shutdown(struct pt_regs *regs);
@@ -8746,9 +8619,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/reboot.h linux-2.6.32.24/arch/x8
8746 8619
8747 typedef void (*nmi_shootdown_cb)(int, struct die_args*); 8620 typedef void (*nmi_shootdown_cb)(int, struct die_args*);
8748 void nmi_shootdown_cpus(nmi_shootdown_cb callback); 8621 void nmi_shootdown_cpus(nmi_shootdown_cb callback);
8749diff -urNp linux-2.6.32.24/arch/x86/include/asm/rwsem.h linux-2.6.32.24/arch/x86/include/asm/rwsem.h 8622diff -urNp linux-2.6.35.7/arch/x86/include/asm/rwsem.h linux-2.6.35.7/arch/x86/include/asm/rwsem.h
8750--- linux-2.6.32.24/arch/x86/include/asm/rwsem.h 2010-08-13 16:24:37.000000000 -0400 8623--- linux-2.6.35.7/arch/x86/include/asm/rwsem.h 2010-08-26 19:47:12.000000000 -0400
8751+++ linux-2.6.32.24/arch/x86/include/asm/rwsem.h 2010-10-23 19:59:19.000000000 -0400 8624+++ linux-2.6.35.7/arch/x86/include/asm/rwsem.h 2010-09-17 20:12:09.000000000 -0400
8752@@ -118,10 +118,26 @@ static inline void __down_read(struct rw 8625@@ -118,10 +118,26 @@ static inline void __down_read(struct rw
8753 { 8626 {
8754 asm volatile("# beginning down_read\n\t" 8627 asm volatile("# beginning down_read\n\t"
@@ -8763,7 +8636,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/rwsem.h linux-2.6.32.24/arch/x86
8763+#endif 8636+#endif
8764+ ".pushsection .fixup,\"ax\"\n" 8637+ ".pushsection .fixup,\"ax\"\n"
8765+ "1:\n" 8638+ "1:\n"
8766+ LOCK_PREFIX _ASM_DEC "(%1)\n\t" 8639+ LOCK_PREFIX _ASM_DEC "(%1)\n"
8767+ "jmp 0b\n" 8640+ "jmp 0b\n"
8768+ ".popsection\n" 8641+ ".popsection\n"
8769+ _ASM_EXTABLE(0b, 1b) 8642+ _ASM_EXTABLE(0b, 1b)
@@ -8984,9 +8857,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/rwsem.h linux-2.6.32.24/arch/x86
8984 : "+r" (tmp), "+m" (sem->count) 8857 : "+r" (tmp), "+m" (sem->count)
8985 : : "memory"); 8858 : : "memory");
8986 8859
8987diff -urNp linux-2.6.32.24/arch/x86/include/asm/segment.h linux-2.6.32.24/arch/x86/include/asm/segment.h 8860diff -urNp linux-2.6.35.7/arch/x86/include/asm/segment.h linux-2.6.35.7/arch/x86/include/asm/segment.h
8988--- linux-2.6.32.24/arch/x86/include/asm/segment.h 2010-08-13 16:24:37.000000000 -0400 8861--- linux-2.6.35.7/arch/x86/include/asm/segment.h 2010-08-26 19:47:12.000000000 -0400
8989+++ linux-2.6.32.24/arch/x86/include/asm/segment.h 2010-10-23 19:59:19.000000000 -0400 8862+++ linux-2.6.35.7/arch/x86/include/asm/segment.h 2010-09-17 20:12:09.000000000 -0400
8990@@ -62,8 +62,8 @@ 8863@@ -62,8 +62,8 @@
8991 * 26 - ESPFIX small SS 8864 * 26 - ESPFIX small SS
8992 * 27 - per-cpu [ offset to per-cpu data area ] 8865 * 27 - per-cpu [ offset to per-cpu data area ]
@@ -9055,9 +8928,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/segment.h linux-2.6.32.24/arch/x
9055 #define __KERNEL_DS (GDT_ENTRY_KERNEL_DS * 8) 8928 #define __KERNEL_DS (GDT_ENTRY_KERNEL_DS * 8)
9056 #define __USER_DS (GDT_ENTRY_DEFAULT_USER_DS* 8 + 3) 8929 #define __USER_DS (GDT_ENTRY_DEFAULT_USER_DS* 8 + 3)
9057 #define __USER_CS (GDT_ENTRY_DEFAULT_USER_CS* 8 + 3) 8930 #define __USER_CS (GDT_ENTRY_DEFAULT_USER_CS* 8 + 3)
9058diff -urNp linux-2.6.32.24/arch/x86/include/asm/smp.h linux-2.6.32.24/arch/x86/include/asm/smp.h 8931diff -urNp linux-2.6.35.7/arch/x86/include/asm/smp.h linux-2.6.35.7/arch/x86/include/asm/smp.h
9059--- linux-2.6.32.24/arch/x86/include/asm/smp.h 2010-08-13 16:24:37.000000000 -0400 8932--- linux-2.6.35.7/arch/x86/include/asm/smp.h 2010-08-26 19:47:12.000000000 -0400
9060+++ linux-2.6.32.24/arch/x86/include/asm/smp.h 2010-10-23 19:59:24.000000000 -0400 8933+++ linux-2.6.35.7/arch/x86/include/asm/smp.h 2010-10-11 22:41:44.000000000 -0400
9061@@ -24,7 +24,7 @@ extern unsigned int num_processors; 8934@@ -24,7 +24,7 @@ extern unsigned int num_processors;
9062 DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map); 8935 DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map);
9063 DECLARE_PER_CPU(cpumask_var_t, cpu_core_map); 8936 DECLARE_PER_CPU(cpumask_var_t, cpu_core_map);
@@ -9067,11 +8940,11 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/smp.h linux-2.6.32.24/arch/x86/i
9067 8940
9068 static inline struct cpumask *cpu_sibling_mask(int cpu) 8941 static inline struct cpumask *cpu_sibling_mask(int cpu)
9069 { 8942 {
9070diff -urNp linux-2.6.32.24/arch/x86/include/asm/spinlock.h linux-2.6.32.24/arch/x86/include/asm/spinlock.h 8943diff -urNp linux-2.6.35.7/arch/x86/include/asm/spinlock.h linux-2.6.35.7/arch/x86/include/asm/spinlock.h
9071--- linux-2.6.32.24/arch/x86/include/asm/spinlock.h 2010-08-13 16:24:37.000000000 -0400 8944--- linux-2.6.35.7/arch/x86/include/asm/spinlock.h 2010-08-26 19:47:12.000000000 -0400
9072+++ linux-2.6.32.24/arch/x86/include/asm/spinlock.h 2010-10-23 19:59:19.000000000 -0400 8945+++ linux-2.6.35.7/arch/x86/include/asm/spinlock.h 2010-09-17 20:12:09.000000000 -0400
9073@@ -249,18 +249,50 @@ static inline int __raw_write_can_lock(r 8946@@ -249,18 +249,50 @@ static inline int arch_write_can_lock(ar
9074 static inline void __raw_read_lock(raw_rwlock_t *rw) 8947 static inline void arch_read_lock(arch_rwlock_t *rw)
9075 { 8948 {
9076 asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t" 8949 asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t"
9077- "jns 1f\n" 8950- "jns 1f\n"
@@ -9098,7 +8971,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/spinlock.h linux-2.6.32.24/arch/
9098 ::LOCK_PTR_REG (rw) : "memory"); 8971 ::LOCK_PTR_REG (rw) : "memory");
9099 } 8972 }
9100 8973
9101 static inline void __raw_write_lock(raw_rwlock_t *rw) 8974 static inline void arch_write_lock(arch_rwlock_t *rw)
9102 { 8975 {
9103 asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t" 8976 asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t"
9104- "jz 1f\n" 8977- "jz 1f\n"
@@ -9125,9 +8998,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/spinlock.h linux-2.6.32.24/arch/
9125 ::LOCK_PTR_REG (rw), "i" (RW_LOCK_BIAS) : "memory"); 8998 ::LOCK_PTR_REG (rw), "i" (RW_LOCK_BIAS) : "memory");
9126 } 8999 }
9127 9000
9128@@ -286,12 +318,45 @@ static inline int __raw_write_trylock(ra 9001@@ -286,12 +318,45 @@ static inline int arch_write_trylock(arc
9129 9002
9130 static inline void __raw_read_unlock(raw_rwlock_t *rw) 9003 static inline void arch_read_unlock(arch_rwlock_t *rw)
9131 { 9004 {
9132- asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory"); 9005- asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory");
9133+ asm volatile(LOCK_PREFIX "incl %0\n" 9006+ asm volatile(LOCK_PREFIX "incl %0\n"
@@ -9150,7 +9023,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/spinlock.h linux-2.6.32.24/arch/
9150+ :"+m" (rw->lock) : : "memory"); 9023+ :"+m" (rw->lock) : : "memory");
9151 } 9024 }
9152 9025
9153 static inline void __raw_write_unlock(raw_rwlock_t *rw) 9026 static inline void arch_write_unlock(arch_rwlock_t *rw)
9154 { 9027 {
9155- asm volatile(LOCK_PREFIX "addl %1, %0" 9028- asm volatile(LOCK_PREFIX "addl %1, %0"
9156+ asm volatile(LOCK_PREFIX "addl %1, %0\n" 9029+ asm volatile(LOCK_PREFIX "addl %1, %0\n"
@@ -9173,10 +9046,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/spinlock.h linux-2.6.32.24/arch/
9173 : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory"); 9046 : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
9174 } 9047 }
9175 9048
9176diff -urNp linux-2.6.32.24/arch/x86/include/asm/system.h linux-2.6.32.24/arch/x86/include/asm/system.h 9049diff -urNp linux-2.6.35.7/arch/x86/include/asm/system.h linux-2.6.35.7/arch/x86/include/asm/system.h
9177--- linux-2.6.32.24/arch/x86/include/asm/system.h 2010-08-13 16:24:37.000000000 -0400 9050--- linux-2.6.35.7/arch/x86/include/asm/system.h 2010-08-26 19:47:12.000000000 -0400
9178+++ linux-2.6.32.24/arch/x86/include/asm/system.h 2010-10-23 19:59:19.000000000 -0400 9051+++ linux-2.6.35.7/arch/x86/include/asm/system.h 2010-09-17 20:12:09.000000000 -0400
9179@@ -200,7 +200,7 @@ static inline unsigned long get_limit(un 9052@@ -202,7 +202,7 @@ static inline unsigned long get_limit(un
9180 { 9053 {
9181 unsigned long __limit; 9054 unsigned long __limit;
9182 asm("lsll %1,%0" : "=r" (__limit) : "r" (segment)); 9055 asm("lsll %1,%0" : "=r" (__limit) : "r" (segment));
@@ -9185,7 +9058,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/system.h linux-2.6.32.24/arch/x8
9185 } 9058 }
9186 9059
9187 static inline void native_clts(void) 9060 static inline void native_clts(void)
9188@@ -340,7 +340,7 @@ void enable_hlt(void); 9061@@ -342,7 +342,7 @@ void enable_hlt(void);
9189 9062
9190 void cpu_idle_wait(void); 9063 void cpu_idle_wait(void);
9191 9064
@@ -9194,9 +9067,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/system.h linux-2.6.32.24/arch/x8
9194 extern void free_init_pages(char *what, unsigned long begin, unsigned long end); 9067 extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
9195 9068
9196 void default_idle(void); 9069 void default_idle(void);
9197diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_32.h linux-2.6.32.24/arch/x86/include/asm/uaccess_32.h 9070diff -urNp linux-2.6.35.7/arch/x86/include/asm/uaccess_32.h linux-2.6.35.7/arch/x86/include/asm/uaccess_32.h
9198--- linux-2.6.32.24/arch/x86/include/asm/uaccess_32.h 2010-08-13 16:24:37.000000000 -0400 9071--- linux-2.6.35.7/arch/x86/include/asm/uaccess_32.h 2010-08-26 19:47:12.000000000 -0400
9199+++ linux-2.6.32.24/arch/x86/include/asm/uaccess_32.h 2010-10-23 19:59:19.000000000 -0400 9072+++ linux-2.6.35.7/arch/x86/include/asm/uaccess_32.h 2010-09-17 20:12:09.000000000 -0400
9200@@ -44,6 +44,9 @@ unsigned long __must_check __copy_from_u 9073@@ -44,6 +44,9 @@ unsigned long __must_check __copy_from_u
9201 static __always_inline unsigned long __must_check 9074 static __always_inline unsigned long __must_check
9202 __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n) 9075 __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
@@ -9257,17 +9130,40 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_32.h linux-2.6.32.24/arc
9257 if (__builtin_constant_p(n)) { 9130 if (__builtin_constant_p(n)) {
9258 unsigned long ret; 9131 unsigned long ret;
9259 9132
9260@@ -182,14 +200,62 @@ static __always_inline unsigned long 9133@@ -182,15 +200,19 @@ static __always_inline unsigned long
9261 __copy_from_user_inatomic_nocache(void *to, const void __user *from, 9134 __copy_from_user_inatomic_nocache(void *to, const void __user *from,
9262 unsigned long n) 9135 unsigned long n)
9263 { 9136 {
9264- return __copy_from_user_ll_nocache_nozero(to, from, n); 9137- return __copy_from_user_ll_nocache_nozero(to, from, n);
9138-}
9265+ if ((long)n < 0) 9139+ if ((long)n < 0)
9266+ return n; 9140+ return n;
9267+ 9141
9142-unsigned long __must_check copy_to_user(void __user *to,
9143- const void *from, unsigned long n);
9144-unsigned long __must_check _copy_from_user(void *to,
9145- const void __user *from,
9146- unsigned long n);
9268+ return __copy_from_user_ll_nocache_nozero(to, from, n); 9147+ return __copy_from_user_ll_nocache_nozero(to, from, n);
9269+} 9148+}
9270+ 9149
9150+extern void copy_to_user_overflow(void)
9151+#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
9152+ __compiletime_error("copy_to_user() buffer size is not provably correct")
9153+#else
9154+ __compiletime_warning("copy_to_user() buffer size is not provably correct")
9155+#endif
9156+;
9157
9158 extern void copy_from_user_overflow(void)
9159 #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
9160@@ -200,17 +222,61 @@ extern void copy_from_user_overflow(void
9161 #endif
9162 ;
9163
9164-static inline unsigned long __must_check copy_from_user(void *to,
9165- const void __user *from,
9166- unsigned long n)
9271+/** 9167+/**
9272+ * copy_to_user: - Copy a block of data into user space. 9168+ * copy_to_user: - Copy a block of data into user space.
9273+ * @to: Destination address, in user space. 9169+ * @to: Destination address, in user space.
@@ -9281,10 +9177,14 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_32.h linux-2.6.32.24/arc
9281+ * Returns number of bytes that could not be copied. 9177+ * Returns number of bytes that could not be copied.
9282+ * On success, this will be zero. 9178+ * On success, this will be zero.
9283+ */ 9179+ */
9284+static __always_inline unsigned long __must_check 9180+static inline unsigned long __must_check
9285+copy_to_user(void __user *to, const void *from, unsigned long n) 9181+copy_to_user(void __user *to, const void *from, unsigned long n)
9286+{ 9182+{
9287+ if (access_ok(VERIFY_WRITE, to, n)) 9183+ int sz = __compiletime_object_size(from);
9184+
9185+ if (unlikely(sz != -1 && sz < n))
9186+ copy_to_user_overflow();
9187+ else if (access_ok(VERIFY_WRITE, to, n))
9288+ n = __copy_to_user(to, from, n); 9188+ n = __copy_to_user(to, from, n);
9289+ return n; 9189+ return n;
9290+} 9190+}
@@ -9305,33 +9205,33 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_32.h linux-2.6.32.24/arc
9305+ * If some data could not be copied, this function will pad the copied 9205+ * If some data could not be copied, this function will pad the copied
9306+ * data to the requested size using zero bytes. 9206+ * data to the requested size using zero bytes.
9307+ */ 9207+ */
9308+static __always_inline unsigned long __must_check 9208+static inline unsigned long __must_check
9309+copy_from_user(void *to, const void __user *from, unsigned long n) 9209+copy_from_user(void *to, const void __user *from, unsigned long n)
9310+{ 9210 {
9311+ if (access_ok(VERIFY_READ, from, n)) 9211 int sz = __compiletime_object_size(to);
9212
9213- if (likely(sz == -1 || sz >= n))
9214- n = _copy_from_user(to, from, n);
9215- else
9216+ if (unlikely(sz != -1 && sz < n))
9217 copy_from_user_overflow();
9218-
9219+ else if (access_ok(VERIFY_READ, from, n))
9312+ n = __copy_from_user(to, from, n); 9220+ n = __copy_from_user(to, from, n);
9313+ else if ((long)n > 0) { 9221+ else if ((long)n > 0) {
9314+ if (!__builtin_constant_p(n)) 9222+ if (!__builtin_constant_p(n))
9315+ check_object_size(to, n, false); 9223+ check_object_size(to, n, false);
9316+ memset(to, 0, n); 9224+ memset(to, 0, n);
9317+ } 9225+ }
9318+ return n; 9226 return n;
9319 } 9227 }
9320 9228
9321-unsigned long __must_check copy_to_user(void __user *to, 9229diff -urNp linux-2.6.35.7/arch/x86/include/asm/uaccess_64.h linux-2.6.35.7/arch/x86/include/asm/uaccess_64.h
9322- const void *from, unsigned long n); 9230--- linux-2.6.35.7/arch/x86/include/asm/uaccess_64.h 2010-08-26 19:47:12.000000000 -0400
9323-unsigned long __must_check copy_from_user(void *to, 9231+++ linux-2.6.35.7/arch/x86/include/asm/uaccess_64.h 2010-10-02 11:47:12.000000000 -0400
9324- const void __user *from, 9232@@ -11,6 +11,9 @@
9325- unsigned long n); 9233 #include <asm/alternative.h>
9326 long __must_check strncpy_from_user(char *dst, const char __user *src, 9234 #include <asm/cpufeature.h>
9327 long count);
9328 long __must_check __strncpy_from_user(char *dst,
9329diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h
9330--- linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h 2010-08-13 16:24:37.000000000 -0400
9331+++ linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h 2010-10-23 19:59:19.000000000 -0400
9332@@ -9,6 +9,9 @@
9333 #include <linux/prefetch.h>
9334 #include <linux/lockdep.h>
9335 #include <asm/page.h> 9235 #include <asm/page.h>
9336+#include <asm/pgtable.h> 9236+#include <asm/pgtable.h>
9337+ 9237+
@@ -9339,21 +9239,62 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9339 9239
9340 /* 9240 /*
9341 * Copy To/From Userspace 9241 * Copy To/From Userspace
9342@@ -19,20 +22,24 @@ __must_check unsigned long 9242@@ -37,26 +40,26 @@ copy_user_generic(void *to, const void *
9343 copy_user_generic(void *to, const void *from, unsigned len); 9243 return ret;
9244 }
9344 9245
9345 __must_check unsigned long
9346-copy_to_user(void __user *to, const void *from, unsigned len);
9347-__must_check unsigned long 9246-__must_check unsigned long
9348-copy_from_user(void *to, const void __user *from, unsigned len); 9247-_copy_to_user(void __user *to, const void *from, unsigned len);
9349-__must_check unsigned long 9248-__must_check unsigned long
9249-_copy_from_user(void *to, const void __user *from, unsigned len);
9250+static __always_inline __must_check unsigned long
9251+__copy_to_user(void __user *to, const void *from, unsigned len);
9252+static __always_inline __must_check unsigned long
9253+__copy_from_user(void *to, const void __user *from, unsigned len);
9254 __must_check unsigned long
9350 copy_in_user(void __user *to, const void __user *from, unsigned len); 9255 copy_in_user(void __user *to, const void __user *from, unsigned len);
9351 9256
9257 static inline unsigned long __must_check copy_from_user(void *to,
9258 const void __user *from,
9259- unsigned long n)
9260+ unsigned n)
9261 {
9262- int sz = __compiletime_object_size(to);
9263-
9264 might_fault();
9265- if (likely(sz == -1 || sz >= n))
9266- n = _copy_from_user(to, from, n);
9267-#ifdef CONFIG_DEBUG_VM
9268- else
9269- WARN(1, "Buffer overflow detected!\n");
9270-#endif
9271+
9272+ if (access_ok(VERIFY_READ, from, n))
9273+ n = __copy_from_user(to, from, n);
9274+ else if ((int)n > 0) {
9275+ if (!__builtin_constant_p(n))
9276+ check_object_size(to, n, false);
9277+ memset(to, 0, n);
9278+ }
9279 return n;
9280 }
9281
9282@@ -65,17 +68,35 @@ int copy_to_user(void __user *dst, const
9283 {
9284 might_fault();
9285
9286- return _copy_to_user(dst, src, size);
9287+ if (access_ok(VERIFY_WRITE, dst, size))
9288+ size = __copy_to_user(dst, src, size);
9289+ return size;
9290 }
9291
9352 static __always_inline __must_check 9292 static __always_inline __must_check
9353-int __copy_from_user(void *dst, const void __user *src, unsigned size) 9293-int __copy_from_user(void *dst, const void __user *src, unsigned size)
9354+unsigned long __copy_from_user(void *dst, const void __user *src, unsigned size) 9294+unsigned long __copy_from_user(void *dst, const void __user *src, unsigned size)
9355 { 9295 {
9356- int ret = 0; 9296- int ret = 0;
9297+ int sz = __compiletime_object_size(dst);
9357+ unsigned ret = 0; 9298+ unsigned ret = 0;
9358 9299
9359 might_fault(); 9300 might_fault();
@@ -9362,6 +9303,13 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9362+ if ((int)size < 0) 9303+ if ((int)size < 0)
9363+ return size; 9304+ return size;
9364+ 9305+
9306+ if (unlikely(sz != -1 && sz < size)) {
9307+#ifdef CONFIG_DEBUG_VM
9308+ WARN(1, "Buffer overflow detected!\n");
9309+#endif
9310+ return size;
9311+ }
9312+
9365+ if (!__builtin_constant_p(size)) { 9313+ if (!__builtin_constant_p(size)) {
9366+ check_object_size(dst, size, false); 9314+ check_object_size(dst, size, false);
9367+ if ((unsigned long)src < PAX_USER_SHADOW_BASE) 9315+ if ((unsigned long)src < PAX_USER_SHADOW_BASE)
@@ -9371,7 +9319,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9371 switch (size) { 9319 switch (size) {
9372 case 1:__get_user_asm(*(u8 *)dst, (u8 __user *)src, 9320 case 1:__get_user_asm(*(u8 *)dst, (u8 __user *)src,
9373 ret, "b", "b", "=q", 1); 9321 ret, "b", "b", "=q", 1);
9374@@ -65,18 +72,28 @@ int __copy_from_user(void *dst, const vo 9322@@ -108,18 +129,36 @@ int __copy_from_user(void *dst, const vo
9375 ret, "q", "", "=r", 8); 9323 ret, "q", "", "=r", 8);
9376 return ret; 9324 return ret;
9377 default: 9325 default:
@@ -9386,6 +9334,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9386+unsigned long __copy_to_user(void __user *dst, const void *src, unsigned size) 9334+unsigned long __copy_to_user(void __user *dst, const void *src, unsigned size)
9387 { 9335 {
9388- int ret = 0; 9336- int ret = 0;
9337+ int sz = __compiletime_object_size(src);
9389+ unsigned ret = 0; 9338+ unsigned ret = 0;
9390 9339
9391 might_fault(); 9340 might_fault();
@@ -9394,6 +9343,13 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9394+ if ((int)size < 0) 9343+ if ((int)size < 0)
9395+ return size; 9344+ return size;
9396+ 9345+
9346+ if (unlikely(sz != -1 && sz < size)) {
9347+#ifdef CONFIG_DEBUG_VM
9348+ WARN(1, "Buffer overflow detected!\n");
9349+#endif
9350+ return size;
9351+ }
9352+
9397+ if (!__builtin_constant_p(size)) { 9353+ if (!__builtin_constant_p(size)) {
9398+ check_object_size(src, size, true); 9354+ check_object_size(src, size, true);
9399+ if ((unsigned long)dst < PAX_USER_SHADOW_BASE) 9355+ if ((unsigned long)dst < PAX_USER_SHADOW_BASE)
@@ -9403,7 +9359,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9403 switch (size) { 9359 switch (size) {
9404 case 1:__put_user_asm(*(u8 *)src, (u8 __user *)dst, 9360 case 1:__put_user_asm(*(u8 *)src, (u8 __user *)dst,
9405 ret, "b", "b", "iq", 1); 9361 ret, "b", "b", "iq", 1);
9406@@ -109,19 +126,54 @@ int __copy_to_user(void __user *dst, con 9362@@ -152,19 +191,30 @@ int __copy_to_user(void __user *dst, con
9407 ret, "q", "", "er", 8); 9363 ret, "q", "", "er", 8);
9408 return ret; 9364 return ret;
9409 default: 9365 default:
@@ -9415,30 +9371,6 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9415 9371
9416 static __always_inline __must_check 9372 static __always_inline __must_check
9417-int __copy_in_user(void __user *dst, const void __user *src, unsigned size) 9373-int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
9418+unsigned long copy_to_user(void __user *to, const void *from, unsigned len)
9419+{
9420+ if (access_ok(VERIFY_WRITE, to, len))
9421+ len = __copy_to_user(to, from, len);
9422+ return len;
9423+}
9424+
9425+static __always_inline __must_check
9426+unsigned long copy_from_user(void *to, const void __user *from, unsigned len)
9427+{
9428+ if ((int)len < 0)
9429+ return len;
9430+
9431+ if (access_ok(VERIFY_READ, from, len))
9432+ len = __copy_from_user(to, from, len);
9433+ else if ((int)len > 0) {
9434+ if (!__builtin_constant_p(len))
9435+ check_object_size(to, len, false);
9436+ memset(to, 0, len);
9437+ }
9438+ return len;
9439+}
9440+
9441+static __always_inline __must_check
9442+unsigned long __copy_in_user(void __user *dst, const void __user *src, unsigned size) 9374+unsigned long __copy_in_user(void __user *dst, const void __user *src, unsigned size)
9443 { 9375 {
9444- int ret = 0; 9376- int ret = 0;
@@ -9461,7 +9393,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9461 switch (size) { 9393 switch (size) {
9462 case 1: { 9394 case 1: {
9463 u8 tmp; 9395 u8 tmp;
9464@@ -161,6 +213,10 @@ int __copy_in_user(void __user *dst, con 9396@@ -204,6 +254,10 @@ int __copy_in_user(void __user *dst, con
9465 return ret; 9397 return ret;
9466 } 9398 }
9467 default: 9399 default:
@@ -9472,9 +9404,14 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9472 return copy_user_generic((__force void *)dst, 9404 return copy_user_generic((__force void *)dst,
9473 (__force void *)src, size); 9405 (__force void *)src, size);
9474 } 9406 }
9475@@ -179,30 +235,40 @@ __must_check unsigned long __clear_user( 9407@@ -222,33 +276,45 @@ __must_check unsigned long __clear_user(
9476 __must_check long __copy_from_user_inatomic(void *dst, const void __user *src, 9408 static __must_check __always_inline int
9477 unsigned size); 9409 __copy_from_user_inatomic(void *dst, const void __user *src, unsigned size)
9410 {
9411+ if ((unsigned long)src < PAX_USER_SHADOW_BASE)
9412+ src += PAX_USER_SHADOW_BASE;
9413 return copy_user_generic(dst, (__force const void *)src, size);
9414 }
9478 9415
9479-static __must_check __always_inline int 9416-static __must_check __always_inline int
9480+static __must_check __always_inline unsigned long 9417+static __must_check __always_inline unsigned long
@@ -9520,9 +9457,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess_64.h linux-2.6.32.24/arc
9520 copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest); 9457 copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest);
9521 9458
9522 #endif /* _ASM_X86_UACCESS_64_H */ 9459 #endif /* _ASM_X86_UACCESS_64_H */
9523diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess.h linux-2.6.32.24/arch/x86/include/asm/uaccess.h 9460diff -urNp linux-2.6.35.7/arch/x86/include/asm/uaccess.h linux-2.6.35.7/arch/x86/include/asm/uaccess.h
9524--- linux-2.6.32.24/arch/x86/include/asm/uaccess.h 2010-08-13 16:24:37.000000000 -0400 9461--- linux-2.6.35.7/arch/x86/include/asm/uaccess.h 2010-08-26 19:47:12.000000000 -0400
9525+++ linux-2.6.32.24/arch/x86/include/asm/uaccess.h 2010-10-23 19:59:19.000000000 -0400 9462+++ linux-2.6.35.7/arch/x86/include/asm/uaccess.h 2010-09-17 20:12:09.000000000 -0400
9526@@ -8,12 +8,15 @@ 9463@@ -8,12 +8,15 @@
9527 #include <linux/thread_info.h> 9464 #include <linux/thread_info.h>
9528 #include <linux/prefetch.h> 9465 #include <linux/prefetch.h>
@@ -9747,9 +9684,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/uaccess.h linux-2.6.32.24/arch/x
9747 #ifdef CONFIG_X86_32 9684 #ifdef CONFIG_X86_32
9748 # include "uaccess_32.h" 9685 # include "uaccess_32.h"
9749 #else 9686 #else
9750diff -urNp linux-2.6.32.24/arch/x86/include/asm/vgtod.h linux-2.6.32.24/arch/x86/include/asm/vgtod.h 9687diff -urNp linux-2.6.35.7/arch/x86/include/asm/vgtod.h linux-2.6.35.7/arch/x86/include/asm/vgtod.h
9751--- linux-2.6.32.24/arch/x86/include/asm/vgtod.h 2010-08-13 16:24:37.000000000 -0400 9688--- linux-2.6.35.7/arch/x86/include/asm/vgtod.h 2010-08-26 19:47:12.000000000 -0400
9752+++ linux-2.6.32.24/arch/x86/include/asm/vgtod.h 2010-10-23 19:59:19.000000000 -0400 9689+++ linux-2.6.35.7/arch/x86/include/asm/vgtod.h 2010-09-17 20:12:09.000000000 -0400
9753@@ -14,6 +14,7 @@ struct vsyscall_gtod_data { 9690@@ -14,6 +14,7 @@ struct vsyscall_gtod_data {
9754 int sysctl_enabled; 9691 int sysctl_enabled;
9755 struct timezone sys_tz; 9692 struct timezone sys_tz;
@@ -9758,9 +9695,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/vgtod.h linux-2.6.32.24/arch/x86
9758 cycle_t (*vread)(void); 9695 cycle_t (*vread)(void);
9759 cycle_t cycle_last; 9696 cycle_t cycle_last;
9760 cycle_t mask; 9697 cycle_t mask;
9761diff -urNp linux-2.6.32.24/arch/x86/include/asm/vmi.h linux-2.6.32.24/arch/x86/include/asm/vmi.h 9698diff -urNp linux-2.6.35.7/arch/x86/include/asm/vmi.h linux-2.6.35.7/arch/x86/include/asm/vmi.h
9762--- linux-2.6.32.24/arch/x86/include/asm/vmi.h 2010-08-13 16:24:37.000000000 -0400 9699--- linux-2.6.35.7/arch/x86/include/asm/vmi.h 2010-08-26 19:47:12.000000000 -0400
9763+++ linux-2.6.32.24/arch/x86/include/asm/vmi.h 2010-10-23 19:59:19.000000000 -0400 9700+++ linux-2.6.35.7/arch/x86/include/asm/vmi.h 2010-09-17 20:12:09.000000000 -0400
9764@@ -191,6 +191,7 @@ struct vrom_header { 9701@@ -191,6 +191,7 @@ struct vrom_header {
9765 u8 reserved[96]; /* Reserved for headers */ 9702 u8 reserved[96]; /* Reserved for headers */
9766 char vmi_init[8]; /* VMI_Init jump point */ 9703 char vmi_init[8]; /* VMI_Init jump point */
@@ -9769,9 +9706,9 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/vmi.h linux-2.6.32.24/arch/x86/i
9769 } __attribute__((packed)); 9706 } __attribute__((packed));
9770 9707
9771 struct pnp_header { 9708 struct pnp_header {
9772diff -urNp linux-2.6.32.24/arch/x86/include/asm/vsyscall.h linux-2.6.32.24/arch/x86/include/asm/vsyscall.h 9709diff -urNp linux-2.6.35.7/arch/x86/include/asm/vsyscall.h linux-2.6.35.7/arch/x86/include/asm/vsyscall.h
9773--- linux-2.6.32.24/arch/x86/include/asm/vsyscall.h 2010-08-13 16:24:37.000000000 -0400 9710--- linux-2.6.35.7/arch/x86/include/asm/vsyscall.h 2010-08-26 19:47:12.000000000 -0400
9774+++ linux-2.6.32.24/arch/x86/include/asm/vsyscall.h 2010-10-23 19:59:19.000000000 -0400 9711+++ linux-2.6.35.7/arch/x86/include/asm/vsyscall.h 2010-09-17 20:12:09.000000000 -0400
9775@@ -15,9 +15,10 @@ enum vsyscall_num { 9712@@ -15,9 +15,10 @@ enum vsyscall_num {
9776 9713
9777 #ifdef __KERNEL__ 9714 #ifdef __KERNEL__
@@ -9802,10 +9739,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/vsyscall.h linux-2.6.32.24/arch/
9802 #endif /* __KERNEL__ */ 9739 #endif /* __KERNEL__ */
9803 9740
9804 #endif /* _ASM_X86_VSYSCALL_H */ 9741 #endif /* _ASM_X86_VSYSCALL_H */
9805diff -urNp linux-2.6.32.24/arch/x86/include/asm/xsave.h linux-2.6.32.24/arch/x86/include/asm/xsave.h 9742diff -urNp linux-2.6.35.7/arch/x86/include/asm/xsave.h linux-2.6.35.7/arch/x86/include/asm/xsave.h
9806--- linux-2.6.32.24/arch/x86/include/asm/xsave.h 2010-08-13 16:24:37.000000000 -0400 9743--- linux-2.6.35.7/arch/x86/include/asm/xsave.h 2010-08-26 19:47:12.000000000 -0400
9807+++ linux-2.6.32.24/arch/x86/include/asm/xsave.h 2010-10-23 19:59:19.000000000 -0400 9744+++ linux-2.6.35.7/arch/x86/include/asm/xsave.h 2010-09-17 20:12:09.000000000 -0400
9808@@ -56,6 +56,12 @@ static inline int xrstor_checking(struct 9745@@ -59,6 +59,12 @@ static inline int fpu_xrstor_checking(st
9809 static inline int xsave_user(struct xsave_struct __user *buf) 9746 static inline int xsave_user(struct xsave_struct __user *buf)
9810 { 9747 {
9811 int err; 9748 int err;
@@ -9818,7 +9755,7 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/xsave.h linux-2.6.32.24/arch/x86
9818 __asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x27\n" 9755 __asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x27\n"
9819 "2:\n" 9756 "2:\n"
9820 ".section .fixup,\"ax\"\n" 9757 ".section .fixup,\"ax\"\n"
9821@@ -82,6 +88,11 @@ static inline int xrestore_user(struct x 9758@@ -85,6 +91,11 @@ static inline int xrestore_user(struct x
9822 u32 lmask = mask; 9759 u32 lmask = mask;
9823 u32 hmask = mask >> 32; 9760 u32 hmask = mask >> 32;
9824 9761
@@ -9830,10 +9767,10 @@ diff -urNp linux-2.6.32.24/arch/x86/include/asm/xsave.h linux-2.6.32.24/arch/x86
9830 __asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n" 9767 __asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n"
9831 "2:\n" 9768 "2:\n"
9832 ".section .fixup,\"ax\"\n" 9769 ".section .fixup,\"ax\"\n"
9833diff -urNp linux-2.6.32.24/arch/x86/Kconfig linux-2.6.32.24/arch/x86/Kconfig 9770diff -urNp linux-2.6.35.7/arch/x86/Kconfig linux-2.6.35.7/arch/x86/Kconfig
9834--- linux-2.6.32.24/arch/x86/Kconfig 2010-08-29 21:08:20.000000000 -0400 9771--- linux-2.6.35.7/arch/x86/Kconfig 2010-08-26 19:47:12.000000000 -0400
9835+++ linux-2.6.32.24/arch/x86/Kconfig 2010-10-23 19:59:19.000000000 -0400 9772+++ linux-2.6.35.7/arch/x86/Kconfig 2010-09-17 20:12:37.000000000 -0400
9836@@ -997,7 +997,7 @@ choice 9773@@ -1038,7 +1038,7 @@ choice
9837 9774
9838 config NOHIGHMEM 9775 config NOHIGHMEM
9839 bool "off" 9776 bool "off"
@@ -9842,7 +9779,7 @@ diff -urNp linux-2.6.32.24/arch/x86/Kconfig linux-2.6.32.24/arch/x86/Kconfig
9842 ---help--- 9779 ---help---
9843 Linux can use up to 64 Gigabytes of physical memory on x86 systems. 9780 Linux can use up to 64 Gigabytes of physical memory on x86 systems.
9844 However, the address space of 32-bit x86 processors is only 4 9781 However, the address space of 32-bit x86 processors is only 4
9845@@ -1034,7 +1034,7 @@ config NOHIGHMEM 9782@@ -1075,7 +1075,7 @@ config NOHIGHMEM
9846 9783
9847 config HIGHMEM4G 9784 config HIGHMEM4G
9848 bool "4GB" 9785 bool "4GB"
@@ -9851,7 +9788,7 @@ diff -urNp linux-2.6.32.24/arch/x86/Kconfig linux-2.6.32.24/arch/x86/Kconfig
9851 ---help--- 9788 ---help---
9852 Select this if you have a 32-bit processor and between 1 and 4 9789 Select this if you have a 32-bit processor and between 1 and 4
9853 gigabytes of physical RAM. 9790 gigabytes of physical RAM.
9854@@ -1088,7 +1088,7 @@ config PAGE_OFFSET 9791@@ -1129,7 +1129,7 @@ config PAGE_OFFSET
9855 hex 9792 hex
9856 default 0xB0000000 if VMSPLIT_3G_OPT 9793 default 0xB0000000 if VMSPLIT_3G_OPT
9857 default 0x80000000 if VMSPLIT_2G 9794 default 0x80000000 if VMSPLIT_2G
@@ -9860,7 +9797,7 @@ diff -urNp linux-2.6.32.24/arch/x86/Kconfig linux-2.6.32.24/arch/x86/Kconfig
9860 default 0x40000000 if VMSPLIT_1G 9797 default 0x40000000 if VMSPLIT_1G
9861 default 0xC0000000 9798 default 0xC0000000
9862 depends on X86_32 9799 depends on X86_32
9863@@ -1419,7 +1419,7 @@ config ARCH_USES_PG_UNCACHED 9800@@ -1461,7 +1461,7 @@ config ARCH_USES_PG_UNCACHED
9864 9801
9865 config EFI 9802 config EFI
9866 bool "EFI runtime service support" 9803 bool "EFI runtime service support"
@@ -9869,7 +9806,7 @@ diff -urNp linux-2.6.32.24/arch/x86/Kconfig linux-2.6.32.24/arch/x86/Kconfig
9869 ---help--- 9806 ---help---
9870 This enables the kernel to use EFI runtime services that are 9807 This enables the kernel to use EFI runtime services that are
9871 available (such as the EFI variable services). 9808 available (such as the EFI variable services).
9872@@ -1506,6 +1506,7 @@ config KEXEC_JUMP 9809@@ -1548,6 +1548,7 @@ config KEXEC_JUMP
9873 config PHYSICAL_START 9810 config PHYSICAL_START
9874 hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) 9811 hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
9875 default "0x1000000" 9812 default "0x1000000"
@@ -9877,15 +9814,15 @@ diff -urNp linux-2.6.32.24/arch/x86/Kconfig linux-2.6.32.24/arch/x86/Kconfig
9877 ---help--- 9814 ---help---
9878 This gives the physical address where the kernel is loaded. 9815 This gives the physical address where the kernel is loaded.
9879 9816
9880@@ -1570,6 +1571,7 @@ config PHYSICAL_ALIGN 9817@@ -1611,6 +1612,7 @@ config X86_NEED_RELOCS
9881 hex 9818 config PHYSICAL_ALIGN
9882 prompt "Alignment value to which kernel should be aligned" if X86_32 9819 hex "Alignment value to which kernel should be aligned" if X86_32
9883 default "0x1000000" 9820 default "0x1000000"
9884+ range 0x400000 0x1000000 if PAX_KERNEXEC 9821+ range 0x400000 0x1000000 if PAX_KERNEXEC
9885 range 0x2000 0x1000000 9822 range 0x2000 0x1000000
9886 ---help--- 9823 ---help---
9887 This value puts the alignment restrictions on physical address 9824 This value puts the alignment restrictions on physical address
9888@@ -1601,9 +1603,10 @@ config HOTPLUG_CPU 9825@@ -1642,9 +1644,10 @@ config HOTPLUG_CPU
9889 Say N if you want to disable CPU hotplug. 9826 Say N if you want to disable CPU hotplug.
9890 9827
9891 config COMPAT_VDSO 9828 config COMPAT_VDSO
@@ -9896,18 +9833,18 @@ diff -urNp linux-2.6.32.24/arch/x86/Kconfig linux-2.6.32.24/arch/x86/Kconfig
9896+ depends on !PAX_NOEXEC && !PAX_MEMORY_UDEREF 9833+ depends on !PAX_NOEXEC && !PAX_MEMORY_UDEREF
9897 ---help--- 9834 ---help---
9898 Map the 32-bit VDSO to the predictable old-style address too. 9835 Map the 32-bit VDSO to the predictable old-style address too.
9899 ---help--- 9836
9900diff -urNp linux-2.6.32.24/arch/x86/Kconfig.cpu linux-2.6.32.24/arch/x86/Kconfig.cpu 9837diff -urNp linux-2.6.35.7/arch/x86/Kconfig.cpu linux-2.6.35.7/arch/x86/Kconfig.cpu
9901--- linux-2.6.32.24/arch/x86/Kconfig.cpu 2010-08-13 16:24:37.000000000 -0400 9838--- linux-2.6.35.7/arch/x86/Kconfig.cpu 2010-08-26 19:47:12.000000000 -0400
9902+++ linux-2.6.32.24/arch/x86/Kconfig.cpu 2010-10-23 19:59:19.000000000 -0400 9839+++ linux-2.6.35.7/arch/x86/Kconfig.cpu 2010-09-17 20:12:09.000000000 -0400
9903@@ -340,7 +340,7 @@ config X86_PPRO_FENCE 9840@@ -336,7 +336,7 @@ config X86_PPRO_FENCE
9904 9841
9905 config X86_F00F_BUG 9842 config X86_F00F_BUG
9906 def_bool y 9843 def_bool y
9907- depends on M586MMX || M586TSC || M586 || M486 || M386 9844- depends on M586MMX || M586TSC || M586 || M486 || M386
9908+ depends on (M586MMX || M586TSC || M586 || M486 || M386) && !PAX_KERNEXEC 9845+ depends on (M586MMX || M586TSC || M586 || M486 || M386) && !PAX_KERNEXEC
9909 9846
9910 config X86_WP_WORKS_OK 9847 config X86_INVD_BUG
9911 def_bool y 9848 def_bool y
9912@@ -360,7 +360,7 @@ config X86_POPAD_OK 9849@@ -360,7 +360,7 @@ config X86_POPAD_OK
9913 9850
@@ -9922,15 +9859,15 @@ diff -urNp linux-2.6.32.24/arch/x86/Kconfig.cpu linux-2.6.32.24/arch/x86/Kconfig
9922 # generates cmov. 9859 # generates cmov.
9923 config X86_CMOV 9860 config X86_CMOV
9924 def_bool y 9861 def_bool y
9925- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM) 9862- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
9926+ depends on (MK8 || MK7 || MCORE2 || MPSC || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM) 9863+ depends on (MK8 || MK7 || MCORE2 || MPSC || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
9927 9864
9928 config X86_MINIMUM_CPU_FAMILY 9865 config X86_MINIMUM_CPU_FAMILY
9929 int 9866 int
9930diff -urNp linux-2.6.32.24/arch/x86/Kconfig.debug linux-2.6.32.24/arch/x86/Kconfig.debug 9867diff -urNp linux-2.6.35.7/arch/x86/Kconfig.debug linux-2.6.35.7/arch/x86/Kconfig.debug
9931--- linux-2.6.32.24/arch/x86/Kconfig.debug 2010-08-13 16:24:37.000000000 -0400 9868--- linux-2.6.35.7/arch/x86/Kconfig.debug 2010-08-26 19:47:12.000000000 -0400
9932+++ linux-2.6.32.24/arch/x86/Kconfig.debug 2010-10-23 19:59:19.000000000 -0400 9869+++ linux-2.6.35.7/arch/x86/Kconfig.debug 2010-09-17 20:12:09.000000000 -0400
9933@@ -99,7 +99,7 @@ config X86_PTDUMP 9870@@ -97,7 +97,7 @@ config X86_PTDUMP
9934 config DEBUG_RODATA 9871 config DEBUG_RODATA
9935 bool "Write protect kernel read-only data structures" 9872 bool "Write protect kernel read-only data structures"
9936 default y 9873 default y
@@ -9939,10 +9876,10 @@ diff -urNp linux-2.6.32.24/arch/x86/Kconfig.debug linux-2.6.32.24/arch/x86/Kconf
9939 ---help--- 9876 ---help---
9940 Mark the kernel read-only data as write-protected in the pagetables, 9877 Mark the kernel read-only data as write-protected in the pagetables,
9941 in order to catch accidental (and incorrect) writes to such const 9878 in order to catch accidental (and incorrect) writes to such const
9942diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/boot.c linux-2.6.32.24/arch/x86/kernel/acpi/boot.c 9879diff -urNp linux-2.6.35.7/arch/x86/kernel/acpi/boot.c linux-2.6.35.7/arch/x86/kernel/acpi/boot.c
9943--- linux-2.6.32.24/arch/x86/kernel/acpi/boot.c 2010-08-13 16:24:37.000000000 -0400 9880--- linux-2.6.35.7/arch/x86/kernel/acpi/boot.c 2010-08-26 19:47:12.000000000 -0400
9944+++ linux-2.6.32.24/arch/x86/kernel/acpi/boot.c 2010-10-23 19:59:19.000000000 -0400 9881+++ linux-2.6.35.7/arch/x86/kernel/acpi/boot.c 2010-09-17 20:12:09.000000000 -0400
9945@@ -1502,7 +1502,7 @@ static struct dmi_system_id __initdata a 9882@@ -1472,7 +1472,7 @@ static struct dmi_system_id __initdata a
9946 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"), 9883 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
9947 }, 9884 },
9948 }, 9885 },
@@ -9951,9 +9888,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/boot.c linux-2.6.32.24/arch/x86/
9951 }; 9888 };
9952 9889
9953 /* 9890 /*
9954diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/realmode/wakeup.S linux-2.6.32.24/arch/x86/kernel/acpi/realmode/wakeup.S 9891diff -urNp linux-2.6.35.7/arch/x86/kernel/acpi/realmode/wakeup.S linux-2.6.35.7/arch/x86/kernel/acpi/realmode/wakeup.S
9955--- linux-2.6.32.24/arch/x86/kernel/acpi/realmode/wakeup.S 2010-08-13 16:24:37.000000000 -0400 9892--- linux-2.6.35.7/arch/x86/kernel/acpi/realmode/wakeup.S 2010-08-26 19:47:12.000000000 -0400
9956+++ linux-2.6.32.24/arch/x86/kernel/acpi/realmode/wakeup.S 2010-10-23 19:59:19.000000000 -0400 9893+++ linux-2.6.35.7/arch/x86/kernel/acpi/realmode/wakeup.S 2010-09-17 20:12:09.000000000 -0400
9957@@ -104,7 +104,7 @@ _start: 9894@@ -104,7 +104,7 @@ _start:
9958 movl %eax, %ecx 9895 movl %eax, %ecx
9959 orl %edx, %ecx 9896 orl %edx, %ecx
@@ -9963,9 +9900,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/realmode/wakeup.S linux-2.6.32.2
9963 wrmsr 9900 wrmsr
9964 1: 9901 1:
9965 9902
9966diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/sleep.c linux-2.6.32.24/arch/x86/kernel/acpi/sleep.c 9903diff -urNp linux-2.6.35.7/arch/x86/kernel/acpi/sleep.c linux-2.6.35.7/arch/x86/kernel/acpi/sleep.c
9967--- linux-2.6.32.24/arch/x86/kernel/acpi/sleep.c 2010-08-13 16:24:37.000000000 -0400 9904--- linux-2.6.35.7/arch/x86/kernel/acpi/sleep.c 2010-08-26 19:47:12.000000000 -0400
9968+++ linux-2.6.32.24/arch/x86/kernel/acpi/sleep.c 2010-10-23 19:59:19.000000000 -0400 9905+++ linux-2.6.35.7/arch/x86/kernel/acpi/sleep.c 2010-09-17 20:12:09.000000000 -0400
9969@@ -11,11 +11,12 @@ 9906@@ -11,11 +11,12 @@
9970 #include <linux/cpumask.h> 9907 #include <linux/cpumask.h>
9971 #include <asm/segment.h> 9908 #include <asm/segment.h>
@@ -9980,7 +9917,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/sleep.c linux-2.6.32.24/arch/x86
9980 unsigned long acpi_realmode_flags; 9917 unsigned long acpi_realmode_flags;
9981 9918
9982 /* address in low memory of the wakeup routine. */ 9919 /* address in low memory of the wakeup routine. */
9983@@ -99,8 +100,12 @@ int acpi_save_state_mem(void) 9920@@ -96,8 +97,12 @@ int acpi_save_state_mem(void)
9984 header->trampoline_segment = setup_trampoline() >> 4; 9921 header->trampoline_segment = setup_trampoline() >> 4;
9985 #ifdef CONFIG_SMP 9922 #ifdef CONFIG_SMP
9986 stack_start.sp = temp_stack + sizeof(temp_stack); 9923 stack_start.sp = temp_stack + sizeof(temp_stack);
@@ -9993,26 +9930,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/sleep.c linux-2.6.32.24/arch/x86
9993 initial_gs = per_cpu_offset(smp_processor_id()); 9930 initial_gs = per_cpu_offset(smp_processor_id());
9994 #endif 9931 #endif
9995 initial_code = (unsigned long)wakeup_long64; 9932 initial_code = (unsigned long)wakeup_long64;
9996@@ -134,14 +139,8 @@ void __init acpi_reserve_bootmem(void) 9933diff -urNp linux-2.6.35.7/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.35.7/arch/x86/kernel/acpi/wakeup_32.S
9997 return; 9934--- linux-2.6.35.7/arch/x86/kernel/acpi/wakeup_32.S 2010-08-26 19:47:12.000000000 -0400
9998 } 9935+++ linux-2.6.35.7/arch/x86/kernel/acpi/wakeup_32.S 2010-09-17 20:12:09.000000000 -0400
9999
10000- acpi_realmode = (unsigned long)alloc_bootmem_low(WAKEUP_SIZE);
10001-
10002- if (!acpi_realmode) {
10003- printk(KERN_ERR "ACPI: Cannot allocate lowmem, S3 disabled.\n");
10004- return;
10005- }
10006-
10007- acpi_wakeup_address = virt_to_phys((void *)acpi_realmode);
10008+ reserve_early(acpi_wakeup_address, acpi_wakeup_address + WAKEUP_SIZE, "ACPI Wakeup Code");
10009+ acpi_realmode = (unsigned long)__va(acpi_wakeup_address);;
10010 }
10011
10012
10013diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.32.24/arch/x86/kernel/acpi/wakeup_32.S
10014--- linux-2.6.32.24/arch/x86/kernel/acpi/wakeup_32.S 2010-08-13 16:24:37.000000000 -0400
10015+++ linux-2.6.32.24/arch/x86/kernel/acpi/wakeup_32.S 2010-10-23 19:59:19.000000000 -0400
10016@@ -30,13 +30,11 @@ wakeup_pmode_return: 9936@@ -30,13 +30,11 @@ wakeup_pmode_return:
10017 # and restore the stack ... but you need gdt for this to work 9937 # and restore the stack ... but you need gdt for this to work
10018 movl saved_context_esp, %esp 9938 movl saved_context_esp, %esp
@@ -10029,10 +9949,28 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/acpi/wakeup_32.S linux-2.6.32.24/arch
10029 9949
10030 bogus_magic: 9950 bogus_magic:
10031 jmp bogus_magic 9951 jmp bogus_magic
10032diff -urNp linux-2.6.32.24/arch/x86/kernel/alternative.c linux-2.6.32.24/arch/x86/kernel/alternative.c 9952diff -urNp linux-2.6.35.7/arch/x86/kernel/alternative.c linux-2.6.35.7/arch/x86/kernel/alternative.c
10033--- linux-2.6.32.24/arch/x86/kernel/alternative.c 2010-08-13 16:24:37.000000000 -0400 9953--- linux-2.6.35.7/arch/x86/kernel/alternative.c 2010-08-26 19:47:12.000000000 -0400
10034+++ linux-2.6.32.24/arch/x86/kernel/alternative.c 2010-10-23 19:59:19.000000000 -0400 9954+++ linux-2.6.35.7/arch/x86/kernel/alternative.c 2010-09-17 20:12:09.000000000 -0400
10035@@ -407,7 +407,7 @@ void __init_or_module apply_paravirt(str 9955@@ -247,7 +247,7 @@ static void alternatives_smp_lock(const
9956 if (!*poff || ptr < text || ptr >= text_end)
9957 continue;
9958 /* turn DS segment override prefix into lock prefix */
9959- if (*ptr == 0x3e)
9960+ if (*ktla_ktva(ptr) == 0x3e)
9961 text_poke(ptr, ((unsigned char []){0xf0}), 1);
9962 };
9963 mutex_unlock(&text_mutex);
9964@@ -268,7 +268,7 @@ static void alternatives_smp_unlock(cons
9965 if (!*poff || ptr < text || ptr >= text_end)
9966 continue;
9967 /* turn lock prefix into DS segment override prefix */
9968- if (*ptr == 0xf0)
9969+ if (*ktla_ktva(ptr) == 0xf0)
9970 text_poke(ptr, ((unsigned char []){0x3E}), 1);
9971 };
9972 mutex_unlock(&text_mutex);
9973@@ -436,7 +436,7 @@ void __init_or_module apply_paravirt(str
10036 9974
10037 BUG_ON(p->len > MAX_PATCH_LEN); 9975 BUG_ON(p->len > MAX_PATCH_LEN);
10038 /* prep the buffer with the original instructions */ 9976 /* prep the buffer with the original instructions */
@@ -10041,7 +9979,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/alternative.c linux-2.6.32.24/arch/x8
10041 used = pv_init_ops.patch(p->instrtype, p->clobbers, insnbuf, 9979 used = pv_init_ops.patch(p->instrtype, p->clobbers, insnbuf,
10042 (unsigned long)p->instr, p->len); 9980 (unsigned long)p->instr, p->len);
10043 9981
10044@@ -475,7 +475,7 @@ void __init alternative_instructions(voi 9982@@ -504,7 +504,7 @@ void __init alternative_instructions(voi
10045 if (smp_alt_once) 9983 if (smp_alt_once)
10046 free_init_pages("SMP alternatives", 9984 free_init_pages("SMP alternatives",
10047 (unsigned long)__smp_locks, 9985 (unsigned long)__smp_locks,
@@ -10050,7 +9988,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/alternative.c linux-2.6.32.24/arch/x8
10050 9988
10051 restart_nmi(); 9989 restart_nmi();
10052 } 9990 }
10053@@ -492,13 +492,17 @@ void __init alternative_instructions(voi 9991@@ -521,13 +521,17 @@ void __init alternative_instructions(voi
10054 * instructions. And on the local CPU you need to be protected again NMI or MCE 9992 * instructions. And on the local CPU you need to be protected again NMI or MCE
10055 * handlers seeing an inconsistent instruction while you patch. 9993 * handlers seeing an inconsistent instruction while you patch.
10056 */ 9994 */
@@ -10070,7 +10008,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/alternative.c linux-2.6.32.24/arch/x8
10070 local_irq_restore(flags); 10008 local_irq_restore(flags);
10071 /* Could also do a CLFLUSH here to speed up CPU recovery; but 10009 /* Could also do a CLFLUSH here to speed up CPU recovery; but
10072 that causes hangs on some VIA CPUs. */ 10010 that causes hangs on some VIA CPUs. */
10073@@ -520,35 +524,21 @@ static void *__init_or_module text_poke_ 10011@@ -549,36 +553,22 @@ static void *__init_or_module text_poke_
10074 */ 10012 */
10075 void *__kprobes text_poke(void *addr, const void *opcode, size_t len) 10013 void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
10076 { 10014 {
@@ -10114,10 +10052,11 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/alternative.c linux-2.6.32.24/arch/x8
10114+ BUG_ON(((char *)vaddr)[i] != ((char *)opcode)[i]); 10052+ BUG_ON(((char *)vaddr)[i] != ((char *)opcode)[i]);
10115 return addr; 10053 return addr;
10116 } 10054 }
10117diff -urNp linux-2.6.32.24/arch/x86/kernel/amd_iommu.c linux-2.6.32.24/arch/x86/kernel/amd_iommu.c 10055
10118--- linux-2.6.32.24/arch/x86/kernel/amd_iommu.c 2010-08-13 16:24:37.000000000 -0400 10056diff -urNp linux-2.6.35.7/arch/x86/kernel/amd_iommu.c linux-2.6.35.7/arch/x86/kernel/amd_iommu.c
10119+++ linux-2.6.32.24/arch/x86/kernel/amd_iommu.c 2010-10-23 19:59:19.000000000 -0400 10057--- linux-2.6.35.7/arch/x86/kernel/amd_iommu.c 2010-08-26 19:47:12.000000000 -0400
10120@@ -2074,7 +2074,7 @@ static void prealloc_protection_domains( 10058+++ linux-2.6.35.7/arch/x86/kernel/amd_iommu.c 2010-09-17 20:12:09.000000000 -0400
10059@@ -2284,7 +2284,7 @@ static void prealloc_protection_domains(
10121 } 10060 }
10122 } 10061 }
10123 10062
@@ -10126,10 +10065,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/amd_iommu.c linux-2.6.32.24/arch/x86/
10126 .alloc_coherent = alloc_coherent, 10065 .alloc_coherent = alloc_coherent,
10127 .free_coherent = free_coherent, 10066 .free_coherent = free_coherent,
10128 .map_page = map_page, 10067 .map_page = map_page,
10129diff -urNp linux-2.6.32.24/arch/x86/kernel/apic/io_apic.c linux-2.6.32.24/arch/x86/kernel/apic/io_apic.c 10068diff -urNp linux-2.6.35.7/arch/x86/kernel/apic/io_apic.c linux-2.6.35.7/arch/x86/kernel/apic/io_apic.c
10130--- linux-2.6.32.24/arch/x86/kernel/apic/io_apic.c 2010-09-20 17:26:42.000000000 -0400 10069--- linux-2.6.35.7/arch/x86/kernel/apic/io_apic.c 2010-09-20 17:33:09.000000000 -0400
10131+++ linux-2.6.32.24/arch/x86/kernel/apic/io_apic.c 2010-10-23 19:59:19.000000000 -0400 10070+++ linux-2.6.35.7/arch/x86/kernel/apic/io_apic.c 2010-09-20 17:33:32.000000000 -0400
10132@@ -711,7 +711,7 @@ struct IO_APIC_route_entry **alloc_ioapi 10071@@ -691,7 +691,7 @@ struct IO_APIC_route_entry **alloc_ioapi
10133 ioapic_entries = kzalloc(sizeof(*ioapic_entries) * nr_ioapics, 10072 ioapic_entries = kzalloc(sizeof(*ioapic_entries) * nr_ioapics,
10134 GFP_ATOMIC); 10073 GFP_ATOMIC);
10135 if (!ioapic_entries) 10074 if (!ioapic_entries)
@@ -10138,7 +10077,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/apic/io_apic.c linux-2.6.32.24/arch/x
10138 10077
10139 for (apic = 0; apic < nr_ioapics; apic++) { 10078 for (apic = 0; apic < nr_ioapics; apic++) {
10140 ioapic_entries[apic] = 10079 ioapic_entries[apic] =
10141@@ -728,7 +728,7 @@ nomem: 10080@@ -708,7 +708,7 @@ nomem:
10142 kfree(ioapic_entries[apic]); 10081 kfree(ioapic_entries[apic]);
10143 kfree(ioapic_entries); 10082 kfree(ioapic_entries);
10144 10083
@@ -10147,7 +10086,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/apic/io_apic.c linux-2.6.32.24/arch/x
10147 } 10086 }
10148 10087
10149 /* 10088 /*
10150@@ -1145,7 +1145,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, 10089@@ -1118,7 +1118,7 @@ int IO_APIC_get_PCI_irq_vector(int bus,
10151 } 10090 }
10152 EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector); 10091 EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
10153 10092
@@ -10156,19 +10095,19 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/apic/io_apic.c linux-2.6.32.24/arch/x
10156 { 10095 {
10157 /* Used to the online set of cpus does not change 10096 /* Used to the online set of cpus does not change
10158 * during assign_irq_vector. 10097 * during assign_irq_vector.
10159@@ -1153,7 +1153,7 @@ void lock_vector_lock(void) 10098@@ -1126,7 +1126,7 @@ void lock_vector_lock(void)
10160 spin_lock(&vector_lock); 10099 raw_spin_lock(&vector_lock);
10161 } 10100 }
10162 10101
10163-void unlock_vector_lock(void) 10102-void unlock_vector_lock(void)
10164+void unlock_vector_lock(void) __releases(vector_lock) 10103+void unlock_vector_lock(void) __releases(vector_lock)
10165 { 10104 {
10166 spin_unlock(&vector_lock); 10105 raw_spin_unlock(&vector_lock);
10167 } 10106 }
10168diff -urNp linux-2.6.32.24/arch/x86/kernel/apm_32.c linux-2.6.32.24/arch/x86/kernel/apm_32.c 10107diff -urNp linux-2.6.35.7/arch/x86/kernel/apm_32.c linux-2.6.35.7/arch/x86/kernel/apm_32.c
10169--- linux-2.6.32.24/arch/x86/kernel/apm_32.c 2010-08-13 16:24:37.000000000 -0400 10108--- linux-2.6.35.7/arch/x86/kernel/apm_32.c 2010-08-26 19:47:12.000000000 -0400
10170+++ linux-2.6.32.24/arch/x86/kernel/apm_32.c 2010-10-23 19:59:19.000000000 -0400 10109+++ linux-2.6.35.7/arch/x86/kernel/apm_32.c 2010-09-17 20:12:09.000000000 -0400
10171@@ -410,7 +410,7 @@ static DEFINE_SPINLOCK(user_list_lock); 10110@@ -410,7 +410,7 @@ static DEFINE_MUTEX(apm_mutex);
10172 * This is for buggy BIOS's that refer to (real mode) segment 0x40 10111 * This is for buggy BIOS's that refer to (real mode) segment 0x40
10173 * even though they are called in protected mode. 10112 * even though they are called in protected mode.
10174 */ 10113 */
@@ -10232,7 +10171,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/apm_32.c linux-2.6.32.24/arch/x86/ker
10232 0xb8, 0x00, 0x10, /* movw $0x1000,ax */ 10171 0xb8, 0x00, 0x10, /* movw $0x1000,ax */
10233 0x8e, 0xd0, /* movw ax,ss */ 10172 0x8e, 0xd0, /* movw ax,ss */
10234 0xbc, 0x00, 0xf0, /* movw $0xf000,sp */ 10173 0xbc, 0x00, 0xf0, /* movw $0xf000,sp */
10235@@ -1933,7 +1947,10 @@ static const struct file_operations apm_ 10174@@ -1931,7 +1945,10 @@ static const struct file_operations apm_
10236 static struct miscdevice apm_device = { 10175 static struct miscdevice apm_device = {
10237 APM_MINOR_DEV, 10176 APM_MINOR_DEV,
10238 "apm_bios", 10177 "apm_bios",
@@ -10244,7 +10183,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/apm_32.c linux-2.6.32.24/arch/x86/ker
10244 }; 10183 };
10245 10184
10246 10185
10247@@ -2254,7 +2271,7 @@ static struct dmi_system_id __initdata a 10186@@ -2252,7 +2269,7 @@ static struct dmi_system_id __initdata a
10248 { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), }, 10187 { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
10249 }, 10188 },
10250 10189
@@ -10253,7 +10192,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/apm_32.c linux-2.6.32.24/arch/x86/ker
10253 }; 10192 };
10254 10193
10255 /* 10194 /*
10256@@ -2357,12 +2374,15 @@ static int __init apm_init(void) 10195@@ -2355,12 +2372,15 @@ static int __init apm_init(void)
10257 * code to that CPU. 10196 * code to that CPU.
10258 */ 10197 */
10259 gdt = get_cpu_gdt_table(0); 10198 gdt = get_cpu_gdt_table(0);
@@ -10269,9 +10208,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/apm_32.c linux-2.6.32.24/arch/x86/ker
10269 10208
10270 proc_create("apm", 0, NULL, &apm_file_ops); 10209 proc_create("apm", 0, NULL, &apm_file_ops);
10271 10210
10272diff -urNp linux-2.6.32.24/arch/x86/kernel/asm-offsets_32.c linux-2.6.32.24/arch/x86/kernel/asm-offsets_32.c 10211diff -urNp linux-2.6.35.7/arch/x86/kernel/asm-offsets_32.c linux-2.6.35.7/arch/x86/kernel/asm-offsets_32.c
10273--- linux-2.6.32.24/arch/x86/kernel/asm-offsets_32.c 2010-08-13 16:24:37.000000000 -0400 10212--- linux-2.6.35.7/arch/x86/kernel/asm-offsets_32.c 2010-08-26 19:47:12.000000000 -0400
10274+++ linux-2.6.32.24/arch/x86/kernel/asm-offsets_32.c 2010-10-23 19:59:19.000000000 -0400 10213+++ linux-2.6.35.7/arch/x86/kernel/asm-offsets_32.c 2010-09-17 20:12:09.000000000 -0400
10275@@ -115,6 +115,11 @@ void foo(void) 10214@@ -115,6 +115,11 @@ void foo(void)
10276 OFFSET(PV_CPU_iret, pv_cpu_ops, iret); 10215 OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
10277 OFFSET(PV_CPU_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit); 10216 OFFSET(PV_CPU_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit);
@@ -10284,9 +10223,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/asm-offsets_32.c linux-2.6.32.24/arch
10284 #endif 10223 #endif
10285 10224
10286 #ifdef CONFIG_XEN 10225 #ifdef CONFIG_XEN
10287diff -urNp linux-2.6.32.24/arch/x86/kernel/asm-offsets_64.c linux-2.6.32.24/arch/x86/kernel/asm-offsets_64.c 10226diff -urNp linux-2.6.35.7/arch/x86/kernel/asm-offsets_64.c linux-2.6.35.7/arch/x86/kernel/asm-offsets_64.c
10288--- linux-2.6.32.24/arch/x86/kernel/asm-offsets_64.c 2010-08-13 16:24:37.000000000 -0400 10227--- linux-2.6.35.7/arch/x86/kernel/asm-offsets_64.c 2010-08-26 19:47:12.000000000 -0400
10289+++ linux-2.6.32.24/arch/x86/kernel/asm-offsets_64.c 2010-10-23 19:59:19.000000000 -0400 10228+++ linux-2.6.35.7/arch/x86/kernel/asm-offsets_64.c 2010-09-17 20:12:09.000000000 -0400
10290@@ -63,6 +63,18 @@ int main(void) 10229@@ -63,6 +63,18 @@ int main(void)
10291 OFFSET(PV_CPU_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit); 10230 OFFSET(PV_CPU_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit);
10292 OFFSET(PV_CPU_swapgs, pv_cpu_ops, swapgs); 10231 OFFSET(PV_CPU_swapgs, pv_cpu_ops, swapgs);
@@ -10314,9 +10253,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/asm-offsets_64.c linux-2.6.32.24/arch
10314 DEFINE(TSS_ist, offsetof(struct tss_struct, x86_tss.ist)); 10253 DEFINE(TSS_ist, offsetof(struct tss_struct, x86_tss.ist));
10315 BLANK(); 10254 BLANK();
10316 DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); 10255 DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
10317diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/common.c linux-2.6.32.24/arch/x86/kernel/cpu/common.c 10256diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/common.c linux-2.6.35.7/arch/x86/kernel/cpu/common.c
10318--- linux-2.6.32.24/arch/x86/kernel/cpu/common.c 2010-08-13 16:24:37.000000000 -0400 10257--- linux-2.6.35.7/arch/x86/kernel/cpu/common.c 2010-08-26 19:47:12.000000000 -0400
10319+++ linux-2.6.32.24/arch/x86/kernel/cpu/common.c 2010-10-23 19:59:19.000000000 -0400 10258+++ linux-2.6.35.7/arch/x86/kernel/cpu/common.c 2010-09-17 20:12:09.000000000 -0400
10320@@ -83,60 +83,6 @@ static const struct cpu_dev __cpuinitcon 10259@@ -83,60 +83,6 @@ static const struct cpu_dev __cpuinitcon
10321 10260
10322 static const struct cpu_dev *this_cpu __cpuinitdata = &default_cpu; 10261 static const struct cpu_dev *this_cpu __cpuinitdata = &default_cpu;
@@ -10387,7 +10326,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/common.c linux-2.6.32.24/arch/x86
10387 gdt_descr.size = GDT_SIZE - 1; 10326 gdt_descr.size = GDT_SIZE - 1;
10388 load_gdt(&gdt_descr); 10327 load_gdt(&gdt_descr);
10389 /* Reload the per-cpu base */ 10328 /* Reload the per-cpu base */
10390@@ -798,6 +744,10 @@ static void __cpuinit identify_cpu(struc 10329@@ -802,6 +748,10 @@ static void __cpuinit identify_cpu(struc
10391 /* Filter out anything that depends on CPUID levels we don't have */ 10330 /* Filter out anything that depends on CPUID levels we don't have */
10392 filter_cpuid_features(c, true); 10331 filter_cpuid_features(c, true);
10393 10332
@@ -10398,16 +10337,16 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/common.c linux-2.6.32.24/arch/x86
10398 /* If the model name is still unset, do table lookup. */ 10337 /* If the model name is still unset, do table lookup. */
10399 if (!c->x86_model_id[0]) { 10338 if (!c->x86_model_id[0]) {
10400 const char *p; 10339 const char *p;
10401@@ -1101,7 +1051,7 @@ void __cpuinit cpu_init(void) 10340@@ -1117,7 +1067,7 @@ void __cpuinit cpu_init(void)
10402 int i; 10341 int i;
10403 10342
10404 cpu = stack_smp_processor_id(); 10343 cpu = stack_smp_processor_id();
10405- t = &per_cpu(init_tss, cpu); 10344- t = &per_cpu(init_tss, cpu);
10406+ t = init_tss + cpu; 10345+ t = init_tss + cpu;
10407 orig_ist = &per_cpu(orig_ist, cpu); 10346 oist = &per_cpu(orig_ist, cpu);
10408 10347
10409 #ifdef CONFIG_NUMA 10348 #ifdef CONFIG_NUMA
10410@@ -1127,7 +1077,7 @@ void __cpuinit cpu_init(void) 10349@@ -1143,7 +1093,7 @@ void __cpuinit cpu_init(void)
10411 switch_to_new_gdt(cpu); 10350 switch_to_new_gdt(cpu);
10412 loadsegment(fs, 0); 10351 loadsegment(fs, 0);
10413 10352
@@ -10416,7 +10355,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/common.c linux-2.6.32.24/arch/x86
10416 10355
10417 memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8); 10356 memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8);
10418 syscall_init(); 10357 syscall_init();
10419@@ -1199,7 +1149,7 @@ void __cpuinit cpu_init(void) 10358@@ -1205,7 +1155,7 @@ void __cpuinit cpu_init(void)
10420 { 10359 {
10421 int cpu = smp_processor_id(); 10360 int cpu = smp_processor_id();
10422 struct task_struct *curr = current; 10361 struct task_struct *curr = current;
@@ -10425,10 +10364,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/common.c linux-2.6.32.24/arch/x86
10425 struct thread_struct *thread = &curr->thread; 10364 struct thread_struct *thread = &curr->thread;
10426 10365
10427 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) { 10366 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) {
10428diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 10367diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.35.7/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
10429--- linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2010-08-13 16:24:37.000000000 -0400 10368--- linux-2.6.35.7/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2010-08-26 19:47:12.000000000 -0400
10430+++ linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2010-10-23 19:59:19.000000000 -0400 10369+++ linux-2.6.35.7/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c 2010-09-17 20:12:09.000000000 -0400
10431@@ -521,7 +521,7 @@ static const struct dmi_system_id sw_any 10370@@ -484,7 +484,7 @@ static const struct dmi_system_id sw_any
10432 DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"), 10371 DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"),
10433 }, 10372 },
10434 }, 10373 },
@@ -10437,10 +10376,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c linux-2.6.
10437 }; 10376 };
10438 10377
10439 static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c) 10378 static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c)
10440diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 10379diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c linux-2.6.35.7/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
10441--- linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2010-08-13 16:24:37.000000000 -0400 10380--- linux-2.6.35.7/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2010-08-26 19:47:12.000000000 -0400
10442+++ linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2010-10-23 19:59:19.000000000 -0400 10381+++ linux-2.6.35.7/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c 2010-09-17 20:12:09.000000000 -0400
10443@@ -225,7 +225,7 @@ static struct cpu_model models[] = 10382@@ -226,7 +226,7 @@ static struct cpu_model models[] =
10444 { &cpu_ids[CPU_MP4HT_D0], NULL, 0, NULL }, 10383 { &cpu_ids[CPU_MP4HT_D0], NULL, 0, NULL },
10445 { &cpu_ids[CPU_MP4HT_E0], NULL, 0, NULL }, 10384 { &cpu_ids[CPU_MP4HT_E0], NULL, 0, NULL },
10446 10385
@@ -10449,10 +10388,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c linu
10449 }; 10388 };
10450 #undef _BANIAS 10389 #undef _BANIAS
10451 #undef BANIAS 10390 #undef BANIAS
10452diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/intel.c linux-2.6.32.24/arch/x86/kernel/cpu/intel.c 10391diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/intel.c linux-2.6.35.7/arch/x86/kernel/cpu/intel.c
10453--- linux-2.6.32.24/arch/x86/kernel/cpu/intel.c 2010-08-13 16:24:37.000000000 -0400 10392--- linux-2.6.35.7/arch/x86/kernel/cpu/intel.c 2010-08-26 19:47:12.000000000 -0400
10454+++ linux-2.6.32.24/arch/x86/kernel/cpu/intel.c 2010-10-23 19:59:19.000000000 -0400 10393+++ linux-2.6.35.7/arch/x86/kernel/cpu/intel.c 2010-09-17 20:12:09.000000000 -0400
10455@@ -161,7 +161,7 @@ static void __cpuinit trap_init_f00f_bug 10394@@ -160,7 +160,7 @@ static void __cpuinit trap_init_f00f_bug
10456 * Update the IDT descriptor and reload the IDT so that 10395 * Update the IDT descriptor and reload the IDT so that
10457 * it uses the read-only mapped virtual address. 10396 * it uses the read-only mapped virtual address.
10458 */ 10397 */
@@ -10461,23 +10400,11 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/intel.c linux-2.6.32.24/arch/x86/
10461 load_idt(&idt_descr); 10400 load_idt(&idt_descr);
10462 } 10401 }
10463 #endif 10402 #endif
10464diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/intel_cacheinfo.c linux-2.6.32.24/arch/x86/kernel/cpu/intel_cacheinfo.c 10403diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/Makefile linux-2.6.35.7/arch/x86/kernel/cpu/Makefile
10465--- linux-2.6.32.24/arch/x86/kernel/cpu/intel_cacheinfo.c 2010-08-13 16:24:37.000000000 -0400 10404--- linux-2.6.35.7/arch/x86/kernel/cpu/Makefile 2010-08-26 19:47:12.000000000 -0400
10466+++ linux-2.6.32.24/arch/x86/kernel/cpu/intel_cacheinfo.c 2010-10-23 19:59:19.000000000 -0400 10405+++ linux-2.6.35.7/arch/x86/kernel/cpu/Makefile 2010-09-17 20:12:09.000000000 -0400
10467@@ -921,7 +921,7 @@ static ssize_t store(struct kobject *kob 10406@@ -8,10 +8,6 @@ CFLAGS_REMOVE_common.o = -pg
10468 return ret; 10407 CFLAGS_REMOVE_perf_event.o = -pg
10469 }
10470
10471-static struct sysfs_ops sysfs_ops = {
10472+static const struct sysfs_ops sysfs_ops = {
10473 .show = show,
10474 .store = store,
10475 };
10476diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/Makefile linux-2.6.32.24/arch/x86/kernel/cpu/Makefile
10477--- linux-2.6.32.24/arch/x86/kernel/cpu/Makefile 2010-08-13 16:24:37.000000000 -0400
10478+++ linux-2.6.32.24/arch/x86/kernel/cpu/Makefile 2010-10-23 19:59:19.000000000 -0400
10479@@ -7,10 +7,6 @@ ifdef CONFIG_FUNCTION_TRACER
10480 CFLAGS_REMOVE_common.o = -pg
10481 endif 10408 endif
10482 10409
10483-# Make sure load_percpu_segment has no stackprotector 10410-# Make sure load_percpu_segment has no stackprotector
@@ -10486,23 +10413,11 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/Makefile linux-2.6.32.24/arch/x86
10486- 10413-
10487 obj-y := intel_cacheinfo.o addon_cpuid_features.o 10414 obj-y := intel_cacheinfo.o addon_cpuid_features.o
10488 obj-y += proc.o capflags.o powerflags.o common.o 10415 obj-y += proc.o capflags.o powerflags.o common.o
10489 obj-y += vmware.o hypervisor.o sched.o 10416 obj-y += vmware.o hypervisor.o sched.o mshyperv.o
10490diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce_amd.c linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce_amd.c 10417diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.35.7/arch/x86/kernel/cpu/mcheck/mce.c
10491--- linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce_amd.c 2010-08-13 16:24:37.000000000 -0400 10418--- linux-2.6.35.7/arch/x86/kernel/cpu/mcheck/mce.c 2010-08-26 19:47:12.000000000 -0400
10492+++ linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce_amd.c 2010-10-23 19:59:19.000000000 -0400 10419+++ linux-2.6.35.7/arch/x86/kernel/cpu/mcheck/mce.c 2010-09-17 20:12:09.000000000 -0400
10493@@ -388,7 +388,7 @@ static ssize_t store(struct kobject *kob 10420@@ -219,7 +219,7 @@ static void print_mce(struct mce *m)
10494 return ret;
10495 }
10496
10497-static struct sysfs_ops threshold_ops = {
10498+static const struct sysfs_ops threshold_ops = {
10499 .show = show,
10500 .store = store,
10501 };
10502diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c
10503--- linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c 2010-08-13 16:24:37.000000000 -0400
10504+++ linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c 2010-10-23 19:59:19.000000000 -0400
10505@@ -187,7 +187,7 @@ static void print_mce(struct mce *m)
10506 !(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "", 10421 !(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "",
10507 m->cs, m->ip); 10422 m->cs, m->ip);
10508 10423
@@ -10511,7 +10426,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.24/arch
10511 print_symbol("{%s}", m->ip); 10426 print_symbol("{%s}", m->ip);
10512 pr_cont("\n"); 10427 pr_cont("\n");
10513 } 10428 }
10514@@ -1429,14 +1429,14 @@ void __cpuinit mcheck_init(struct cpuinf 10429@@ -1471,14 +1471,14 @@ void __cpuinit mcheck_cpu_init(struct cp
10515 */ 10430 */
10516 10431
10517 static DEFINE_SPINLOCK(mce_state_lock); 10432 static DEFINE_SPINLOCK(mce_state_lock);
@@ -10528,7 +10443,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.24/arch
10528 spin_unlock(&mce_state_lock); 10443 spin_unlock(&mce_state_lock);
10529 10444
10530 return -EBUSY; 10445 return -EBUSY;
10531@@ -1444,7 +1444,7 @@ static int mce_open(struct inode *inode, 10446@@ -1486,7 +1486,7 @@ static int mce_open(struct inode *inode,
10532 10447
10533 if (file->f_flags & O_EXCL) 10448 if (file->f_flags & O_EXCL)
10534 open_exclu = 1; 10449 open_exclu = 1;
@@ -10537,7 +10452,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.24/arch
10537 10452
10538 spin_unlock(&mce_state_lock); 10453 spin_unlock(&mce_state_lock);
10539 10454
10540@@ -1455,7 +1455,7 @@ static int mce_release(struct inode *ino 10455@@ -1497,7 +1497,7 @@ static int mce_release(struct inode *ino
10541 { 10456 {
10542 spin_lock(&mce_state_lock); 10457 spin_lock(&mce_state_lock);
10543 10458
@@ -10546,7 +10461,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.24/arch
10546 open_exclu = 0; 10461 open_exclu = 0;
10547 10462
10548 spin_unlock(&mce_state_lock); 10463 spin_unlock(&mce_state_lock);
10549@@ -1595,6 +1595,7 @@ static struct miscdevice mce_log_device 10464@@ -1683,6 +1683,7 @@ static struct miscdevice mce_log_device
10550 MISC_MCELOG_MINOR, 10465 MISC_MCELOG_MINOR,
10551 "mcelog", 10466 "mcelog",
10552 &mce_chrdev_ops, 10467 &mce_chrdev_ops,
@@ -10554,46 +10469,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mcheck/mce.c linux-2.6.32.24/arch
10554 }; 10469 };
10555 10470
10556 /* 10471 /*
10557diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/amd.c linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/amd.c 10472diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/generic.c
10558--- linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/amd.c 2010-08-13 16:24:37.000000000 -0400 10473--- linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/generic.c 2010-08-26 19:47:12.000000000 -0400
10559+++ linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/amd.c 2010-10-23 19:59:19.000000000 -0400 10474+++ linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/generic.c 2010-09-17 20:12:09.000000000 -0400
10560@@ -108,7 +108,7 @@ amd_validate_add_page(unsigned long base 10475@@ -28,7 +28,7 @@ static struct fixed_range_block fixed_ra
10561 return 0;
10562 }
10563
10564-static struct mtrr_ops amd_mtrr_ops = {
10565+static const struct mtrr_ops amd_mtrr_ops = {
10566 .vendor = X86_VENDOR_AMD,
10567 .set = amd_set_mtrr,
10568 .get = amd_get_mtrr,
10569diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/centaur.c linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/centaur.c
10570--- linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/centaur.c 2010-08-13 16:24:37.000000000 -0400
10571+++ linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/centaur.c 2010-10-23 19:59:19.000000000 -0400
10572@@ -110,7 +110,7 @@ centaur_validate_add_page(unsigned long
10573 return 0;
10574 }
10575
10576-static struct mtrr_ops centaur_mtrr_ops = {
10577+static const struct mtrr_ops centaur_mtrr_ops = {
10578 .vendor = X86_VENDOR_CENTAUR,
10579 .set = centaur_set_mcr,
10580 .get = centaur_get_mcr,
10581diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/cyrix.c linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/cyrix.c
10582--- linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/cyrix.c 2010-08-13 16:24:37.000000000 -0400
10583+++ linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/cyrix.c 2010-10-23 19:59:19.000000000 -0400
10584@@ -265,7 +265,7 @@ static void cyrix_set_all(void)
10585 post_set();
10586 }
10587
10588-static struct mtrr_ops cyrix_mtrr_ops = {
10589+static const struct mtrr_ops cyrix_mtrr_ops = {
10590 .vendor = X86_VENDOR_CYRIX,
10591 .set_all = cyrix_set_all,
10592 .set = cyrix_set_arr,
10593diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/generic.c
10594--- linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/generic.c 2010-08-13 16:24:37.000000000 -0400
10595+++ linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/generic.c 2010-10-23 19:59:19.000000000 -0400
10596@@ -29,7 +29,7 @@ static struct fixed_range_block fixed_ra
10597 { MSR_MTRRfix64K_00000, 1 }, /* one 64k MTRR */ 10476 { MSR_MTRRfix64K_00000, 1 }, /* one 64k MTRR */
10598 { MSR_MTRRfix16K_80000, 2 }, /* two 16k MTRRs */ 10477 { MSR_MTRRfix16K_80000, 2 }, /* two 16k MTRRs */
10599 { MSR_MTRRfix4K_C0000, 8 }, /* eight 4k MTRRs */ 10478 { MSR_MTRRfix4K_C0000, 8 }, /* eight 4k MTRRs */
@@ -10602,39 +10481,21 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/generic.c linux-2.6.32.24/ar
10602 }; 10481 };
10603 10482
10604 static unsigned long smp_changes_mask; 10483 static unsigned long smp_changes_mask;
10605@@ -752,7 +752,7 @@ int positive_have_wrcomb(void) 10484diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/main.c linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/main.c
10606 /* 10485--- linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/main.c 2010-08-26 19:47:12.000000000 -0400
10607 * Generic structure... 10486+++ linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/main.c 2010-09-17 20:12:09.000000000 -0400
10608 */ 10487@@ -61,7 +61,7 @@ static DEFINE_MUTEX(mtrr_mutex);
10609-struct mtrr_ops generic_mtrr_ops = {
10610+const struct mtrr_ops generic_mtrr_ops = {
10611 .use_intel_if = 1,
10612 .set_all = generic_set_all,
10613 .get = generic_get_mtrr,
10614diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/main.c linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/main.c
10615--- linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/main.c 2010-08-13 16:24:37.000000000 -0400
10616+++ linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/main.c 2010-10-23 19:59:19.000000000 -0400
10617@@ -60,14 +60,14 @@ static DEFINE_MUTEX(mtrr_mutex);
10618 u64 size_or_mask, size_and_mask; 10488 u64 size_or_mask, size_and_mask;
10619 static bool mtrr_aps_delayed_init; 10489 static bool mtrr_aps_delayed_init;
10620 10490
10621-static struct mtrr_ops *mtrr_ops[X86_VENDOR_NUM]; 10491-static const struct mtrr_ops *mtrr_ops[X86_VENDOR_NUM];
10622+static const struct mtrr_ops *mtrr_ops[X86_VENDOR_NUM] __read_only; 10492+static const struct mtrr_ops *mtrr_ops[X86_VENDOR_NUM] __read_only;
10623 10493
10624-struct mtrr_ops *mtrr_if; 10494 const struct mtrr_ops *mtrr_if;
10625+const struct mtrr_ops *mtrr_if;
10626 10495
10627 static void set_mtrr(unsigned int reg, unsigned long base, 10496diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/mtrr.h
10628 unsigned long size, mtrr_type type); 10497--- linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/mtrr.h 2010-08-26 19:47:12.000000000 -0400
10629 10498+++ linux-2.6.35.7/arch/x86/kernel/cpu/mtrr/mtrr.h 2010-09-17 20:12:09.000000000 -0400
10630-void set_mtrr_ops(struct mtrr_ops *ops)
10631+void set_mtrr_ops(const struct mtrr_ops *ops)
10632 {
10633 if (ops->vendor && ops->vendor < X86_VENDOR_NUM)
10634 mtrr_ops[ops->vendor] = ops;
10635diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/mtrr.h
10636--- linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/mtrr.h 2010-08-13 16:24:37.000000000 -0400
10637+++ linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/mtrr.h 2010-10-23 19:59:19.000000000 -0400
10638@@ -12,19 +12,19 @@ 10499@@ -12,19 +12,19 @@
10639 extern unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES]; 10500 extern unsigned int mtrr_usage_table[MTRR_MAX_VAR_RANGES];
10640 10501
@@ -10663,31 +10524,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/mtrr/mtrr.h linux-2.6.32.24/arch/
10663 }; 10524 };
10664 10525
10665 extern int generic_get_free_region(unsigned long base, unsigned long size, 10526 extern int generic_get_free_region(unsigned long base, unsigned long size,
10666@@ -32,7 +32,7 @@ extern int generic_get_free_region(unsig 10527diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/perfctr-watchdog.c linux-2.6.35.7/arch/x86/kernel/cpu/perfctr-watchdog.c
10667 extern int generic_validate_add_page(unsigned long base, unsigned long size, 10528--- linux-2.6.35.7/arch/x86/kernel/cpu/perfctr-watchdog.c 2010-08-26 19:47:12.000000000 -0400
10668 unsigned int type); 10529+++ linux-2.6.35.7/arch/x86/kernel/cpu/perfctr-watchdog.c 2010-09-17 20:12:09.000000000 -0400
10669
10670-extern struct mtrr_ops generic_mtrr_ops;
10671+extern const struct mtrr_ops generic_mtrr_ops;
10672
10673 extern int positive_have_wrcomb(void);
10674
10675@@ -53,10 +53,10 @@ void fill_mtrr_var_range(unsigned int in
10676 u32 base_lo, u32 base_hi, u32 mask_lo, u32 mask_hi);
10677 void get_mtrr_state(void);
10678
10679-extern void set_mtrr_ops(struct mtrr_ops *ops);
10680+extern void set_mtrr_ops(const struct mtrr_ops *ops);
10681
10682 extern u64 size_or_mask, size_and_mask;
10683-extern struct mtrr_ops *mtrr_if;
10684+extern const struct mtrr_ops *mtrr_if;
10685
10686 #define is_cpu(vnd) (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)
10687 #define use_intel() (mtrr_if && mtrr_if->use_intel_if == 1)
10688diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/perfctr-watchdog.c linux-2.6.32.24/arch/x86/kernel/cpu/perfctr-watchdog.c
10689--- linux-2.6.32.24/arch/x86/kernel/cpu/perfctr-watchdog.c 2010-08-13 16:24:37.000000000 -0400
10690+++ linux-2.6.32.24/arch/x86/kernel/cpu/perfctr-watchdog.c 2010-10-23 19:59:19.000000000 -0400
10691@@ -30,11 +30,11 @@ struct nmi_watchdog_ctlblk { 10530@@ -30,11 +30,11 @@ struct nmi_watchdog_ctlblk {
10692 10531
10693 /* Interface defining a CPU specific perfctr watchdog */ 10532 /* Interface defining a CPU specific perfctr watchdog */
@@ -10705,15 +10544,15 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/perfctr-watchdog.c linux-2.6.32.2
10705 unsigned perfctr; 10544 unsigned perfctr;
10706 unsigned evntsel; 10545 unsigned evntsel;
10707 u64 checkbit; 10546 u64 checkbit;
10708@@ -645,6 +645,7 @@ static const struct wd_ops p4_wd_ops = { 10547@@ -634,6 +634,7 @@ static const struct wd_ops p4_wd_ops = {
10709 #define ARCH_PERFMON_NMI_EVENT_SEL ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL 10548 #define ARCH_PERFMON_NMI_EVENT_SEL ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL
10710 #define ARCH_PERFMON_NMI_EVENT_UMASK ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK 10549 #define ARCH_PERFMON_NMI_EVENT_UMASK ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK
10711 10550
10712+/* cannot be const */ 10551+/* cannot be const, see probe_nmi_watchdog */
10713 static struct wd_ops intel_arch_wd_ops; 10552 static struct wd_ops intel_arch_wd_ops;
10714 10553
10715 static int setup_intel_arch_watchdog(unsigned nmi_hz) 10554 static int setup_intel_arch_watchdog(unsigned nmi_hz)
10716@@ -697,6 +698,7 @@ static int setup_intel_arch_watchdog(uns 10555@@ -686,6 +687,7 @@ static int setup_intel_arch_watchdog(uns
10717 return 1; 10556 return 1;
10718 } 10557 }
10719 10558
@@ -10721,10 +10560,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/perfctr-watchdog.c linux-2.6.32.2
10721 static struct wd_ops intel_arch_wd_ops __read_mostly = { 10560 static struct wd_ops intel_arch_wd_ops __read_mostly = {
10722 .reserve = single_msr_reserve, 10561 .reserve = single_msr_reserve,
10723 .unreserve = single_msr_unreserve, 10562 .unreserve = single_msr_unreserve,
10724diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/perf_event.c linux-2.6.32.24/arch/x86/kernel/cpu/perf_event.c 10563diff -urNp linux-2.6.35.7/arch/x86/kernel/cpu/perf_event.c linux-2.6.35.7/arch/x86/kernel/cpu/perf_event.c
10725--- linux-2.6.32.24/arch/x86/kernel/cpu/perf_event.c 2010-08-13 16:24:37.000000000 -0400 10564--- linux-2.6.35.7/arch/x86/kernel/cpu/perf_event.c 2010-08-26 19:47:12.000000000 -0400
10726+++ linux-2.6.32.24/arch/x86/kernel/cpu/perf_event.c 2010-10-23 19:59:19.000000000 -0400 10565+++ linux-2.6.35.7/arch/x86/kernel/cpu/perf_event.c 2010-09-17 20:12:09.000000000 -0400
10727@@ -2357,7 +2357,7 @@ perf_callchain_user(struct pt_regs *regs 10566@@ -1685,7 +1685,7 @@ perf_callchain_user(struct pt_regs *regs
10728 break; 10567 break;
10729 10568
10730 callchain_store(entry, frame.return_address); 10569 callchain_store(entry, frame.return_address);
@@ -10733,10 +10572,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/cpu/perf_event.c linux-2.6.32.24/arch
10733 } 10572 }
10734 } 10573 }
10735 10574
10736diff -urNp linux-2.6.32.24/arch/x86/kernel/crash.c linux-2.6.32.24/arch/x86/kernel/crash.c 10575diff -urNp linux-2.6.35.7/arch/x86/kernel/crash.c linux-2.6.35.7/arch/x86/kernel/crash.c
10737--- linux-2.6.32.24/arch/x86/kernel/crash.c 2010-08-13 16:24:37.000000000 -0400 10576--- linux-2.6.35.7/arch/x86/kernel/crash.c 2010-08-26 19:47:12.000000000 -0400
10738+++ linux-2.6.32.24/arch/x86/kernel/crash.c 2010-10-23 19:59:19.000000000 -0400 10577+++ linux-2.6.35.7/arch/x86/kernel/crash.c 2010-09-17 20:12:09.000000000 -0400
10739@@ -41,7 +41,7 @@ static void kdump_nmi_callback(int cpu, 10578@@ -40,7 +40,7 @@ static void kdump_nmi_callback(int cpu,
10740 regs = args->regs; 10579 regs = args->regs;
10741 10580
10742 #ifdef CONFIG_X86_32 10581 #ifdef CONFIG_X86_32
@@ -10745,9 +10584,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/crash.c linux-2.6.32.24/arch/x86/kern
10745 crash_fixup_ss_esp(&fixed_regs, regs); 10584 crash_fixup_ss_esp(&fixed_regs, regs);
10746 regs = &fixed_regs; 10585 regs = &fixed_regs;
10747 } 10586 }
10748diff -urNp linux-2.6.32.24/arch/x86/kernel/doublefault_32.c linux-2.6.32.24/arch/x86/kernel/doublefault_32.c 10587diff -urNp linux-2.6.35.7/arch/x86/kernel/doublefault_32.c linux-2.6.35.7/arch/x86/kernel/doublefault_32.c
10749--- linux-2.6.32.24/arch/x86/kernel/doublefault_32.c 2010-08-13 16:24:37.000000000 -0400 10588--- linux-2.6.35.7/arch/x86/kernel/doublefault_32.c 2010-08-26 19:47:12.000000000 -0400
10750+++ linux-2.6.32.24/arch/x86/kernel/doublefault_32.c 2010-10-23 19:59:19.000000000 -0400 10589+++ linux-2.6.35.7/arch/x86/kernel/doublefault_32.c 2010-09-17 20:12:09.000000000 -0400
10751@@ -11,7 +11,7 @@ 10590@@ -11,7 +11,7 @@
10752 10591
10753 #define DOUBLEFAULT_STACKSIZE (1024) 10592 #define DOUBLEFAULT_STACKSIZE (1024)
@@ -10779,10 +10618,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/doublefault_32.c linux-2.6.32.24/arch
10779 .fs = __KERNEL_PERCPU, 10618 .fs = __KERNEL_PERCPU,
10780 10619
10781 .__cr3 = __pa_nodebug(swapper_pg_dir), 10620 .__cr3 = __pa_nodebug(swapper_pg_dir),
10782diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack_32.c linux-2.6.32.24/arch/x86/kernel/dumpstack_32.c 10621diff -urNp linux-2.6.35.7/arch/x86/kernel/dumpstack_32.c linux-2.6.35.7/arch/x86/kernel/dumpstack_32.c
10783--- linux-2.6.32.24/arch/x86/kernel/dumpstack_32.c 2010-08-13 16:24:37.000000000 -0400 10622--- linux-2.6.35.7/arch/x86/kernel/dumpstack_32.c 2010-08-26 19:47:12.000000000 -0400
10784+++ linux-2.6.32.24/arch/x86/kernel/dumpstack_32.c 2010-10-23 19:59:19.000000000 -0400 10623+++ linux-2.6.35.7/arch/x86/kernel/dumpstack_32.c 2010-09-17 20:12:09.000000000 -0400
10785@@ -112,11 +112,12 @@ void show_registers(struct pt_regs *regs 10624@@ -107,11 +107,12 @@ void show_registers(struct pt_regs *regs
10786 * When in-kernel, we also print out the stack and code at the 10625 * When in-kernel, we also print out the stack and code at the
10787 * time of the fault.. 10626 * time of the fault..
10788 */ 10627 */
@@ -10796,7 +10635,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack_32.c linux-2.6.32.24/arch/x
10796 10635
10797 printk(KERN_EMERG "Stack:\n"); 10636 printk(KERN_EMERG "Stack:\n");
10798 show_stack_log_lvl(NULL, regs, &regs->sp, 10637 show_stack_log_lvl(NULL, regs, &regs->sp,
10799@@ -124,10 +125,10 @@ void show_registers(struct pt_regs *regs 10638@@ -119,10 +120,10 @@ void show_registers(struct pt_regs *regs
10800 10639
10801 printk(KERN_EMERG "Code: "); 10640 printk(KERN_EMERG "Code: ");
10802 10641
@@ -10809,7 +10648,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack_32.c linux-2.6.32.24/arch/x
10809 code_len = code_len - code_prologue + 1; 10648 code_len = code_len - code_prologue + 1;
10810 } 10649 }
10811 for (i = 0; i < code_len; i++, ip++) { 10650 for (i = 0; i < code_len; i++, ip++) {
10812@@ -136,7 +137,7 @@ void show_registers(struct pt_regs *regs 10651@@ -131,7 +132,7 @@ void show_registers(struct pt_regs *regs
10813 printk(" Bad EIP value."); 10652 printk(" Bad EIP value.");
10814 break; 10653 break;
10815 } 10654 }
@@ -10818,7 +10657,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack_32.c linux-2.6.32.24/arch/x
10818 printk("<%02x> ", c); 10657 printk("<%02x> ", c);
10819 else 10658 else
10820 printk("%02x ", c); 10659 printk("%02x ", c);
10821@@ -149,6 +150,7 @@ int is_valid_bugaddr(unsigned long ip) 10660@@ -144,6 +145,7 @@ int is_valid_bugaddr(unsigned long ip)
10822 { 10661 {
10823 unsigned short ud2; 10662 unsigned short ud2;
10824 10663
@@ -10826,10 +10665,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack_32.c linux-2.6.32.24/arch/x
10826 if (ip < PAGE_OFFSET) 10665 if (ip < PAGE_OFFSET)
10827 return 0; 10666 return 0;
10828 if (probe_kernel_address((unsigned short *)ip, ud2)) 10667 if (probe_kernel_address((unsigned short *)ip, ud2))
10829diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack.c linux-2.6.32.24/arch/x86/kernel/dumpstack.c 10668diff -urNp linux-2.6.35.7/arch/x86/kernel/dumpstack.c linux-2.6.35.7/arch/x86/kernel/dumpstack.c
10830--- linux-2.6.32.24/arch/x86/kernel/dumpstack.c 2010-08-13 16:24:37.000000000 -0400 10669--- linux-2.6.35.7/arch/x86/kernel/dumpstack.c 2010-08-26 19:47:12.000000000 -0400
10831+++ linux-2.6.32.24/arch/x86/kernel/dumpstack.c 2010-10-23 19:59:19.000000000 -0400 10670+++ linux-2.6.35.7/arch/x86/kernel/dumpstack.c 2010-09-17 20:12:09.000000000 -0400
10832@@ -180,7 +180,7 @@ void dump_stack(void) 10671@@ -207,7 +207,7 @@ void dump_stack(void)
10833 #endif 10672 #endif
10834 10673
10835 printk("Pid: %d, comm: %.20s %s %s %.*s\n", 10674 printk("Pid: %d, comm: %.20s %s %s %.*s\n",
@@ -10838,7 +10677,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack.c linux-2.6.32.24/arch/x86/
10838 init_utsname()->release, 10677 init_utsname()->release,
10839 (int)strcspn(init_utsname()->version, " "), 10678 (int)strcspn(init_utsname()->version, " "),
10840 init_utsname()->version); 10679 init_utsname()->version);
10841@@ -241,7 +241,7 @@ void __kprobes oops_end(unsigned long fl 10680@@ -263,7 +263,7 @@ void __kprobes oops_end(unsigned long fl
10842 panic("Fatal exception in interrupt"); 10681 panic("Fatal exception in interrupt");
10843 if (panic_on_oops) 10682 if (panic_on_oops)
10844 panic("Fatal exception"); 10683 panic("Fatal exception");
@@ -10847,7 +10686,16 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack.c linux-2.6.32.24/arch/x86/
10847 } 10686 }
10848 10687
10849 int __kprobes __die(const char *str, struct pt_regs *regs, long err) 10688 int __kprobes __die(const char *str, struct pt_regs *regs, long err)
10850@@ -295,7 +295,7 @@ void die(const char *str, struct pt_regs 10689@@ -290,7 +290,7 @@ int __kprobes __die(const char *str, str
10690
10691 show_registers(regs);
10692 #ifdef CONFIG_X86_32
10693- if (user_mode_vm(regs)) {
10694+ if (user_mode(regs)) {
10695 sp = regs->sp;
10696 ss = regs->ss & 0xffff;
10697 } else {
10698@@ -318,7 +318,7 @@ void die(const char *str, struct pt_regs
10851 unsigned long flags = oops_begin(); 10699 unsigned long flags = oops_begin();
10852 int sig = SIGSEGV; 10700 int sig = SIGSEGV;
10853 10701
@@ -10856,21 +10704,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/dumpstack.c linux-2.6.32.24/arch/x86/
10856 report_bug(regs->ip, regs); 10704 report_bug(regs->ip, regs);
10857 10705
10858 if (__die(str, regs, err)) 10706 if (__die(str, regs, err))
10859diff -urNp linux-2.6.32.24/arch/x86/kernel/e820.c linux-2.6.32.24/arch/x86/kernel/e820.c 10707diff -urNp linux-2.6.35.7/arch/x86/kernel/efi_32.c linux-2.6.35.7/arch/x86/kernel/efi_32.c
10860--- linux-2.6.32.24/arch/x86/kernel/e820.c 2010-08-13 16:24:37.000000000 -0400 10708--- linux-2.6.35.7/arch/x86/kernel/efi_32.c 2010-08-26 19:47:12.000000000 -0400
10861+++ linux-2.6.32.24/arch/x86/kernel/e820.c 2010-10-23 19:59:19.000000000 -0400 10709+++ linux-2.6.35.7/arch/x86/kernel/efi_32.c 2010-09-17 20:12:09.000000000 -0400
10862@@ -733,7 +733,7 @@ struct early_res {
10863 };
10864 static struct early_res early_res[MAX_EARLY_RES] __initdata = {
10865 { 0, PAGE_SIZE, "BIOS data page" }, /* BIOS data page */
10866- {}
10867+ { 0, 0, {0}, 0 }
10868 };
10869
10870 static int __init find_overlapped_early(u64 start, u64 end)
10871diff -urNp linux-2.6.32.24/arch/x86/kernel/efi_32.c linux-2.6.32.24/arch/x86/kernel/efi_32.c
10872--- linux-2.6.32.24/arch/x86/kernel/efi_32.c 2010-08-13 16:24:37.000000000 -0400
10873+++ linux-2.6.32.24/arch/x86/kernel/efi_32.c 2010-10-23 19:59:19.000000000 -0400
10874@@ -38,70 +38,38 @@ 10710@@ -38,70 +38,38 @@
10875 */ 10711 */
10876 10712
@@ -10951,9 +10787,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/efi_32.c linux-2.6.32.24/arch/x86/ker
10951 10787
10952 /* 10788 /*
10953 * After the lock is released, the original page table is restored. 10789 * After the lock is released, the original page table is restored.
10954diff -urNp linux-2.6.32.24/arch/x86/kernel/efi_stub_32.S linux-2.6.32.24/arch/x86/kernel/efi_stub_32.S 10790diff -urNp linux-2.6.35.7/arch/x86/kernel/efi_stub_32.S linux-2.6.35.7/arch/x86/kernel/efi_stub_32.S
10955--- linux-2.6.32.24/arch/x86/kernel/efi_stub_32.S 2010-08-13 16:24:37.000000000 -0400 10791--- linux-2.6.35.7/arch/x86/kernel/efi_stub_32.S 2010-08-26 19:47:12.000000000 -0400
10956+++ linux-2.6.32.24/arch/x86/kernel/efi_stub_32.S 2010-10-23 19:59:19.000000000 -0400 10792+++ linux-2.6.35.7/arch/x86/kernel/efi_stub_32.S 2010-09-17 20:12:09.000000000 -0400
10957@@ -6,6 +6,7 @@ 10793@@ -6,6 +6,7 @@
10958 */ 10794 */
10959 10795
@@ -11052,10 +10888,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/efi_stub_32.S linux-2.6.32.24/arch/x8
11052 saved_return_addr: 10888 saved_return_addr:
11053 .long 0 10889 .long 0
11054 efi_rt_function_ptr: 10890 efi_rt_function_ptr:
11055diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/kernel/entry_32.S 10891diff -urNp linux-2.6.35.7/arch/x86/kernel/entry_32.S linux-2.6.35.7/arch/x86/kernel/entry_32.S
11056--- linux-2.6.32.24/arch/x86/kernel/entry_32.S 2010-08-13 16:24:37.000000000 -0400 10892--- linux-2.6.35.7/arch/x86/kernel/entry_32.S 2010-08-26 19:47:12.000000000 -0400
11057+++ linux-2.6.32.24/arch/x86/kernel/entry_32.S 2010-10-23 19:59:19.000000000 -0400 10893+++ linux-2.6.35.7/arch/x86/kernel/entry_32.S 2010-09-17 20:12:09.000000000 -0400
11058@@ -191,7 +191,67 @@ 10894@@ -192,7 +192,67 @@
11059 10895
11060 #endif /* CONFIG_X86_32_LAZY_GS */ 10896 #endif /* CONFIG_X86_32_LAZY_GS */
11061 10897
@@ -11124,7 +10960,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11124 cld 10960 cld
11125 PUSH_GS 10961 PUSH_GS
11126 pushl %fs 10962 pushl %fs
11127@@ -224,7 +284,7 @@ 10963@@ -225,7 +285,7 @@
11128 pushl %ebx 10964 pushl %ebx
11129 CFI_ADJUST_CFA_OFFSET 4 10965 CFI_ADJUST_CFA_OFFSET 4
11130 CFI_REL_OFFSET ebx, 0 10966 CFI_REL_OFFSET ebx, 0
@@ -11133,7 +10969,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11133 movl %edx, %ds 10969 movl %edx, %ds
11134 movl %edx, %es 10970 movl %edx, %es
11135 movl $(__KERNEL_PERCPU), %edx 10971 movl $(__KERNEL_PERCPU), %edx
11136@@ -232,6 +292,15 @@ 10972@@ -233,6 +293,15 @@
11137 SET_KERNEL_GS %edx 10973 SET_KERNEL_GS %edx
11138 .endm 10974 .endm
11139 10975
@@ -11149,7 +10985,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11149 .macro RESTORE_INT_REGS 10985 .macro RESTORE_INT_REGS
11150 popl %ebx 10986 popl %ebx
11151 CFI_ADJUST_CFA_OFFSET -4 10987 CFI_ADJUST_CFA_OFFSET -4
11152@@ -352,7 +421,15 @@ check_userspace: 10988@@ -357,7 +426,15 @@ check_userspace:
11153 movb PT_CS(%esp), %al 10989 movb PT_CS(%esp), %al
11154 andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax 10990 andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax
11155 cmpl $USER_RPL, %eax 10991 cmpl $USER_RPL, %eax
@@ -11165,7 +11001,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11165 11001
11166 ENTRY(resume_userspace) 11002 ENTRY(resume_userspace)
11167 LOCKDEP_SYS_EXIT 11003 LOCKDEP_SYS_EXIT
11168@@ -414,10 +491,9 @@ sysenter_past_esp: 11004@@ -423,10 +500,9 @@ sysenter_past_esp:
11169 /*CFI_REL_OFFSET cs, 0*/ 11005 /*CFI_REL_OFFSET cs, 0*/
11170 /* 11006 /*
11171 * Push current_thread_info()->sysenter_return to the stack. 11007 * Push current_thread_info()->sysenter_return to the stack.
@@ -11178,7 +11014,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11178 CFI_ADJUST_CFA_OFFSET 4 11014 CFI_ADJUST_CFA_OFFSET 4
11179 CFI_REL_OFFSET eip, 0 11015 CFI_REL_OFFSET eip, 0
11180 11016
11181@@ -430,9 +506,19 @@ sysenter_past_esp: 11017@@ -439,9 +515,19 @@ sysenter_past_esp:
11182 * Load the potential sixth argument from user stack. 11018 * Load the potential sixth argument from user stack.
11183 * Careful about security. 11019 * Careful about security.
11184 */ 11020 */
@@ -11198,7 +11034,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11198 movl %ebp,PT_EBP(%esp) 11034 movl %ebp,PT_EBP(%esp)
11199 .section __ex_table,"a" 11035 .section __ex_table,"a"
11200 .align 4 11036 .align 4
11201@@ -455,12 +541,23 @@ sysenter_do_call: 11037@@ -464,12 +550,23 @@ sysenter_do_call:
11202 testl $_TIF_ALLWORK_MASK, %ecx 11038 testl $_TIF_ALLWORK_MASK, %ecx
11203 jne sysexit_audit 11039 jne sysexit_audit
11204 sysenter_exit: 11040 sysenter_exit:
@@ -11222,7 +11058,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11222 PTGS_TO_GS 11058 PTGS_TO_GS
11223 ENABLE_INTERRUPTS_SYSEXIT 11059 ENABLE_INTERRUPTS_SYSEXIT
11224 11060
11225@@ -504,11 +601,17 @@ sysexit_audit: 11061@@ -513,11 +610,17 @@ sysexit_audit:
11226 11062
11227 CFI_ENDPROC 11063 CFI_ENDPROC
11228 .pushsection .fixup,"ax" 11064 .pushsection .fixup,"ax"
@@ -11242,7 +11078,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11242 .popsection 11078 .popsection
11243 PTGS_TO_GS_EX 11079 PTGS_TO_GS_EX
11244 ENDPROC(ia32_sysenter_target) 11080 ENDPROC(ia32_sysenter_target)
11245@@ -538,6 +641,10 @@ syscall_exit: 11081@@ -551,6 +654,10 @@ syscall_exit:
11246 testl $_TIF_ALLWORK_MASK, %ecx # current->work 11082 testl $_TIF_ALLWORK_MASK, %ecx # current->work
11247 jne syscall_exit_work 11083 jne syscall_exit_work
11248 11084
@@ -11253,7 +11089,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11253 restore_all: 11089 restore_all:
11254 TRACE_IRQS_IRET 11090 TRACE_IRQS_IRET
11255 restore_all_notrace: 11091 restore_all_notrace:
11256@@ -602,7 +709,13 @@ ldt_ss: 11092@@ -615,7 +722,13 @@ ldt_ss:
11257 mov PT_OLDESP(%esp), %eax /* load userspace esp */ 11093 mov PT_OLDESP(%esp), %eax /* load userspace esp */
11258 mov %dx, %ax /* eax: new kernel esp */ 11094 mov %dx, %ax /* eax: new kernel esp */
11259 sub %eax, %edx /* offset (low word is 0) */ 11095 sub %eax, %edx /* offset (low word is 0) */
@@ -11268,7 +11104,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11268 shr $16, %edx 11104 shr $16, %edx
11269 mov %dl, GDT_ENTRY_ESPFIX_SS * 8 + 4(%ebx) /* bits 16..23 */ 11105 mov %dl, GDT_ENTRY_ESPFIX_SS * 8 + 4(%ebx) /* bits 16..23 */
11270 mov %dh, GDT_ENTRY_ESPFIX_SS * 8 + 7(%ebx) /* bits 24..31 */ 11106 mov %dh, GDT_ENTRY_ESPFIX_SS * 8 + 7(%ebx) /* bits 24..31 */
11271@@ -642,25 +755,19 @@ work_resched: 11107@@ -655,25 +768,19 @@ work_resched:
11272 11108
11273 work_notifysig: # deal with pending signals and 11109 work_notifysig: # deal with pending signals and
11274 # notify-resume requests 11110 # notify-resume requests
@@ -11297,7 +11133,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11297 #endif 11133 #endif
11298 xorl %edx, %edx 11134 xorl %edx, %edx
11299 call do_notify_resume 11135 call do_notify_resume
11300@@ -695,6 +802,10 @@ END(syscall_exit_work) 11136@@ -708,6 +815,10 @@ END(syscall_exit_work)
11301 11137
11302 RING0_INT_FRAME # can't unwind into user space anyway 11138 RING0_INT_FRAME # can't unwind into user space anyway
11303 syscall_fault: 11139 syscall_fault:
@@ -11308,7 +11144,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11308 GET_THREAD_INFO(%ebp) 11144 GET_THREAD_INFO(%ebp)
11309 movl $-EFAULT,PT_EAX(%esp) 11145 movl $-EFAULT,PT_EAX(%esp)
11310 jmp resume_userspace 11146 jmp resume_userspace
11311@@ -735,7 +846,13 @@ PTREGSCALL(vm86old) 11147@@ -791,7 +902,13 @@ ptregs_clone:
11312 * normal stack and adjusts ESP with the matching offset. 11148 * normal stack and adjusts ESP with the matching offset.
11313 */ 11149 */
11314 /* fixup the stack */ 11150 /* fixup the stack */
@@ -11323,15 +11159,15 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11323 mov GDT_ENTRY_ESPFIX_SS * 8 + 4(%ebx), %al /* bits 16..23 */ 11159 mov GDT_ENTRY_ESPFIX_SS * 8 + 4(%ebx), %al /* bits 16..23 */
11324 mov GDT_ENTRY_ESPFIX_SS * 8 + 7(%ebx), %ah /* bits 24..31 */ 11160 mov GDT_ENTRY_ESPFIX_SS * 8 + 7(%ebx), %ah /* bits 24..31 */
11325 shl $16, %eax 11161 shl $16, %eax
11326@@ -1198,7 +1315,6 @@ return_to_handler: 11162@@ -1273,7 +1390,6 @@ return_to_handler:
11327 ret 11163 jmp *%ecx
11328 #endif 11164 #endif
11329 11165
11330-.section .rodata,"a" 11166-.section .rodata,"a"
11331 #include "syscall_table_32.S" 11167 #include "syscall_table_32.S"
11332 11168
11333 syscall_table_size=(.-sys_call_table) 11169 syscall_table_size=(.-sys_call_table)
11334@@ -1255,9 +1371,12 @@ error_code: 11170@@ -1330,9 +1446,12 @@ error_code:
11335 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart 11171 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
11336 REG_TO_PTGS %ecx 11172 REG_TO_PTGS %ecx
11337 SET_KERNEL_GS %ecx 11173 SET_KERNEL_GS %ecx
@@ -11345,7 +11181,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11345 TRACE_IRQS_OFF 11181 TRACE_IRQS_OFF
11346 movl %esp,%eax # pt_regs pointer 11182 movl %esp,%eax # pt_regs pointer
11347 call *%edi 11183 call *%edi
11348@@ -1351,6 +1470,9 @@ nmi_stack_correct: 11184@@ -1426,6 +1545,9 @@ nmi_stack_correct:
11349 xorl %edx,%edx # zero error code 11185 xorl %edx,%edx # zero error code
11350 movl %esp,%eax # pt_regs pointer 11186 movl %esp,%eax # pt_regs pointer
11351 call do_nmi 11187 call do_nmi
@@ -11355,7 +11191,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11355 jmp restore_all_notrace 11191 jmp restore_all_notrace
11356 CFI_ENDPROC 11192 CFI_ENDPROC
11357 11193
11358@@ -1391,6 +1513,9 @@ nmi_espfix_stack: 11194@@ -1466,6 +1588,9 @@ nmi_espfix_stack:
11359 FIXUP_ESPFIX_STACK # %eax == %esp 11195 FIXUP_ESPFIX_STACK # %eax == %esp
11360 xorl %edx,%edx # zero error code 11196 xorl %edx,%edx # zero error code
11361 call do_nmi 11197 call do_nmi
@@ -11365,9 +11201,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_32.S linux-2.6.32.24/arch/x86/k
11365 RESTORE_REGS 11201 RESTORE_REGS
11366 lss 12+4(%esp), %esp # back to espfix stack 11202 lss 12+4(%esp), %esp # back to espfix stack
11367 CFI_ADJUST_CFA_OFFSET -24 11203 CFI_ADJUST_CFA_OFFSET -24
11368diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/kernel/entry_64.S 11204diff -urNp linux-2.6.35.7/arch/x86/kernel/entry_64.S linux-2.6.35.7/arch/x86/kernel/entry_64.S
11369--- linux-2.6.32.24/arch/x86/kernel/entry_64.S 2010-08-13 16:24:37.000000000 -0400 11205--- linux-2.6.35.7/arch/x86/kernel/entry_64.S 2010-08-26 19:47:12.000000000 -0400
11370+++ linux-2.6.32.24/arch/x86/kernel/entry_64.S 2010-10-23 19:59:19.000000000 -0400 11206+++ linux-2.6.35.7/arch/x86/kernel/entry_64.S 2010-09-17 20:12:09.000000000 -0400
11371@@ -53,6 +53,7 @@ 11207@@ -53,6 +53,7 @@
11372 #include <asm/paravirt.h> 11208 #include <asm/paravirt.h>
11373 #include <asm/ftrace.h> 11209 #include <asm/ftrace.h>
@@ -11634,7 +11470,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11634 call \func 11470 call \func
11635 .endm 11471 .endm
11636 11472
11637@@ -822,7 +1026,7 @@ ret_from_intr: 11473@@ -826,7 +1030,7 @@ ret_from_intr:
11638 CFI_ADJUST_CFA_OFFSET -8 11474 CFI_ADJUST_CFA_OFFSET -8
11639 exit_intr: 11475 exit_intr:
11640 GET_THREAD_INFO(%rcx) 11476 GET_THREAD_INFO(%rcx)
@@ -11643,7 +11479,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11643 je retint_kernel 11479 je retint_kernel
11644 11480
11645 /* Interrupt came from user space */ 11481 /* Interrupt came from user space */
11646@@ -844,12 +1048,18 @@ retint_swapgs: /* return to user-space 11482@@ -848,12 +1052,18 @@ retint_swapgs: /* return to user-space
11647 * The iretq could re-enable interrupts: 11483 * The iretq could re-enable interrupts:
11648 */ 11484 */
11649 DISABLE_INTERRUPTS(CLBR_ANY) 11485 DISABLE_INTERRUPTS(CLBR_ANY)
@@ -11662,7 +11498,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11662 /* 11498 /*
11663 * The iretq could re-enable interrupts: 11499 * The iretq could re-enable interrupts:
11664 */ 11500 */
11665@@ -1032,6 +1242,16 @@ ENTRY(\sym) 11501@@ -1040,6 +1250,16 @@ ENTRY(\sym)
11666 CFI_ADJUST_CFA_OFFSET 15*8 11502 CFI_ADJUST_CFA_OFFSET 15*8
11667 call error_entry 11503 call error_entry
11668 DEFAULT_FRAME 0 11504 DEFAULT_FRAME 0
@@ -11679,7 +11515,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11679 movq %rsp,%rdi /* pt_regs pointer */ 11515 movq %rsp,%rdi /* pt_regs pointer */
11680 xorl %esi,%esi /* no error code */ 11516 xorl %esi,%esi /* no error code */
11681 call \do_sym 11517 call \do_sym
11682@@ -1049,6 +1269,16 @@ ENTRY(\sym) 11518@@ -1057,6 +1277,16 @@ ENTRY(\sym)
11683 subq $15*8, %rsp 11519 subq $15*8, %rsp
11684 call save_paranoid 11520 call save_paranoid
11685 TRACE_IRQS_OFF 11521 TRACE_IRQS_OFF
@@ -11696,7 +11532,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11696 movq %rsp,%rdi /* pt_regs pointer */ 11532 movq %rsp,%rdi /* pt_regs pointer */
11697 xorl %esi,%esi /* no error code */ 11533 xorl %esi,%esi /* no error code */
11698 call \do_sym 11534 call \do_sym
11699@@ -1066,9 +1296,24 @@ ENTRY(\sym) 11535@@ -1074,9 +1304,24 @@ ENTRY(\sym)
11700 subq $15*8, %rsp 11536 subq $15*8, %rsp
11701 call save_paranoid 11537 call save_paranoid
11702 TRACE_IRQS_OFF 11538 TRACE_IRQS_OFF
@@ -11712,17 +11548,17 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11712+#endif 11548+#endif
11713 movq %rsp,%rdi /* pt_regs pointer */ 11549 movq %rsp,%rdi /* pt_regs pointer */
11714 xorl %esi,%esi /* no error code */ 11550 xorl %esi,%esi /* no error code */
11715- PER_CPU(init_tss, %rbp) 11551- PER_CPU(init_tss, %r12)
11716+#ifdef CONFIG_SMP 11552+#ifdef CONFIG_SMP
11717+ imul $TSS_size, PER_CPU_VAR(cpu_number), %ebp 11553+ imul $TSS_size, PER_CPU_VAR(cpu_number), %r12d
11718+ lea init_tss(%rbp), %rbp 11554+ lea init_tss(%r12), %r12
11719+#else 11555+#else
11720+ lea init_tss(%rip), %rbp 11556+ lea init_tss(%rip), %r12
11721+#endif 11557+#endif
11722 subq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%rbp) 11558 subq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%r12)
11723 call \do_sym 11559 call \do_sym
11724 addq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%rbp) 11560 addq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%r12)
11725@@ -1085,6 +1330,16 @@ ENTRY(\sym) 11561@@ -1093,6 +1338,16 @@ ENTRY(\sym)
11726 CFI_ADJUST_CFA_OFFSET 15*8 11562 CFI_ADJUST_CFA_OFFSET 15*8
11727 call error_entry 11563 call error_entry
11728 DEFAULT_FRAME 0 11564 DEFAULT_FRAME 0
@@ -11739,7 +11575,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11739 movq %rsp,%rdi /* pt_regs pointer */ 11575 movq %rsp,%rdi /* pt_regs pointer */
11740 movq ORIG_RAX(%rsp),%rsi /* get error code */ 11576 movq ORIG_RAX(%rsp),%rsi /* get error code */
11741 movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */ 11577 movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */
11742@@ -1104,6 +1359,16 @@ ENTRY(\sym) 11578@@ -1112,6 +1367,16 @@ ENTRY(\sym)
11743 call save_paranoid 11579 call save_paranoid
11744 DEFAULT_FRAME 0 11580 DEFAULT_FRAME 0
11745 TRACE_IRQS_OFF 11581 TRACE_IRQS_OFF
@@ -11756,7 +11592,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11756 movq %rsp,%rdi /* pt_regs pointer */ 11592 movq %rsp,%rdi /* pt_regs pointer */
11757 movq ORIG_RAX(%rsp),%rsi /* get error code */ 11593 movq ORIG_RAX(%rsp),%rsi /* get error code */
11758 movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */ 11594 movq $-1,ORIG_RAX(%rsp) /* no syscall to restart */
11759@@ -1405,14 +1670,27 @@ ENTRY(paranoid_exit) 11595@@ -1370,14 +1635,27 @@ ENTRY(paranoid_exit)
11760 TRACE_IRQS_OFF 11596 TRACE_IRQS_OFF
11761 testl %ebx,%ebx /* swapgs needed? */ 11597 testl %ebx,%ebx /* swapgs needed? */
11762 jnz paranoid_restore 11598 jnz paranoid_restore
@@ -11785,7 +11621,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11785 TRACE_IRQS_IRETQ 0 11621 TRACE_IRQS_IRETQ 0
11786 RESTORE_ALL 8 11622 RESTORE_ALL 8
11787 jmp irq_return 11623 jmp irq_return
11788@@ -1470,7 +1748,7 @@ ENTRY(error_entry) 11624@@ -1435,7 +1713,7 @@ ENTRY(error_entry)
11789 movq_cfi r14, R14+8 11625 movq_cfi r14, R14+8
11790 movq_cfi r15, R15+8 11626 movq_cfi r15, R15+8
11791 xorl %ebx,%ebx 11627 xorl %ebx,%ebx
@@ -11794,7 +11630,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11794 je error_kernelspace 11630 je error_kernelspace
11795 error_swapgs: 11631 error_swapgs:
11796 SWAPGS 11632 SWAPGS
11797@@ -1529,6 +1807,16 @@ ENTRY(nmi) 11633@@ -1499,6 +1777,16 @@ ENTRY(nmi)
11798 CFI_ADJUST_CFA_OFFSET 15*8 11634 CFI_ADJUST_CFA_OFFSET 15*8
11799 call save_paranoid 11635 call save_paranoid
11800 DEFAULT_FRAME 0 11636 DEFAULT_FRAME 0
@@ -11811,7 +11647,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11811 /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ 11647 /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */
11812 movq %rsp,%rdi 11648 movq %rsp,%rdi
11813 movq $-1,%rsi 11649 movq $-1,%rsi
11814@@ -1539,11 +1827,12 @@ ENTRY(nmi) 11650@@ -1509,11 +1797,12 @@ ENTRY(nmi)
11815 DISABLE_INTERRUPTS(CLBR_NONE) 11651 DISABLE_INTERRUPTS(CLBR_NONE)
11816 testl %ebx,%ebx /* swapgs needed? */ 11652 testl %ebx,%ebx /* swapgs needed? */
11817 jnz nmi_restore 11653 jnz nmi_restore
@@ -11825,11 +11661,11 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/entry_64.S linux-2.6.32.24/arch/x86/k
11825 RESTORE_ALL 8 11661 RESTORE_ALL 8
11826 jmp irq_return 11662 jmp irq_return
11827 nmi_userspace: 11663 nmi_userspace:
11828diff -urNp linux-2.6.32.24/arch/x86/kernel/ftrace.c linux-2.6.32.24/arch/x86/kernel/ftrace.c 11664diff -urNp linux-2.6.35.7/arch/x86/kernel/ftrace.c linux-2.6.35.7/arch/x86/kernel/ftrace.c
11829--- linux-2.6.32.24/arch/x86/kernel/ftrace.c 2010-08-13 16:24:37.000000000 -0400 11665--- linux-2.6.35.7/arch/x86/kernel/ftrace.c 2010-08-26 19:47:12.000000000 -0400
11830+++ linux-2.6.32.24/arch/x86/kernel/ftrace.c 2010-10-23 19:59:19.000000000 -0400 11666+++ linux-2.6.35.7/arch/x86/kernel/ftrace.c 2010-09-17 20:12:09.000000000 -0400
11831@@ -149,7 +149,9 @@ void ftrace_nmi_enter(void) 11667@@ -174,7 +174,9 @@ void ftrace_nmi_enter(void)
11832 { 11668
11833 if (atomic_inc_return(&nmi_running) & MOD_CODE_WRITE_FLAG) { 11669 if (atomic_inc_return(&nmi_running) & MOD_CODE_WRITE_FLAG) {
11834 smp_rmb(); 11670 smp_rmb();
11835+ pax_open_kernel(); 11671+ pax_open_kernel();
@@ -11838,7 +11674,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ftrace.c linux-2.6.32.24/arch/x86/ker
11838 atomic_inc(&nmi_update_count); 11674 atomic_inc(&nmi_update_count);
11839 } 11675 }
11840 /* Must have previous changes seen before executions */ 11676 /* Must have previous changes seen before executions */
11841@@ -215,7 +217,7 @@ do_ftrace_mod_code(unsigned long ip, voi 11677@@ -260,7 +262,7 @@ do_ftrace_mod_code(unsigned long ip, voi
11842 11678
11843 11679
11844 11680
@@ -11847,7 +11683,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ftrace.c linux-2.6.32.24/arch/x86/ker
11847 11683
11848 static unsigned char *ftrace_nop_replace(void) 11684 static unsigned char *ftrace_nop_replace(void)
11849 { 11685 {
11850@@ -228,6 +230,8 @@ ftrace_modify_code(unsigned long ip, uns 11686@@ -273,6 +275,8 @@ ftrace_modify_code(unsigned long ip, uns
11851 { 11687 {
11852 unsigned char replaced[MCOUNT_INSN_SIZE]; 11688 unsigned char replaced[MCOUNT_INSN_SIZE];
11853 11689
@@ -11856,7 +11692,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ftrace.c linux-2.6.32.24/arch/x86/ker
11856 /* 11692 /*
11857 * Note: Due to modules and __init, code can 11693 * Note: Due to modules and __init, code can
11858 * disappear and change, we need to protect against faulting 11694 * disappear and change, we need to protect against faulting
11859@@ -284,7 +288,7 @@ int ftrace_update_ftrace_func(ftrace_fun 11695@@ -329,7 +333,7 @@ int ftrace_update_ftrace_func(ftrace_fun
11860 unsigned char old[MCOUNT_INSN_SIZE], *new; 11696 unsigned char old[MCOUNT_INSN_SIZE], *new;
11861 int ret; 11697 int ret;
11862 11698
@@ -11865,26 +11701,26 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ftrace.c linux-2.6.32.24/arch/x86/ker
11865 new = ftrace_call_replace(ip, (unsigned long)func); 11701 new = ftrace_call_replace(ip, (unsigned long)func);
11866 ret = ftrace_modify_code(ip, old, new); 11702 ret = ftrace_modify_code(ip, old, new);
11867 11703
11868@@ -337,15 +341,15 @@ int __init ftrace_dyn_arch_init(void *da 11704@@ -382,15 +386,15 @@ int __init ftrace_dyn_arch_init(void *da
11869 switch (faulted) { 11705 switch (faulted) {
11870 case 0: 11706 case 0:
11871 pr_info("ftrace: converting mcount calls to 0f 1f 44 00 00\n"); 11707 pr_info("converting mcount calls to 0f 1f 44 00 00\n");
11872- memcpy(ftrace_nop, ftrace_test_p6nop, MCOUNT_INSN_SIZE); 11708- memcpy(ftrace_nop, ftrace_test_p6nop, MCOUNT_INSN_SIZE);
11873+ memcpy(ftrace_nop, ktla_ktva(ftrace_test_p6nop), MCOUNT_INSN_SIZE); 11709+ memcpy(ftrace_nop, ktla_ktva(ftrace_test_p6nop), MCOUNT_INSN_SIZE);
11874 break; 11710 break;
11875 case 1: 11711 case 1:
11876 pr_info("ftrace: converting mcount calls to 66 66 66 66 90\n"); 11712 pr_info("converting mcount calls to 66 66 66 66 90\n");
11877- memcpy(ftrace_nop, ftrace_test_nop5, MCOUNT_INSN_SIZE); 11713- memcpy(ftrace_nop, ftrace_test_nop5, MCOUNT_INSN_SIZE);
11878+ memcpy(ftrace_nop, ktla_ktva(ftrace_test_nop5), MCOUNT_INSN_SIZE); 11714+ memcpy(ftrace_nop, ktla_ktva(ftrace_test_nop5), MCOUNT_INSN_SIZE);
11879 break; 11715 break;
11880 case 2: 11716 case 2:
11881 pr_info("ftrace: converting mcount calls to jmp . + 5\n"); 11717 pr_info("converting mcount calls to jmp . + 5\n");
11882- memcpy(ftrace_nop, ftrace_test_jmp, MCOUNT_INSN_SIZE); 11718- memcpy(ftrace_nop, ftrace_test_jmp, MCOUNT_INSN_SIZE);
11883+ memcpy(ftrace_nop, ktla_ktva(ftrace_test_jmp), MCOUNT_INSN_SIZE); 11719+ memcpy(ftrace_nop, ktla_ktva(ftrace_test_jmp), MCOUNT_INSN_SIZE);
11884 break; 11720 break;
11885 } 11721 }
11886 11722
11887@@ -366,6 +370,8 @@ static int ftrace_mod_jmp(unsigned long 11723@@ -411,6 +415,8 @@ static int ftrace_mod_jmp(unsigned long
11888 { 11724 {
11889 unsigned char code[MCOUNT_INSN_SIZE]; 11725 unsigned char code[MCOUNT_INSN_SIZE];
11890 11726
@@ -11893,10 +11729,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ftrace.c linux-2.6.32.24/arch/x86/ker
11893 if (probe_kernel_read(code, (void *)ip, MCOUNT_INSN_SIZE)) 11729 if (probe_kernel_read(code, (void *)ip, MCOUNT_INSN_SIZE))
11894 return -EFAULT; 11730 return -EFAULT;
11895 11731
11896diff -urNp linux-2.6.32.24/arch/x86/kernel/head32.c linux-2.6.32.24/arch/x86/kernel/head32.c 11732diff -urNp linux-2.6.35.7/arch/x86/kernel/head32.c linux-2.6.35.7/arch/x86/kernel/head32.c
11897--- linux-2.6.32.24/arch/x86/kernel/head32.c 2010-08-13 16:24:37.000000000 -0400 11733--- linux-2.6.35.7/arch/x86/kernel/head32.c 2010-08-26 19:47:12.000000000 -0400
11898+++ linux-2.6.32.24/arch/x86/kernel/head32.c 2010-10-23 19:59:19.000000000 -0400 11734+++ linux-2.6.35.7/arch/x86/kernel/head32.c 2010-09-17 20:12:09.000000000 -0400
11899@@ -16,6 +16,7 @@ 11735@@ -17,6 +17,7 @@
11900 #include <asm/apic.h> 11736 #include <asm/apic.h>
11901 #include <asm/io_apic.h> 11737 #include <asm/io_apic.h>
11902 #include <asm/bios_ebda.h> 11738 #include <asm/bios_ebda.h>
@@ -11904,24 +11740,19 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head32.c linux-2.6.32.24/arch/x86/ker
11904 11740
11905 static void __init i386_default_early_setup(void) 11741 static void __init i386_default_early_setup(void)
11906 { 11742 {
11907@@ -31,7 +32,7 @@ void __init i386_start_kernel(void) 11743@@ -40,7 +41,7 @@ void __init i386_start_kernel(void)
11908 { 11744 "EX TRAMPOLINE");
11909 reserve_trampoline_memory(); 11745 #endif
11910 11746
11911- reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS"); 11747- reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS");
11912+ reserve_early(LOAD_PHYSICAL_ADDR, __pa_symbol(&__bss_stop), "TEXT DATA BSS"); 11748+ reserve_early(LOAD_PHYSICAL_ADDR, __pa_symbol(&__bss_stop), "TEXT DATA BSS");
11913 11749
11914 #ifdef CONFIG_BLK_DEV_INITRD 11750 #ifdef CONFIG_BLK_DEV_INITRD
11915 /* Reserve INITRD */ 11751 /* Reserve INITRD */
11916diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/kernel/head_32.S 11752diff -urNp linux-2.6.35.7/arch/x86/kernel/head_32.S linux-2.6.35.7/arch/x86/kernel/head_32.S
11917--- linux-2.6.32.24/arch/x86/kernel/head_32.S 2010-08-13 16:24:37.000000000 -0400 11753--- linux-2.6.35.7/arch/x86/kernel/head_32.S 2010-08-26 19:47:12.000000000 -0400
11918+++ linux-2.6.32.24/arch/x86/kernel/head_32.S 2010-10-23 19:59:19.000000000 -0400 11754+++ linux-2.6.35.7/arch/x86/kernel/head_32.S 2010-09-17 20:12:09.000000000 -0400
11919@@ -19,10 +19,17 @@ 11755@@ -25,6 +25,12 @@
11920 #include <asm/setup.h>
11921 #include <asm/processor-flags.h>
11922 #include <asm/percpu.h>
11923+#include <asm/msr-index.h>
11924
11925 /* Physical address */ 11756 /* Physical address */
11926 #define pa(X) ((X) - __PAGE_OFFSET) 11757 #define pa(X) ((X) - __PAGE_OFFSET)
11927 11758
@@ -11934,7 +11765,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
11934 /* 11765 /*
11935 * References to members of the new_cpu_data structure. 11766 * References to members of the new_cpu_data structure.
11936 */ 11767 */
11937@@ -52,11 +59,7 @@ 11768@@ -54,11 +60,7 @@
11938 * and small than max_low_pfn, otherwise will waste some page table entries 11769 * and small than max_low_pfn, otherwise will waste some page table entries
11939 */ 11770 */
11940 11771
@@ -11947,7 +11778,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
11947 11778
11948 /* Enough space to fit pagetables for the low memory linear map */ 11779 /* Enough space to fit pagetables for the low memory linear map */
11949 MAPPING_BEYOND_END = \ 11780 MAPPING_BEYOND_END = \
11950@@ -73,6 +76,12 @@ INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_P 11781@@ -75,6 +77,12 @@ INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_P
11951 RESERVE_BRK(pagetables, INIT_MAP_SIZE) 11782 RESERVE_BRK(pagetables, INIT_MAP_SIZE)
11952 11783
11953 /* 11784 /*
@@ -11960,7 +11791,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
11960 * 32-bit kernel entrypoint; only used by the boot CPU. On entry, 11791 * 32-bit kernel entrypoint; only used by the boot CPU. On entry,
11961 * %esi points to the real-mode code as a 32-bit pointer. 11792 * %esi points to the real-mode code as a 32-bit pointer.
11962 * CS and DS must be 4 GB flat segments, but we don't depend on 11793 * CS and DS must be 4 GB flat segments, but we don't depend on
11963@@ -80,6 +89,13 @@ RESERVE_BRK(pagetables, INIT_MAP_SIZE) 11794@@ -82,6 +90,13 @@ RESERVE_BRK(pagetables, INIT_MAP_SIZE)
11964 * can. 11795 * can.
11965 */ 11796 */
11966 __HEAD 11797 __HEAD
@@ -11974,7 +11805,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
11974 ENTRY(startup_32) 11805 ENTRY(startup_32)
11975 /* test KEEP_SEGMENTS flag to see if the bootloader is asking 11806 /* test KEEP_SEGMENTS flag to see if the bootloader is asking
11976 us to not reload segments */ 11807 us to not reload segments */
11977@@ -97,6 +113,55 @@ ENTRY(startup_32) 11808@@ -99,6 +114,55 @@ ENTRY(startup_32)
11978 movl %eax,%gs 11809 movl %eax,%gs
11979 2: 11810 2:
11980 11811
@@ -12030,7 +11861,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12030 /* 11861 /*
12031 * Clear BSS first so that there are no surprises... 11862 * Clear BSS first so that there are no surprises...
12032 */ 11863 */
12033@@ -140,9 +205,7 @@ ENTRY(startup_32) 11864@@ -142,9 +206,7 @@ ENTRY(startup_32)
12034 cmpl $num_subarch_entries, %eax 11865 cmpl $num_subarch_entries, %eax
12035 jae bad_subarch 11866 jae bad_subarch
12036 11867
@@ -12041,7 +11872,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12041 11872
12042 bad_subarch: 11873 bad_subarch:
12043 WEAK(lguest_entry) 11874 WEAK(lguest_entry)
12044@@ -154,10 +217,10 @@ WEAK(xen_entry) 11875@@ -156,10 +218,10 @@ WEAK(xen_entry)
12045 __INITDATA 11876 __INITDATA
12046 11877
12047 subarch_entries: 11878 subarch_entries:
@@ -12056,7 +11887,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12056 num_subarch_entries = (. - subarch_entries) / 4 11887 num_subarch_entries = (. - subarch_entries) / 4
12057 .previous 11888 .previous
12058 #endif /* CONFIG_PARAVIRT */ 11889 #endif /* CONFIG_PARAVIRT */
12059@@ -218,8 +281,11 @@ default_entry: 11890@@ -220,8 +282,11 @@ default_entry:
12060 movl %eax, pa(max_pfn_mapped) 11891 movl %eax, pa(max_pfn_mapped)
12061 11892
12062 /* Do early initialization of the fixmap area */ 11893 /* Do early initialization of the fixmap area */
@@ -12070,7 +11901,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12070 #else /* Not PAE */ 11901 #else /* Not PAE */
12071 11902
12072 page_pde_offset = (__PAGE_OFFSET >> 20); 11903 page_pde_offset = (__PAGE_OFFSET >> 20);
12073@@ -249,8 +315,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20); 11904@@ -251,8 +316,11 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
12074 movl %eax, pa(max_pfn_mapped) 11905 movl %eax, pa(max_pfn_mapped)
12075 11906
12076 /* Do early initialization of the fixmap area */ 11907 /* Do early initialization of the fixmap area */
@@ -12084,34 +11915,25 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12084 #endif 11915 #endif
12085 jmp 3f 11916 jmp 3f
12086 /* 11917 /*
12087@@ -297,6 +366,7 @@ ENTRY(startup_32_smp) 11918@@ -299,6 +367,7 @@ ENTRY(startup_32_smp)
12088 orl %edx,%eax 11919 orl %edx,%eax
12089 movl %eax,%cr4 11920 movl %eax,%cr4
12090 11921
12091+#ifdef CONFIG_X86_PAE 11922+#ifdef CONFIG_X86_PAE
12092 btl $5, %eax # check if PAE is enabled 11923 testb $X86_CR4_PAE, %al # check if PAE is enabled
12093 jnc 6f 11924 jz 6f
12094 11925
12095@@ -312,13 +382,17 @@ ENTRY(startup_32_smp) 11926@@ -323,6 +392,9 @@ ENTRY(startup_32_smp)
12096 jnc 6f
12097
12098 /* Setup EFER (Extended Feature Enable Register) */
12099- movl $0xc0000080, %ecx
12100+ movl $MSR_EFER, %ecx
12101 rdmsr
12102
12103 btsl $11, %eax
12104 /* Make changes effective */ 11927 /* Make changes effective */
12105 wrmsr 11928 wrmsr
12106 11929
12107+ btsl $_PAGE_BIT_NX-32,pa(__supported_pte_mask+4) 11930+ btsl $_PAGE_BIT_NX-32,pa(__supported_pte_mask+4)
12108+ movl $1,pa(nx_enabled)
12109+#endif 11931+#endif
12110+ 11932+
12111 6: 11933 6:
12112 11934
12113 /* 11935 /*
12114@@ -344,9 +418,7 @@ ENTRY(startup_32_smp) 11936@@ -348,9 +420,7 @@ ENTRY(startup_32_smp)
12115 11937
12116 #ifdef CONFIG_SMP 11938 #ifdef CONFIG_SMP
12117 cmpb $0, ready 11939 cmpb $0, ready
@@ -12122,7 +11944,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12122 #endif /* CONFIG_SMP */ 11944 #endif /* CONFIG_SMP */
12123 11945
12124 /* 11946 /*
12125@@ -424,7 +496,7 @@ is386: movl $2,%ecx # set MP 11947@@ -428,7 +498,7 @@ is386: movl $2,%ecx # set MP
12126 1: movl $(__KERNEL_DS),%eax # reload all the segment registers 11948 1: movl $(__KERNEL_DS),%eax # reload all the segment registers
12127 movl %eax,%ss # after changing gdt. 11949 movl %eax,%ss # after changing gdt.
12128 11950
@@ -12131,20 +11953,20 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12131 movl %eax,%ds 11953 movl %eax,%ds
12132 movl %eax,%es 11954 movl %eax,%es
12133 11955
12134@@ -438,8 +510,11 @@ is386: movl $2,%ecx # set MP 11956@@ -442,8 +512,11 @@ is386: movl $2,%ecx # set MP
12135 */ 11957 */
12136 cmpb $0,ready 11958 cmpb $0,ready
12137 jne 1f 11959 jne 1f
12138- movl $per_cpu__gdt_page,%eax 11960- movl $gdt_page,%eax
12139+ movl $cpu_gdt_table,%eax 11961+ movl $cpu_gdt_table,%eax
12140 movl $per_cpu__stack_canary,%ecx 11962 movl $stack_canary,%ecx
12141+#ifdef CONFIG_SMP 11963+#ifdef CONFIG_SMP
12142+ addl $__per_cpu_load,%ecx 11964+ addl $__per_cpu_load,%ecx
12143+#endif 11965+#endif
12144 movw %cx, 8 * GDT_ENTRY_STACK_CANARY + 2(%eax) 11966 movw %cx, 8 * GDT_ENTRY_STACK_CANARY + 2(%eax)
12145 shrl $16, %ecx 11967 shrl $16, %ecx
12146 movb %cl, 8 * GDT_ENTRY_STACK_CANARY + 4(%eax) 11968 movb %cl, 8 * GDT_ENTRY_STACK_CANARY + 4(%eax)
12147@@ -457,10 +532,6 @@ is386: movl $2,%ecx # set MP 11969@@ -461,10 +534,6 @@ is386: movl $2,%ecx # set MP
12148 #ifdef CONFIG_SMP 11970 #ifdef CONFIG_SMP
12149 movb ready, %cl 11971 movb ready, %cl
12150 movb $1, ready 11972 movb $1, ready
@@ -12155,7 +11977,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12155 #endif /* CONFIG_SMP */ 11977 #endif /* CONFIG_SMP */
12156 jmp *(initial_code) 11978 jmp *(initial_code)
12157 11979
12158@@ -546,22 +617,22 @@ early_page_fault: 11980@@ -550,22 +619,22 @@ early_page_fault:
12159 jmp early_fault 11981 jmp early_fault
12160 11982
12161 early_fault: 11983 early_fault:
@@ -12183,7 +12005,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12183 hlt_loop: 12005 hlt_loop:
12184 hlt 12006 hlt
12185 jmp hlt_loop 12007 jmp hlt_loop
12186@@ -569,8 +640,11 @@ hlt_loop: 12008@@ -573,8 +642,11 @@ hlt_loop:
12187 /* This is the default interrupt "handler" :-) */ 12009 /* This is the default interrupt "handler" :-) */
12188 ALIGN 12010 ALIGN
12189 ignore_int: 12011 ignore_int:
@@ -12196,7 +12018,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12196 pushl %eax 12018 pushl %eax
12197 pushl %ecx 12019 pushl %ecx
12198 pushl %edx 12020 pushl %edx
12199@@ -579,9 +653,6 @@ ignore_int: 12021@@ -583,9 +655,6 @@ ignore_int:
12200 movl $(__KERNEL_DS),%eax 12022 movl $(__KERNEL_DS),%eax
12201 movl %eax,%ds 12023 movl %eax,%ds
12202 movl %eax,%es 12024 movl %eax,%es
@@ -12206,7 +12028,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12206 pushl 16(%esp) 12028 pushl 16(%esp)
12207 pushl 24(%esp) 12029 pushl 24(%esp)
12208 pushl 32(%esp) 12030 pushl 32(%esp)
12209@@ -608,27 +679,38 @@ ENTRY(initial_code) 12031@@ -612,27 +681,38 @@ ENTRY(initial_code)
12210 /* 12032 /*
12211 * BSS section 12033 * BSS section
12212 */ 12034 */
@@ -12250,7 +12072,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12250 ENTRY(swapper_pg_dir) 12072 ENTRY(swapper_pg_dir)
12251 .long pa(swapper_pg_pmd+PGD_IDENT_ATTR),0 /* low identity map */ 12073 .long pa(swapper_pg_pmd+PGD_IDENT_ATTR),0 /* low identity map */
12252 # if KPMDS == 3 12074 # if KPMDS == 3
12253@@ -647,15 +729,24 @@ ENTRY(swapper_pg_dir) 12075@@ -651,15 +731,24 @@ ENTRY(swapper_pg_dir)
12254 # error "Kernel PMDs should be 1, 2 or 3" 12076 # error "Kernel PMDs should be 1, 2 or 3"
12255 # endif 12077 # endif
12256 .align PAGE_SIZE_asm /* needs to be page-sized too */ 12078 .align PAGE_SIZE_asm /* needs to be page-sized too */
@@ -12276,7 +12098,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12276 early_recursion_flag: 12098 early_recursion_flag:
12277 .long 0 12099 .long 0
12278 12100
12279@@ -691,7 +782,7 @@ fault_msg: 12101@@ -695,7 +784,7 @@ fault_msg:
12280 .word 0 # 32 bit align gdt_desc.address 12102 .word 0 # 32 bit align gdt_desc.address
12281 boot_gdt_descr: 12103 boot_gdt_descr:
12282 .word __BOOT_DS+7 12104 .word __BOOT_DS+7
@@ -12285,16 +12107,16 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12285 12107
12286 .word 0 # 32-bit align idt_desc.address 12108 .word 0 # 32-bit align idt_desc.address
12287 idt_descr: 12109 idt_descr:
12288@@ -702,7 +793,7 @@ idt_descr: 12110@@ -706,7 +795,7 @@ idt_descr:
12289 .word 0 # 32 bit align gdt_desc.address 12111 .word 0 # 32 bit align gdt_desc.address
12290 ENTRY(early_gdt_descr) 12112 ENTRY(early_gdt_descr)
12291 .word GDT_ENTRIES*8-1 12113 .word GDT_ENTRIES*8-1
12292- .long per_cpu__gdt_page /* Overwritten for secondary CPUs */ 12114- .long gdt_page /* Overwritten for secondary CPUs */
12293+ .long cpu_gdt_table /* Overwritten for secondary CPUs */ 12115+ .long cpu_gdt_table /* Overwritten for secondary CPUs */
12294 12116
12295 /* 12117 /*
12296 * The boot_gdt must mirror the equivalent in setup.S and is 12118 * The boot_gdt must mirror the equivalent in setup.S and is
12297@@ -711,5 +802,65 @@ ENTRY(early_gdt_descr) 12119@@ -715,5 +804,65 @@ ENTRY(early_gdt_descr)
12298 .align L1_CACHE_BYTES 12120 .align L1_CACHE_BYTES
12299 ENTRY(boot_gdt) 12121 ENTRY(boot_gdt)
12300 .fill GDT_ENTRY_BOOT_CS,8,0 12122 .fill GDT_ENTRY_BOOT_CS,8,0
@@ -12362,9 +12184,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_32.S linux-2.6.32.24/arch/x86/ke
12362+ /* Be sure this is zeroed to avoid false validations in Xen */ 12184+ /* Be sure this is zeroed to avoid false validations in Xen */
12363+ .fill PAGE_SIZE_asm - GDT_SIZE,1,0 12185+ .fill PAGE_SIZE_asm - GDT_SIZE,1,0
12364+ .endr 12186+ .endr
12365diff -urNp linux-2.6.32.24/arch/x86/kernel/head_64.S linux-2.6.32.24/arch/x86/kernel/head_64.S 12187diff -urNp linux-2.6.35.7/arch/x86/kernel/head_64.S linux-2.6.35.7/arch/x86/kernel/head_64.S
12366--- linux-2.6.32.24/arch/x86/kernel/head_64.S 2010-08-13 16:24:37.000000000 -0400 12188--- linux-2.6.35.7/arch/x86/kernel/head_64.S 2010-08-26 19:47:12.000000000 -0400
12367+++ linux-2.6.32.24/arch/x86/kernel/head_64.S 2010-10-23 19:59:19.000000000 -0400 12189+++ linux-2.6.35.7/arch/x86/kernel/head_64.S 2010-09-17 20:12:09.000000000 -0400
12368@@ -19,6 +19,7 @@ 12190@@ -19,6 +19,7 @@
12369 #include <asm/cache.h> 12191 #include <asm/cache.h>
12370 #include <asm/processor-flags.h> 12192 #include <asm/processor-flags.h>
@@ -12441,7 +12263,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_64.S linux-2.6.32.24/arch/x86/ke
12441 movq %rax, %cr4 12263 movq %rax, %cr4
12442 12264
12443 /* Setup early boot stage 4 level pagetables. */ 12265 /* Setup early boot stage 4 level pagetables. */
12444@@ -184,9 +176,13 @@ ENTRY(secondary_startup_64) 12266@@ -184,9 +176,14 @@ ENTRY(secondary_startup_64)
12445 movl $MSR_EFER, %ecx 12267 movl $MSR_EFER, %ecx
12446 rdmsr 12268 rdmsr
12447 btsl $_EFER_SCE, %eax /* Enable System Call */ 12269 btsl $_EFER_SCE, %eax /* Enable System Call */
@@ -12453,20 +12275,11 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_64.S linux-2.6.32.24/arch/x86/ke
12453+ btsq $_PAGE_BIT_NX, 8*L4_PAGE_OFFSET(%rdi) 12275+ btsq $_PAGE_BIT_NX, 8*L4_PAGE_OFFSET(%rdi)
12454+ btsq $_PAGE_BIT_NX, 8*L4_VMALLOC_START(%rdi) 12276+ btsq $_PAGE_BIT_NX, 8*L4_VMALLOC_START(%rdi)
12455+ btsq $_PAGE_BIT_NX, 8*L4_VMEMMAP_START(%rdi) 12277+ btsq $_PAGE_BIT_NX, 8*L4_VMEMMAP_START(%rdi)
12278+ btsq $_PAGE_BIT_NX, __supported_pte_mask(%rip)
12456 1: wrmsr /* Make changes effective */ 12279 1: wrmsr /* Make changes effective */
12457 12280
12458 /* Setup cr0 */ 12281 /* Setup cr0 */
12459@@ -262,16 +258,16 @@ ENTRY(secondary_startup_64) 12282@@ -271,7 +268,7 @@ ENTRY(secondary_startup_64)
12460 .quad x86_64_start_kernel
12461 ENTRY(initial_gs)
12462 .quad INIT_PER_CPU_VAR(irq_stack_union)
12463- __FINITDATA
12464
12465 ENTRY(stack_start)
12466 .quad init_thread_union+THREAD_SIZE-8
12467 .word 0
12468+ __FINITDATA
12469
12470 bad_address: 12283 bad_address:
12471 jmp bad_address 12284 jmp bad_address
12472 12285
@@ -12475,7 +12288,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_64.S linux-2.6.32.24/arch/x86/ke
12475 #ifdef CONFIG_EARLY_PRINTK 12288 #ifdef CONFIG_EARLY_PRINTK
12476 .globl early_idt_handlers 12289 .globl early_idt_handlers
12477 early_idt_handlers: 12290 early_idt_handlers:
12478@@ -316,18 +312,23 @@ ENTRY(early_idt_handler) 12291@@ -316,18 +313,23 @@ ENTRY(early_idt_handler)
12479 #endif /* EARLY_PRINTK */ 12292 #endif /* EARLY_PRINTK */
12480 1: hlt 12293 1: hlt
12481 jmp 1b 12294 jmp 1b
@@ -12500,7 +12313,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_64.S linux-2.6.32.24/arch/x86/ke
12500 #define NEXT_PAGE(name) \ 12313 #define NEXT_PAGE(name) \
12501 .balign PAGE_SIZE; \ 12314 .balign PAGE_SIZE; \
12502 ENTRY(name) 12315 ENTRY(name)
12503@@ -350,13 +351,36 @@ NEXT_PAGE(init_level4_pgt) 12316@@ -351,13 +353,36 @@ NEXT_PAGE(init_level4_pgt)
12504 .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE 12317 .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
12505 .org init_level4_pgt + L4_PAGE_OFFSET*8, 0 12318 .org init_level4_pgt + L4_PAGE_OFFSET*8, 0
12506 .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE 12319 .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE
@@ -12537,7 +12350,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_64.S linux-2.6.32.24/arch/x86/ke
12537 12350
12538 NEXT_PAGE(level3_kernel_pgt) 12351 NEXT_PAGE(level3_kernel_pgt)
12539 .fill L3_START_KERNEL,8,0 12352 .fill L3_START_KERNEL,8,0
12540@@ -364,20 +388,23 @@ NEXT_PAGE(level3_kernel_pgt) 12353@@ -365,20 +390,23 @@ NEXT_PAGE(level3_kernel_pgt)
12541 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE 12354 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE
12542 .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE 12355 .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
12543 12356
@@ -12569,7 +12382,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_64.S linux-2.6.32.24/arch/x86/ke
12569 12382
12570 NEXT_PAGE(level2_kernel_pgt) 12383 NEXT_PAGE(level2_kernel_pgt)
12571 /* 12384 /*
12572@@ -390,33 +417,55 @@ NEXT_PAGE(level2_kernel_pgt) 12385@@ -391,33 +419,55 @@ NEXT_PAGE(level2_kernel_pgt)
12573 * If you want to increase this then increase MODULES_VADDR 12386 * If you want to increase this then increase MODULES_VADDR
12574 * too.) 12387 * too.)
12575 */ 12388 */
@@ -12635,9 +12448,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/head_64.S linux-2.6.32.24/arch/x86/ke
12635 12448
12636 __PAGE_ALIGNED_BSS 12449 __PAGE_ALIGNED_BSS
12637 .align PAGE_SIZE 12450 .align PAGE_SIZE
12638diff -urNp linux-2.6.32.24/arch/x86/kernel/i386_ksyms_32.c linux-2.6.32.24/arch/x86/kernel/i386_ksyms_32.c 12451diff -urNp linux-2.6.35.7/arch/x86/kernel/i386_ksyms_32.c linux-2.6.35.7/arch/x86/kernel/i386_ksyms_32.c
12639--- linux-2.6.32.24/arch/x86/kernel/i386_ksyms_32.c 2010-08-13 16:24:37.000000000 -0400 12452--- linux-2.6.35.7/arch/x86/kernel/i386_ksyms_32.c 2010-08-26 19:47:12.000000000 -0400
12640+++ linux-2.6.32.24/arch/x86/kernel/i386_ksyms_32.c 2010-10-23 19:59:19.000000000 -0400 12453+++ linux-2.6.35.7/arch/x86/kernel/i386_ksyms_32.c 2010-09-17 20:12:09.000000000 -0400
12641@@ -20,8 +20,12 @@ extern void cmpxchg8b_emu(void); 12454@@ -20,8 +20,12 @@ extern void cmpxchg8b_emu(void);
12642 EXPORT_SYMBOL(cmpxchg8b_emu); 12455 EXPORT_SYMBOL(cmpxchg8b_emu);
12643 #endif 12456 #endif
@@ -12659,9 +12472,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/i386_ksyms_32.c linux-2.6.32.24/arch/
12659+#ifdef CONFIG_PAX_KERNEXEC 12472+#ifdef CONFIG_PAX_KERNEXEC
12660+EXPORT_SYMBOL(__LOAD_PHYSICAL_ADDR); 12473+EXPORT_SYMBOL(__LOAD_PHYSICAL_ADDR);
12661+#endif 12474+#endif
12662diff -urNp linux-2.6.32.24/arch/x86/kernel/init_task.c linux-2.6.32.24/arch/x86/kernel/init_task.c 12475diff -urNp linux-2.6.35.7/arch/x86/kernel/init_task.c linux-2.6.35.7/arch/x86/kernel/init_task.c
12663--- linux-2.6.32.24/arch/x86/kernel/init_task.c 2010-08-13 16:24:37.000000000 -0400 12476--- linux-2.6.35.7/arch/x86/kernel/init_task.c 2010-08-26 19:47:12.000000000 -0400
12664+++ linux-2.6.32.24/arch/x86/kernel/init_task.c 2010-10-23 19:59:19.000000000 -0400 12477+++ linux-2.6.35.7/arch/x86/kernel/init_task.c 2010-09-17 20:12:09.000000000 -0400
12665@@ -38,5 +38,5 @@ EXPORT_SYMBOL(init_task); 12478@@ -38,5 +38,5 @@ EXPORT_SYMBOL(init_task);
12666 * section. Since TSS's are completely CPU-local, we want them 12479 * section. Since TSS's are completely CPU-local, we want them
12667 * on exact cacheline boundaries, to eliminate cacheline ping-pong. 12480 * on exact cacheline boundaries, to eliminate cacheline ping-pong.
@@ -12670,9 +12483,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/init_task.c linux-2.6.32.24/arch/x86/
12670- 12483-
12671+struct tss_struct init_tss[NR_CPUS] ____cacheline_internodealigned_in_smp = { [0 ... NR_CPUS-1] = INIT_TSS }; 12484+struct tss_struct init_tss[NR_CPUS] ____cacheline_internodealigned_in_smp = { [0 ... NR_CPUS-1] = INIT_TSS };
12672+EXPORT_SYMBOL(init_tss); 12485+EXPORT_SYMBOL(init_tss);
12673diff -urNp linux-2.6.32.24/arch/x86/kernel/ioport.c linux-2.6.32.24/arch/x86/kernel/ioport.c 12486diff -urNp linux-2.6.35.7/arch/x86/kernel/ioport.c linux-2.6.35.7/arch/x86/kernel/ioport.c
12674--- linux-2.6.32.24/arch/x86/kernel/ioport.c 2010-08-13 16:24:37.000000000 -0400 12487--- linux-2.6.35.7/arch/x86/kernel/ioport.c 2010-08-26 19:47:12.000000000 -0400
12675+++ linux-2.6.32.24/arch/x86/kernel/ioport.c 2010-10-23 19:59:19.000000000 -0400 12488+++ linux-2.6.35.7/arch/x86/kernel/ioport.c 2010-09-17 20:12:37.000000000 -0400
12676@@ -6,6 +6,7 @@ 12489@@ -6,6 +6,7 @@
12677 #include <linux/sched.h> 12490 #include <linux/sched.h>
12678 #include <linux/kernel.h> 12491 #include <linux/kernel.h>
@@ -12703,7 +12516,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ioport.c linux-2.6.32.24/arch/x86/ker
12703 12516
12704 set_bitmap(t->io_bitmap_ptr, from, num, !turn_on); 12517 set_bitmap(t->io_bitmap_ptr, from, num, !turn_on);
12705 12518
12706@@ -111,6 +118,12 @@ static int do_iopl(unsigned int level, s 12519@@ -112,6 +119,12 @@ long sys_iopl(unsigned int level, struct
12707 return -EINVAL; 12520 return -EINVAL;
12708 /* Trying to gain more privileges? */ 12521 /* Trying to gain more privileges? */
12709 if (level > old) { 12522 if (level > old) {
@@ -12716,9 +12529,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ioport.c linux-2.6.32.24/arch/x86/ker
12716 if (!capable(CAP_SYS_RAWIO)) 12529 if (!capable(CAP_SYS_RAWIO))
12717 return -EPERM; 12530 return -EPERM;
12718 } 12531 }
12719diff -urNp linux-2.6.32.24/arch/x86/kernel/irq_32.c linux-2.6.32.24/arch/x86/kernel/irq_32.c 12532diff -urNp linux-2.6.35.7/arch/x86/kernel/irq_32.c linux-2.6.35.7/arch/x86/kernel/irq_32.c
12720--- linux-2.6.32.24/arch/x86/kernel/irq_32.c 2010-08-13 16:24:37.000000000 -0400 12533--- linux-2.6.35.7/arch/x86/kernel/irq_32.c 2010-08-26 19:47:12.000000000 -0400
12721+++ linux-2.6.32.24/arch/x86/kernel/irq_32.c 2010-10-23 19:59:19.000000000 -0400 12534+++ linux-2.6.35.7/arch/x86/kernel/irq_32.c 2010-09-17 20:12:09.000000000 -0400
12722@@ -94,7 +94,7 @@ execute_on_irq_stack(int overflow, struc 12535@@ -94,7 +94,7 @@ execute_on_irq_stack(int overflow, struc
12723 return 0; 12536 return 0;
12724 12537
@@ -12737,11 +12550,20 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/irq_32.c linux-2.6.32.24/arch/x86/ker
12737 12550
12738 call_on_stack(__do_softirq, isp); 12551 call_on_stack(__do_softirq, isp);
12739 /* 12552 /*
12740diff -urNp linux-2.6.32.24/arch/x86/kernel/kgdb.c linux-2.6.32.24/arch/x86/kernel/kgdb.c 12553diff -urNp linux-2.6.35.7/arch/x86/kernel/kgdb.c linux-2.6.35.7/arch/x86/kernel/kgdb.c
12741--- linux-2.6.32.24/arch/x86/kernel/kgdb.c 2010-08-13 16:24:37.000000000 -0400 12554--- linux-2.6.35.7/arch/x86/kernel/kgdb.c 2010-08-26 19:47:12.000000000 -0400
12742+++ linux-2.6.32.24/arch/x86/kernel/kgdb.c 2010-10-23 19:59:19.000000000 -0400 12555+++ linux-2.6.35.7/arch/x86/kernel/kgdb.c 2010-09-17 20:12:09.000000000 -0400
12743@@ -573,7 +573,7 @@ unsigned long kgdb_arch_pc(int exception 12556@@ -77,7 +77,7 @@ void pt_regs_to_gdb_regs(unsigned long *
12744 return instruction_pointer(regs); 12557 gdb_regs[GDB_CS] = regs->cs;
12558 gdb_regs[GDB_FS] = 0xFFFF;
12559 gdb_regs[GDB_GS] = 0xFFFF;
12560- if (user_mode_vm(regs)) {
12561+ if (user_mode(regs)) {
12562 gdb_regs[GDB_SS] = regs->ss;
12563 gdb_regs[GDB_SP] = regs->sp;
12564 } else {
12565@@ -720,7 +720,7 @@ void kgdb_arch_set_pc(struct pt_regs *re
12566 regs->ip = ip;
12745 } 12567 }
12746 12568
12747-struct kgdb_arch arch_kgdb_ops = { 12569-struct kgdb_arch arch_kgdb_ops = {
@@ -12749,44 +12571,46 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/kgdb.c linux-2.6.32.24/arch/x86/kerne
12749 /* Breakpoint instruction: */ 12571 /* Breakpoint instruction: */
12750 .gdb_bpt_instr = { 0xcc }, 12572 .gdb_bpt_instr = { 0xcc },
12751 .flags = KGDB_HW_BREAKPOINT, 12573 .flags = KGDB_HW_BREAKPOINT,
12752diff -urNp linux-2.6.32.24/arch/x86/kernel/kprobes.c linux-2.6.32.24/arch/x86/kernel/kprobes.c 12574diff -urNp linux-2.6.35.7/arch/x86/kernel/kprobes.c linux-2.6.35.7/arch/x86/kernel/kprobes.c
12753--- linux-2.6.32.24/arch/x86/kernel/kprobes.c 2010-08-13 16:24:37.000000000 -0400 12575--- linux-2.6.35.7/arch/x86/kernel/kprobes.c 2010-08-26 19:47:12.000000000 -0400
12754+++ linux-2.6.32.24/arch/x86/kernel/kprobes.c 2010-10-23 19:59:19.000000000 -0400 12576+++ linux-2.6.35.7/arch/x86/kernel/kprobes.c 2010-09-17 20:12:09.000000000 -0400
12755@@ -166,9 +166,13 @@ static void __kprobes set_jmp_op(void *f 12577@@ -114,9 +114,12 @@ static void __kprobes __synthesize_relat
12756 char op;
12757 s32 raddr; 12578 s32 raddr;
12758 } __attribute__((packed)) * jop; 12579 } __attribute__((packed)) *insn;
12759- jop = (struct __arch_jmp_op *)from; 12580
12760+ 12581- insn = (struct __arch_relative_insn *)from;
12761+ jop = (struct __arch_jmp_op *)(ktla_ktva(from)); 12582+ insn = (struct __arch_relative_insn *)(ktla_ktva(from));
12762+ 12583+
12763+ pax_open_kernel(); 12584+ pax_open_kernel();
12764 jop->raddr = (s32)((long)(to) - ((long)(from) + 5)); 12585 insn->raddr = (s32)((long)(to) - ((long)(from) + 5));
12765 jop->op = RELATIVEJUMP_INSTRUCTION; 12586 insn->op = op;
12766+ pax_close_kernel(); 12587+ pax_close_kernel();
12767 } 12588 }
12768 12589
12769 /* 12590 /* Insert a jump instruction at address 'from', which jumps to address 'to'.*/
12770@@ -337,7 +341,9 @@ static void __kprobes fix_riprel(struct 12591@@ -315,7 +318,9 @@ static int __kprobes __copy_instruction(
12771 disp = (u8 *) p->addr + *((s32 *) insn) -
12772 (u8 *) p->ainsn.insn;
12773 BUG_ON((s64) (s32) disp != disp); /* Sanity check. */
12774+ pax_open_kernel();
12775 *(s32 *)insn = (s32) disp;
12776+ pax_close_kernel();
12777 } 12592 }
12778 } 12593 }
12779 #endif 12594 insn_get_length(&insn);
12780@@ -345,16 +351,18 @@ static void __kprobes fix_riprel(struct
12781
12782 static void __kprobes arch_copy_kprobe(struct kprobe *p)
12783 {
12784- memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
12785+ pax_open_kernel(); 12595+ pax_open_kernel();
12786+ memcpy(p->ainsn.insn, ktla_ktva(p->addr), MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); 12596 memcpy(dest, insn.kaddr, insn.length);
12787+ pax_close_kernel(); 12597+ pax_close_kernel();
12788 12598
12789 fix_riprel(p); 12599 #ifdef CONFIG_X86_64
12600 if (insn_rip_relative(&insn)) {
12601@@ -339,7 +344,9 @@ static int __kprobes __copy_instruction(
12602 (u8 *) dest;
12603 BUG_ON((s64) (s32) newdisp != newdisp); /* Sanity check. */
12604 disp = (u8 *) dest + insn_offset_displacement(&insn);
12605+ pax_open_kernel();
12606 *(s32 *) disp = (s32) newdisp;
12607+ pax_close_kernel();
12608 }
12609 #endif
12610 return insn.length;
12611@@ -353,12 +360,12 @@ static void __kprobes arch_copy_kprobe(s
12612 */
12613 __copy_instruction(p->ainsn.insn, p->addr, 0);
12790 12614
12791- if (can_boost(p->addr)) 12615- if (can_boost(p->addr))
12792+ if (can_boost(ktla_ktva(p->addr))) 12616+ if (can_boost(ktla_ktva(p->addr)))
@@ -12799,7 +12623,16 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/kprobes.c linux-2.6.32.24/arch/x86/ke
12799 } 12623 }
12800 12624
12801 int __kprobes arch_prepare_kprobe(struct kprobe *p) 12625 int __kprobes arch_prepare_kprobe(struct kprobe *p)
12802@@ -432,7 +440,7 @@ static void __kprobes prepare_singlestep 12626@@ -475,7 +482,7 @@ static void __kprobes setup_singlestep(s
12627 * nor set current_kprobe, because it doesn't use single
12628 * stepping.
12629 */
12630- regs->ip = (unsigned long)p->ainsn.insn;
12631+ regs->ip = ktva_ktla((unsigned long)p->ainsn.insn);
12632 preempt_enable_no_resched();
12633 return;
12634 }
12635@@ -494,7 +501,7 @@ static void __kprobes setup_singlestep(s
12803 if (p->opcode == BREAKPOINT_INSTRUCTION) 12636 if (p->opcode == BREAKPOINT_INSTRUCTION)
12804 regs->ip = (unsigned long)p->addr; 12637 regs->ip = (unsigned long)p->addr;
12805 else 12638 else
@@ -12807,26 +12640,17 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/kprobes.c linux-2.6.32.24/arch/x86/ke
12807+ regs->ip = ktva_ktla((unsigned long)p->ainsn.insn); 12640+ regs->ip = ktva_ktla((unsigned long)p->ainsn.insn);
12808 } 12641 }
12809 12642
12810 void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, 12643 /*
12811@@ -453,7 +461,7 @@ static void __kprobes setup_singlestep(s 12644@@ -573,7 +580,7 @@ static int __kprobes kprobe_handler(stru
12812 if (p->ainsn.boostable == 1 && !p->post_handler) { 12645 setup_singlestep(p, regs, kcb, 0);
12813 /* Boost up -- we can execute copied instructions directly */ 12646 return 1;
12814 reset_current_kprobe(); 12647 }
12815- regs->ip = (unsigned long)p->ainsn.insn; 12648- } else if (*addr != BREAKPOINT_INSTRUCTION) {
12816+ regs->ip = ktva_ktla((unsigned long)p->ainsn.insn); 12649+ } else if (*(kprobe_opcode_t *)ktla_ktva((unsigned long)addr) != BREAKPOINT_INSTRUCTION) {
12817 preempt_enable_no_resched();
12818 return;
12819 }
12820@@ -523,7 +531,7 @@ static int __kprobes kprobe_handler(stru
12821 struct kprobe_ctlblk *kcb;
12822
12823 addr = (kprobe_opcode_t *)(regs->ip - sizeof(kprobe_opcode_t));
12824- if (*addr != BREAKPOINT_INSTRUCTION) {
12825+ if (*(kprobe_opcode_t *)ktla_ktva((unsigned long)addr) != BREAKPOINT_INSTRUCTION) {
12826 /* 12650 /*
12827 * The breakpoint instruction was removed right 12651 * The breakpoint instruction was removed right
12828 * after we hit it. Another cpu has removed 12652 * after we hit it. Another cpu has removed
12829@@ -775,7 +783,7 @@ static void __kprobes resume_execution(s 12653@@ -799,7 +806,7 @@ static void __kprobes resume_execution(s
12830 struct pt_regs *regs, struct kprobe_ctlblk *kcb) 12654 struct pt_regs *regs, struct kprobe_ctlblk *kcb)
12831 { 12655 {
12832 unsigned long *tos = stack_addr(regs); 12656 unsigned long *tos = stack_addr(regs);
@@ -12835,7 +12659,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/kprobes.c linux-2.6.32.24/arch/x86/ke
12835 unsigned long orig_ip = (unsigned long)p->addr; 12659 unsigned long orig_ip = (unsigned long)p->addr;
12836 kprobe_opcode_t *insn = p->ainsn.insn; 12660 kprobe_opcode_t *insn = p->ainsn.insn;
12837 12661
12838@@ -958,7 +966,7 @@ int __kprobes kprobe_exceptions_notify(s 12662@@ -982,7 +989,7 @@ int __kprobes kprobe_exceptions_notify(s
12839 struct die_args *args = data; 12663 struct die_args *args = data;
12840 int ret = NOTIFY_DONE; 12664 int ret = NOTIFY_DONE;
12841 12665
@@ -12844,10 +12668,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/kprobes.c linux-2.6.32.24/arch/x86/ke
12844 return ret; 12668 return ret;
12845 12669
12846 switch (val) { 12670 switch (val) {
12847diff -urNp linux-2.6.32.24/arch/x86/kernel/ldt.c linux-2.6.32.24/arch/x86/kernel/ldt.c 12671diff -urNp linux-2.6.35.7/arch/x86/kernel/ldt.c linux-2.6.35.7/arch/x86/kernel/ldt.c
12848--- linux-2.6.32.24/arch/x86/kernel/ldt.c 2010-08-13 16:24:37.000000000 -0400 12672--- linux-2.6.35.7/arch/x86/kernel/ldt.c 2010-08-26 19:47:12.000000000 -0400
12849+++ linux-2.6.32.24/arch/x86/kernel/ldt.c 2010-10-23 19:59:24.000000000 -0400 12673+++ linux-2.6.35.7/arch/x86/kernel/ldt.c 2010-10-11 22:41:44.000000000 -0400
12850@@ -66,13 +66,13 @@ static int alloc_ldt(mm_context_t *pc, i 12674@@ -67,13 +67,13 @@ static int alloc_ldt(mm_context_t *pc, i
12851 if (reload) { 12675 if (reload) {
12852 #ifdef CONFIG_SMP 12676 #ifdef CONFIG_SMP
12853 preempt_disable(); 12677 preempt_disable();
@@ -12863,7 +12687,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ldt.c linux-2.6.32.24/arch/x86/kernel
12863 #endif 12687 #endif
12864 } 12688 }
12865 if (oldsize) { 12689 if (oldsize) {
12866@@ -94,7 +94,7 @@ static inline int copy_ldt(mm_context_t 12690@@ -95,7 +95,7 @@ static inline int copy_ldt(mm_context_t
12867 return err; 12691 return err;
12868 12692
12869 for (i = 0; i < old->size; i++) 12693 for (i = 0; i < old->size; i++)
@@ -12872,7 +12696,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ldt.c linux-2.6.32.24/arch/x86/kernel
12872 return 0; 12696 return 0;
12873 } 12697 }
12874 12698
12875@@ -115,6 +115,24 @@ int init_new_context(struct task_struct 12699@@ -116,6 +116,24 @@ int init_new_context(struct task_struct
12876 retval = copy_ldt(&mm->context, &old_mm->context); 12700 retval = copy_ldt(&mm->context, &old_mm->context);
12877 mutex_unlock(&old_mm->context.lock); 12701 mutex_unlock(&old_mm->context.lock);
12878 } 12702 }
@@ -12897,7 +12721,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ldt.c linux-2.6.32.24/arch/x86/kernel
12897 return retval; 12721 return retval;
12898 } 12722 }
12899 12723
12900@@ -229,6 +247,13 @@ static int write_ldt(void __user *ptr, u 12724@@ -230,6 +248,13 @@ static int write_ldt(void __user *ptr, u
12901 } 12725 }
12902 } 12726 }
12903 12727
@@ -12911,19 +12735,19 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ldt.c linux-2.6.32.24/arch/x86/kernel
12911 fill_ldt(&ldt, &ldt_info); 12735 fill_ldt(&ldt, &ldt_info);
12912 if (oldmode) 12736 if (oldmode)
12913 ldt.avl = 0; 12737 ldt.avl = 0;
12914diff -urNp linux-2.6.32.24/arch/x86/kernel/machine_kexec_32.c linux-2.6.32.24/arch/x86/kernel/machine_kexec_32.c 12738diff -urNp linux-2.6.35.7/arch/x86/kernel/machine_kexec_32.c linux-2.6.35.7/arch/x86/kernel/machine_kexec_32.c
12915--- linux-2.6.32.24/arch/x86/kernel/machine_kexec_32.c 2010-08-13 16:24:37.000000000 -0400 12739--- linux-2.6.35.7/arch/x86/kernel/machine_kexec_32.c 2010-08-26 19:47:12.000000000 -0400
12916+++ linux-2.6.32.24/arch/x86/kernel/machine_kexec_32.c 2010-10-23 19:59:19.000000000 -0400 12740+++ linux-2.6.35.7/arch/x86/kernel/machine_kexec_32.c 2010-09-17 20:12:09.000000000 -0400
12917@@ -26,7 +26,7 @@ 12741@@ -27,7 +27,7 @@
12918 #include <asm/system.h>
12919 #include <asm/cacheflush.h> 12742 #include <asm/cacheflush.h>
12743 #include <asm/debugreg.h>
12920 12744
12921-static void set_idt(void *newidt, __u16 limit) 12745-static void set_idt(void *newidt, __u16 limit)
12922+static void set_idt(struct desc_struct *newidt, __u16 limit) 12746+static void set_idt(struct desc_struct *newidt, __u16 limit)
12923 { 12747 {
12924 struct desc_ptr curidt; 12748 struct desc_ptr curidt;
12925 12749
12926@@ -38,7 +38,7 @@ static void set_idt(void *newidt, __u16 12750@@ -39,7 +39,7 @@ static void set_idt(void *newidt, __u16
12927 } 12751 }
12928 12752
12929 12753
@@ -12941,10 +12765,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/machine_kexec_32.c linux-2.6.32.24/ar
12941 12765
12942 relocate_kernel_ptr = control_page; 12766 relocate_kernel_ptr = control_page;
12943 page_list[PA_CONTROL_PAGE] = __pa(control_page); 12767 page_list[PA_CONTROL_PAGE] = __pa(control_page);
12944diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_amd.c linux-2.6.32.24/arch/x86/kernel/microcode_amd.c 12768diff -urNp linux-2.6.35.7/arch/x86/kernel/microcode_amd.c linux-2.6.35.7/arch/x86/kernel/microcode_amd.c
12945--- linux-2.6.32.24/arch/x86/kernel/microcode_amd.c 2010-08-13 16:24:37.000000000 -0400 12769--- linux-2.6.35.7/arch/x86/kernel/microcode_amd.c 2010-08-26 19:47:12.000000000 -0400
12946+++ linux-2.6.32.24/arch/x86/kernel/microcode_amd.c 2010-10-23 19:59:19.000000000 -0400 12770+++ linux-2.6.35.7/arch/x86/kernel/microcode_amd.c 2010-09-17 20:12:09.000000000 -0400
12947@@ -346,7 +346,7 @@ static void microcode_fini_cpu_amd(int c 12771@@ -331,7 +331,7 @@ static void microcode_fini_cpu_amd(int c
12948 uci->mc = NULL; 12772 uci->mc = NULL;
12949 } 12773 }
12950 12774
@@ -12953,7 +12777,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_amd.c linux-2.6.32.24/arch/
12953 .request_microcode_user = request_microcode_user, 12777 .request_microcode_user = request_microcode_user,
12954 .request_microcode_fw = request_microcode_fw, 12778 .request_microcode_fw = request_microcode_fw,
12955 .collect_cpu_info = collect_cpu_info_amd, 12779 .collect_cpu_info = collect_cpu_info_amd,
12956@@ -354,7 +354,7 @@ static struct microcode_ops microcode_am 12780@@ -339,7 +339,7 @@ static struct microcode_ops microcode_am
12957 .microcode_fini_cpu = microcode_fini_cpu_amd, 12781 .microcode_fini_cpu = microcode_fini_cpu_amd,
12958 }; 12782 };
12959 12783
@@ -12962,10 +12786,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_amd.c linux-2.6.32.24/arch/
12962 { 12786 {
12963 return &microcode_amd_ops; 12787 return &microcode_amd_ops;
12964 } 12788 }
12965diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_core.c linux-2.6.32.24/arch/x86/kernel/microcode_core.c 12789diff -urNp linux-2.6.35.7/arch/x86/kernel/microcode_core.c linux-2.6.35.7/arch/x86/kernel/microcode_core.c
12966--- linux-2.6.32.24/arch/x86/kernel/microcode_core.c 2010-08-13 16:24:37.000000000 -0400 12790--- linux-2.6.35.7/arch/x86/kernel/microcode_core.c 2010-08-26 19:47:12.000000000 -0400
12967+++ linux-2.6.32.24/arch/x86/kernel/microcode_core.c 2010-10-23 19:59:19.000000000 -0400 12791+++ linux-2.6.35.7/arch/x86/kernel/microcode_core.c 2010-09-17 20:12:09.000000000 -0400
12968@@ -90,7 +90,7 @@ MODULE_LICENSE("GPL"); 12792@@ -92,7 +92,7 @@ MODULE_LICENSE("GPL");
12969 12793
12970 #define MICROCODE_VERSION "2.00" 12794 #define MICROCODE_VERSION "2.00"
12971 12795
@@ -12974,10 +12798,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_core.c linux-2.6.32.24/arch
12974 12798
12975 /* 12799 /*
12976 * Synchronization. 12800 * Synchronization.
12977diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_intel.c linux-2.6.32.24/arch/x86/kernel/microcode_intel.c 12801diff -urNp linux-2.6.35.7/arch/x86/kernel/microcode_intel.c linux-2.6.35.7/arch/x86/kernel/microcode_intel.c
12978--- linux-2.6.32.24/arch/x86/kernel/microcode_intel.c 2010-08-13 16:24:37.000000000 -0400 12802--- linux-2.6.35.7/arch/x86/kernel/microcode_intel.c 2010-08-26 19:47:12.000000000 -0400
12979+++ linux-2.6.32.24/arch/x86/kernel/microcode_intel.c 2010-10-23 19:59:19.000000000 -0400 12803+++ linux-2.6.35.7/arch/x86/kernel/microcode_intel.c 2010-09-17 20:12:09.000000000 -0400
12980@@ -443,13 +443,13 @@ static enum ucode_state request_microcod 12804@@ -446,13 +446,13 @@ static enum ucode_state request_microcod
12981 12805
12982 static int get_ucode_user(void *to, const void *from, size_t n) 12806 static int get_ucode_user(void *to, const void *from, size_t n)
12983 { 12807 {
@@ -12993,7 +12817,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_intel.c linux-2.6.32.24/arc
12993 } 12817 }
12994 12818
12995 static void microcode_fini_cpu(int cpu) 12819 static void microcode_fini_cpu(int cpu)
12996@@ -460,7 +460,7 @@ static void microcode_fini_cpu(int cpu) 12820@@ -463,7 +463,7 @@ static void microcode_fini_cpu(int cpu)
12997 uci->mc = NULL; 12821 uci->mc = NULL;
12998 } 12822 }
12999 12823
@@ -13002,7 +12826,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_intel.c linux-2.6.32.24/arc
13002 .request_microcode_user = request_microcode_user, 12826 .request_microcode_user = request_microcode_user,
13003 .request_microcode_fw = request_microcode_fw, 12827 .request_microcode_fw = request_microcode_fw,
13004 .collect_cpu_info = collect_cpu_info, 12828 .collect_cpu_info = collect_cpu_info,
13005@@ -468,7 +468,7 @@ static struct microcode_ops microcode_in 12829@@ -471,7 +471,7 @@ static struct microcode_ops microcode_in
13006 .microcode_fini_cpu = microcode_fini_cpu, 12830 .microcode_fini_cpu = microcode_fini_cpu,
13007 }; 12831 };
13008 12832
@@ -13011,10 +12835,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/microcode_intel.c linux-2.6.32.24/arc
13011 { 12835 {
13012 return &microcode_intel_ops; 12836 return &microcode_intel_ops;
13013 } 12837 }
13014diff -urNp linux-2.6.32.24/arch/x86/kernel/module.c linux-2.6.32.24/arch/x86/kernel/module.c 12838diff -urNp linux-2.6.35.7/arch/x86/kernel/module.c linux-2.6.35.7/arch/x86/kernel/module.c
13015--- linux-2.6.32.24/arch/x86/kernel/module.c 2010-08-13 16:24:37.000000000 -0400 12839--- linux-2.6.35.7/arch/x86/kernel/module.c 2010-08-26 19:47:12.000000000 -0400
13016+++ linux-2.6.32.24/arch/x86/kernel/module.c 2010-10-23 19:59:19.000000000 -0400 12840+++ linux-2.6.35.7/arch/x86/kernel/module.c 2010-09-17 20:12:09.000000000 -0400
13017@@ -34,7 +34,7 @@ 12841@@ -35,7 +35,7 @@
13018 #define DEBUGP(fmt...) 12842 #define DEBUGP(fmt...)
13019 #endif 12843 #endif
13020 12844
@@ -13023,7 +12847,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/module.c linux-2.6.32.24/arch/x86/ker
13023 { 12847 {
13024 struct vm_struct *area; 12848 struct vm_struct *area;
13025 12849
13026@@ -48,8 +48,18 @@ void *module_alloc(unsigned long size) 12850@@ -49,8 +49,18 @@ void *module_alloc(unsigned long size)
13027 if (!area) 12851 if (!area)
13028 return NULL; 12852 return NULL;
13029 12853
@@ -13044,7 +12868,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/module.c linux-2.6.32.24/arch/x86/ker
13044 } 12868 }
13045 12869
13046 /* Free memory returned from module_alloc */ 12870 /* Free memory returned from module_alloc */
13047@@ -58,6 +68,40 @@ void module_free(struct module *mod, voi 12871@@ -59,6 +69,40 @@ void module_free(struct module *mod, voi
13048 vfree(module_region); 12872 vfree(module_region);
13049 } 12873 }
13050 12874
@@ -13085,7 +12909,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/module.c linux-2.6.32.24/arch/x86/ker
13085 /* We don't need anything special. */ 12909 /* We don't need anything special. */
13086 int module_frob_arch_sections(Elf_Ehdr *hdr, 12910 int module_frob_arch_sections(Elf_Ehdr *hdr,
13087 Elf_Shdr *sechdrs, 12911 Elf_Shdr *sechdrs,
13088@@ -77,14 +121,16 @@ int apply_relocate(Elf32_Shdr *sechdrs, 12912@@ -78,14 +122,16 @@ int apply_relocate(Elf32_Shdr *sechdrs,
13089 unsigned int i; 12913 unsigned int i;
13090 Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr; 12914 Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr;
13091 Elf32_Sym *sym; 12915 Elf32_Sym *sym;
@@ -13105,7 +12929,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/module.c linux-2.6.32.24/arch/x86/ker
13105 /* This is the symbol it is referring to. Note that all 12929 /* This is the symbol it is referring to. Note that all
13106 undefined symbols have been resolved. */ 12930 undefined symbols have been resolved. */
13107 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr 12931 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
13108@@ -93,11 +139,15 @@ int apply_relocate(Elf32_Shdr *sechdrs, 12932@@ -94,11 +140,15 @@ int apply_relocate(Elf32_Shdr *sechdrs,
13109 switch (ELF32_R_TYPE(rel[i].r_info)) { 12933 switch (ELF32_R_TYPE(rel[i].r_info)) {
13110 case R_386_32: 12934 case R_386_32:
13111 /* We add the value into the location given */ 12935 /* We add the value into the location given */
@@ -13123,7 +12947,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/module.c linux-2.6.32.24/arch/x86/ker
13123 break; 12947 break;
13124 default: 12948 default:
13125 printk(KERN_ERR "module %s: Unknown relocation: %u\n", 12949 printk(KERN_ERR "module %s: Unknown relocation: %u\n",
13126@@ -153,21 +203,30 @@ int apply_relocate_add(Elf64_Shdr *sechd 12950@@ -154,21 +204,30 @@ int apply_relocate_add(Elf64_Shdr *sechd
13127 case R_X86_64_NONE: 12951 case R_X86_64_NONE:
13128 break; 12952 break;
13129 case R_X86_64_64: 12953 case R_X86_64_64:
@@ -13154,9 +12978,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/module.c linux-2.6.32.24/arch/x86/ker
13154 #if 0 12978 #if 0
13155 if ((s64)val != *(s32 *)loc) 12979 if ((s64)val != *(s32 *)loc)
13156 goto overflow; 12980 goto overflow;
13157diff -urNp linux-2.6.32.24/arch/x86/kernel/paravirt.c linux-2.6.32.24/arch/x86/kernel/paravirt.c 12981diff -urNp linux-2.6.35.7/arch/x86/kernel/paravirt.c linux-2.6.35.7/arch/x86/kernel/paravirt.c
13158--- linux-2.6.32.24/arch/x86/kernel/paravirt.c 2010-08-13 16:24:37.000000000 -0400 12982--- linux-2.6.35.7/arch/x86/kernel/paravirt.c 2010-08-26 19:47:12.000000000 -0400
13159+++ linux-2.6.32.24/arch/x86/kernel/paravirt.c 2010-10-23 19:59:19.000000000 -0400 12983+++ linux-2.6.35.7/arch/x86/kernel/paravirt.c 2010-09-17 20:12:09.000000000 -0400
13160@@ -122,7 +122,7 @@ unsigned paravirt_patch_jmp(void *insnbu 12984@@ -122,7 +122,7 @@ unsigned paravirt_patch_jmp(void *insnbu
13161 * corresponding structure. */ 12985 * corresponding structure. */
13162 static void *get_call_destination(u8 type) 12986 static void *get_call_destination(u8 type)
@@ -13247,7 +13071,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/paravirt.c linux-2.6.32.24/arch/x86/k
13247 13071
13248 .read_cr2 = native_read_cr2, 13072 .read_cr2 = native_read_cr2,
13249 .write_cr2 = native_write_cr2, 13073 .write_cr2 = native_write_cr2,
13250@@ -467,6 +467,12 @@ struct pv_mmu_ops pv_mmu_ops = { 13074@@ -463,6 +463,12 @@ struct pv_mmu_ops pv_mmu_ops = {
13251 }, 13075 },
13252 13076
13253 .set_fixmap = native_set_fixmap, 13077 .set_fixmap = native_set_fixmap,
@@ -13260,11 +13084,11 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/paravirt.c linux-2.6.32.24/arch/x86/k
13260 }; 13084 };
13261 13085
13262 EXPORT_SYMBOL_GPL(pv_time_ops); 13086 EXPORT_SYMBOL_GPL(pv_time_ops);
13263diff -urNp linux-2.6.32.24/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.32.24/arch/x86/kernel/paravirt-spinlocks.c 13087diff -urNp linux-2.6.35.7/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.35.7/arch/x86/kernel/paravirt-spinlocks.c
13264--- linux-2.6.32.24/arch/x86/kernel/paravirt-spinlocks.c 2010-08-13 16:24:37.000000000 -0400 13088--- linux-2.6.35.7/arch/x86/kernel/paravirt-spinlocks.c 2010-08-26 19:47:12.000000000 -0400
13265+++ linux-2.6.32.24/arch/x86/kernel/paravirt-spinlocks.c 2010-10-23 19:59:19.000000000 -0400 13089+++ linux-2.6.35.7/arch/x86/kernel/paravirt-spinlocks.c 2010-09-17 20:12:09.000000000 -0400
13266@@ -13,7 +13,7 @@ default_spin_lock_flags(raw_spinlock_t * 13090@@ -13,7 +13,7 @@ default_spin_lock_flags(arch_spinlock_t
13267 __raw_spin_lock(lock); 13091 arch_spin_lock(lock);
13268 } 13092 }
13269 13093
13270-struct pv_lock_ops pv_lock_ops = { 13094-struct pv_lock_ops pv_lock_ops = {
@@ -13272,10 +13096,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/paravirt-spinlocks.c linux-2.6.32.24/
13272 #ifdef CONFIG_SMP 13096 #ifdef CONFIG_SMP
13273 .spin_is_locked = __ticket_spin_is_locked, 13097 .spin_is_locked = __ticket_spin_is_locked,
13274 .spin_is_contended = __ticket_spin_is_contended, 13098 .spin_is_contended = __ticket_spin_is_contended,
13275diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-calgary_64.c linux-2.6.32.24/arch/x86/kernel/pci-calgary_64.c 13099diff -urNp linux-2.6.35.7/arch/x86/kernel/pci-calgary_64.c linux-2.6.35.7/arch/x86/kernel/pci-calgary_64.c
13276--- linux-2.6.32.24/arch/x86/kernel/pci-calgary_64.c 2010-08-13 16:24:37.000000000 -0400 13100--- linux-2.6.35.7/arch/x86/kernel/pci-calgary_64.c 2010-08-26 19:47:12.000000000 -0400
13277+++ linux-2.6.32.24/arch/x86/kernel/pci-calgary_64.c 2010-10-23 19:59:19.000000000 -0400 13101+++ linux-2.6.35.7/arch/x86/kernel/pci-calgary_64.c 2010-09-17 20:12:09.000000000 -0400
13278@@ -477,7 +477,7 @@ static void calgary_free_coherent(struct 13102@@ -475,7 +475,7 @@ static void calgary_free_coherent(struct
13279 free_pages((unsigned long)vaddr, get_order(size)); 13103 free_pages((unsigned long)vaddr, get_order(size));
13280 } 13104 }
13281 13105
@@ -13284,19 +13108,19 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-calgary_64.c linux-2.6.32.24/arch
13284 .alloc_coherent = calgary_alloc_coherent, 13108 .alloc_coherent = calgary_alloc_coherent,
13285 .free_coherent = calgary_free_coherent, 13109 .free_coherent = calgary_free_coherent,
13286 .map_sg = calgary_map_sg, 13110 .map_sg = calgary_map_sg,
13287diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-dma.c linux-2.6.32.24/arch/x86/kernel/pci-dma.c 13111diff -urNp linux-2.6.35.7/arch/x86/kernel/pci-dma.c linux-2.6.35.7/arch/x86/kernel/pci-dma.c
13288--- linux-2.6.32.24/arch/x86/kernel/pci-dma.c 2010-08-13 16:24:37.000000000 -0400 13112--- linux-2.6.35.7/arch/x86/kernel/pci-dma.c 2010-08-26 19:47:12.000000000 -0400
13289+++ linux-2.6.32.24/arch/x86/kernel/pci-dma.c 2010-10-23 19:59:19.000000000 -0400 13113+++ linux-2.6.35.7/arch/x86/kernel/pci-dma.c 2010-09-17 20:12:09.000000000 -0400
13290@@ -14,7 +14,7 @@ 13114@@ -16,7 +16,7 @@
13291 13115
13292 static int forbid_dac __read_mostly; 13116 static int forbid_dac __read_mostly;
13293 13117
13294-struct dma_map_ops *dma_ops; 13118-struct dma_map_ops *dma_ops = &nommu_dma_ops;
13295+const struct dma_map_ops *dma_ops; 13119+const struct dma_map_ops *dma_ops = &nommu_dma_ops;
13296 EXPORT_SYMBOL(dma_ops); 13120 EXPORT_SYMBOL(dma_ops);
13297 13121
13298 static int iommu_sac_force __read_mostly; 13122 static int iommu_sac_force __read_mostly;
13299@@ -243,7 +243,7 @@ early_param("iommu", iommu_setup); 13123@@ -248,7 +248,7 @@ early_param("iommu", iommu_setup);
13300 13124
13301 int dma_supported(struct device *dev, u64 mask) 13125 int dma_supported(struct device *dev, u64 mask)
13302 { 13126 {
@@ -13305,10 +13129,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-dma.c linux-2.6.32.24/arch/x86/ke
13305 13129
13306 #ifdef CONFIG_PCI 13130 #ifdef CONFIG_PCI
13307 if (mask > 0xffffffff && forbid_dac > 0) { 13131 if (mask > 0xffffffff && forbid_dac > 0) {
13308diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-gart_64.c linux-2.6.32.24/arch/x86/kernel/pci-gart_64.c 13132diff -urNp linux-2.6.35.7/arch/x86/kernel/pci-gart_64.c linux-2.6.35.7/arch/x86/kernel/pci-gart_64.c
13309--- linux-2.6.32.24/arch/x86/kernel/pci-gart_64.c 2010-08-13 16:24:37.000000000 -0400 13133--- linux-2.6.35.7/arch/x86/kernel/pci-gart_64.c 2010-08-26 19:47:12.000000000 -0400
13310+++ linux-2.6.32.24/arch/x86/kernel/pci-gart_64.c 2010-10-23 19:59:19.000000000 -0400 13134+++ linux-2.6.35.7/arch/x86/kernel/pci-gart_64.c 2010-09-17 20:12:09.000000000 -0400
13311@@ -682,7 +682,7 @@ static __init int init_k8_gatt(struct ag 13135@@ -699,7 +699,7 @@ static __init int init_k8_gatt(struct ag
13312 return -1; 13136 return -1;
13313 } 13137 }
13314 13138
@@ -13317,10 +13141,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-gart_64.c linux-2.6.32.24/arch/x8
13317 .map_sg = gart_map_sg, 13141 .map_sg = gart_map_sg,
13318 .unmap_sg = gart_unmap_sg, 13142 .unmap_sg = gart_unmap_sg,
13319 .map_page = gart_map_page, 13143 .map_page = gart_map_page,
13320diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-nommu.c linux-2.6.32.24/arch/x86/kernel/pci-nommu.c 13144diff -urNp linux-2.6.35.7/arch/x86/kernel/pci-nommu.c linux-2.6.35.7/arch/x86/kernel/pci-nommu.c
13321--- linux-2.6.32.24/arch/x86/kernel/pci-nommu.c 2010-08-13 16:24:37.000000000 -0400 13145--- linux-2.6.35.7/arch/x86/kernel/pci-nommu.c 2010-08-26 19:47:12.000000000 -0400
13322+++ linux-2.6.32.24/arch/x86/kernel/pci-nommu.c 2010-10-23 19:59:19.000000000 -0400 13146+++ linux-2.6.35.7/arch/x86/kernel/pci-nommu.c 2010-09-17 20:12:09.000000000 -0400
13323@@ -94,7 +94,7 @@ static void nommu_sync_sg_for_device(str 13147@@ -95,7 +95,7 @@ static void nommu_sync_sg_for_device(str
13324 flush_write_buffers(); 13148 flush_write_buffers();
13325 } 13149 }
13326 13150
@@ -13329,9 +13153,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-nommu.c linux-2.6.32.24/arch/x86/
13329 .alloc_coherent = dma_generic_alloc_coherent, 13153 .alloc_coherent = dma_generic_alloc_coherent,
13330 .free_coherent = nommu_free_coherent, 13154 .free_coherent = nommu_free_coherent,
13331 .map_sg = nommu_map_sg, 13155 .map_sg = nommu_map_sg,
13332diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-swiotlb.c linux-2.6.32.24/arch/x86/kernel/pci-swiotlb.c 13156diff -urNp linux-2.6.35.7/arch/x86/kernel/pci-swiotlb.c linux-2.6.35.7/arch/x86/kernel/pci-swiotlb.c
13333--- linux-2.6.32.24/arch/x86/kernel/pci-swiotlb.c 2010-08-13 16:24:37.000000000 -0400 13157--- linux-2.6.35.7/arch/x86/kernel/pci-swiotlb.c 2010-08-26 19:47:12.000000000 -0400
13334+++ linux-2.6.32.24/arch/x86/kernel/pci-swiotlb.c 2010-10-23 19:59:19.000000000 -0400 13158+++ linux-2.6.35.7/arch/x86/kernel/pci-swiotlb.c 2010-09-17 20:12:09.000000000 -0400
13335@@ -25,7 +25,7 @@ static void *x86_swiotlb_alloc_coherent( 13159@@ -25,7 +25,7 @@ static void *x86_swiotlb_alloc_coherent(
13336 return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags); 13160 return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags);
13337 } 13161 }
@@ -13341,10 +13165,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/pci-swiotlb.c linux-2.6.32.24/arch/x8
13341 .mapping_error = swiotlb_dma_mapping_error, 13165 .mapping_error = swiotlb_dma_mapping_error,
13342 .alloc_coherent = x86_swiotlb_alloc_coherent, 13166 .alloc_coherent = x86_swiotlb_alloc_coherent,
13343 .free_coherent = swiotlb_free_coherent, 13167 .free_coherent = swiotlb_free_coherent,
13344diff -urNp linux-2.6.32.24/arch/x86/kernel/process_32.c linux-2.6.32.24/arch/x86/kernel/process_32.c 13168diff -urNp linux-2.6.35.7/arch/x86/kernel/process_32.c linux-2.6.35.7/arch/x86/kernel/process_32.c
13345--- linux-2.6.32.24/arch/x86/kernel/process_32.c 2010-08-13 16:24:37.000000000 -0400 13169--- linux-2.6.35.7/arch/x86/kernel/process_32.c 2010-08-26 19:47:12.000000000 -0400
13346+++ linux-2.6.32.24/arch/x86/kernel/process_32.c 2010-10-23 19:59:19.000000000 -0400 13170+++ linux-2.6.35.7/arch/x86/kernel/process_32.c 2010-09-17 20:12:09.000000000 -0400
13347@@ -67,6 +67,7 @@ asmlinkage void ret_from_fork(void) __as 13171@@ -65,6 +65,7 @@ asmlinkage void ret_from_fork(void) __as
13348 unsigned long thread_saved_pc(struct task_struct *tsk) 13172 unsigned long thread_saved_pc(struct task_struct *tsk)
13349 { 13173 {
13350 return ((unsigned long *)tsk->thread.sp)[3]; 13174 return ((unsigned long *)tsk->thread.sp)[3];
@@ -13352,27 +13176,16 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_32.c linux-2.6.32.24/arch/x86
13352 } 13176 }
13353 13177
13354 #ifndef CONFIG_SMP 13178 #ifndef CONFIG_SMP
13355@@ -129,7 +130,7 @@ void __show_regs(struct pt_regs *regs, i 13179@@ -126,7 +127,7 @@ void __show_regs(struct pt_regs *regs, i
13180 unsigned long sp;
13356 unsigned short ss, gs; 13181 unsigned short ss, gs;
13357 const char *board;
13358 13182
13359- if (user_mode_vm(regs)) { 13183- if (user_mode_vm(regs)) {
13360+ if (user_mode(regs)) { 13184+ if (user_mode(regs)) {
13361 sp = regs->sp; 13185 sp = regs->sp;
13362 ss = regs->ss & 0xffff; 13186 ss = regs->ss & 0xffff;
13363 gs = get_user_gs(regs); 13187 gs = get_user_gs(regs);
13364@@ -210,8 +211,8 @@ int kernel_thread(int (*fn)(void *), voi 13188@@ -196,7 +197,7 @@ int copy_thread(unsigned long clone_flag
13365 regs.bx = (unsigned long) fn;
13366 regs.dx = (unsigned long) arg;
13367
13368- regs.ds = __USER_DS;
13369- regs.es = __USER_DS;
13370+ regs.ds = __KERNEL_DS;
13371+ regs.es = __KERNEL_DS;
13372 regs.fs = __KERNEL_PERCPU;
13373 regs.gs = __KERNEL_STACK_CANARY;
13374 regs.orig_ax = -1;
13375@@ -247,7 +248,7 @@ int copy_thread(unsigned long clone_flag
13376 struct task_struct *tsk; 13189 struct task_struct *tsk;
13377 int err; 13190 int err;
13378 13191
@@ -13381,7 +13194,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_32.c linux-2.6.32.24/arch/x86
13381 *childregs = *regs; 13194 *childregs = *regs;
13382 childregs->ax = 0; 13195 childregs->ax = 0;
13383 childregs->sp = sp; 13196 childregs->sp = sp;
13384@@ -276,6 +277,7 @@ int copy_thread(unsigned long clone_flag 13197@@ -230,6 +231,7 @@ int copy_thread(unsigned long clone_flag
13385 * Set a new TLS for the child thread? 13198 * Set a new TLS for the child thread?
13386 */ 13199 */
13387 if (clone_flags & CLONE_SETTLS) 13200 if (clone_flags & CLONE_SETTLS)
@@ -13389,7 +13202,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_32.c linux-2.6.32.24/arch/x86
13389 err = do_set_thread_area(p, -1, 13202 err = do_set_thread_area(p, -1,
13390 (struct user_desc __user *)childregs->si, 0); 13203 (struct user_desc __user *)childregs->si, 0);
13391 13204
13392@@ -346,7 +348,7 @@ __switch_to(struct task_struct *prev_p, 13205@@ -293,7 +295,7 @@ __switch_to(struct task_struct *prev_p,
13393 struct thread_struct *prev = &prev_p->thread, 13206 struct thread_struct *prev = &prev_p->thread,
13394 *next = &next_p->thread; 13207 *next = &next_p->thread;
13395 int cpu = smp_processor_id(); 13208 int cpu = smp_processor_id();
@@ -13398,7 +13211,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_32.c linux-2.6.32.24/arch/x86
13398 bool preload_fpu; 13211 bool preload_fpu;
13399 13212
13400 /* never put a printk in __switch_to... printk() calls wake_up*() indirectly */ 13213 /* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
13401@@ -381,6 +383,11 @@ __switch_to(struct task_struct *prev_p, 13214@@ -328,6 +330,11 @@ __switch_to(struct task_struct *prev_p,
13402 */ 13215 */
13403 lazy_save_gs(prev->gs); 13216 lazy_save_gs(prev->gs);
13404 13217
@@ -13410,7 +13223,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_32.c linux-2.6.32.24/arch/x86
13410 /* 13223 /*
13411 * Load the per-thread Thread-Local Storage descriptor. 13224 * Load the per-thread Thread-Local Storage descriptor.
13412 */ 13225 */
13413@@ -497,3 +504,27 @@ unsigned long get_wchan(struct task_stru 13226@@ -404,3 +411,27 @@ unsigned long get_wchan(struct task_stru
13414 return 0; 13227 return 0;
13415 } 13228 }
13416 13229
@@ -13438,10 +13251,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_32.c linux-2.6.32.24/arch/x86
13438+ load_sp0(init_tss + smp_processor_id(), thread); 13251+ load_sp0(init_tss + smp_processor_id(), thread);
13439+} 13252+}
13440+#endif 13253+#endif
13441diff -urNp linux-2.6.32.24/arch/x86/kernel/process_64.c linux-2.6.32.24/arch/x86/kernel/process_64.c 13254diff -urNp linux-2.6.35.7/arch/x86/kernel/process_64.c linux-2.6.35.7/arch/x86/kernel/process_64.c
13442--- linux-2.6.32.24/arch/x86/kernel/process_64.c 2010-08-13 16:24:37.000000000 -0400 13255--- linux-2.6.35.7/arch/x86/kernel/process_64.c 2010-08-26 19:47:12.000000000 -0400
13443+++ linux-2.6.32.24/arch/x86/kernel/process_64.c 2010-10-23 19:59:19.000000000 -0400 13256+++ linux-2.6.35.7/arch/x86/kernel/process_64.c 2010-09-17 20:12:09.000000000 -0400
13444@@ -91,7 +91,7 @@ static void __exit_idle(void) 13257@@ -87,7 +87,7 @@ static void __exit_idle(void)
13445 void exit_idle(void) 13258 void exit_idle(void)
13446 { 13259 {
13447 /* idle loop has pid 0 */ 13260 /* idle loop has pid 0 */
@@ -13450,16 +13263,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_64.c linux-2.6.32.24/arch/x86
13450 return; 13263 return;
13451 __exit_idle(); 13264 __exit_idle();
13452 } 13265 }
13453@@ -170,7 +170,7 @@ void __show_regs(struct pt_regs *regs, i 13266@@ -375,7 +375,7 @@ __switch_to(struct task_struct *prev_p,
13454 if (!board)
13455 board = "";
13456 printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s\n",
13457- current->pid, current->comm, print_tainted(),
13458+ task_pid_nr(current), current->comm, print_tainted(),
13459 init_utsname()->release,
13460 (int)strcspn(init_utsname()->version, " "),
13461 init_utsname()->version, board);
13462@@ -380,7 +380,7 @@ __switch_to(struct task_struct *prev_p,
13463 struct thread_struct *prev = &prev_p->thread; 13267 struct thread_struct *prev = &prev_p->thread;
13464 struct thread_struct *next = &next_p->thread; 13268 struct thread_struct *next = &next_p->thread;
13465 int cpu = smp_processor_id(); 13269 int cpu = smp_processor_id();
@@ -13468,7 +13272,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_64.c linux-2.6.32.24/arch/x86
13468 unsigned fsindex, gsindex; 13272 unsigned fsindex, gsindex;
13469 bool preload_fpu; 13273 bool preload_fpu;
13470 13274
13471@@ -560,12 +560,11 @@ unsigned long get_wchan(struct task_stru 13275@@ -528,12 +528,11 @@ unsigned long get_wchan(struct task_stru
13472 if (!p || p == current || p->state == TASK_RUNNING) 13276 if (!p || p == current || p->state == TASK_RUNNING)
13473 return 0; 13277 return 0;
13474 stack = (unsigned long)task_stack_page(p); 13278 stack = (unsigned long)task_stack_page(p);
@@ -13483,9 +13287,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process_64.c linux-2.6.32.24/arch/x86
13483 return 0; 13287 return 0;
13484 ip = *(u64 *)(fp+8); 13288 ip = *(u64 *)(fp+8);
13485 if (!in_sched_functions(ip)) 13289 if (!in_sched_functions(ip))
13486diff -urNp linux-2.6.32.24/arch/x86/kernel/process.c linux-2.6.32.24/arch/x86/kernel/process.c 13290diff -urNp linux-2.6.35.7/arch/x86/kernel/process.c linux-2.6.35.7/arch/x86/kernel/process.c
13487--- linux-2.6.32.24/arch/x86/kernel/process.c 2010-08-13 16:24:37.000000000 -0400 13291--- linux-2.6.35.7/arch/x86/kernel/process.c 2010-08-26 19:47:12.000000000 -0400
13488+++ linux-2.6.32.24/arch/x86/kernel/process.c 2010-10-23 19:59:19.000000000 -0400 13292+++ linux-2.6.35.7/arch/x86/kernel/process.c 2010-09-17 20:12:09.000000000 -0400
13489@@ -73,7 +73,7 @@ void exit_thread(void) 13293@@ -73,7 +73,7 @@ void exit_thread(void)
13490 unsigned long *bp = t->io_bitmap_ptr; 13294 unsigned long *bp = t->io_bitmap_ptr;
13491 13295
@@ -13495,17 +13299,37 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process.c linux-2.6.32.24/arch/x86/ke
13495 13299
13496 t->io_bitmap_ptr = NULL; 13300 t->io_bitmap_ptr = NULL;
13497 clear_thread_flag(TIF_IO_BITMAP); 13301 clear_thread_flag(TIF_IO_BITMAP);
13498@@ -93,6 +93,9 @@ void flush_thread(void) 13302@@ -107,7 +107,7 @@ void show_regs_common(void)
13499 13303
13500 clear_tsk_thread_flag(tsk, TIF_DEBUG); 13304 printk(KERN_CONT "\n");
13305 printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s %s/%s\n",
13306- current->pid, current->comm, print_tainted(),
13307+ task_pid_nr(current), current->comm, print_tainted(),
13308 init_utsname()->release,
13309 (int)strcspn(init_utsname()->version, " "),
13310 init_utsname()->version, board, product);
13311@@ -117,6 +117,9 @@ void flush_thread(void)
13312 {
13313 struct task_struct *tsk = current;
13501 13314
13502+#if defined(CONFIG_X86_32) && !defined(CONFIG_CC_STACKPROTECTOR) 13315+#if defined(CONFIG_X86_32) && !defined(CONFIG_CC_STACKPROTECTOR)
13503+ loadsegment(gs, 0); 13316+ loadsegment(gs, 0);
13504+#endif 13317+#endif
13505 tsk->thread.debugreg0 = 0; 13318 flush_ptrace_hw_breakpoint(tsk);
13506 tsk->thread.debugreg1 = 0; 13319 memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
13507 tsk->thread.debugreg2 = 0; 13320 /*
13508@@ -602,17 +605,3 @@ static int __init idle_setup(char *str) 13321@@ -279,8 +282,8 @@ int kernel_thread(int (*fn)(void *), voi
13322 regs.di = (unsigned long) arg;
13323
13324 #ifdef CONFIG_X86_32
13325- regs.ds = __USER_DS;
13326- regs.es = __USER_DS;
13327+ regs.ds = __KERNEL_DS;
13328+ regs.es = __KERNEL_DS;
13329 regs.fs = __KERNEL_PERCPU;
13330 regs.gs = __KERNEL_STACK_CANARY;
13331 #else
13332@@ -689,17 +692,3 @@ static int __init idle_setup(char *str)
13509 return 0; 13333 return 0;
13510 } 13334 }
13511 early_param("idle", idle_setup); 13335 early_param("idle", idle_setup);
@@ -13523,10 +13347,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/process.c linux-2.6.32.24/arch/x86/ke
13523- return randomize_range(mm->brk, range_end, 0) ? : mm->brk; 13347- return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
13524-} 13348-}
13525- 13349-
13526diff -urNp linux-2.6.32.24/arch/x86/kernel/ptrace.c linux-2.6.32.24/arch/x86/kernel/ptrace.c 13350diff -urNp linux-2.6.35.7/arch/x86/kernel/ptrace.c linux-2.6.35.7/arch/x86/kernel/ptrace.c
13527--- linux-2.6.32.24/arch/x86/kernel/ptrace.c 2010-08-13 16:24:37.000000000 -0400 13351--- linux-2.6.35.7/arch/x86/kernel/ptrace.c 2010-08-26 19:47:12.000000000 -0400
13528+++ linux-2.6.32.24/arch/x86/kernel/ptrace.c 2010-10-23 19:59:19.000000000 -0400 13352+++ linux-2.6.35.7/arch/x86/kernel/ptrace.c 2010-09-17 20:12:09.000000000 -0400
13529@@ -925,7 +925,7 @@ static const struct user_regset_view use 13353@@ -804,7 +804,7 @@ static const struct user_regset_view use
13530 long arch_ptrace(struct task_struct *child, long request, long addr, long data) 13354 long arch_ptrace(struct task_struct *child, long request, long addr, long data)
13531 { 13355 {
13532 int ret; 13356 int ret;
@@ -13535,7 +13359,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ptrace.c linux-2.6.32.24/arch/x86/ker
13535 13359
13536 switch (request) { 13360 switch (request) {
13537 /* read the word at location addr in the USER area. */ 13361 /* read the word at location addr in the USER area. */
13538@@ -1012,14 +1012,14 @@ long arch_ptrace(struct task_struct *chi 13362@@ -891,14 +891,14 @@ long arch_ptrace(struct task_struct *chi
13539 if (addr < 0) 13363 if (addr < 0)
13540 return -EIO; 13364 return -EIO;
13541 ret = do_get_thread_area(child, addr, 13365 ret = do_get_thread_area(child, addr,
@@ -13552,51 +13376,18 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/ptrace.c linux-2.6.32.24/arch/x86/ker
13552 break; 13376 break;
13553 #endif 13377 #endif
13554 13378
13555@@ -1038,12 +1038,12 @@ long arch_ptrace(struct task_struct *chi 13379@@ -1315,7 +1315,7 @@ static void fill_sigtrap_info(struct tas
13556 #ifdef CONFIG_X86_PTRACE_BTS 13380 memset(info, 0, sizeof(*info));
13557 case PTRACE_BTS_CONFIG: 13381 info->si_signo = SIGTRAP;
13558 ret = ptrace_bts_config 13382 info->si_code = si_code;
13559- (child, data, (struct ptrace_bts_config __user *)addr); 13383- info->si_addr = user_mode_vm(regs) ? (void __user *)regs->ip : NULL;
13560+ (child, data, (__force struct ptrace_bts_config __user *)addr); 13384+ info->si_addr = user_mode(regs) ? (__force void __user *)regs->ip : NULL;
13561 break; 13385 }
13562
13563 case PTRACE_BTS_STATUS:
13564 ret = ptrace_bts_status
13565- (child, data, (struct ptrace_bts_config __user *)addr);
13566+ (child, data, (__force struct ptrace_bts_config __user *)addr);
13567 break;
13568
13569 case PTRACE_BTS_SIZE:
13570@@ -1052,7 +1052,7 @@ long arch_ptrace(struct task_struct *chi
13571
13572 case PTRACE_BTS_GET:
13573 ret = ptrace_bts_read_record
13574- (child, data, (struct bts_struct __user *) addr);
13575+ (child, data, (__force struct bts_struct __user *) addr);
13576 break;
13577
13578 case PTRACE_BTS_CLEAR:
13579@@ -1061,7 +1061,7 @@ long arch_ptrace(struct task_struct *chi
13580
13581 case PTRACE_BTS_DRAIN:
13582 ret = ptrace_bts_drain
13583- (child, data, (struct bts_struct __user *) addr);
13584+ (child, data, (__force struct bts_struct __user *) addr);
13585 break;
13586 #endif /* CONFIG_X86_PTRACE_BTS */
13587
13588@@ -1450,7 +1450,7 @@ void send_sigtrap(struct task_struct *ts
13589 info.si_code = si_code;
13590
13591 /* User-mode ip? */
13592- info.si_addr = user_mode_vm(regs) ? (void __user *) regs->ip : NULL;
13593+ info.si_addr = user_mode(regs) ? (__force void __user *) regs->ip : NULL;
13594 13386
13595 /* Send us the fake SIGTRAP */ 13387 void user_single_step_siginfo(struct task_struct *tsk,
13596 force_sig_info(SIGTRAP, &info, tsk); 13388diff -urNp linux-2.6.35.7/arch/x86/kernel/reboot.c linux-2.6.35.7/arch/x86/kernel/reboot.c
13597diff -urNp linux-2.6.32.24/arch/x86/kernel/reboot.c linux-2.6.32.24/arch/x86/kernel/reboot.c 13389--- linux-2.6.35.7/arch/x86/kernel/reboot.c 2010-08-26 19:47:12.000000000 -0400
13598--- linux-2.6.32.24/arch/x86/kernel/reboot.c 2010-08-13 16:24:37.000000000 -0400 13390+++ linux-2.6.35.7/arch/x86/kernel/reboot.c 2010-09-17 20:12:09.000000000 -0400
13599+++ linux-2.6.32.24/arch/x86/kernel/reboot.c 2010-10-23 19:59:19.000000000 -0400
13600@@ -33,7 +33,7 @@ void (*pm_power_off)(void); 13391@@ -33,7 +33,7 @@ void (*pm_power_off)(void);
13601 EXPORT_SYMBOL(pm_power_off); 13392 EXPORT_SYMBOL(pm_power_off);
13602 13393
@@ -13606,7 +13397,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/reboot.c linux-2.6.32.24/arch/x86/ker
13606 enum reboot_type reboot_type = BOOT_KBD; 13397 enum reboot_type reboot_type = BOOT_KBD;
13607 int reboot_force; 13398 int reboot_force;
13608 13399
13609@@ -276,7 +276,7 @@ static struct dmi_system_id __initdata r 13400@@ -284,7 +284,7 @@ static struct dmi_system_id __initdata r
13610 DMI_MATCH(DMI_BOARD_NAME, "P4S800"), 13401 DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
13611 }, 13402 },
13612 }, 13403 },
@@ -13615,7 +13406,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/reboot.c linux-2.6.32.24/arch/x86/ker
13615 }; 13406 };
13616 13407
13617 static int __init reboot_init(void) 13408 static int __init reboot_init(void)
13618@@ -292,12 +292,12 @@ core_initcall(reboot_init); 13409@@ -300,12 +300,12 @@ core_initcall(reboot_init);
13619 controller to pulse the CPU reset line, which is more thorough, but 13410 controller to pulse the CPU reset line, which is more thorough, but
13620 doesn't work with at least one type of 486 motherboard. It is easy 13411 doesn't work with at least one type of 486 motherboard. It is easy
13621 to stop this code working; hence the copious comments. */ 13412 to stop this code working; hence the copious comments. */
@@ -13633,7 +13424,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/reboot.c linux-2.6.32.24/arch/x86/ker
13633 }; 13424 };
13634 13425
13635 static const struct desc_ptr 13426 static const struct desc_ptr
13636@@ -346,7 +346,7 @@ static const unsigned char jump_to_bios 13427@@ -354,7 +354,7 @@ static const unsigned char jump_to_bios
13637 * specified by the code and length parameters. 13428 * specified by the code and length parameters.
13638 * We assume that length will aways be less that 100! 13429 * We assume that length will aways be less that 100!
13639 */ 13430 */
@@ -13642,7 +13433,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/reboot.c linux-2.6.32.24/arch/x86/ker
13642 { 13433 {
13643 local_irq_disable(); 13434 local_irq_disable();
13644 13435
13645@@ -366,8 +366,8 @@ void machine_real_restart(const unsigned 13436@@ -374,8 +374,8 @@ void machine_real_restart(const unsigned
13646 /* Remap the kernel at virtual address zero, as well as offset zero 13437 /* Remap the kernel at virtual address zero, as well as offset zero
13647 from the kernel segment. This assumes the kernel segment starts at 13438 from the kernel segment. This assumes the kernel segment starts at
13648 virtual address PAGE_OFFSET. */ 13439 virtual address PAGE_OFFSET. */
@@ -13653,7 +13444,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/reboot.c linux-2.6.32.24/arch/x86/ker
13653 13444
13654 /* 13445 /*
13655 * Use `swapper_pg_dir' as our page directory. 13446 * Use `swapper_pg_dir' as our page directory.
13656@@ -379,16 +379,15 @@ void machine_real_restart(const unsigned 13447@@ -387,16 +387,15 @@ void machine_real_restart(const unsigned
13657 boot)". This seems like a fairly standard thing that gets set by 13448 boot)". This seems like a fairly standard thing that gets set by
13658 REBOOT.COM programs, and the previous reset routine did this 13449 REBOOT.COM programs, and the previous reset routine did this
13659 too. */ 13450 too. */
@@ -13673,10 +13464,19 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/reboot.c linux-2.6.32.24/arch/x86/ker
13673 13464
13674 /* Set up the IDT for real mode. */ 13465 /* Set up the IDT for real mode. */
13675 load_idt(&real_mode_idt); 13466 load_idt(&real_mode_idt);
13676diff -urNp linux-2.6.32.24/arch/x86/kernel/setup.c linux-2.6.32.24/arch/x86/kernel/setup.c 13467diff -urNp linux-2.6.35.7/arch/x86/kernel/setup.c linux-2.6.35.7/arch/x86/kernel/setup.c
13677--- linux-2.6.32.24/arch/x86/kernel/setup.c 2010-08-13 16:24:37.000000000 -0400 13468--- linux-2.6.35.7/arch/x86/kernel/setup.c 2010-08-26 19:47:12.000000000 -0400
13678+++ linux-2.6.32.24/arch/x86/kernel/setup.c 2010-10-23 19:59:19.000000000 -0400 13469+++ linux-2.6.35.7/arch/x86/kernel/setup.c 2010-09-17 20:12:09.000000000 -0400
13679@@ -782,14 +782,14 @@ void __init setup_arch(char **cmdline_p) 13470@@ -704,7 +704,7 @@ static void __init trim_bios_range(void)
13471 * area (640->1Mb) as ram even though it is not.
13472 * take them out.
13473 */
13474- e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1);
13475+ e820_remove_range(ISA_START_ADDRESS, ISA_END_ADDRESS - ISA_START_ADDRESS, E820_RAM, 1);
13476 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
13477 }
13478
13479@@ -791,14 +791,14 @@ void __init setup_arch(char **cmdline_p)
13680 13480
13681 if (!boot_params.hdr.root_flags) 13481 if (!boot_params.hdr.root_flags)
13682 root_mountflags &= ~MS_RDONLY; 13482 root_mountflags &= ~MS_RDONLY;
@@ -13696,12 +13496,12 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/setup.c linux-2.6.32.24/arch/x86/kern
13696 data_resource.end = virt_to_phys(_edata)-1; 13496 data_resource.end = virt_to_phys(_edata)-1;
13697 bss_resource.start = virt_to_phys(&__bss_start); 13497 bss_resource.start = virt_to_phys(&__bss_start);
13698 bss_resource.end = virt_to_phys(&__bss_stop)-1; 13498 bss_resource.end = virt_to_phys(&__bss_stop)-1;
13699diff -urNp linux-2.6.32.24/arch/x86/kernel/setup_percpu.c linux-2.6.32.24/arch/x86/kernel/setup_percpu.c 13499diff -urNp linux-2.6.35.7/arch/x86/kernel/setup_percpu.c linux-2.6.35.7/arch/x86/kernel/setup_percpu.c
13700--- linux-2.6.32.24/arch/x86/kernel/setup_percpu.c 2010-08-13 16:24:37.000000000 -0400 13500--- linux-2.6.35.7/arch/x86/kernel/setup_percpu.c 2010-08-26 19:47:12.000000000 -0400
13701+++ linux-2.6.32.24/arch/x86/kernel/setup_percpu.c 2010-10-23 19:59:24.000000000 -0400 13501+++ linux-2.6.35.7/arch/x86/kernel/setup_percpu.c 2010-10-11 22:41:44.000000000 -0400
13702@@ -25,19 +25,17 @@ 13502@@ -21,19 +21,17 @@
13703 # define DBG(x...) 13503 #include <asm/cpu.h>
13704 #endif 13504 #include <asm/stackprotector.h>
13705 13505
13706-DEFINE_PER_CPU(int, cpu_number); 13506-DEFINE_PER_CPU(int, cpu_number);
13707+#ifdef CONFIG_SMP 13507+#ifdef CONFIG_SMP
@@ -13723,7 +13523,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/setup_percpu.c linux-2.6.32.24/arch/x
13723 [0 ... NR_CPUS-1] = BOOT_PERCPU_OFFSET, 13523 [0 ... NR_CPUS-1] = BOOT_PERCPU_OFFSET,
13724 }; 13524 };
13725 EXPORT_SYMBOL(__per_cpu_offset); 13525 EXPORT_SYMBOL(__per_cpu_offset);
13726@@ -159,10 +157,10 @@ static inline void setup_percpu_segment( 13526@@ -161,10 +159,10 @@ static inline void setup_percpu_segment(
13727 { 13527 {
13728 #ifdef CONFIG_X86_32 13528 #ifdef CONFIG_X86_32
13729 struct desc_struct gdt; 13529 struct desc_struct gdt;
@@ -13737,7 +13537,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/setup_percpu.c linux-2.6.32.24/arch/x
13737 write_gdt_entry(get_cpu_gdt_table(cpu), 13537 write_gdt_entry(get_cpu_gdt_table(cpu),
13738 GDT_ENTRY_PERCPU, &gdt, DESCTYPE_S); 13538 GDT_ENTRY_PERCPU, &gdt, DESCTYPE_S);
13739 #endif 13539 #endif
13740@@ -212,6 +210,11 @@ void __init setup_per_cpu_areas(void) 13540@@ -213,6 +211,11 @@ void __init setup_per_cpu_areas(void)
13741 /* alrighty, percpu areas up and running */ 13541 /* alrighty, percpu areas up and running */
13742 delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start; 13542 delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start;
13743 for_each_possible_cpu(cpu) { 13543 for_each_possible_cpu(cpu) {
@@ -13749,8 +13549,8 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/setup_percpu.c linux-2.6.32.24/arch/x
13749 per_cpu_offset(cpu) = delta + pcpu_unit_offsets[cpu]; 13549 per_cpu_offset(cpu) = delta + pcpu_unit_offsets[cpu];
13750 per_cpu(this_cpu_off, cpu) = per_cpu_offset(cpu); 13550 per_cpu(this_cpu_off, cpu) = per_cpu_offset(cpu);
13751 per_cpu(cpu_number, cpu) = cpu; 13551 per_cpu(cpu_number, cpu) = cpu;
13752@@ -239,6 +242,12 @@ void __init setup_per_cpu_areas(void) 13552@@ -249,6 +252,12 @@ void __init setup_per_cpu_areas(void)
13753 early_per_cpu_map(x86_cpu_to_node_map, cpu); 13553 set_cpu_numa_node(cpu, early_cpu_to_node(cpu));
13754 #endif 13554 #endif
13755 #endif 13555 #endif
13756+#ifdef CONFIG_CC_STACKPROTECTOR 13556+#ifdef CONFIG_CC_STACKPROTECTOR
@@ -13760,12 +13560,12 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/setup_percpu.c linux-2.6.32.24/arch/x
13760+#endif 13560+#endif
13761+#endif 13561+#endif
13762 /* 13562 /*
13763 * Up to this point, the boot CPU has been using .data.init 13563 * Up to this point, the boot CPU has been using .init.data
13764 * area. Reload any changed state for the boot CPU. 13564 * area. Reload any changed state for the boot CPU.
13765diff -urNp linux-2.6.32.24/arch/x86/kernel/signal.c linux-2.6.32.24/arch/x86/kernel/signal.c 13565diff -urNp linux-2.6.35.7/arch/x86/kernel/signal.c linux-2.6.35.7/arch/x86/kernel/signal.c
13766--- linux-2.6.32.24/arch/x86/kernel/signal.c 2010-08-13 16:24:37.000000000 -0400 13566--- linux-2.6.35.7/arch/x86/kernel/signal.c 2010-08-26 19:47:12.000000000 -0400
13767+++ linux-2.6.32.24/arch/x86/kernel/signal.c 2010-10-23 19:59:24.000000000 -0400 13567+++ linux-2.6.35.7/arch/x86/kernel/signal.c 2010-10-11 22:41:44.000000000 -0400
13768@@ -197,7 +197,7 @@ static unsigned long align_sigframe(unsi 13568@@ -198,7 +198,7 @@ static unsigned long align_sigframe(unsi
13769 * Align the stack pointer according to the i386 ABI, 13569 * Align the stack pointer according to the i386 ABI,
13770 * i.e. so that on function entry ((sp + 4) & 15) == 0. 13570 * i.e. so that on function entry ((sp + 4) & 15) == 0.
13771 */ 13571 */
@@ -13774,7 +13574,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/signal.c linux-2.6.32.24/arch/x86/ker
13774 #else /* !CONFIG_X86_32 */ 13574 #else /* !CONFIG_X86_32 */
13775 sp = round_down(sp, 16) - 8; 13575 sp = round_down(sp, 16) - 8;
13776 #endif 13576 #endif
13777@@ -248,11 +248,11 @@ get_sigframe(struct k_sigaction *ka, str 13577@@ -249,11 +249,11 @@ get_sigframe(struct k_sigaction *ka, str
13778 * Return an always-bogus address instead so we will die with SIGSEGV. 13578 * Return an always-bogus address instead so we will die with SIGSEGV.
13779 */ 13579 */
13780 if (onsigstack && !likely(on_sig_stack(sp))) 13580 if (onsigstack && !likely(on_sig_stack(sp)))
@@ -13788,7 +13588,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/signal.c linux-2.6.32.24/arch/x86/ker
13788 13588
13789 return (void __user *)sp; 13589 return (void __user *)sp;
13790 } 13590 }
13791@@ -307,9 +307,9 @@ __setup_frame(int sig, struct k_sigactio 13591@@ -308,9 +308,9 @@ __setup_frame(int sig, struct k_sigactio
13792 } 13592 }
13793 13593
13794 if (current->mm->context.vdso) 13594 if (current->mm->context.vdso)
@@ -13800,7 +13600,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/signal.c linux-2.6.32.24/arch/x86/ker
13800 if (ka->sa.sa_flags & SA_RESTORER) 13600 if (ka->sa.sa_flags & SA_RESTORER)
13801 restorer = ka->sa.sa_restorer; 13601 restorer = ka->sa.sa_restorer;
13802 13602
13803@@ -323,7 +323,7 @@ __setup_frame(int sig, struct k_sigactio 13603@@ -324,7 +324,7 @@ __setup_frame(int sig, struct k_sigactio
13804 * reasons and because gdb uses it as a signature to notice 13604 * reasons and because gdb uses it as a signature to notice
13805 * signal handler stack frames. 13605 * signal handler stack frames.
13806 */ 13606 */
@@ -13809,7 +13609,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/signal.c linux-2.6.32.24/arch/x86/ker
13809 13609
13810 if (err) 13610 if (err)
13811 return -EFAULT; 13611 return -EFAULT;
13812@@ -377,7 +377,10 @@ static int __setup_rt_frame(int sig, str 13612@@ -378,7 +378,10 @@ static int __setup_rt_frame(int sig, str
13813 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); 13613 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
13814 13614
13815 /* Set up to return from userspace. */ 13615 /* Set up to return from userspace. */
@@ -13821,7 +13621,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/signal.c linux-2.6.32.24/arch/x86/ker
13821 if (ka->sa.sa_flags & SA_RESTORER) 13621 if (ka->sa.sa_flags & SA_RESTORER)
13822 restorer = ka->sa.sa_restorer; 13622 restorer = ka->sa.sa_restorer;
13823 put_user_ex(restorer, &frame->pretcode); 13623 put_user_ex(restorer, &frame->pretcode);
13824@@ -389,7 +392,7 @@ static int __setup_rt_frame(int sig, str 13624@@ -390,7 +393,7 @@ static int __setup_rt_frame(int sig, str
13825 * reasons and because gdb uses it as a signature to notice 13625 * reasons and because gdb uses it as a signature to notice
13826 * signal handler stack frames. 13626 * signal handler stack frames.
13827 */ 13627 */
@@ -13830,7 +13630,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/signal.c linux-2.6.32.24/arch/x86/ker
13830 } put_user_catch(err); 13630 } put_user_catch(err);
13831 13631
13832 if (err) 13632 if (err)
13833@@ -789,7 +792,7 @@ static void do_signal(struct pt_regs *re 13633@@ -780,7 +783,7 @@ static void do_signal(struct pt_regs *re
13834 * X86_32: vm86 regs switched out by assembly code before reaching 13634 * X86_32: vm86 regs switched out by assembly code before reaching
13835 * here, so testing against kernel CS suffices. 13635 * here, so testing against kernel CS suffices.
13836 */ 13636 */
@@ -13839,29 +13639,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/signal.c linux-2.6.32.24/arch/x86/ker
13839 return; 13639 return;
13840 13640
13841 if (current_thread_info()->status & TS_RESTORE_SIGMASK) 13641 if (current_thread_info()->status & TS_RESTORE_SIGMASK)
13842diff -urNp linux-2.6.32.24/arch/x86/kernel/smpboot.c linux-2.6.32.24/arch/x86/kernel/smpboot.c 13642diff -urNp linux-2.6.35.7/arch/x86/kernel/smpboot.c linux-2.6.35.7/arch/x86/kernel/smpboot.c
13843--- linux-2.6.32.24/arch/x86/kernel/smpboot.c 2010-08-29 21:08:20.000000000 -0400 13643--- linux-2.6.35.7/arch/x86/kernel/smpboot.c 2010-08-26 19:47:12.000000000 -0400
13844+++ linux-2.6.32.24/arch/x86/kernel/smpboot.c 2010-10-23 19:59:19.000000000 -0400 13644+++ linux-2.6.35.7/arch/x86/kernel/smpboot.c 2010-09-17 20:12:09.000000000 -0400
13845@@ -95,14 +95,14 @@ static DEFINE_PER_CPU(struct task_struct 13645@@ -780,7 +780,11 @@ do_rest:
13846 */
13847 static DEFINE_MUTEX(x86_cpu_hotplug_driver_mutex);
13848
13849-void cpu_hotplug_driver_lock()
13850+void cpu_hotplug_driver_lock(void)
13851 {
13852- mutex_lock(&x86_cpu_hotplug_driver_mutex);
13853+ mutex_lock(&x86_cpu_hotplug_driver_mutex);
13854 }
13855
13856-void cpu_hotplug_driver_unlock()
13857+void cpu_hotplug_driver_unlock(void)
13858 {
13859- mutex_unlock(&x86_cpu_hotplug_driver_mutex);
13860+ mutex_unlock(&x86_cpu_hotplug_driver_mutex);
13861 }
13862
13863 ssize_t arch_cpu_probe(const char *buf, size_t count) { return -1; }
13864@@ -748,7 +748,11 @@ do_rest:
13865 (unsigned long)task_stack_page(c_idle.idle) - 13646 (unsigned long)task_stack_page(c_idle.idle) -
13866 KERNEL_STACK_OFFSET + THREAD_SIZE; 13647 KERNEL_STACK_OFFSET + THREAD_SIZE;
13867 #endif 13648 #endif
@@ -13873,7 +13654,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/smpboot.c linux-2.6.32.24/arch/x86/ke
13873 initial_code = (unsigned long)start_secondary; 13654 initial_code = (unsigned long)start_secondary;
13874 stack_start.sp = (void *) c_idle.idle->thread.sp; 13655 stack_start.sp = (void *) c_idle.idle->thread.sp;
13875 13656
13876@@ -885,6 +889,12 @@ int __cpuinit native_cpu_up(unsigned int 13657@@ -920,6 +924,12 @@ int __cpuinit native_cpu_up(unsigned int
13877 13658
13878 per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; 13659 per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
13879 13660
@@ -13886,9 +13667,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/smpboot.c linux-2.6.32.24/arch/x86/ke
13886 #ifdef CONFIG_X86_32 13667 #ifdef CONFIG_X86_32
13887 /* init low mem mapping */ 13668 /* init low mem mapping */
13888 clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY, 13669 clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY,
13889diff -urNp linux-2.6.32.24/arch/x86/kernel/step.c linux-2.6.32.24/arch/x86/kernel/step.c 13670diff -urNp linux-2.6.35.7/arch/x86/kernel/step.c linux-2.6.35.7/arch/x86/kernel/step.c
13890--- linux-2.6.32.24/arch/x86/kernel/step.c 2010-08-13 16:24:37.000000000 -0400 13671--- linux-2.6.35.7/arch/x86/kernel/step.c 2010-08-26 19:47:12.000000000 -0400
13891+++ linux-2.6.32.24/arch/x86/kernel/step.c 2010-10-23 19:59:19.000000000 -0400 13672+++ linux-2.6.35.7/arch/x86/kernel/step.c 2010-09-17 20:12:09.000000000 -0400
13892@@ -27,10 +27,10 @@ unsigned long convert_ip_to_linear(struc 13673@@ -27,10 +27,10 @@ unsigned long convert_ip_to_linear(struc
13893 struct desc_struct *desc; 13674 struct desc_struct *desc;
13894 unsigned long base; 13675 unsigned long base;
@@ -13921,18 +13702,18 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/step.c linux-2.6.32.24/arch/x86/kerne
13921 /* 32-bit mode: register increment */ 13702 /* 32-bit mode: register increment */
13922 return 0; 13703 return 0;
13923 /* 64-bit mode: REX prefix */ 13704 /* 64-bit mode: REX prefix */
13924diff -urNp linux-2.6.32.24/arch/x86/kernel/syscall_table_32.S linux-2.6.32.24/arch/x86/kernel/syscall_table_32.S 13705diff -urNp linux-2.6.35.7/arch/x86/kernel/syscall_table_32.S linux-2.6.35.7/arch/x86/kernel/syscall_table_32.S
13925--- linux-2.6.32.24/arch/x86/kernel/syscall_table_32.S 2010-08-13 16:24:37.000000000 -0400 13706--- linux-2.6.35.7/arch/x86/kernel/syscall_table_32.S 2010-08-26 19:47:12.000000000 -0400
13926+++ linux-2.6.32.24/arch/x86/kernel/syscall_table_32.S 2010-10-23 19:59:19.000000000 -0400 13707+++ linux-2.6.35.7/arch/x86/kernel/syscall_table_32.S 2010-09-17 20:12:09.000000000 -0400
13927@@ -1,3 +1,4 @@ 13708@@ -1,3 +1,4 @@
13928+.section .rodata,"a",@progbits 13709+.section .rodata,"a",@progbits
13929 ENTRY(sys_call_table) 13710 ENTRY(sys_call_table)
13930 .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */ 13711 .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
13931 .long sys_exit 13712 .long sys_exit
13932diff -urNp linux-2.6.32.24/arch/x86/kernel/sys_i386_32.c linux-2.6.32.24/arch/x86/kernel/sys_i386_32.c 13713diff -urNp linux-2.6.35.7/arch/x86/kernel/sys_i386_32.c linux-2.6.35.7/arch/x86/kernel/sys_i386_32.c
13933--- linux-2.6.32.24/arch/x86/kernel/sys_i386_32.c 2010-08-13 16:24:37.000000000 -0400 13714--- linux-2.6.35.7/arch/x86/kernel/sys_i386_32.c 2010-08-26 19:47:12.000000000 -0400
13934+++ linux-2.6.32.24/arch/x86/kernel/sys_i386_32.c 2010-10-23 19:59:19.000000000 -0400 13715+++ linux-2.6.35.7/arch/x86/kernel/sys_i386_32.c 2010-09-26 22:02:10.000000000 -0400
13935@@ -24,6 +24,21 @@ 13716@@ -24,6 +24,228 @@
13936 13717
13937 #include <asm/syscalls.h> 13718 #include <asm/syscalls.h>
13938 13719
@@ -13951,13 +13732,6 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/sys_i386_32.c linux-2.6.32.24/arch/x8
13951+ return 0; 13732+ return 0;
13952+} 13733+}
13953+ 13734+
13954 /*
13955 * Perform the select(nd, in, out, ex, tv) and mmap() system
13956 * calls. Linux/i386 didn't use to be able to handle more than
13957@@ -58,6 +73,212 @@ out:
13958 return err;
13959 }
13960
13961+unsigned long 13735+unsigned long
13962+arch_get_unmapped_area(struct file *filp, unsigned long addr, 13736+arch_get_unmapped_area(struct file *filp, unsigned long addr,
13963+ unsigned long len, unsigned long pgoff, unsigned long flags) 13737+ unsigned long len, unsigned long pgoff, unsigned long flags)
@@ -13999,7 +13773,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/sys_i386_32.c linux-2.6.32.24/arch/x8
13999+ } 13773+ }
14000+ 13774+
14001+#ifdef CONFIG_PAX_PAGEEXEC 13775+#ifdef CONFIG_PAX_PAGEEXEC
14002+ if (!nx_enabled && (mm->pax_flags & MF_PAX_PAGEEXEC) && (flags & MAP_EXECUTABLE) && start_addr >= mm->mmap_base) { 13776+ if (!(__supported_pte_mask & _PAGE_NX) && (mm->pax_flags & MF_PAX_PAGEEXEC) && (flags & MAP_EXECUTABLE) && start_addr >= mm->mmap_base) {
14003+ start_addr = 0x00110000UL; 13777+ start_addr = 0x00110000UL;
14004+ 13778+
14005+#ifdef CONFIG_PAX_RANDMMAP 13779+#ifdef CONFIG_PAX_RANDMMAP
@@ -14072,7 +13846,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/sys_i386_32.c linux-2.6.32.24/arch/x8
14072+ return addr; 13846+ return addr;
14073+ 13847+
14074+#ifdef CONFIG_PAX_PAGEEXEC 13848+#ifdef CONFIG_PAX_PAGEEXEC
14075+ if (!nx_enabled && (mm->pax_flags & MF_PAX_PAGEEXEC) && (flags & MAP_EXECUTABLE)) 13849+ if (!(__supported_pte_mask & _PAGE_NX) && (mm->pax_flags & MF_PAX_PAGEEXEC) && (flags & MAP_EXECUTABLE))
14076+ goto bottomup; 13850+ goto bottomup;
14077+#endif 13851+#endif
14078+ 13852+
@@ -14164,30 +13938,13 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/sys_i386_32.c linux-2.6.32.24/arch/x8
14164+ 13938+
14165+ return addr; 13939+ return addr;
14166+} 13940+}
14167 13941+
14168 struct sel_arg_struct { 13942 /*
14169 unsigned long n; 13943 * Do a system call from kernel instead of calling sys_execve so we
14170@@ -93,7 +314,7 @@ asmlinkage int sys_ipc(uint call, int fi 13944 * end up with proper pt_regs.
14171 return sys_semtimedop(first, (struct sembuf __user *)ptr, second, NULL); 13945diff -urNp linux-2.6.35.7/arch/x86/kernel/sys_x86_64.c linux-2.6.35.7/arch/x86/kernel/sys_x86_64.c
14172 case SEMTIMEDOP: 13946--- linux-2.6.35.7/arch/x86/kernel/sys_x86_64.c 2010-08-26 19:47:12.000000000 -0400
14173 return sys_semtimedop(first, (struct sembuf __user *)ptr, second, 13947+++ linux-2.6.35.7/arch/x86/kernel/sys_x86_64.c 2010-09-17 20:12:09.000000000 -0400
14174- (const struct timespec __user *)fifth);
14175+ (__force const struct timespec __user *)fifth);
14176
14177 case SEMGET:
14178 return sys_semget(first, second, third);
14179@@ -140,7 +361,7 @@ asmlinkage int sys_ipc(uint call, int fi
14180 ret = do_shmat(first, (char __user *) ptr, second, &raddr);
14181 if (ret)
14182 return ret;
14183- return put_user(raddr, (ulong __user *) third);
14184+ return put_user(raddr, (__force ulong __user *) third);
14185 }
14186 case 1: /* iBCS2 emulator entry point */
14187 if (!segment_eq(get_fs(), get_ds()))
14188diff -urNp linux-2.6.32.24/arch/x86/kernel/sys_x86_64.c linux-2.6.32.24/arch/x86/kernel/sys_x86_64.c
14189--- linux-2.6.32.24/arch/x86/kernel/sys_x86_64.c 2010-08-13 16:24:37.000000000 -0400
14190+++ linux-2.6.32.24/arch/x86/kernel/sys_x86_64.c 2010-10-23 19:59:19.000000000 -0400
14191@@ -32,8 +32,8 @@ out: 13948@@ -32,8 +32,8 @@ out:
14192 return error; 13949 return error;
14193 } 13950 }
@@ -14309,9 +14066,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/sys_x86_64.c linux-2.6.32.24/arch/x86
14309 mm->cached_hole_size = ~0UL; 14066 mm->cached_hole_size = ~0UL;
14310 14067
14311 return addr; 14068 return addr;
14312diff -urNp linux-2.6.32.24/arch/x86/kernel/time.c linux-2.6.32.24/arch/x86/kernel/time.c 14069diff -urNp linux-2.6.35.7/arch/x86/kernel/time.c linux-2.6.35.7/arch/x86/kernel/time.c
14313--- linux-2.6.32.24/arch/x86/kernel/time.c 2010-08-13 16:24:37.000000000 -0400 14070--- linux-2.6.35.7/arch/x86/kernel/time.c 2010-08-26 19:47:12.000000000 -0400
14314+++ linux-2.6.32.24/arch/x86/kernel/time.c 2010-10-23 19:59:19.000000000 -0400 14071+++ linux-2.6.35.7/arch/x86/kernel/time.c 2010-09-17 20:12:09.000000000 -0400
14315@@ -26,17 +26,13 @@ 14072@@ -26,17 +26,13 @@
14316 int timer_ack; 14073 int timer_ack;
14317 #endif 14074 #endif
@@ -14350,9 +14107,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/time.c linux-2.6.32.24/arch/x86/kerne
14350 } 14107 }
14351 return pc; 14108 return pc;
14352 } 14109 }
14353diff -urNp linux-2.6.32.24/arch/x86/kernel/tls.c linux-2.6.32.24/arch/x86/kernel/tls.c 14110diff -urNp linux-2.6.35.7/arch/x86/kernel/tls.c linux-2.6.35.7/arch/x86/kernel/tls.c
14354--- linux-2.6.32.24/arch/x86/kernel/tls.c 2010-08-13 16:24:37.000000000 -0400 14111--- linux-2.6.35.7/arch/x86/kernel/tls.c 2010-08-26 19:47:12.000000000 -0400
14355+++ linux-2.6.32.24/arch/x86/kernel/tls.c 2010-10-23 19:59:19.000000000 -0400 14112+++ linux-2.6.35.7/arch/x86/kernel/tls.c 2010-09-17 20:12:09.000000000 -0400
14356@@ -85,6 +85,11 @@ int do_set_thread_area(struct task_struc 14113@@ -85,6 +85,11 @@ int do_set_thread_area(struct task_struc
14357 if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX) 14114 if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
14358 return -EINVAL; 14115 return -EINVAL;
@@ -14365,9 +14122,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/tls.c linux-2.6.32.24/arch/x86/kernel
14365 set_tls_desc(p, idx, &info, 1); 14122 set_tls_desc(p, idx, &info, 1);
14366 14123
14367 return 0; 14124 return 0;
14368diff -urNp linux-2.6.32.24/arch/x86/kernel/trampoline_32.S linux-2.6.32.24/arch/x86/kernel/trampoline_32.S 14125diff -urNp linux-2.6.35.7/arch/x86/kernel/trampoline_32.S linux-2.6.35.7/arch/x86/kernel/trampoline_32.S
14369--- linux-2.6.32.24/arch/x86/kernel/trampoline_32.S 2010-08-13 16:24:37.000000000 -0400 14126--- linux-2.6.35.7/arch/x86/kernel/trampoline_32.S 2010-08-26 19:47:12.000000000 -0400
14370+++ linux-2.6.32.24/arch/x86/kernel/trampoline_32.S 2010-10-23 19:59:19.000000000 -0400 14127+++ linux-2.6.35.7/arch/x86/kernel/trampoline_32.S 2010-09-17 20:12:09.000000000 -0400
14371@@ -32,6 +32,12 @@ 14128@@ -32,6 +32,12 @@
14372 #include <asm/segment.h> 14129 #include <asm/segment.h>
14373 #include <asm/page_types.h> 14130 #include <asm/page_types.h>
@@ -14390,9 +14147,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/trampoline_32.S linux-2.6.32.24/arch/
14390 14147
14391 # These need to be in the same 64K segment as the above; 14148 # These need to be in the same 64K segment as the above;
14392 # hence we don't use the boot_gdt_descr defined in head.S 14149 # hence we don't use the boot_gdt_descr defined in head.S
14393diff -urNp linux-2.6.32.24/arch/x86/kernel/trampoline_64.S linux-2.6.32.24/arch/x86/kernel/trampoline_64.S 14150diff -urNp linux-2.6.35.7/arch/x86/kernel/trampoline_64.S linux-2.6.35.7/arch/x86/kernel/trampoline_64.S
14394--- linux-2.6.32.24/arch/x86/kernel/trampoline_64.S 2010-08-13 16:24:37.000000000 -0400 14151--- linux-2.6.35.7/arch/x86/kernel/trampoline_64.S 2010-08-26 19:47:12.000000000 -0400
14395+++ linux-2.6.32.24/arch/x86/kernel/trampoline_64.S 2010-10-23 19:59:24.000000000 -0400 14152+++ linux-2.6.35.7/arch/x86/kernel/trampoline_64.S 2010-10-10 15:54:54.000000000 -0400
14396@@ -91,7 +91,7 @@ startup_32: 14153@@ -91,7 +91,7 @@ startup_32:
14397 movl $__KERNEL_DS, %eax # Initialize the %ds segment register 14154 movl $__KERNEL_DS, %eax # Initialize the %ds segment register
14398 movl %eax, %ds 14155 movl %eax, %ds
@@ -14411,10 +14168,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/trampoline_64.S linux-2.6.32.24/arch/
14411 .long tgdt - r_base 14168 .long tgdt - r_base
14412 .short 0 14169 .short 0
14413 .quad 0x00cf9b000000ffff # __KERNEL32_CS 14170 .quad 0x00cf9b000000ffff # __KERNEL32_CS
14414diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kernel/traps.c 14171diff -urNp linux-2.6.35.7/arch/x86/kernel/traps.c linux-2.6.35.7/arch/x86/kernel/traps.c
14415--- linux-2.6.32.24/arch/x86/kernel/traps.c 2010-08-13 16:24:37.000000000 -0400 14172--- linux-2.6.35.7/arch/x86/kernel/traps.c 2010-08-26 19:47:12.000000000 -0400
14416+++ linux-2.6.32.24/arch/x86/kernel/traps.c 2010-10-23 19:59:19.000000000 -0400 14173+++ linux-2.6.35.7/arch/x86/kernel/traps.c 2010-09-17 20:12:09.000000000 -0400
14417@@ -69,12 +69,6 @@ asmlinkage int system_call(void); 14174@@ -70,12 +70,6 @@ asmlinkage int system_call(void);
14418 14175
14419 /* Do we ignore FPU interrupts ? */ 14176 /* Do we ignore FPU interrupts ? */
14420 char ignore_fpu_irq; 14177 char ignore_fpu_irq;
@@ -14427,15 +14184,8 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kern
14427 #endif 14184 #endif
14428 14185
14429 DECLARE_BITMAP(used_vectors, NR_VECTORS); 14186 DECLARE_BITMAP(used_vectors, NR_VECTORS);
14430@@ -112,19 +106,19 @@ static inline void preempt_conditional_c 14187@@ -110,13 +104,13 @@ static inline void preempt_conditional_c
14431 static inline void
14432 die_if_kernel(const char *str, struct pt_regs *regs, long err)
14433 {
14434- if (!user_mode_vm(regs))
14435+ if (!user_mode(regs))
14436 die(str, regs, err);
14437 } 14188 }
14438 #endif
14439 14189
14440 static void __kprobes 14190 static void __kprobes
14441-do_trap(int trapnr, int signr, char *str, struct pt_regs *regs, 14191-do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
@@ -14450,7 +14200,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kern
14450 /* 14200 /*
14451 * traps 0, 1, 3, 4, and 5 should be forwarded to vm86. 14201 * traps 0, 1, 3, 4, and 5 should be forwarded to vm86.
14452 * On nmi (interrupt 2), do_trap should not be called. 14202 * On nmi (interrupt 2), do_trap should not be called.
14453@@ -135,7 +129,7 @@ do_trap(int trapnr, int signr, char *str 14203@@ -127,7 +121,7 @@ do_trap(int trapnr, int signr, char *str
14454 } 14204 }
14455 #endif 14205 #endif
14456 14206
@@ -14459,7 +14209,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kern
14459 goto kernel_trap; 14209 goto kernel_trap;
14460 14210
14461 #ifdef CONFIG_X86_32 14211 #ifdef CONFIG_X86_32
14462@@ -158,7 +152,7 @@ trap_signal: 14212@@ -150,7 +144,7 @@ trap_signal:
14463 printk_ratelimit()) { 14213 printk_ratelimit()) {
14464 printk(KERN_INFO 14214 printk(KERN_INFO
14465 "%s[%d] trap %s ip:%lx sp:%lx error:%lx", 14215 "%s[%d] trap %s ip:%lx sp:%lx error:%lx",
@@ -14468,7 +14218,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kern
14468 regs->ip, regs->sp, error_code); 14218 regs->ip, regs->sp, error_code);
14469 print_vma_addr(" in ", regs->ip); 14219 print_vma_addr(" in ", regs->ip);
14470 printk("\n"); 14220 printk("\n");
14471@@ -175,8 +169,20 @@ kernel_trap: 14221@@ -167,8 +161,20 @@ kernel_trap:
14472 if (!fixup_exception(regs)) { 14222 if (!fixup_exception(regs)) {
14473 tsk->thread.error_code = error_code; 14223 tsk->thread.error_code = error_code;
14474 tsk->thread.trap_no = trapnr; 14224 tsk->thread.trap_no = trapnr;
@@ -14489,7 +14239,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kern
14489 return; 14239 return;
14490 14240
14491 #ifdef CONFIG_X86_32 14241 #ifdef CONFIG_X86_32
14492@@ -265,14 +271,30 @@ do_general_protection(struct pt_regs *re 14242@@ -257,14 +263,30 @@ do_general_protection(struct pt_regs *re
14493 conditional_sti(regs); 14243 conditional_sti(regs);
14494 14244
14495 #ifdef CONFIG_X86_32 14245 #ifdef CONFIG_X86_32
@@ -14504,7 +14254,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kern
14504 goto gp_in_kernel; 14254 goto gp_in_kernel;
14505 14255
14506+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_PAGEEXEC) 14256+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_PAGEEXEC)
14507+ if (!nx_enabled && tsk->mm && (tsk->mm->pax_flags & MF_PAX_PAGEEXEC)) { 14257+ if (!(__supported_pte_mask & _PAGE_NX) && tsk->mm && (tsk->mm->pax_flags & MF_PAX_PAGEEXEC)) {
14508+ struct mm_struct *mm = tsk->mm; 14258+ struct mm_struct *mm = tsk->mm;
14509+ unsigned long limit; 14259+ unsigned long limit;
14510+ 14260+
@@ -14522,7 +14272,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kern
14522 tsk->thread.error_code = error_code; 14272 tsk->thread.error_code = error_code;
14523 tsk->thread.trap_no = 13; 14273 tsk->thread.trap_no = 13;
14524 14274
14525@@ -305,6 +327,13 @@ gp_in_kernel: 14275@@ -297,6 +319,13 @@ gp_in_kernel:
14526 if (notify_die(DIE_GPF, "general protection fault", regs, 14276 if (notify_die(DIE_GPF, "general protection fault", regs,
14527 error_code, 13, SIGSEGV) == NOTIFY_STOP) 14277 error_code, 13, SIGSEGV) == NOTIFY_STOP)
14528 return; 14278 return;
@@ -14536,36 +14286,36 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/traps.c linux-2.6.32.24/arch/x86/kern
14536 die("general protection fault", regs, error_code); 14286 die("general protection fault", regs, error_code);
14537 } 14287 }
14538 14288
14539@@ -558,7 +587,7 @@ dotraplinkage void __kprobes do_debug(st 14289@@ -565,7 +594,7 @@ dotraplinkage void __kprobes do_debug(st
14540 } 14290 /* It's safe to allow irq's after DR6 has been saved */
14541 14291 preempt_conditional_sti(regs);
14542 #ifdef CONFIG_X86_32
14543- if (regs->flags & X86_VM_MASK)
14544+ if (v8086_mode(regs))
14545 goto debug_vm86;
14546 #endif
14547
14548@@ -570,7 +599,7 @@ dotraplinkage void __kprobes do_debug(st
14549 * kernel space (but re-enable TF when returning to user mode).
14550 */
14551 if (condition & DR_STEP) {
14552- if (!user_mode(regs))
14553+ if (!user_mode_novm(regs))
14554 goto clear_TF_reenable;
14555 }
14556 14292
14557@@ -757,7 +786,7 @@ do_simd_coprocessor_error(struct pt_regs
14558 * Handle strange cache flush from user space exception
14559 * in all other cases. This is undocumented behaviour.
14560 */
14561- if (regs->flags & X86_VM_MASK) { 14293- if (regs->flags & X86_VM_MASK) {
14562+ if (v8086_mode(regs)) { 14294+ if (v8086_mode(regs)) {
14563 handle_vm86_fault((struct kernel_vm86_regs *)regs, error_code); 14295 handle_vm86_trap((struct kernel_vm86_regs *) regs,
14296 error_code, 1);
14564 return; 14297 return;
14565 } 14298@@ -578,7 +607,7 @@ dotraplinkage void __kprobes do_debug(st
14566diff -urNp linux-2.6.32.24/arch/x86/kernel/tsc.c linux-2.6.32.24/arch/x86/kernel/tsc.c 14299 * We already checked v86 mode above, so we can check for kernel mode
14567--- linux-2.6.32.24/arch/x86/kernel/tsc.c 2010-09-20 17:26:42.000000000 -0400 14300 * by just checking the CPL of CS.
14568+++ linux-2.6.32.24/arch/x86/kernel/tsc.c 2010-10-23 19:59:19.000000000 -0400 14301 */
14302- if ((dr6 & DR_STEP) && !user_mode(regs)) {
14303+ if ((dr6 & DR_STEP) && !user_mode_novm(regs)) {
14304 tsk->thread.debugreg6 &= ~DR_STEP;
14305 set_tsk_thread_flag(tsk, TIF_SINGLESTEP);
14306 regs->flags &= ~X86_EFLAGS_TF;
14307@@ -607,7 +636,7 @@ void math_error(struct pt_regs *regs, in
14308 return;
14309 conditional_sti(regs);
14310
14311- if (!user_mode_vm(regs))
14312+ if (!user_mode(regs))
14313 {
14314 if (!fixup_exception(regs)) {
14315 task->thread.error_code = error_code;
14316diff -urNp linux-2.6.35.7/arch/x86/kernel/tsc.c linux-2.6.35.7/arch/x86/kernel/tsc.c
14317--- linux-2.6.35.7/arch/x86/kernel/tsc.c 2010-09-20 17:33:09.000000000 -0400
14318+++ linux-2.6.35.7/arch/x86/kernel/tsc.c 2010-09-20 17:33:32.000000000 -0400
14569@@ -833,7 +833,7 @@ static struct dmi_system_id __initdata b 14319@@ -833,7 +833,7 @@ static struct dmi_system_id __initdata b
14570 DMI_MATCH(DMI_BOARD_NAME, "2635FA0"), 14320 DMI_MATCH(DMI_BOARD_NAME, "2635FA0"),
14571 }, 14321 },
@@ -14575,9 +14325,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/tsc.c linux-2.6.32.24/arch/x86/kernel
14575 }; 14325 };
14576 14326
14577 static void __init check_system_tsc_reliable(void) 14327 static void __init check_system_tsc_reliable(void)
14578diff -urNp linux-2.6.32.24/arch/x86/kernel/vm86_32.c linux-2.6.32.24/arch/x86/kernel/vm86_32.c 14328diff -urNp linux-2.6.35.7/arch/x86/kernel/vm86_32.c linux-2.6.35.7/arch/x86/kernel/vm86_32.c
14579--- linux-2.6.32.24/arch/x86/kernel/vm86_32.c 2010-08-13 16:24:37.000000000 -0400 14329--- linux-2.6.35.7/arch/x86/kernel/vm86_32.c 2010-08-26 19:47:12.000000000 -0400
14580+++ linux-2.6.32.24/arch/x86/kernel/vm86_32.c 2010-10-23 19:59:19.000000000 -0400 14330+++ linux-2.6.35.7/arch/x86/kernel/vm86_32.c 2010-09-17 20:12:37.000000000 -0400
14581@@ -41,6 +41,7 @@ 14331@@ -41,6 +41,7 @@
14582 #include <linux/ptrace.h> 14332 #include <linux/ptrace.h>
14583 #include <linux/audit.h> 14333 #include <linux/audit.h>
@@ -14595,7 +14345,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vm86_32.c linux-2.6.32.24/arch/x86/ke
14595 current->thread.sp0 = current->thread.saved_sp0; 14345 current->thread.sp0 = current->thread.saved_sp0;
14596 current->thread.sysenter_cs = __KERNEL_CS; 14346 current->thread.sysenter_cs = __KERNEL_CS;
14597 load_sp0(tss, &current->thread); 14347 load_sp0(tss, &current->thread);
14598@@ -208,6 +209,13 @@ int sys_vm86old(struct pt_regs *regs) 14348@@ -207,6 +208,13 @@ int sys_vm86old(struct vm86_struct __use
14599 struct task_struct *tsk; 14349 struct task_struct *tsk;
14600 int tmp, ret = -EPERM; 14350 int tmp, ret = -EPERM;
14601 14351
@@ -14609,7 +14359,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vm86_32.c linux-2.6.32.24/arch/x86/ke
14609 tsk = current; 14359 tsk = current;
14610 if (tsk->thread.saved_sp0) 14360 if (tsk->thread.saved_sp0)
14611 goto out; 14361 goto out;
14612@@ -238,6 +246,14 @@ int sys_vm86(struct pt_regs *regs) 14362@@ -237,6 +245,14 @@ int sys_vm86(unsigned long cmd, unsigned
14613 int tmp, ret; 14363 int tmp, ret;
14614 struct vm86plus_struct __user *v86; 14364 struct vm86plus_struct __user *v86;
14615 14365
@@ -14622,9 +14372,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vm86_32.c linux-2.6.32.24/arch/x86/ke
14622+#endif 14372+#endif
14623+ 14373+
14624 tsk = current; 14374 tsk = current;
14625 switch (regs->bx) { 14375 switch (cmd) {
14626 case VM86_REQUEST_IRQ: 14376 case VM86_REQUEST_IRQ:
14627@@ -324,7 +340,7 @@ static void do_sys_vm86(struct kernel_vm 14377@@ -323,7 +339,7 @@ static void do_sys_vm86(struct kernel_vm
14628 tsk->thread.saved_fs = info->regs32->fs; 14378 tsk->thread.saved_fs = info->regs32->fs;
14629 tsk->thread.saved_gs = get_user_gs(info->regs32); 14379 tsk->thread.saved_gs = get_user_gs(info->regs32);
14630 14380
@@ -14633,7 +14383,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vm86_32.c linux-2.6.32.24/arch/x86/ke
14633 tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0; 14383 tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0;
14634 if (cpu_has_sep) 14384 if (cpu_has_sep)
14635 tsk->thread.sysenter_cs = 0; 14385 tsk->thread.sysenter_cs = 0;
14636@@ -529,7 +545,7 @@ static void do_int(struct kernel_vm86_re 14386@@ -528,7 +544,7 @@ static void do_int(struct kernel_vm86_re
14637 goto cannot_handle; 14387 goto cannot_handle;
14638 if (i == 0x21 && is_revectored(AH(regs), &KVM86->int21_revectored)) 14388 if (i == 0x21 && is_revectored(AH(regs), &KVM86->int21_revectored))
14639 goto cannot_handle; 14389 goto cannot_handle;
@@ -14642,10 +14392,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vm86_32.c linux-2.6.32.24/arch/x86/ke
14642 if (get_user(segoffs, intr_ptr)) 14392 if (get_user(segoffs, intr_ptr))
14643 goto cannot_handle; 14393 goto cannot_handle;
14644 if ((segoffs >> 16) == BIOSSEG) 14394 if ((segoffs >> 16) == BIOSSEG)
14645diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/kernel/vmi_32.c 14395diff -urNp linux-2.6.35.7/arch/x86/kernel/vmi_32.c linux-2.6.35.7/arch/x86/kernel/vmi_32.c
14646--- linux-2.6.32.24/arch/x86/kernel/vmi_32.c 2010-08-13 16:24:37.000000000 -0400 14396--- linux-2.6.35.7/arch/x86/kernel/vmi_32.c 2010-08-26 19:47:12.000000000 -0400
14647+++ linux-2.6.32.24/arch/x86/kernel/vmi_32.c 2010-10-23 19:59:19.000000000 -0400 14397+++ linux-2.6.35.7/arch/x86/kernel/vmi_32.c 2010-09-17 20:12:09.000000000 -0400
14648@@ -44,12 +44,17 @@ typedef u32 __attribute__((regparm(1))) 14398@@ -46,12 +46,17 @@ typedef u32 __attribute__((regparm(1)))
14649 typedef u64 __attribute__((regparm(2))) (VROMLONGFUNC)(int); 14399 typedef u64 __attribute__((regparm(2))) (VROMLONGFUNC)(int);
14650 14400
14651 #define call_vrom_func(rom,func) \ 14401 #define call_vrom_func(rom,func) \
@@ -14666,7 +14416,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14666 static int disable_pge; 14416 static int disable_pge;
14667 static int disable_pse; 14417 static int disable_pse;
14668 static int disable_sep; 14418 static int disable_sep;
14669@@ -76,10 +81,10 @@ static struct { 14419@@ -78,10 +83,10 @@ static struct {
14670 void (*set_initial_ap_state)(int, int); 14420 void (*set_initial_ap_state)(int, int);
14671 void (*halt)(void); 14421 void (*halt)(void);
14672 void (*set_lazy_mode)(int mode); 14422 void (*set_lazy_mode)(int mode);
@@ -14679,7 +14429,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14679 14429
14680 /* 14430 /*
14681 * VMI patching routines. 14431 * VMI patching routines.
14682@@ -94,7 +99,7 @@ struct vmi_timer_ops vmi_timer_ops; 14432@@ -96,7 +101,7 @@ struct vmi_timer_ops vmi_timer_ops;
14683 static inline void patch_offset(void *insnbuf, 14433 static inline void patch_offset(void *insnbuf,
14684 unsigned long ip, unsigned long dest) 14434 unsigned long ip, unsigned long dest)
14685 { 14435 {
@@ -14688,7 +14438,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14688 } 14438 }
14689 14439
14690 static unsigned patch_internal(int call, unsigned len, void *insnbuf, 14440 static unsigned patch_internal(int call, unsigned len, void *insnbuf,
14691@@ -102,6 +107,7 @@ static unsigned patch_internal(int call, 14441@@ -104,6 +109,7 @@ static unsigned patch_internal(int call,
14692 { 14442 {
14693 u64 reloc; 14443 u64 reloc;
14694 struct vmi_relocation_info *const rel = (struct vmi_relocation_info *)&reloc; 14444 struct vmi_relocation_info *const rel = (struct vmi_relocation_info *)&reloc;
@@ -14696,7 +14446,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14696 reloc = call_vrom_long_func(vmi_rom, get_reloc, call); 14446 reloc = call_vrom_long_func(vmi_rom, get_reloc, call);
14697 switch(rel->type) { 14447 switch(rel->type) {
14698 case VMI_RELOCATION_CALL_REL: 14448 case VMI_RELOCATION_CALL_REL:
14699@@ -404,13 +410,13 @@ static void vmi_set_pud(pud_t *pudp, pud 14449@@ -382,13 +388,13 @@ static void vmi_set_pud(pud_t *pudp, pud
14700 14450
14701 static void vmi_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 14451 static void vmi_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
14702 { 14452 {
@@ -14712,7 +14462,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14712 vmi_ops.set_pte(pte, (pte_t *)pmd, VMI_PAGE_PD); 14462 vmi_ops.set_pte(pte, (pte_t *)pmd, VMI_PAGE_PD);
14713 } 14463 }
14714 #endif 14464 #endif
14715@@ -438,8 +444,8 @@ vmi_startup_ipi_hook(int phys_apicid, un 14465@@ -416,8 +422,8 @@ vmi_startup_ipi_hook(int phys_apicid, un
14716 ap.ss = __KERNEL_DS; 14466 ap.ss = __KERNEL_DS;
14717 ap.esp = (unsigned long) start_esp; 14467 ap.esp = (unsigned long) start_esp;
14718 14468
@@ -14723,7 +14473,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14723 ap.fs = __KERNEL_PERCPU; 14473 ap.fs = __KERNEL_PERCPU;
14724 ap.gs = __KERNEL_STACK_CANARY; 14474 ap.gs = __KERNEL_STACK_CANARY;
14725 14475
14726@@ -486,6 +492,18 @@ static void vmi_leave_lazy_mmu(void) 14476@@ -464,6 +470,18 @@ static void vmi_leave_lazy_mmu(void)
14727 paravirt_leave_lazy_mmu(); 14477 paravirt_leave_lazy_mmu();
14728 } 14478 }
14729 14479
@@ -14742,7 +14492,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14742 static inline int __init check_vmi_rom(struct vrom_header *rom) 14492 static inline int __init check_vmi_rom(struct vrom_header *rom)
14743 { 14493 {
14744 struct pci_header *pci; 14494 struct pci_header *pci;
14745@@ -498,6 +516,10 @@ static inline int __init check_vmi_rom(s 14495@@ -476,6 +494,10 @@ static inline int __init check_vmi_rom(s
14746 return 0; 14496 return 0;
14747 if (rom->vrom_signature != VMI_SIGNATURE) 14497 if (rom->vrom_signature != VMI_SIGNATURE)
14748 return 0; 14498 return 0;
@@ -14753,7 +14503,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14753 if (rom->api_version_maj != VMI_API_REV_MAJOR || 14503 if (rom->api_version_maj != VMI_API_REV_MAJOR ||
14754 rom->api_version_min+1 < VMI_API_REV_MINOR+1) { 14504 rom->api_version_min+1 < VMI_API_REV_MINOR+1) {
14755 printk(KERN_WARNING "VMI: Found mismatched rom version %d.%d\n", 14505 printk(KERN_WARNING "VMI: Found mismatched rom version %d.%d\n",
14756@@ -562,7 +584,7 @@ static inline int __init probe_vmi_rom(v 14506@@ -540,7 +562,7 @@ static inline int __init probe_vmi_rom(v
14757 struct vrom_header *romstart; 14507 struct vrom_header *romstart;
14758 romstart = (struct vrom_header *)isa_bus_to_virt(base); 14508 romstart = (struct vrom_header *)isa_bus_to_virt(base);
14759 if (check_vmi_rom(romstart)) { 14509 if (check_vmi_rom(romstart)) {
@@ -14762,7 +14512,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14762 return 1; 14512 return 1;
14763 } 14513 }
14764 } 14514 }
14765@@ -836,6 +858,11 @@ static inline int __init activate_vmi(vo 14515@@ -816,6 +838,11 @@ static inline int __init activate_vmi(vo
14766 14516
14767 para_fill(pv_irq_ops.safe_halt, Halt); 14517 para_fill(pv_irq_ops.safe_halt, Halt);
14768 14518
@@ -14774,7 +14524,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14774 /* 14524 /*
14775 * Alternative instruction rewriting doesn't happen soon enough 14525 * Alternative instruction rewriting doesn't happen soon enough
14776 * to convert VMI_IRET to a call instead of a jump; so we have 14526 * to convert VMI_IRET to a call instead of a jump; so we have
14777@@ -853,16 +880,16 @@ static inline int __init activate_vmi(vo 14527@@ -833,16 +860,16 @@ static inline int __init activate_vmi(vo
14778 14528
14779 void __init vmi_init(void) 14529 void __init vmi_init(void)
14780 { 14530 {
@@ -14795,7 +14545,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14795 14545
14796 #ifdef CONFIG_X86_IO_APIC 14546 #ifdef CONFIG_X86_IO_APIC
14797 /* This is virtual hardware; timer routing is wired correctly */ 14547 /* This is virtual hardware; timer routing is wired correctly */
14798@@ -874,7 +901,7 @@ void __init vmi_activate(void) 14548@@ -854,7 +881,7 @@ void __init vmi_activate(void)
14799 { 14549 {
14800 unsigned long flags; 14550 unsigned long flags;
14801 14551
@@ -14804,9 +14554,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmi_32.c linux-2.6.32.24/arch/x86/ker
14804 return; 14554 return;
14805 14555
14806 local_irq_save(flags); 14556 local_irq_save(flags);
14807diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S 14557diff -urNp linux-2.6.35.7/arch/x86/kernel/vmlinux.lds.S linux-2.6.35.7/arch/x86/kernel/vmlinux.lds.S
14808--- linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S 2010-08-13 16:24:37.000000000 -0400 14558--- linux-2.6.35.7/arch/x86/kernel/vmlinux.lds.S 2010-08-26 19:47:12.000000000 -0400
14809+++ linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S 2010-10-23 19:59:19.000000000 -0400 14559+++ linux-2.6.35.7/arch/x86/kernel/vmlinux.lds.S 2010-09-17 20:12:09.000000000 -0400
14810@@ -26,6 +26,13 @@ 14560@@ -26,6 +26,13 @@
14811 #include <asm/page_types.h> 14561 #include <asm/page_types.h>
14812 #include <asm/cache.h> 14562 #include <asm/cache.h>
@@ -14821,7 +14571,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
14821 14571
14822 #undef i386 /* in case the preprocessor is a 32bit one */ 14572 #undef i386 /* in case the preprocessor is a 32bit one */
14823 14573
14824@@ -34,40 +41,55 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONF 14574@@ -34,13 +41,13 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONF
14825 #ifdef CONFIG_X86_32 14575 #ifdef CONFIG_X86_32
14826 OUTPUT_ARCH(i386) 14576 OUTPUT_ARCH(i386)
14827 ENTRY(phys_startup_32) 14577 ENTRY(phys_startup_32)
@@ -14834,6 +14584,11 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
14834 14584
14835+jiffies = jiffies_64; 14585+jiffies = jiffies_64;
14836+ 14586+
14587 #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
14588 /*
14589 * On 64-bit, align RODATA to 2MB so that even with CONFIG_DEBUG_RODATA
14590@@ -69,31 +76,46 @@ jiffies_64 = jiffies;
14591
14837 PHDRS { 14592 PHDRS {
14838 text PT_LOAD FLAGS(5); /* R_E */ 14593 text PT_LOAD FLAGS(5); /* R_E */
14839- data PT_LOAD FLAGS(7); /* RWE */ 14594- data PT_LOAD FLAGS(7); /* RWE */
@@ -14887,7 +14642,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
14887 HEAD_TEXT 14642 HEAD_TEXT
14888 #ifdef CONFIG_X86_32 14643 #ifdef CONFIG_X86_32
14889 . = ALIGN(PAGE_SIZE); 14644 . = ALIGN(PAGE_SIZE);
14890@@ -82,28 +104,69 @@ SECTIONS 14645@@ -108,13 +130,50 @@ SECTIONS
14891 IRQENTRY_TEXT 14646 IRQENTRY_TEXT
14892 *(.fixup) 14647 *(.fixup)
14893 *(.gnu.warning) 14648 *(.gnu.warning)
@@ -14897,8 +14652,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
14897 14652
14898- NOTES :text :note 14653- NOTES :text :note
14899+ . += __KERNEL_TEXT_OFFSET; 14654+ . += __KERNEL_TEXT_OFFSET;
14900 14655+
14901- EXCEPTION_TABLE(16) :text = 0x9090
14902+#ifdef CONFIG_X86_32 14656+#ifdef CONFIG_X86_32
14903+ . = ALIGN(PAGE_SIZE); 14657+ . = ALIGN(PAGE_SIZE);
14904+ .vmi.rom : AT(ADDR(.vmi.rom) - LOAD_OFFSET) { 14658+ .vmi.rom : AT(ADDR(.vmi.rom) - LOAD_OFFSET) {
@@ -14937,10 +14691,13 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
14937+ 14691+
14938+ . = ALIGN(PAGE_SIZE); 14692+ . = ALIGN(PAGE_SIZE);
14939+ NOTES :rodata :note 14693+ NOTES :rodata :note
14940+ 14694
14695- EXCEPTION_TABLE(16) :text = 0x9090
14941+ EXCEPTION_TABLE(16) :rodata 14696+ EXCEPTION_TABLE(16) :rodata
14942 14697
14698 X64_ALIGN_DEBUG_RODATA_BEGIN
14943 RO_DATA(PAGE_SIZE) 14699 RO_DATA(PAGE_SIZE)
14700@@ -122,16 +181,20 @@ SECTIONS
14944 14701
14945 /* Data */ 14702 /* Data */
14946 .data : AT(ADDR(.data) - LOAD_OFFSET) { 14703 .data : AT(ADDR(.data) - LOAD_OFFSET) {
@@ -14964,11 +14721,11 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
14964 14721
14965 PAGE_ALIGNED_DATA(PAGE_SIZE) 14722 PAGE_ALIGNED_DATA(PAGE_SIZE)
14966 14723
14967@@ -166,12 +229,6 @@ SECTIONS 14724@@ -194,12 +257,6 @@ SECTIONS
14968 } 14725 }
14969 vgetcpu_mode = VVIRT(.vgetcpu_mode); 14726 vgetcpu_mode = VVIRT(.vgetcpu_mode);
14970 14727
14971- . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 14728- . = ALIGN(L1_CACHE_BYTES);
14972- .jiffies : AT(VLOAD(.jiffies)) { 14729- .jiffies : AT(VLOAD(.jiffies)) {
14973- *(.jiffies) 14730- *(.jiffies)
14974- } 14731- }
@@ -14977,7 +14734,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
14977 .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) { 14734 .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) {
14978 *(.vsyscall_3) 14735 *(.vsyscall_3)
14979 } 14736 }
14980@@ -187,12 +244,19 @@ SECTIONS 14737@@ -215,12 +272,19 @@ SECTIONS
14981 #endif /* CONFIG_X86_64 */ 14738 #endif /* CONFIG_X86_64 */
14982 14739
14983 /* Init code and data - will be freed after init */ 14740 /* Init code and data - will be freed after init */
@@ -15000,7 +14757,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
15000 /* 14757 /*
15001 * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the 14758 * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
15002 * output PHDR, so the next output section - .init.text - should 14759 * output PHDR, so the next output section - .init.text - should
15003@@ -201,12 +265,27 @@ SECTIONS 14760@@ -229,12 +293,27 @@ SECTIONS
15004 PERCPU_VADDR(0, :percpu) 14761 PERCPU_VADDR(0, :percpu)
15005 #endif 14762 #endif
15006 14763
@@ -15016,8 +14773,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
15016+ VMLINUX_SYMBOL(_einittext) = .; 14773+ VMLINUX_SYMBOL(_einittext) = .;
15017+ . = ALIGN(PAGE_SIZE); 14774+ . = ALIGN(PAGE_SIZE);
15018+ } :text.init 14775+ } :text.init
15019 14776+
15020- INIT_DATA_SECTION(16)
15021+ /* 14777+ /*
15022+ * .exit.text is discard at runtime, not link time, to deal with 14778+ * .exit.text is discard at runtime, not link time, to deal with
15023+ * references from .altinstructions and .eh_frame 14779+ * references from .altinstructions and .eh_frame
@@ -15027,13 +14783,14 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
15027+ . = ALIGN(16); 14783+ . = ALIGN(16);
15028+ } :text.exit 14784+ } :text.exit
15029+ . = init_begin + SIZEOF(.init.text) + SIZEOF(.exit.text); 14785+ . = init_begin + SIZEOF(.init.text) + SIZEOF(.exit.text);
15030+ 14786
14787- INIT_DATA_SECTION(16)
15031+ . = ALIGN(PAGE_SIZE); 14788+ . = ALIGN(PAGE_SIZE);
15032+ INIT_DATA_SECTION(16) :init 14789+ INIT_DATA_SECTION(16) :init
15033 14790
15034 .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) { 14791 .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
15035 __x86_cpu_dev_start = .; 14792 __x86_cpu_dev_start = .;
15036@@ -232,19 +311,11 @@ SECTIONS 14793@@ -260,19 +339,11 @@ SECTIONS
15037 *(.altinstr_replacement) 14794 *(.altinstr_replacement)
15038 } 14795 }
15039 14796
@@ -15054,8 +14811,13 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
15054 PERCPU(PAGE_SIZE) 14811 PERCPU(PAGE_SIZE)
15055 #endif 14812 #endif
15056 14813
15057@@ -267,12 +338,6 @@ SECTIONS 14814@@ -291,16 +362,10 @@ SECTIONS
15058 . = ALIGN(PAGE_SIZE); 14815 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
14816 __smp_locks = .;
14817 *(.smp_locks)
14818- . = ALIGN(PAGE_SIZE);
14819 __smp_locks_end = .;
14820+ . = ALIGN(PAGE_SIZE);
15059 } 14821 }
15060 14822
15061-#ifdef CONFIG_X86_64 14823-#ifdef CONFIG_X86_64
@@ -15067,7 +14829,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
15067 /* BSS */ 14829 /* BSS */
15068 . = ALIGN(PAGE_SIZE); 14830 . = ALIGN(PAGE_SIZE);
15069 .bss : AT(ADDR(.bss) - LOAD_OFFSET) { 14831 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
15070@@ -288,6 +353,7 @@ SECTIONS 14832@@ -316,6 +381,7 @@ SECTIONS
15071 __brk_base = .; 14833 __brk_base = .;
15072 . += 64 * 1024; /* 64k alignment slop space */ 14834 . += 64 * 1024; /* 64k alignment slop space */
15073 *(.brk_reservation) /* areas brk users have reserved */ 14835 *(.brk_reservation) /* areas brk users have reserved */
@@ -15075,10 +14837,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
15075 __brk_limit = .; 14837 __brk_limit = .;
15076 } 14838 }
15077 14839
15078@@ -316,13 +382,12 @@ SECTIONS 14840@@ -342,13 +408,12 @@ SECTIONS
15079 * for the boot processor. 14841 * for the boot processor.
15080 */ 14842 */
15081 #define INIT_PER_CPU(x) init_per_cpu__##x = per_cpu__##x + __per_cpu_load 14843 #define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load
15082-INIT_PER_CPU(gdt_page); 14844-INIT_PER_CPU(gdt_page);
15083 INIT_PER_CPU(irq_stack_union); 14845 INIT_PER_CPU(irq_stack_union);
15084 14846
@@ -15090,9 +14852,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vmlinux.lds.S linux-2.6.32.24/arch/x8
15090 "kernel image bigger than KERNEL_IMAGE_SIZE"); 14852 "kernel image bigger than KERNEL_IMAGE_SIZE");
15091 14853
15092 #ifdef CONFIG_SMP 14854 #ifdef CONFIG_SMP
15093diff -urNp linux-2.6.32.24/arch/x86/kernel/vsyscall_64.c linux-2.6.32.24/arch/x86/kernel/vsyscall_64.c 14855diff -urNp linux-2.6.35.7/arch/x86/kernel/vsyscall_64.c linux-2.6.35.7/arch/x86/kernel/vsyscall_64.c
15094--- linux-2.6.32.24/arch/x86/kernel/vsyscall_64.c 2010-08-13 16:24:37.000000000 -0400 14856--- linux-2.6.35.7/arch/x86/kernel/vsyscall_64.c 2010-08-26 19:47:12.000000000 -0400
15095+++ linux-2.6.32.24/arch/x86/kernel/vsyscall_64.c 2010-10-23 19:59:19.000000000 -0400 14857+++ linux-2.6.35.7/arch/x86/kernel/vsyscall_64.c 2010-09-17 20:12:09.000000000 -0400
15096@@ -80,6 +80,7 @@ void update_vsyscall(struct timespec *wa 14858@@ -80,6 +80,7 @@ void update_vsyscall(struct timespec *wa
15097 14859
15098 write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags); 14860 write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
@@ -15110,37 +14872,21 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/vsyscall_64.c linux-2.6.32.24/arch/x8
15110 p = tcache->blob[1]; 14872 p = tcache->blob[1];
15111 } else if (__vgetcpu_mode == VGETCPU_RDTSCP) { 14873 } else if (__vgetcpu_mode == VGETCPU_RDTSCP) {
15112 /* Load per CPU data from RDTSCP */ 14874 /* Load per CPU data from RDTSCP */
15113@@ -234,13 +235,13 @@ static ctl_table kernel_table2[] = { 14875diff -urNp linux-2.6.35.7/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.35.7/arch/x86/kernel/x8664_ksyms_64.c
15114 .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int), 14876--- linux-2.6.35.7/arch/x86/kernel/x8664_ksyms_64.c 2010-08-26 19:47:12.000000000 -0400
15115 .mode = 0644, 14877+++ linux-2.6.35.7/arch/x86/kernel/x8664_ksyms_64.c 2010-09-17 20:12:09.000000000 -0400
15116 .proc_handler = proc_dointvec }, 14878@@ -29,8 +29,6 @@ EXPORT_SYMBOL(__put_user_8);
15117- {} 14879 EXPORT_SYMBOL(copy_user_generic_string);
15118+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL } 14880 EXPORT_SYMBOL(copy_user_generic_unrolled);
15119 };
15120
15121 static ctl_table kernel_root_table2[] = {
15122 { .ctl_name = CTL_KERN, .procname = "kernel", .mode = 0555,
15123 .child = kernel_table2 },
15124- {}
15125+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
15126 };
15127 #endif
15128
15129diff -urNp linux-2.6.32.24/arch/x86/kernel/x8664_ksyms_64.c linux-2.6.32.24/arch/x86/kernel/x8664_ksyms_64.c
15130--- linux-2.6.32.24/arch/x86/kernel/x8664_ksyms_64.c 2010-08-13 16:24:37.000000000 -0400
15131+++ linux-2.6.32.24/arch/x86/kernel/x8664_ksyms_64.c 2010-10-23 19:59:19.000000000 -0400
15132@@ -30,8 +30,6 @@ EXPORT_SYMBOL(__put_user_8);
15133
15134 EXPORT_SYMBOL(copy_user_generic);
15135 EXPORT_SYMBOL(__copy_user_nocache); 14881 EXPORT_SYMBOL(__copy_user_nocache);
15136-EXPORT_SYMBOL(copy_from_user); 14882-EXPORT_SYMBOL(_copy_from_user);
15137-EXPORT_SYMBOL(copy_to_user); 14883-EXPORT_SYMBOL(_copy_to_user);
15138 EXPORT_SYMBOL(__copy_from_user_inatomic);
15139 14884
15140 EXPORT_SYMBOL(copy_page); 14885 EXPORT_SYMBOL(copy_page);
15141diff -urNp linux-2.6.32.24/arch/x86/kernel/xsave.c linux-2.6.32.24/arch/x86/kernel/xsave.c 14886 EXPORT_SYMBOL(clear_page);
15142--- linux-2.6.32.24/arch/x86/kernel/xsave.c 2010-08-13 16:24:37.000000000 -0400 14887diff -urNp linux-2.6.35.7/arch/x86/kernel/xsave.c linux-2.6.35.7/arch/x86/kernel/xsave.c
15143+++ linux-2.6.32.24/arch/x86/kernel/xsave.c 2010-10-23 19:59:19.000000000 -0400 14888--- linux-2.6.35.7/arch/x86/kernel/xsave.c 2010-08-26 19:47:12.000000000 -0400
14889+++ linux-2.6.35.7/arch/x86/kernel/xsave.c 2010-09-17 20:12:09.000000000 -0400
15144@@ -54,7 +54,7 @@ int check_for_xstate(struct i387_fxsave_ 14890@@ -54,7 +54,7 @@ int check_for_xstate(struct i387_fxsave_
15145 fx_sw_user->xstate_size > fx_sw_user->extended_size) 14891 fx_sw_user->xstate_size > fx_sw_user->extended_size)
15146 return -1; 14892 return -1;
@@ -15160,7 +14906,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/xsave.c linux-2.6.32.24/arch/x86/kern
15160 14906
15161 /* 14907 /*
15162@@ -228,7 +228,7 @@ int restore_i387_xstate(void __user *buf 14908@@ -228,7 +228,7 @@ int restore_i387_xstate(void __user *buf
15163 if (task_thread_info(tsk)->status & TS_XSAVE) 14909 if (use_xsave())
15164 err = restore_user_xstate(buf); 14910 err = restore_user_xstate(buf);
15165 else 14911 else
15166- err = fxrstor_checking((__force struct i387_fxsave_struct *) 14912- err = fxrstor_checking((__force struct i387_fxsave_struct *)
@@ -15168,21 +14914,25 @@ diff -urNp linux-2.6.32.24/arch/x86/kernel/xsave.c linux-2.6.32.24/arch/x86/kern
15168 buf); 14914 buf);
15169 if (unlikely(err)) { 14915 if (unlikely(err)) {
15170 /* 14916 /*
15171diff -urNp linux-2.6.32.24/arch/x86/kvm/emulate.c linux-2.6.32.24/arch/x86/kvm/emulate.c 14917diff -urNp linux-2.6.35.7/arch/x86/kvm/emulate.c linux-2.6.35.7/arch/x86/kvm/emulate.c
15172--- linux-2.6.32.24/arch/x86/kvm/emulate.c 2010-08-13 16:24:37.000000000 -0400 14918--- linux-2.6.35.7/arch/x86/kvm/emulate.c 2010-09-26 17:32:11.000000000 -0400
15173+++ linux-2.6.32.24/arch/x86/kvm/emulate.c 2010-10-23 19:59:19.000000000 -0400 14919+++ linux-2.6.35.7/arch/x86/kvm/emulate.c 2010-09-26 17:32:46.000000000 -0400
15174@@ -81,8 +81,8 @@ 14920@@ -88,11 +88,11 @@
15175 #define Src2CL (1<<29) 14921 #define Src2CL (1<<29)
15176 #define Src2ImmByte (2<<29) 14922 #define Src2ImmByte (2<<29)
15177 #define Src2One (3<<29) 14923 #define Src2One (3<<29)
15178-#define Src2Imm16 (4<<29) 14924-#define Src2Imm16 (4<<29)
15179-#define Src2Mask (7<<29) 14925-#define Src2Mem16 (5<<29) /* Used for Ep encoding. First argument has to be
15180+#define Src2Imm16 (4U<<29) 14926+#define Src2Imm16 (4U<<29)
14927+#define Src2Mem16 (5U<<29) /* Used for Ep encoding. First argument has to be
14928 in memory and second argument is located
14929 immediately after the first one in memory. */
14930-#define Src2Mask (7<<29)
15181+#define Src2Mask (7U<<29) 14931+#define Src2Mask (7U<<29)
15182 14932
15183 enum { 14933 enum {
15184 Group1_80, Group1_81, Group1_82, Group1_83, 14934 Group1_80, Group1_81, Group1_82, Group1_83,
15185@@ -411,6 +411,7 @@ static u32 group2_table[] = { 14935@@ -446,6 +446,7 @@ static u32 group2_table[] = {
15186 14936
15187 #define ____emulate_2op(_op, _src, _dst, _eflags, _x, _y, _suffix) \ 14937 #define ____emulate_2op(_op, _src, _dst, _eflags, _x, _y, _suffix) \
15188 do { \ 14938 do { \
@@ -15190,7 +14940,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/emulate.c linux-2.6.32.24/arch/x86/kvm/e
15190 __asm__ __volatile__ ( \ 14940 __asm__ __volatile__ ( \
15191 _PRE_EFLAGS("0", "4", "2") \ 14941 _PRE_EFLAGS("0", "4", "2") \
15192 _op _suffix " %"_x"3,%1; " \ 14942 _op _suffix " %"_x"3,%1; " \
15193@@ -424,8 +425,6 @@ static u32 group2_table[] = { 14943@@ -459,8 +460,6 @@ static u32 group2_table[] = {
15194 /* Raw emulation: instruction has two explicit operands. */ 14944 /* Raw emulation: instruction has two explicit operands. */
15195 #define __emulate_2op_nobyte(_op,_src,_dst,_eflags,_wx,_wy,_lx,_ly,_qx,_qy) \ 14945 #define __emulate_2op_nobyte(_op,_src,_dst,_eflags,_wx,_wy,_lx,_ly,_qx,_qy) \
15196 do { \ 14946 do { \
@@ -15199,7 +14949,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/emulate.c linux-2.6.32.24/arch/x86/kvm/e
15199 switch ((_dst).bytes) { \ 14949 switch ((_dst).bytes) { \
15200 case 2: \ 14950 case 2: \
15201 ____emulate_2op(_op,_src,_dst,_eflags,_wx,_wy,"w"); \ 14951 ____emulate_2op(_op,_src,_dst,_eflags,_wx,_wy,"w"); \
15202@@ -441,7 +440,6 @@ static u32 group2_table[] = { 14952@@ -476,7 +475,6 @@ static u32 group2_table[] = {
15203 14953
15204 #define __emulate_2op(_op,_src,_dst,_eflags,_bx,_by,_wx,_wy,_lx,_ly,_qx,_qy) \ 14954 #define __emulate_2op(_op,_src,_dst,_eflags,_bx,_by,_wx,_wy,_lx,_ly,_qx,_qy) \
15205 do { \ 14955 do { \
@@ -15207,9 +14957,9 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/emulate.c linux-2.6.32.24/arch/x86/kvm/e
15207 switch ((_dst).bytes) { \ 14957 switch ((_dst).bytes) { \
15208 case 1: \ 14958 case 1: \
15209 ____emulate_2op(_op,_src,_dst,_eflags,_bx,_by,"b"); \ 14959 ____emulate_2op(_op,_src,_dst,_eflags,_bx,_by,"b"); \
15210diff -urNp linux-2.6.32.24/arch/x86/kvm/lapic.c linux-2.6.32.24/arch/x86/kvm/lapic.c 14960diff -urNp linux-2.6.35.7/arch/x86/kvm/lapic.c linux-2.6.35.7/arch/x86/kvm/lapic.c
15211--- linux-2.6.32.24/arch/x86/kvm/lapic.c 2010-08-13 16:24:37.000000000 -0400 14961--- linux-2.6.35.7/arch/x86/kvm/lapic.c 2010-08-26 19:47:12.000000000 -0400
15212+++ linux-2.6.32.24/arch/x86/kvm/lapic.c 2010-10-23 19:59:19.000000000 -0400 14962+++ linux-2.6.35.7/arch/x86/kvm/lapic.c 2010-09-17 20:12:09.000000000 -0400
15213@@ -52,7 +52,7 @@ 14963@@ -52,7 +52,7 @@
15214 #define APIC_BUS_CYCLE_NS 1 14964 #define APIC_BUS_CYCLE_NS 1
15215 14965
@@ -15219,25 +14969,23 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/lapic.c linux-2.6.32.24/arch/x86/kvm/lap
15219 14969
15220 #define APIC_LVT_NUM 6 14970 #define APIC_LVT_NUM 6
15221 /* 14 is the version for Xeon and Pentium 8.4.8*/ 14971 /* 14 is the version for Xeon and Pentium 8.4.8*/
15222diff -urNp linux-2.6.32.24/arch/x86/kvm/svm.c linux-2.6.32.24/arch/x86/kvm/svm.c 14972diff -urNp linux-2.6.35.7/arch/x86/kvm/svm.c linux-2.6.35.7/arch/x86/kvm/svm.c
15223--- linux-2.6.32.24/arch/x86/kvm/svm.c 2010-08-13 16:24:37.000000000 -0400 14973--- linux-2.6.35.7/arch/x86/kvm/svm.c 2010-08-26 19:47:12.000000000 -0400
15224+++ linux-2.6.32.24/arch/x86/kvm/svm.c 2010-10-23 19:59:19.000000000 -0400 14974+++ linux-2.6.35.7/arch/x86/kvm/svm.c 2010-09-17 20:12:09.000000000 -0400
15225@@ -2482,9 +2482,12 @@ static int handle_exit(struct kvm_run *k 14975@@ -2796,7 +2796,11 @@ static void reload_tss(struct kvm_vcpu *
15226 static void reload_tss(struct kvm_vcpu *vcpu)
15227 {
15228 int cpu = raw_smp_processor_id(); 14976 int cpu = raw_smp_processor_id();
15229- 14977
15230 struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu); 14978 struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
15231+ 14979+
15232+ pax_open_kernel(); 14980+ pax_open_kernel();
15233 svm_data->tss_desc->type = 9; /* available 32/64-bit TSS */ 14981 sd->tss_desc->type = 9; /* available 32/64-bit TSS */
15234+ pax_close_kernel(); 14982+ pax_close_kernel();
15235+ 14983+
15236 load_TR_desc(); 14984 load_TR_desc();
15237 } 14985 }
15238 14986
15239@@ -2940,7 +2943,7 @@ static bool svm_gb_page_enable(void) 14987@@ -3337,7 +3341,7 @@ static void svm_fpu_deactivate(struct kv
15240 return true; 14988 update_cr0_intercept(svm);
15241 } 14989 }
15242 14990
15243-static struct kvm_x86_ops svm_x86_ops = { 14991-static struct kvm_x86_ops svm_x86_ops = {
@@ -15245,13 +14993,13 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/svm.c linux-2.6.32.24/arch/x86/kvm/svm.c
15245 .cpu_has_kvm_support = has_svm, 14993 .cpu_has_kvm_support = has_svm,
15246 .disabled_by_bios = is_disabled, 14994 .disabled_by_bios = is_disabled,
15247 .hardware_setup = svm_hardware_setup, 14995 .hardware_setup = svm_hardware_setup,
15248diff -urNp linux-2.6.32.24/arch/x86/kvm/vmx.c linux-2.6.32.24/arch/x86/kvm/vmx.c 14996diff -urNp linux-2.6.35.7/arch/x86/kvm/vmx.c linux-2.6.35.7/arch/x86/kvm/vmx.c
15249--- linux-2.6.32.24/arch/x86/kvm/vmx.c 2010-08-13 16:24:37.000000000 -0400 14997--- linux-2.6.35.7/arch/x86/kvm/vmx.c 2010-09-26 17:32:11.000000000 -0400
15250+++ linux-2.6.32.24/arch/x86/kvm/vmx.c 2010-10-23 19:59:19.000000000 -0400 14998+++ linux-2.6.35.7/arch/x86/kvm/vmx.c 2010-09-28 18:50:03.000000000 -0400
15251@@ -569,7 +569,11 @@ static void reload_tss(void) 14999@@ -654,7 +654,11 @@ static void reload_tss(void)
15252 15000
15253 kvm_get_gdt(&gdt); 15001 native_store_gdt(&gdt);
15254 descs = (void *)gdt.base; 15002 descs = (void *)gdt.address;
15255+ 15003+
15256+ pax_open_kernel(); 15004+ pax_open_kernel();
15257 descs[GDT_ENTRY_TSS].type = 9; /* available TSS */ 15005 descs[GDT_ENTRY_TSS].type = 9; /* available TSS */
@@ -15260,7 +15008,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/vmx.c linux-2.6.32.24/arch/x86/kvm/vmx.c
15260 load_TR_desc(); 15008 load_TR_desc();
15261 } 15009 }
15262 15010
15263@@ -1405,8 +1409,11 @@ static __init int hardware_setup(void) 15011@@ -1554,8 +1558,11 @@ static __init int hardware_setup(void)
15264 if (!cpu_has_vmx_flexpriority()) 15012 if (!cpu_has_vmx_flexpriority())
15265 flexpriority_enabled = 0; 15013 flexpriority_enabled = 0;
15266 15014
@@ -15274,16 +15022,16 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/vmx.c linux-2.6.32.24/arch/x86/kvm/vmx.c
15274 15022
15275 if (enable_ept && !cpu_has_vmx_ept_2m_page()) 15023 if (enable_ept && !cpu_has_vmx_ept_2m_page())
15276 kvm_disable_largepages(); 15024 kvm_disable_largepages();
15277@@ -2357,7 +2364,7 @@ static int vmx_vcpu_setup(struct vcpu_vm 15025@@ -2537,7 +2544,7 @@ static int vmx_vcpu_setup(struct vcpu_vm
15278 vmcs_writel(HOST_IDTR_BASE, dt.base); /* 22.2.4 */ 15026 vmcs_writel(HOST_IDTR_BASE, dt.address); /* 22.2.4 */
15279 15027
15280 asm("mov $.Lkvm_vmx_return, %0" : "=r"(kvm_vmx_return)); 15028 asm("mov $.Lkvm_vmx_return, %0" : "=r"(kvm_vmx_return));
15281- vmcs_writel(HOST_RIP, kvm_vmx_return); /* 22.2.5 */ 15029- vmcs_writel(HOST_RIP, kvm_vmx_return); /* 22.2.5 */
15282+ vmcs_writel(HOST_RIP, ktla_ktva(kvm_vmx_return)); /* 22.2.5 */ 15030+ vmcs_writel(HOST_RIP, ktla_ktva(kvm_vmx_return)); /* 22.2.5 */
15283 vmcs_write32(VM_EXIT_MSR_STORE_COUNT, 0); 15031 vmcs_write32(VM_EXIT_MSR_STORE_COUNT, 0);
15284 vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, 0); 15032 vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, 0);
15285 vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, 0); 15033 vmcs_write64(VM_EXIT_MSR_LOAD_ADDR, __pa(vmx->msr_autoload.host));
15286@@ -3713,6 +3720,12 @@ static void vmx_vcpu_run(struct kvm_vcpu 15034@@ -3913,6 +3920,12 @@ static void vmx_vcpu_run(struct kvm_vcpu
15287 "jmp .Lkvm_vmx_return \n\t" 15035 "jmp .Lkvm_vmx_return \n\t"
15288 ".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t" 15036 ".Llaunched: " __ex(ASM_VMX_VMRESUME) "\n\t"
15289 ".Lkvm_vmx_return: " 15037 ".Lkvm_vmx_return: "
@@ -15296,7 +15044,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/vmx.c linux-2.6.32.24/arch/x86/kvm/vmx.c
15296 /* Save guest registers, load host registers, keep flags */ 15044 /* Save guest registers, load host registers, keep flags */
15297 "xchg %0, (%%"R"sp) \n\t" 15045 "xchg %0, (%%"R"sp) \n\t"
15298 "mov %%"R"ax, %c[rax](%0) \n\t" 15046 "mov %%"R"ax, %c[rax](%0) \n\t"
15299@@ -3759,8 +3772,13 @@ static void vmx_vcpu_run(struct kvm_vcpu 15047@@ -3959,8 +3972,13 @@ static void vmx_vcpu_run(struct kvm_vcpu
15300 [r15]"i"(offsetof(struct vcpu_vmx, vcpu.arch.regs[VCPU_REGS_R15])), 15048 [r15]"i"(offsetof(struct vcpu_vmx, vcpu.arch.regs[VCPU_REGS_R15])),
15301 #endif 15049 #endif
15302 [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)) 15050 [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2))
@@ -15311,7 +15059,7 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/vmx.c linux-2.6.32.24/arch/x86/kvm/vmx.c
15311 #ifdef CONFIG_X86_64 15059 #ifdef CONFIG_X86_64
15312 , "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" 15060 , "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
15313 #endif 15061 #endif
15314@@ -3777,7 +3795,7 @@ static void vmx_vcpu_run(struct kvm_vcpu 15062@@ -3974,7 +3992,7 @@ static void vmx_vcpu_run(struct kvm_vcpu
15315 if (vmx->rmode.irq.pending) 15063 if (vmx->rmode.irq.pending)
15316 fixup_rmode_irq(vmx); 15064 fixup_rmode_irq(vmx);
15317 15065
@@ -15320,8 +15068,8 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/vmx.c linux-2.6.32.24/arch/x86/kvm/vmx.c
15320 vmx->launched = 1; 15068 vmx->launched = 1;
15321 15069
15322 vmx_complete_interrupts(vmx); 15070 vmx_complete_interrupts(vmx);
15323@@ -3952,7 +3970,7 @@ static bool vmx_gb_page_enable(void) 15071@@ -4195,7 +4213,7 @@ static void vmx_set_supported_cpuid(u32
15324 return false; 15072 {
15325 } 15073 }
15326 15074
15327-static struct kvm_x86_ops vmx_x86_ops = { 15075-static struct kvm_x86_ops vmx_x86_ops = {
@@ -15329,10 +15077,10 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/vmx.c linux-2.6.32.24/arch/x86/kvm/vmx.c
15329 .cpu_has_kvm_support = cpu_has_kvm_support, 15077 .cpu_has_kvm_support = cpu_has_kvm_support,
15330 .disabled_by_bios = vmx_disabled_by_bios, 15078 .disabled_by_bios = vmx_disabled_by_bios,
15331 .hardware_setup = hardware_setup, 15079 .hardware_setup = hardware_setup,
15332diff -urNp linux-2.6.32.24/arch/x86/kvm/x86.c linux-2.6.32.24/arch/x86/kvm/x86.c 15080diff -urNp linux-2.6.35.7/arch/x86/kvm/x86.c linux-2.6.35.7/arch/x86/kvm/x86.c
15333--- linux-2.6.32.24/arch/x86/kvm/x86.c 2010-08-13 16:24:37.000000000 -0400 15081--- linux-2.6.35.7/arch/x86/kvm/x86.c 2010-09-26 17:32:11.000000000 -0400
15334+++ linux-2.6.32.24/arch/x86/kvm/x86.c 2010-10-23 19:59:19.000000000 -0400 15082+++ linux-2.6.35.7/arch/x86/kvm/x86.c 2010-09-26 17:32:46.000000000 -0400
15335@@ -81,45 +81,45 @@ static void update_cr8_intercept(struct 15083@@ -86,7 +86,7 @@ static void update_cr8_intercept(struct
15336 static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid, 15084 static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid,
15337 struct kvm_cpuid_entry2 __user *entries); 15085 struct kvm_cpuid_entry2 __user *entries);
15338 15086
@@ -15341,7 +15089,8 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/x86.c linux-2.6.32.24/arch/x86/kvm/x86.c
15341 EXPORT_SYMBOL_GPL(kvm_x86_ops); 15089 EXPORT_SYMBOL_GPL(kvm_x86_ops);
15342 15090
15343 int ignore_msrs = 0; 15091 int ignore_msrs = 0;
15344 module_param_named(ignore_msrs, ignore_msrs, bool, S_IRUGO | S_IWUSR); 15092@@ -112,38 +112,38 @@ static struct kvm_shared_msrs_global __r
15093 static DEFINE_PER_CPU(struct kvm_shared_msrs, shared_msrs);
15345 15094
15346 struct kvm_stats_debugfs_item debugfs_entries[] = { 15095 struct kvm_stats_debugfs_item debugfs_entries[] = {
15347- { "pf_fixed", VCPU_STAT(pf_fixed) }, 15096- { "pf_fixed", VCPU_STAT(pf_fixed) },
@@ -15411,7 +15160,16 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/x86.c linux-2.6.32.24/arch/x86/kvm/x86.c
15411 { NULL } 15160 { NULL }
15412 }; 15161 };
15413 15162
15414@@ -1638,7 +1638,7 @@ static int kvm_vcpu_ioctl_set_lapic(stru 15163@@ -1672,6 +1672,8 @@ long kvm_arch_dev_ioctl(struct file *fil
15164 if (n < msr_list.nmsrs)
15165 goto out;
15166 r = -EFAULT;
15167+ if (num_msrs_to_save > ARRAY_SIZE(msrs_to_save))
15168+ goto out;
15169 if (copy_to_user(user_msr_list->indices, &msrs_to_save,
15170 num_msrs_to_save * sizeof(u32)))
15171 goto out;
15172@@ -2103,7 +2105,7 @@ static int kvm_vcpu_ioctl_set_lapic(stru
15415 static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu, 15173 static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
15416 struct kvm_interrupt *irq) 15174 struct kvm_interrupt *irq)
15417 { 15175 {
@@ -15420,22 +15178,105 @@ diff -urNp linux-2.6.32.24/arch/x86/kvm/x86.c linux-2.6.32.24/arch/x86/kvm/x86.c
15420 return -EINVAL; 15178 return -EINVAL;
15421 if (irqchip_in_kernel(vcpu->kvm)) 15179 if (irqchip_in_kernel(vcpu->kvm))
15422 return -ENXIO; 15180 return -ENXIO;
15423@@ -3212,10 +3212,10 @@ static struct notifier_block kvmclock_cp 15181@@ -4070,10 +4072,10 @@ void kvm_after_handle_nmi(struct kvm_vcp
15424 .notifier_call = kvmclock_cpufreq_notifier 15182 }
15425 }; 15183 EXPORT_SYMBOL_GPL(kvm_after_handle_nmi);
15426 15184
15427-int kvm_arch_init(void *opaque) 15185-int kvm_arch_init(void *opaque)
15428+int kvm_arch_init(const void *opaque) 15186+int kvm_arch_init(const void *opaque)
15429 { 15187 {
15430 int r, cpu; 15188 int r;
15431- struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque; 15189- struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque;
15432+ const struct kvm_x86_ops *ops = (const struct kvm_x86_ops *)opaque; 15190+ const struct kvm_x86_ops *ops = (const struct kvm_x86_ops *)opaque;
15433 15191
15434 if (kvm_x86_ops) { 15192 if (kvm_x86_ops) {
15435 printk(KERN_ERR "kvm: already loaded the other module\n"); 15193 printk(KERN_ERR "kvm: already loaded the other module\n");
15436diff -urNp linux-2.6.32.24/arch/x86/lib/checksum_32.S linux-2.6.32.24/arch/x86/lib/checksum_32.S 15194diff -urNp linux-2.6.35.7/arch/x86/lib/atomic64_cx8_32.S linux-2.6.35.7/arch/x86/lib/atomic64_cx8_32.S
15437--- linux-2.6.32.24/arch/x86/lib/checksum_32.S 2010-08-13 16:24:37.000000000 -0400 15195--- linux-2.6.35.7/arch/x86/lib/atomic64_cx8_32.S 2010-08-26 19:47:12.000000000 -0400
15438+++ linux-2.6.32.24/arch/x86/lib/checksum_32.S 2010-10-23 19:59:19.000000000 -0400 15196+++ linux-2.6.35.7/arch/x86/lib/atomic64_cx8_32.S 2010-09-26 22:02:10.000000000 -0400
15197@@ -86,13 +86,23 @@ ENTRY(atomic64_\func\()_return_cx8)
15198 movl %edx, %ecx
15199 \ins\()l %esi, %ebx
15200 \insc\()l %edi, %ecx
15201+
15202+#ifdef CONFIG_PAX_REFCOUNT
15203+ into
15204+2:
15205+ _ASM_EXTABLE(2b, 3f)
15206+#endif
15207+
15208 LOCK_PREFIX
15209 cmpxchg8b (%ebp)
15210 jne 1b
15211-
15212-10:
15213 movl %ebx, %eax
15214 movl %ecx, %edx
15215+
15216+#ifdef CONFIG_PAX_REFCOUNT
15217+3:
15218+#endif
15219+
15220 RESTORE edi
15221 RESTORE esi
15222 RESTORE ebx
15223@@ -116,13 +126,24 @@ ENTRY(atomic64_\func\()_return_cx8)
15224 movl %edx, %ecx
15225 \ins\()l $1, %ebx
15226 \insc\()l $0, %ecx
15227+
15228+#ifdef CONFIG_PAX_REFCOUNT
15229+ into
15230+2:
15231+ _ASM_EXTABLE(2b, 3f)
15232+#endif
15233+
15234 LOCK_PREFIX
15235 cmpxchg8b (%esi)
15236 jne 1b
15237
15238-10:
15239 movl %ebx, %eax
15240 movl %ecx, %edx
15241+
15242+#ifdef CONFIG_PAX_REFCOUNT
15243+3:
15244+#endif
15245+
15246 RESTORE ebx
15247 ret
15248 CFI_ENDPROC
15249@@ -176,6 +197,13 @@ ENTRY(atomic64_add_unless_cx8)
15250 movl %edx, %ecx
15251 addl %esi, %ebx
15252 adcl %edi, %ecx
15253+
15254+#ifdef CONFIG_PAX_REFCOUNT
15255+ into
15256+1234:
15257+ _ASM_EXTABLE(1234b, 1234b)
15258+#endif
15259+
15260 LOCK_PREFIX
15261 cmpxchg8b (%ebp)
15262 jne 1b
15263@@ -208,6 +236,13 @@ ENTRY(atomic64_inc_not_zero_cx8)
15264 movl %edx, %ecx
15265 addl $1, %ebx
15266 adcl $0, %ecx
15267+
15268+#ifdef CONFIG_PAX_REFCOUNT
15269+ into
15270+1234:
15271+ _ASM_EXTABLE(1234b, 1234b)
15272+#endif
15273+
15274 LOCK_PREFIX
15275 cmpxchg8b (%esi)
15276 jne 1b
15277diff -urNp linux-2.6.35.7/arch/x86/lib/checksum_32.S linux-2.6.35.7/arch/x86/lib/checksum_32.S
15278--- linux-2.6.35.7/arch/x86/lib/checksum_32.S 2010-08-26 19:47:12.000000000 -0400
15279+++ linux-2.6.35.7/arch/x86/lib/checksum_32.S 2010-09-17 20:12:09.000000000 -0400
15439@@ -28,7 +28,8 @@ 15280@@ -28,7 +28,8 @@
15440 #include <linux/linkage.h> 15281 #include <linux/linkage.h>
15441 #include <asm/dwarf2.h> 15282 #include <asm/dwarf2.h>
@@ -15681,9 +15522,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/checksum_32.S linux-2.6.32.24/arch/x86/l
15681 15522
15682 #undef ROUND 15523 #undef ROUND
15683 #undef ROUND1 15524 #undef ROUND1
15684diff -urNp linux-2.6.32.24/arch/x86/lib/clear_page_64.S linux-2.6.32.24/arch/x86/lib/clear_page_64.S 15525diff -urNp linux-2.6.35.7/arch/x86/lib/clear_page_64.S linux-2.6.35.7/arch/x86/lib/clear_page_64.S
15685--- linux-2.6.32.24/arch/x86/lib/clear_page_64.S 2010-08-13 16:24:37.000000000 -0400 15526--- linux-2.6.35.7/arch/x86/lib/clear_page_64.S 2010-08-26 19:47:12.000000000 -0400
15686+++ linux-2.6.32.24/arch/x86/lib/clear_page_64.S 2010-10-23 19:59:19.000000000 -0400 15527+++ linux-2.6.35.7/arch/x86/lib/clear_page_64.S 2010-09-17 20:12:09.000000000 -0400
15687@@ -43,7 +43,7 @@ ENDPROC(clear_page) 15528@@ -43,7 +43,7 @@ ENDPROC(clear_page)
15688 15529
15689 #include <asm/cpufeature.h> 15530 #include <asm/cpufeature.h>
@@ -15693,9 +15534,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/clear_page_64.S linux-2.6.32.24/arch/x86
15693 1: .byte 0xeb /* jmp <disp8> */ 15534 1: .byte 0xeb /* jmp <disp8> */
15694 .byte (clear_page_c - clear_page) - (2f - 1b) /* offset */ 15535 .byte (clear_page_c - clear_page) - (2f - 1b) /* offset */
15695 2: 15536 2:
15696diff -urNp linux-2.6.32.24/arch/x86/lib/copy_page_64.S linux-2.6.32.24/arch/x86/lib/copy_page_64.S 15537diff -urNp linux-2.6.35.7/arch/x86/lib/copy_page_64.S linux-2.6.35.7/arch/x86/lib/copy_page_64.S
15697--- linux-2.6.32.24/arch/x86/lib/copy_page_64.S 2010-08-13 16:24:37.000000000 -0400 15538--- linux-2.6.35.7/arch/x86/lib/copy_page_64.S 2010-08-26 19:47:12.000000000 -0400
15698+++ linux-2.6.32.24/arch/x86/lib/copy_page_64.S 2010-10-23 19:59:19.000000000 -0400 15539+++ linux-2.6.35.7/arch/x86/lib/copy_page_64.S 2010-09-17 20:12:09.000000000 -0400
15699@@ -104,7 +104,7 @@ ENDPROC(copy_page) 15540@@ -104,7 +104,7 @@ ENDPROC(copy_page)
15700 15541
15701 #include <asm/cpufeature.h> 15542 #include <asm/cpufeature.h>
@@ -15705,9 +15546,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/copy_page_64.S linux-2.6.32.24/arch/x86/
15705 1: .byte 0xeb /* jmp <disp8> */ 15546 1: .byte 0xeb /* jmp <disp8> */
15706 .byte (copy_page_c - copy_page) - (2f - 1b) /* offset */ 15547 .byte (copy_page_c - copy_page) - (2f - 1b) /* offset */
15707 2: 15548 2:
15708diff -urNp linux-2.6.32.24/arch/x86/lib/copy_user_64.S linux-2.6.32.24/arch/x86/lib/copy_user_64.S 15549diff -urNp linux-2.6.35.7/arch/x86/lib/copy_user_64.S linux-2.6.35.7/arch/x86/lib/copy_user_64.S
15709--- linux-2.6.32.24/arch/x86/lib/copy_user_64.S 2010-08-13 16:24:37.000000000 -0400 15550--- linux-2.6.35.7/arch/x86/lib/copy_user_64.S 2010-08-26 19:47:12.000000000 -0400
15710+++ linux-2.6.32.24/arch/x86/lib/copy_user_64.S 2010-10-23 19:59:19.000000000 -0400 15551+++ linux-2.6.35.7/arch/x86/lib/copy_user_64.S 2010-09-17 20:12:09.000000000 -0400
15711@@ -15,13 +15,14 @@ 15552@@ -15,13 +15,14 @@
15712 #include <asm/asm-offsets.h> 15553 #include <asm/asm-offsets.h>
15713 #include <asm/thread_info.h> 15554 #include <asm/thread_info.h>
@@ -15724,12 +15565,12 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/copy_user_64.S linux-2.6.32.24/arch/x86/
15724 2: .byte 0xe9 /* near jump with 32bit immediate */ 15565 2: .byte 0xe9 /* near jump with 32bit immediate */
15725 .long \alt-1b /* offset */ /* or alternatively to alt */ 15566 .long \alt-1b /* offset */ /* or alternatively to alt */
15726 .previous 15567 .previous
15727@@ -64,32 +65,6 @@ 15568@@ -64,37 +65,13 @@
15728 #endif 15569 #endif
15729 .endm 15570 .endm
15730 15571
15731-/* Standard copy_to_user with segment limit checking */ 15572-/* Standard copy_to_user with segment limit checking */
15732-ENTRY(copy_to_user) 15573-ENTRY(_copy_to_user)
15733- CFI_STARTPROC 15574- CFI_STARTPROC
15734- GET_THREAD_INFO(%rax) 15575- GET_THREAD_INFO(%rax)
15735- movq %rdi,%rcx 15576- movq %rdi,%rcx
@@ -15739,10 +15580,10 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/copy_user_64.S linux-2.6.32.24/arch/x86/
15739- jae bad_to_user 15580- jae bad_to_user
15740- ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string 15581- ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
15741- CFI_ENDPROC 15582- CFI_ENDPROC
15742-ENDPROC(copy_to_user) 15583-ENDPROC(_copy_to_user)
15743- 15584-
15744-/* Standard copy_from_user with segment limit checking */ 15585-/* Standard copy_from_user with segment limit checking */
15745-ENTRY(copy_from_user) 15586-ENTRY(_copy_from_user)
15746- CFI_STARTPROC 15587- CFI_STARTPROC
15747- GET_THREAD_INFO(%rax) 15588- GET_THREAD_INFO(%rax)
15748- movq %rsi,%rcx 15589- movq %rsi,%rcx
@@ -15752,28 +15593,10 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/copy_user_64.S linux-2.6.32.24/arch/x86/
15752- jae bad_from_user 15593- jae bad_from_user
15753- ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string 15594- ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
15754- CFI_ENDPROC 15595- CFI_ENDPROC
15755-ENDPROC(copy_from_user) 15596-ENDPROC(_copy_from_user)
15756- 15597-
15757 ENTRY(copy_user_generic) 15598 .section .fixup,"ax"
15758 CFI_STARTPROC 15599 /* must zero dest */
15759 ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
15760@@ -98,6 +73,15 @@ ENDPROC(copy_user_generic)
15761
15762 ENTRY(__copy_from_user_inatomic)
15763 CFI_STARTPROC
15764+
15765+#ifdef CONFIG_PAX_MEMORY_UDEREF
15766+ mov $PAX_USER_SHADOW_BASE,%rcx
15767+ cmp %rcx,%rsi
15768+ jae 1f
15769+ add %rcx,%rsi
15770+1:
15771+#endif
15772+
15773 ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
15774 CFI_ENDPROC
15775 ENDPROC(__copy_from_user_inatomic)
15776@@ -107,6 +91,8 @@ ENDPROC(__copy_from_user_inatomic)
15777 ENTRY(bad_from_user) 15600 ENTRY(bad_from_user)
15778 bad_from_user: 15601 bad_from_user:
15779 CFI_STARTPROC 15602 CFI_STARTPROC
@@ -15782,9 +15605,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/copy_user_64.S linux-2.6.32.24/arch/x86/
15782 movl %edx,%ecx 15605 movl %edx,%ecx
15783 xorl %eax,%eax 15606 xorl %eax,%eax
15784 rep 15607 rep
15785diff -urNp linux-2.6.32.24/arch/x86/lib/copy_user_nocache_64.S linux-2.6.32.24/arch/x86/lib/copy_user_nocache_64.S 15608diff -urNp linux-2.6.35.7/arch/x86/lib/copy_user_nocache_64.S linux-2.6.35.7/arch/x86/lib/copy_user_nocache_64.S
15786--- linux-2.6.32.24/arch/x86/lib/copy_user_nocache_64.S 2010-08-13 16:24:37.000000000 -0400 15609--- linux-2.6.35.7/arch/x86/lib/copy_user_nocache_64.S 2010-08-26 19:47:12.000000000 -0400
15787+++ linux-2.6.32.24/arch/x86/lib/copy_user_nocache_64.S 2010-10-23 19:59:19.000000000 -0400 15610+++ linux-2.6.35.7/arch/x86/lib/copy_user_nocache_64.S 2010-09-17 20:12:09.000000000 -0400
15788@@ -14,6 +14,7 @@ 15611@@ -14,6 +14,7 @@
15789 #include <asm/current.h> 15612 #include <asm/current.h>
15790 #include <asm/asm-offsets.h> 15613 #include <asm/asm-offsets.h>
@@ -15809,9 +15632,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/copy_user_nocache_64.S linux-2.6.32.24/a
15809 cmpl $8,%edx 15632 cmpl $8,%edx
15810 jb 20f /* less then 8 bytes, go to byte copy loop */ 15633 jb 20f /* less then 8 bytes, go to byte copy loop */
15811 ALIGN_DESTINATION 15634 ALIGN_DESTINATION
15812diff -urNp linux-2.6.32.24/arch/x86/lib/csum-wrappers_64.c linux-2.6.32.24/arch/x86/lib/csum-wrappers_64.c 15635diff -urNp linux-2.6.35.7/arch/x86/lib/csum-wrappers_64.c linux-2.6.35.7/arch/x86/lib/csum-wrappers_64.c
15813--- linux-2.6.32.24/arch/x86/lib/csum-wrappers_64.c 2010-08-13 16:24:37.000000000 -0400 15636--- linux-2.6.35.7/arch/x86/lib/csum-wrappers_64.c 2010-08-26 19:47:12.000000000 -0400
15814+++ linux-2.6.32.24/arch/x86/lib/csum-wrappers_64.c 2010-10-23 19:59:19.000000000 -0400 15637+++ linux-2.6.35.7/arch/x86/lib/csum-wrappers_64.c 2010-09-17 20:12:09.000000000 -0400
15815@@ -52,6 +52,8 @@ csum_partial_copy_from_user(const void _ 15638@@ -52,6 +52,8 @@ csum_partial_copy_from_user(const void _
15816 len -= 2; 15639 len -= 2;
15817 } 15640 }
@@ -15830,9 +15653,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/csum-wrappers_64.c linux-2.6.32.24/arch/
15830 return csum_partial_copy_generic(src, (void __force *)dst, 15653 return csum_partial_copy_generic(src, (void __force *)dst,
15831 len, isum, NULL, errp); 15654 len, isum, NULL, errp);
15832 } 15655 }
15833diff -urNp linux-2.6.32.24/arch/x86/lib/getuser.S linux-2.6.32.24/arch/x86/lib/getuser.S 15656diff -urNp linux-2.6.35.7/arch/x86/lib/getuser.S linux-2.6.35.7/arch/x86/lib/getuser.S
15834--- linux-2.6.32.24/arch/x86/lib/getuser.S 2010-08-13 16:24:37.000000000 -0400 15657--- linux-2.6.35.7/arch/x86/lib/getuser.S 2010-08-26 19:47:12.000000000 -0400
15835+++ linux-2.6.32.24/arch/x86/lib/getuser.S 2010-10-23 19:59:19.000000000 -0400 15658+++ linux-2.6.35.7/arch/x86/lib/getuser.S 2010-09-17 20:12:09.000000000 -0400
15836@@ -33,14 +33,38 @@ 15659@@ -33,14 +33,38 @@
15837 #include <asm/asm-offsets.h> 15660 #include <asm/asm-offsets.h>
15838 #include <asm/thread_info.h> 15661 #include <asm/thread_info.h>
@@ -15969,33 +15792,31 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/getuser.S linux-2.6.32.24/arch/x86/lib/g
15969 xor %edx,%edx 15792 xor %edx,%edx
15970 mov $(-EFAULT),%_ASM_AX 15793 mov $(-EFAULT),%_ASM_AX
15971 ret 15794 ret
15972diff -urNp linux-2.6.32.24/arch/x86/lib/memcpy_64.S linux-2.6.32.24/arch/x86/lib/memcpy_64.S 15795diff -urNp linux-2.6.35.7/arch/x86/lib/insn.c linux-2.6.35.7/arch/x86/lib/insn.c
15973--- linux-2.6.32.24/arch/x86/lib/memcpy_64.S 2010-08-13 16:24:37.000000000 -0400 15796--- linux-2.6.35.7/arch/x86/lib/insn.c 2010-08-26 19:47:12.000000000 -0400
15974+++ linux-2.6.32.24/arch/x86/lib/memcpy_64.S 2010-10-23 19:59:19.000000000 -0400 15797+++ linux-2.6.35.7/arch/x86/lib/insn.c 2010-09-17 20:12:09.000000000 -0400
15975@@ -128,7 +128,7 @@ ENDPROC(__memcpy) 15798@@ -21,6 +21,7 @@
15976 * It is also a lot simpler. Use this when possible: 15799 #include <linux/string.h>
15977 */ 15800 #include <asm/inat.h>
15978 15801 #include <asm/insn.h>
15979- .section .altinstr_replacement, "ax" 15802+#include <asm/pgtable_types.h>
15980+ .section .altinstr_replacement, "a" 15803
15981 1: .byte 0xeb /* jmp <disp8> */ 15804 #define get_next(t, insn) \
15982 .byte (memcpy_c - memcpy) - (2f - 1b) /* offset */ 15805 ({t r; r = *(t*)insn->next_byte; insn->next_byte += sizeof(t); r; })
15983 2: 15806@@ -40,8 +41,8 @@
15984diff -urNp linux-2.6.32.24/arch/x86/lib/memset_64.S linux-2.6.32.24/arch/x86/lib/memset_64.S 15807 void insn_init(struct insn *insn, const void *kaddr, int x86_64)
15985--- linux-2.6.32.24/arch/x86/lib/memset_64.S 2010-08-13 16:24:37.000000000 -0400 15808 {
15986+++ linux-2.6.32.24/arch/x86/lib/memset_64.S 2010-10-23 19:59:19.000000000 -0400 15809 memset(insn, 0, sizeof(*insn));
15987@@ -118,7 +118,7 @@ ENDPROC(__memset) 15810- insn->kaddr = kaddr;
15988 15811- insn->next_byte = kaddr;
15989 #include <asm/cpufeature.h> 15812+ insn->kaddr = ktla_ktva(kaddr);
15990 15813+ insn->next_byte = ktla_ktva(kaddr);
15991- .section .altinstr_replacement,"ax" 15814 insn->x86_64 = x86_64 ? 1 : 0;
15992+ .section .altinstr_replacement,"a" 15815 insn->opnd_bytes = 4;
15993 1: .byte 0xeb /* jmp <disp8> */ 15816 if (x86_64)
15994 .byte (memset_c - memset) - (2f - 1b) /* offset */ 15817diff -urNp linux-2.6.35.7/arch/x86/lib/mmx_32.c linux-2.6.35.7/arch/x86/lib/mmx_32.c
15995 2: 15818--- linux-2.6.35.7/arch/x86/lib/mmx_32.c 2010-08-26 19:47:12.000000000 -0400
15996diff -urNp linux-2.6.32.24/arch/x86/lib/mmx_32.c linux-2.6.32.24/arch/x86/lib/mmx_32.c 15819+++ linux-2.6.35.7/arch/x86/lib/mmx_32.c 2010-09-17 20:12:09.000000000 -0400
15997--- linux-2.6.32.24/arch/x86/lib/mmx_32.c 2010-08-13 16:24:37.000000000 -0400
15998+++ linux-2.6.32.24/arch/x86/lib/mmx_32.c 2010-10-23 19:59:19.000000000 -0400
15999@@ -29,6 +29,7 @@ void *_mmx_memcpy(void *to, const void * 15820@@ -29,6 +29,7 @@ void *_mmx_memcpy(void *to, const void *
16000 { 15821 {
16001 void *p; 15822 void *p;
@@ -16311,9 +16132,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/mmx_32.c linux-2.6.32.24/arch/x86/lib/mm
16311 16132
16312 from += 64; 16133 from += 64;
16313 to += 64; 16134 to += 64;
16314diff -urNp linux-2.6.32.24/arch/x86/lib/putuser.S linux-2.6.32.24/arch/x86/lib/putuser.S 16135diff -urNp linux-2.6.35.7/arch/x86/lib/putuser.S linux-2.6.35.7/arch/x86/lib/putuser.S
16315--- linux-2.6.32.24/arch/x86/lib/putuser.S 2010-08-13 16:24:37.000000000 -0400 16136--- linux-2.6.35.7/arch/x86/lib/putuser.S 2010-08-26 19:47:12.000000000 -0400
16316+++ linux-2.6.32.24/arch/x86/lib/putuser.S 2010-10-23 19:59:19.000000000 -0400 16137+++ linux-2.6.35.7/arch/x86/lib/putuser.S 2010-09-17 20:12:09.000000000 -0400
16317@@ -15,7 +15,8 @@ 16138@@ -15,7 +15,8 @@
16318 #include <asm/thread_info.h> 16139 #include <asm/thread_info.h>
16319 #include <asm/errno.h> 16140 #include <asm/errno.h>
@@ -16494,9 +16315,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/putuser.S linux-2.6.32.24/arch/x86/lib/p
16494 movl $-EFAULT,%eax 16315 movl $-EFAULT,%eax
16495 EXIT 16316 EXIT
16496 END(bad_put_user) 16317 END(bad_put_user)
16497diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_32.c linux-2.6.32.24/arch/x86/lib/usercopy_32.c 16318diff -urNp linux-2.6.35.7/arch/x86/lib/usercopy_32.c linux-2.6.35.7/arch/x86/lib/usercopy_32.c
16498--- linux-2.6.32.24/arch/x86/lib/usercopy_32.c 2010-08-13 16:24:37.000000000 -0400 16319--- linux-2.6.35.7/arch/x86/lib/usercopy_32.c 2010-08-26 19:47:12.000000000 -0400
16499+++ linux-2.6.32.24/arch/x86/lib/usercopy_32.c 2010-10-23 19:59:19.000000000 -0400 16320+++ linux-2.6.35.7/arch/x86/lib/usercopy_32.c 2010-09-17 20:12:09.000000000 -0400
16500@@ -36,31 +36,38 @@ static inline int __movsl_is_ok(unsigned 16321@@ -36,31 +36,38 @@ static inline int __movsl_is_ok(unsigned
16501 * Copy a null terminated string from userspace. 16322 * Copy a null terminated string from userspace.
16502 */ 16323 */
@@ -16677,97 +16498,16 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_32.c linux-2.6.32.24/arch/x86/l
16677 :"cc"); 16498 :"cc");
16678 return res & mask; 16499 return res & mask;
16679 } 16500 }
16680@@ -227,10 +240,11 @@ EXPORT_SYMBOL(strnlen_user); 16501@@ -227,10 +240,121 @@ EXPORT_SYMBOL(strnlen_user);
16681 16502
16682 #ifdef CONFIG_X86_INTEL_USERCOPY 16503 #ifdef CONFIG_X86_INTEL_USERCOPY
16683 static unsigned long 16504 static unsigned long
16684-__copy_user_intel(void __user *to, const void *from, unsigned long size) 16505-__copy_user_intel(void __user *to, const void *from, unsigned long size)
16685+__generic_copy_to_user_intel(void __user *to, const void *from, unsigned long size) 16506+__generic_copy_to_user_intel(void __user *to, const void *from, unsigned long size)
16686 {
16687 int d0, d1;
16688 __asm__ __volatile__(
16689+ " movw %w6, %%es\n"
16690 " .align 2,0x90\n"
16691 "1: movl 32(%4), %%eax\n"
16692 " cmpl $67, %0\n"
16693@@ -239,36 +253,36 @@ __copy_user_intel(void __user *to, const
16694 " .align 2,0x90\n"
16695 "3: movl 0(%4), %%eax\n"
16696 "4: movl 4(%4), %%edx\n"
16697- "5: movl %%eax, 0(%3)\n"
16698- "6: movl %%edx, 4(%3)\n"
16699+ "5: movl %%eax, %%es:0(%3)\n"
16700+ "6: movl %%edx, %%es:4(%3)\n"
16701 "7: movl 8(%4), %%eax\n"
16702 "8: movl 12(%4),%%edx\n"
16703- "9: movl %%eax, 8(%3)\n"
16704- "10: movl %%edx, 12(%3)\n"
16705+ "9: movl %%eax, %%es:8(%3)\n"
16706+ "10: movl %%edx, %%es:12(%3)\n"
16707 "11: movl 16(%4), %%eax\n"
16708 "12: movl 20(%4), %%edx\n"
16709- "13: movl %%eax, 16(%3)\n"
16710- "14: movl %%edx, 20(%3)\n"
16711+ "13: movl %%eax, %%es:16(%3)\n"
16712+ "14: movl %%edx, %%es:20(%3)\n"
16713 "15: movl 24(%4), %%eax\n"
16714 "16: movl 28(%4), %%edx\n"
16715- "17: movl %%eax, 24(%3)\n"
16716- "18: movl %%edx, 28(%3)\n"
16717+ "17: movl %%eax, %%es:24(%3)\n"
16718+ "18: movl %%edx, %%es:28(%3)\n"
16719 "19: movl 32(%4), %%eax\n"
16720 "20: movl 36(%4), %%edx\n"
16721- "21: movl %%eax, 32(%3)\n"
16722- "22: movl %%edx, 36(%3)\n"
16723+ "21: movl %%eax, %%es:32(%3)\n"
16724+ "22: movl %%edx, %%es:36(%3)\n"
16725 "23: movl 40(%4), %%eax\n"
16726 "24: movl 44(%4), %%edx\n"
16727- "25: movl %%eax, 40(%3)\n"
16728- "26: movl %%edx, 44(%3)\n"
16729+ "25: movl %%eax, %%es:40(%3)\n"
16730+ "26: movl %%edx, %%es:44(%3)\n"
16731 "27: movl 48(%4), %%eax\n"
16732 "28: movl 52(%4), %%edx\n"
16733- "29: movl %%eax, 48(%3)\n"
16734- "30: movl %%edx, 52(%3)\n"
16735+ "29: movl %%eax, %%es:48(%3)\n"
16736+ "30: movl %%edx, %%es:52(%3)\n"
16737 "31: movl 56(%4), %%eax\n"
16738 "32: movl 60(%4), %%edx\n"
16739- "33: movl %%eax, 56(%3)\n"
16740- "34: movl %%edx, 60(%3)\n"
16741+ "33: movl %%eax, %%es:56(%3)\n"
16742+ "34: movl %%edx, %%es:60(%3)\n"
16743 " addl $-64, %0\n"
16744 " addl $64, %4\n"
16745 " addl $64, %3\n"
16746@@ -282,6 +296,8 @@ __copy_user_intel(void __user *to, const
16747 "36: movl %%eax, %0\n"
16748 "37: rep; movsb\n"
16749 "100:\n"
16750+ " pushl %%ss\n"
16751+ " popl %%es\n"
16752 ".section .fixup,\"ax\"\n"
16753 "101: lea 0(%%eax,%0,4),%0\n"
16754 " jmp 100b\n"
16755@@ -328,7 +344,117 @@ __copy_user_intel(void __user *to, const
16756 " .long 99b,101b\n"
16757 ".previous"
16758 : "=&c"(size), "=&D" (d0), "=&S" (d1)
16759- : "1"(to), "2"(from), "0"(size)
16760+ : "1"(to), "2"(from), "0"(size), "r"(__USER_DS)
16761+ : "eax", "edx", "memory");
16762+ return size;
16763+}
16764+
16765+static unsigned long
16766+__generic_copy_from_user_intel(void *to, const void __user *from, unsigned long size)
16767+{ 16507+{
16768+ int d0, d1; 16508+ int d0, d1;
16769+ __asm__ __volatile__( 16509+ __asm__ __volatile__(
16770+ " movw %w6, %%ds\n" 16510+ " movw %w6, %%es\n"
16771+ " .align 2,0x90\n" 16511+ " .align 2,0x90\n"
16772+ "1: movl 32(%4), %%eax\n" 16512+ "1: movl 32(%4), %%eax\n"
16773+ " cmpl $67, %0\n" 16513+ " cmpl $67, %0\n"
@@ -16820,7 +16560,7 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_32.c linux-2.6.32.24/arch/x86/l
16820+ "37: rep; movsb\n" 16560+ "37: rep; movsb\n"
16821+ "100:\n" 16561+ "100:\n"
16822+ " pushl %%ss\n" 16562+ " pushl %%ss\n"
16823+ " popl %%ds\n" 16563+ " popl %%es\n"
16824+ ".section .fixup,\"ax\"\n" 16564+ ".section .fixup,\"ax\"\n"
16825+ "101: lea 0(%%eax,%0,4),%0\n" 16565+ "101: lea 0(%%eax,%0,4),%0\n"
16826+ " jmp 100b\n" 16566+ " jmp 100b\n"
@@ -16868,6 +16608,87 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_32.c linux-2.6.32.24/arch/x86/l
16868+ ".previous" 16608+ ".previous"
16869+ : "=&c"(size), "=&D" (d0), "=&S" (d1) 16609+ : "=&c"(size), "=&D" (d0), "=&S" (d1)
16870+ : "1"(to), "2"(from), "0"(size), "r"(__USER_DS) 16610+ : "1"(to), "2"(from), "0"(size), "r"(__USER_DS)
16611+ : "eax", "edx", "memory");
16612+ return size;
16613+}
16614+
16615+static unsigned long
16616+__generic_copy_from_user_intel(void *to, const void __user *from, unsigned long size)
16617 {
16618 int d0, d1;
16619 __asm__ __volatile__(
16620+ " movw %w6, %%ds\n"
16621 " .align 2,0x90\n"
16622 "1: movl 32(%4), %%eax\n"
16623 " cmpl $67, %0\n"
16624@@ -239,36 +363,36 @@ __copy_user_intel(void __user *to, const
16625 " .align 2,0x90\n"
16626 "3: movl 0(%4), %%eax\n"
16627 "4: movl 4(%4), %%edx\n"
16628- "5: movl %%eax, 0(%3)\n"
16629- "6: movl %%edx, 4(%3)\n"
16630+ "5: movl %%eax, %%es:0(%3)\n"
16631+ "6: movl %%edx, %%es:4(%3)\n"
16632 "7: movl 8(%4), %%eax\n"
16633 "8: movl 12(%4),%%edx\n"
16634- "9: movl %%eax, 8(%3)\n"
16635- "10: movl %%edx, 12(%3)\n"
16636+ "9: movl %%eax, %%es:8(%3)\n"
16637+ "10: movl %%edx, %%es:12(%3)\n"
16638 "11: movl 16(%4), %%eax\n"
16639 "12: movl 20(%4), %%edx\n"
16640- "13: movl %%eax, 16(%3)\n"
16641- "14: movl %%edx, 20(%3)\n"
16642+ "13: movl %%eax, %%es:16(%3)\n"
16643+ "14: movl %%edx, %%es:20(%3)\n"
16644 "15: movl 24(%4), %%eax\n"
16645 "16: movl 28(%4), %%edx\n"
16646- "17: movl %%eax, 24(%3)\n"
16647- "18: movl %%edx, 28(%3)\n"
16648+ "17: movl %%eax, %%es:24(%3)\n"
16649+ "18: movl %%edx, %%es:28(%3)\n"
16650 "19: movl 32(%4), %%eax\n"
16651 "20: movl 36(%4), %%edx\n"
16652- "21: movl %%eax, 32(%3)\n"
16653- "22: movl %%edx, 36(%3)\n"
16654+ "21: movl %%eax, %%es:32(%3)\n"
16655+ "22: movl %%edx, %%es:36(%3)\n"
16656 "23: movl 40(%4), %%eax\n"
16657 "24: movl 44(%4), %%edx\n"
16658- "25: movl %%eax, 40(%3)\n"
16659- "26: movl %%edx, 44(%3)\n"
16660+ "25: movl %%eax, %%es:40(%3)\n"
16661+ "26: movl %%edx, %%es:44(%3)\n"
16662 "27: movl 48(%4), %%eax\n"
16663 "28: movl 52(%4), %%edx\n"
16664- "29: movl %%eax, 48(%3)\n"
16665- "30: movl %%edx, 52(%3)\n"
16666+ "29: movl %%eax, %%es:48(%3)\n"
16667+ "30: movl %%edx, %%es:52(%3)\n"
16668 "31: movl 56(%4), %%eax\n"
16669 "32: movl 60(%4), %%edx\n"
16670- "33: movl %%eax, 56(%3)\n"
16671- "34: movl %%edx, 60(%3)\n"
16672+ "33: movl %%eax, %%es:56(%3)\n"
16673+ "34: movl %%edx, %%es:60(%3)\n"
16674 " addl $-64, %0\n"
16675 " addl $64, %4\n"
16676 " addl $64, %3\n"
16677@@ -282,6 +406,8 @@ __copy_user_intel(void __user *to, const
16678 "36: movl %%eax, %0\n"
16679 "37: rep; movsb\n"
16680 "100:\n"
16681+ " pushl %%ss\n"
16682+ " popl %%ds\n"
16683 ".section .fixup,\"ax\"\n"
16684 "101: lea 0(%%eax,%0,4),%0\n"
16685 " jmp 100b\n"
16686@@ -328,7 +454,7 @@ __copy_user_intel(void __user *to, const
16687 " .long 99b,101b\n"
16688 ".previous"
16689 : "=&c"(size), "=&D" (d0), "=&S" (d1)
16690- : "1"(to), "2"(from), "0"(size)
16691+ : "1"(to), "2"(from), "0"(size), "r"(__USER_DS)
16871 : "eax", "edx", "memory"); 16692 : "eax", "edx", "memory");
16872 return size; 16693 return size;
16873 } 16694 }
@@ -17379,7 +17200,7 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_32.c linux-2.6.32.24/arch/x86/l
17379 #endif 17200 #endif
17380 return n; 17201 return n;
17381 } 17202 }
17382@@ -827,59 +1017,40 @@ unsigned long __copy_from_user_ll_nocach 17203@@ -827,65 +1017,53 @@ unsigned long __copy_from_user_ll_nocach
17383 if (n > 64 && cpu_has_xmm2) 17204 if (n > 64 && cpu_has_xmm2)
17384 n = __copy_user_intel_nocache(to, from, n); 17205 n = __copy_user_intel_nocache(to, from, n);
17385 else 17206 else
@@ -17408,25 +17229,15 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_32.c linux-2.6.32.24/arch/x86/l
17408- */ 17229- */
17409-unsigned long 17230-unsigned long
17410-copy_to_user(void __user *to, const void *from, unsigned long n) 17231-copy_to_user(void __user *to, const void *from, unsigned long n)
17411+#ifdef CONFIG_PAX_MEMORY_UDEREF 17232+void copy_from_user_overflow(void)
17412+void __set_fs(mm_segment_t x, int cpu)
17413 { 17233 {
17414- if (access_ok(VERIFY_WRITE, to, n)) 17234- if (access_ok(VERIFY_WRITE, to, n))
17415- n = __copy_to_user(to, from, n); 17235- n = __copy_to_user(to, from, n);
17416- return n; 17236- return n;
17417+ unsigned long limit = x.seg; 17237+ WARN(1, "Buffer overflow detected!\n");
17418+ struct desc_struct d;
17419+
17420+ current_thread_info()->addr_limit = x;
17421+ if (unlikely(paravirt_enabled()))
17422+ return;
17423+
17424+ if (likely(limit))
17425+ limit = (limit - 1UL) >> PAGE_SHIFT;
17426+ pack_descriptor(&d, 0UL, limit, 0xF3, 0xC);
17427+ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_DEFAULT_USER_DS, &d, DESCTYPE_S);
17428 } 17238 }
17429-EXPORT_SYMBOL(copy_to_user); 17239-EXPORT_SYMBOL(copy_to_user);
17240+EXPORT_SYMBOL(copy_from_user_overflow);
17430 17241
17431-/** 17242-/**
17432- * copy_from_user: - Copy a block of data from user space. 17243- * copy_from_user: - Copy a block of data from user space.
@@ -17445,18 +17256,44 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_32.c linux-2.6.32.24/arch/x86/l
17445- * data to the requested size using zero bytes. 17256- * data to the requested size using zero bytes.
17446- */ 17257- */
17447-unsigned long 17258-unsigned long
17448-copy_from_user(void *to, const void __user *from, unsigned long n) 17259-_copy_from_user(void *to, const void __user *from, unsigned long n)
17449+void set_fs(mm_segment_t x) 17260+void copy_to_user_overflow(void)
17450 { 17261 {
17451- if (access_ok(VERIFY_READ, from, n)) 17262- if (access_ok(VERIFY_READ, from, n))
17452- n = __copy_from_user(to, from, n); 17263- n = __copy_from_user(to, from, n);
17453- else 17264- else
17454- memset(to, 0, n); 17265- memset(to, 0, n);
17455- return n; 17266- return n;
17267+ WARN(1, "Buffer overflow detected!\n");
17268 }
17269-EXPORT_SYMBOL(_copy_from_user);
17270+EXPORT_SYMBOL(copy_to_user_overflow);
17271
17272-void copy_from_user_overflow(void)
17273+#ifdef CONFIG_PAX_MEMORY_UDEREF
17274+void __set_fs(mm_segment_t x, int cpu)
17275 {
17276- WARN(1, "Buffer overflow detected!\n");
17277+ unsigned long limit = x.seg;
17278+ struct desc_struct d;
17279+
17280+ current_thread_info()->addr_limit = x;
17281+ if (unlikely(paravirt_enabled()))
17282+ return;
17283+
17284+ if (likely(limit))
17285+ limit = (limit - 1UL) >> PAGE_SHIFT;
17286+ pack_descriptor(&d, 0UL, limit, 0xF3, 0xC);
17287+ write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_DEFAULT_USER_DS, &d, DESCTYPE_S);
17288 }
17289-EXPORT_SYMBOL(copy_from_user_overflow);
17290+
17291+void set_fs(mm_segment_t x)
17292+{
17456+ __set_fs(x, get_cpu()); 17293+ __set_fs(x, get_cpu());
17457+ put_cpu(); 17294+ put_cpu();
17458 } 17295+}
17459-EXPORT_SYMBOL(copy_from_user); 17296+EXPORT_SYMBOL(copy_from_user);
17460+#else 17297+#else
17461+void set_fs(mm_segment_t x) 17298+void set_fs(mm_segment_t x)
17462+{ 17299+{
@@ -17465,9 +17302,9 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_32.c linux-2.6.32.24/arch/x86/l
17465+#endif 17302+#endif
17466+ 17303+
17467+EXPORT_SYMBOL(set_fs); 17304+EXPORT_SYMBOL(set_fs);
17468diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_64.c linux-2.6.32.24/arch/x86/lib/usercopy_64.c 17305diff -urNp linux-2.6.35.7/arch/x86/lib/usercopy_64.c linux-2.6.35.7/arch/x86/lib/usercopy_64.c
17469--- linux-2.6.32.24/arch/x86/lib/usercopy_64.c 2010-08-13 16:24:37.000000000 -0400 17306--- linux-2.6.35.7/arch/x86/lib/usercopy_64.c 2010-08-26 19:47:12.000000000 -0400
17470+++ linux-2.6.32.24/arch/x86/lib/usercopy_64.c 2010-10-23 19:59:19.000000000 -0400 17307+++ linux-2.6.35.7/arch/x86/lib/usercopy_64.c 2010-09-17 20:12:09.000000000 -0400
17471@@ -42,6 +42,8 @@ long 17308@@ -42,6 +42,8 @@ long
17472 __strncpy_from_user(char *dst, const char __user *src, long count) 17309 __strncpy_from_user(char *dst, const char __user *src, long count)
17473 { 17310 {
@@ -17504,10 +17341,10 @@ diff -urNp linux-2.6.32.24/arch/x86/lib/usercopy_64.c linux-2.6.32.24/arch/x86/l
17504 } 17341 }
17505 EXPORT_SYMBOL(copy_in_user); 17342 EXPORT_SYMBOL(copy_in_user);
17506 17343
17507diff -urNp linux-2.6.32.24/arch/x86/Makefile linux-2.6.32.24/arch/x86/Makefile 17344diff -urNp linux-2.6.35.7/arch/x86/Makefile linux-2.6.35.7/arch/x86/Makefile
17508--- linux-2.6.32.24/arch/x86/Makefile 2010-08-13 16:24:37.000000000 -0400 17345--- linux-2.6.35.7/arch/x86/Makefile 2010-08-26 19:47:12.000000000 -0400
17509+++ linux-2.6.32.24/arch/x86/Makefile 2010-10-23 19:59:19.000000000 -0400 17346+++ linux-2.6.35.7/arch/x86/Makefile 2010-09-17 20:12:09.000000000 -0400
17510@@ -189,3 +189,12 @@ define archhelp 17347@@ -191,3 +191,12 @@ define archhelp
17511 echo ' FDARGS="..." arguments for the booted kernel' 17348 echo ' FDARGS="..." arguments for the booted kernel'
17512 echo ' FDINITRD=file initrd for the booted kernel' 17349 echo ' FDINITRD=file initrd for the booted kernel'
17513 endef 17350 endef
@@ -17520,9 +17357,9 @@ diff -urNp linux-2.6.32.24/arch/x86/Makefile linux-2.6.32.24/arch/x86/Makefile
17520+ 17357+
17521+archprepare: 17358+archprepare:
17522+ $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD))) 17359+ $(if $(LDFLAGS_BUILD_ID),,$(error $(OLD_LD)))
17523diff -urNp linux-2.6.32.24/arch/x86/mm/extable.c linux-2.6.32.24/arch/x86/mm/extable.c 17360diff -urNp linux-2.6.35.7/arch/x86/mm/extable.c linux-2.6.35.7/arch/x86/mm/extable.c
17524--- linux-2.6.32.24/arch/x86/mm/extable.c 2010-08-13 16:24:37.000000000 -0400 17361--- linux-2.6.35.7/arch/x86/mm/extable.c 2010-08-26 19:47:12.000000000 -0400
17525+++ linux-2.6.32.24/arch/x86/mm/extable.c 2010-10-23 19:59:19.000000000 -0400 17362+++ linux-2.6.35.7/arch/x86/mm/extable.c 2010-09-17 20:12:09.000000000 -0400
17526@@ -1,14 +1,71 @@ 17363@@ -1,14 +1,71 @@
17527 #include <linux/module.h> 17364 #include <linux/module.h>
17528 #include <linux/spinlock.h> 17365 #include <linux/spinlock.h>
@@ -17596,9 +17433,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/extable.c linux-2.6.32.24/arch/x86/mm/ext
17596 extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp; 17433 extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
17597 extern u32 pnp_bios_is_utter_crap; 17434 extern u32 pnp_bios_is_utter_crap;
17598 pnp_bios_is_utter_crap = 1; 17435 pnp_bios_is_utter_crap = 1;
17599diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault.c 17436diff -urNp linux-2.6.35.7/arch/x86/mm/fault.c linux-2.6.35.7/arch/x86/mm/fault.c
17600--- linux-2.6.32.24/arch/x86/mm/fault.c 2010-08-13 16:24:37.000000000 -0400 17437--- linux-2.6.35.7/arch/x86/mm/fault.c 2010-08-26 19:47:12.000000000 -0400
17601+++ linux-2.6.32.24/arch/x86/mm/fault.c 2010-10-23 19:59:24.000000000 -0400 17438+++ linux-2.6.35.7/arch/x86/mm/fault.c 2010-10-11 22:41:44.000000000 -0400
17602@@ -11,10 +11,19 @@ 17439@@ -11,10 +11,19 @@
17603 #include <linux/kprobes.h> /* __kprobes, ... */ 17440 #include <linux/kprobes.h> /* __kprobes, ... */
17604 #include <linux/mmiotrace.h> /* kmmio_handler, ... */ 17441 #include <linux/mmiotrace.h> /* kmmio_handler, ... */
@@ -17619,7 +17456,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17619 17456
17620 /* 17457 /*
17621 * Page fault error code bits: 17458 * Page fault error code bits:
17622@@ -51,7 +60,7 @@ static inline int notify_page_fault(stru 17459@@ -52,7 +61,7 @@ static inline int __kprobes notify_page_
17623 int ret = 0; 17460 int ret = 0;
17624 17461
17625 /* kprobe_running() needs smp_processor_id() */ 17462 /* kprobe_running() needs smp_processor_id() */
@@ -17628,7 +17465,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17628 preempt_disable(); 17465 preempt_disable();
17629 if (kprobe_running() && kprobe_fault_handler(regs, 14)) 17466 if (kprobe_running() && kprobe_fault_handler(regs, 14))
17630 ret = 1; 17467 ret = 1;
17631@@ -172,6 +181,30 @@ force_sig_info_fault(int si_signo, int s 17468@@ -173,6 +182,30 @@ force_sig_info_fault(int si_signo, int s
17632 force_sig_info(si_signo, &info, tsk); 17469 force_sig_info(si_signo, &info, tsk);
17633 } 17470 }
17634 17471
@@ -17659,7 +17496,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17659 DEFINE_SPINLOCK(pgd_lock); 17496 DEFINE_SPINLOCK(pgd_lock);
17660 LIST_HEAD(pgd_list); 17497 LIST_HEAD(pgd_list);
17661 17498
17662@@ -224,11 +257,24 @@ void vmalloc_sync_all(void) 17499@@ -225,11 +258,24 @@ void vmalloc_sync_all(void)
17663 address += PMD_SIZE) { 17500 address += PMD_SIZE) {
17664 17501
17665 unsigned long flags; 17502 unsigned long flags;
@@ -17685,7 +17522,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17685 break; 17522 break;
17686 } 17523 }
17687 spin_unlock_irqrestore(&pgd_lock, flags); 17524 spin_unlock_irqrestore(&pgd_lock, flags);
17688@@ -258,6 +304,11 @@ static noinline int vmalloc_fault(unsign 17525@@ -259,6 +305,11 @@ static noinline __kprobes int vmalloc_fa
17689 * an interrupt in the middle of a task switch.. 17526 * an interrupt in the middle of a task switch..
17690 */ 17527 */
17691 pgd_paddr = read_cr3(); 17528 pgd_paddr = read_cr3();
@@ -17697,7 +17534,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17697 pmd_k = vmalloc_sync_one(__va(pgd_paddr), address); 17534 pmd_k = vmalloc_sync_one(__va(pgd_paddr), address);
17698 if (!pmd_k) 17535 if (!pmd_k)
17699 return -1; 17536 return -1;
17700@@ -332,15 +383,27 @@ void vmalloc_sync_all(void) 17537@@ -333,15 +384,27 @@ void vmalloc_sync_all(void)
17701 17538
17702 const pgd_t *pgd_ref = pgd_offset_k(address); 17539 const pgd_t *pgd_ref = pgd_offset_k(address);
17703 unsigned long flags; 17540 unsigned long flags;
@@ -17725,7 +17562,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17725 if (pgd_none(*pgd)) 17562 if (pgd_none(*pgd))
17726 set_pgd(pgd, *pgd_ref); 17563 set_pgd(pgd, *pgd_ref);
17727 else 17564 else
17728@@ -373,7 +436,14 @@ static noinline int vmalloc_fault(unsign 17565@@ -374,7 +437,14 @@ static noinline __kprobes int vmalloc_fa
17729 * happen within a race in page table update. In the later 17566 * happen within a race in page table update. In the later
17730 * case just flush: 17567 * case just flush:
17731 */ 17568 */
@@ -17740,7 +17577,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17740 pgd_ref = pgd_offset_k(address); 17577 pgd_ref = pgd_offset_k(address);
17741 if (pgd_none(*pgd_ref)) 17578 if (pgd_none(*pgd_ref))
17742 return -1; 17579 return -1;
17743@@ -535,7 +605,7 @@ static int is_errata93(struct pt_regs *r 17580@@ -536,7 +606,7 @@ static int is_errata93(struct pt_regs *r
17744 static int is_errata100(struct pt_regs *regs, unsigned long address) 17581 static int is_errata100(struct pt_regs *regs, unsigned long address)
17745 { 17582 {
17746 #ifdef CONFIG_X86_64 17583 #ifdef CONFIG_X86_64
@@ -17749,7 +17586,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17749 return 1; 17586 return 1;
17750 #endif 17587 #endif
17751 return 0; 17588 return 0;
17752@@ -562,7 +632,7 @@ static int is_f00f_bug(struct pt_regs *r 17589@@ -563,7 +633,7 @@ static int is_f00f_bug(struct pt_regs *r
17753 } 17590 }
17754 17591
17755 static const char nx_warning[] = KERN_CRIT 17592 static const char nx_warning[] = KERN_CRIT
@@ -17758,12 +17595,12 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17758 17595
17759 static void 17596 static void
17760 show_fault_oops(struct pt_regs *regs, unsigned long error_code, 17597 show_fault_oops(struct pt_regs *regs, unsigned long error_code,
17761@@ -571,15 +641,26 @@ show_fault_oops(struct pt_regs *regs, un 17598@@ -572,15 +642,26 @@ show_fault_oops(struct pt_regs *regs, un
17762 if (!oops_may_print()) 17599 if (!oops_may_print())
17763 return; 17600 return;
17764 17601
17765- if (error_code & PF_INSTR) { 17602- if (error_code & PF_INSTR) {
17766+ if (nx_enabled && (error_code & PF_INSTR)) { 17603+ if ((__supported_pte_mask & _PAGE_NX) && (error_code & PF_INSTR)) {
17767 unsigned int level; 17604 unsigned int level;
17768 17605
17769 pte_t *pte = lookup_address(address, &level); 17606 pte_t *pte = lookup_address(address, &level);
@@ -17787,7 +17624,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17787 printk(KERN_ALERT "BUG: unable to handle kernel "); 17624 printk(KERN_ALERT "BUG: unable to handle kernel ");
17788 if (address < PAGE_SIZE) 17625 if (address < PAGE_SIZE)
17789 printk(KERN_CONT "NULL pointer dereference"); 17626 printk(KERN_CONT "NULL pointer dereference");
17790@@ -704,6 +785,68 @@ __bad_area_nosemaphore(struct pt_regs *r 17627@@ -705,6 +786,68 @@ __bad_area_nosemaphore(struct pt_regs *r
17791 unsigned long address, int si_code) 17628 unsigned long address, int si_code)
17792 { 17629 {
17793 struct task_struct *tsk = current; 17630 struct task_struct *tsk = current;
@@ -17822,7 +17659,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17822+ 17659+
17823+#ifdef CONFIG_PAX_PAGEEXEC 17660+#ifdef CONFIG_PAX_PAGEEXEC
17824+ if ((mm->pax_flags & MF_PAX_PAGEEXEC) && 17661+ if ((mm->pax_flags & MF_PAX_PAGEEXEC) &&
17825+ ((nx_enabled && (error_code & PF_INSTR)) || (!(error_code & (PF_PROT | PF_WRITE)) && ip == address))) { 17662+ (((__supported_pte_mask & _PAGE_NX) && (error_code & PF_INSTR)) || (!(error_code & (PF_PROT | PF_WRITE)) && ip == address))) {
17826+ 17663+
17827+#ifdef CONFIG_PAX_EMUTRAMP 17664+#ifdef CONFIG_PAX_EMUTRAMP
17828+ switch (pax_handle_fetch_fault(regs)) { 17665+ switch (pax_handle_fetch_fault(regs)) {
@@ -17856,7 +17693,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17856 17693
17857 /* User mode accesses just cause a SIGSEGV */ 17694 /* User mode accesses just cause a SIGSEGV */
17858 if (error_code & PF_USER) { 17695 if (error_code & PF_USER) {
17859@@ -850,6 +993,106 @@ static int spurious_fault_check(unsigned 17696@@ -851,6 +994,106 @@ static int spurious_fault_check(unsigned
17860 return 1; 17697 return 1;
17861 } 17698 }
17862 17699
@@ -17868,7 +17705,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17868+ spinlock_t *ptl; 17705+ spinlock_t *ptl;
17869+ unsigned char pte_mask; 17706+ unsigned char pte_mask;
17870+ 17707+
17871+ if (nx_enabled || (error_code & (PF_PROT|PF_USER)) != (PF_PROT|PF_USER) || v8086_mode(regs) || 17708+ if ((__supported_pte_mask & _PAGE_NX) || (error_code & (PF_PROT|PF_USER)) != (PF_PROT|PF_USER) || v8086_mode(regs) ||
17872+ !(mm->pax_flags & MF_PAX_PAGEEXEC)) 17709+ !(mm->pax_flags & MF_PAX_PAGEEXEC))
17873+ return 0; 17710+ return 0;
17874+ 17711+
@@ -17963,17 +17800,17 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
17963 /* 17800 /*
17964 * Handle a spurious fault caused by a stale TLB entry. 17801 * Handle a spurious fault caused by a stale TLB entry.
17965 * 17802 *
17966@@ -916,6 +1159,9 @@ int show_unhandled_signals = 1; 17803@@ -917,6 +1160,9 @@ int show_unhandled_signals = 1;
17967 static inline int 17804 static inline int
17968 access_error(unsigned long error_code, int write, struct vm_area_struct *vma) 17805 access_error(unsigned long error_code, int write, struct vm_area_struct *vma)
17969 { 17806 {
17970+ if (nx_enabled && (error_code & PF_INSTR) && !(vma->vm_flags & VM_EXEC)) 17807+ if ((__supported_pte_mask & _PAGE_NX) && (error_code & PF_INSTR) && !(vma->vm_flags & VM_EXEC))
17971+ return 1; 17808+ return 1;
17972+ 17809+
17973 if (write) { 17810 if (write) {
17974 /* write, present and write, not present: */ 17811 /* write, present and write, not present: */
17975 if (unlikely(!(vma->vm_flags & VM_WRITE))) 17812 if (unlikely(!(vma->vm_flags & VM_WRITE)))
17976@@ -949,17 +1195,31 @@ do_page_fault(struct pt_regs *regs, unsi 17813@@ -950,17 +1196,31 @@ do_page_fault(struct pt_regs *regs, unsi
17977 { 17814 {
17978 struct vm_area_struct *vma; 17815 struct vm_area_struct *vma;
17979 struct task_struct *tsk; 17816 struct task_struct *tsk;
@@ -18009,7 +17846,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
18009 /* 17846 /*
18010 * Detect and handle instructions that would cause a page fault for 17847 * Detect and handle instructions that would cause a page fault for
18011 * both a tracked kernel page and a userspace page. 17848 * both a tracked kernel page and a userspace page.
18012@@ -1019,7 +1279,7 @@ do_page_fault(struct pt_regs *regs, unsi 17849@@ -1020,7 +1280,7 @@ do_page_fault(struct pt_regs *regs, unsi
18013 * User-mode registers count as a user access even for any 17850 * User-mode registers count as a user access even for any
18014 * potential system fault or CPU buglet: 17851 * potential system fault or CPU buglet:
18015 */ 17852 */
@@ -18018,7 +17855,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
18018 local_irq_enable(); 17855 local_irq_enable();
18019 error_code |= PF_USER; 17856 error_code |= PF_USER;
18020 } else { 17857 } else {
18021@@ -1073,6 +1333,11 @@ do_page_fault(struct pt_regs *regs, unsi 17858@@ -1074,6 +1334,11 @@ do_page_fault(struct pt_regs *regs, unsi
18022 might_sleep(); 17859 might_sleep();
18023 } 17860 }
18024 17861
@@ -18030,7 +17867,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
18030 vma = find_vma(mm, address); 17867 vma = find_vma(mm, address);
18031 if (unlikely(!vma)) { 17868 if (unlikely(!vma)) {
18032 bad_area(regs, error_code, address); 17869 bad_area(regs, error_code, address);
18033@@ -1084,18 +1349,24 @@ do_page_fault(struct pt_regs *regs, unsi 17870@@ -1085,18 +1350,24 @@ do_page_fault(struct pt_regs *regs, unsi
18034 bad_area(regs, error_code, address); 17871 bad_area(regs, error_code, address);
18035 return; 17872 return;
18036 } 17873 }
@@ -18066,7 +17903,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
18066 if (unlikely(expand_stack(vma, address))) { 17903 if (unlikely(expand_stack(vma, address))) {
18067 bad_area(regs, error_code, address); 17904 bad_area(regs, error_code, address);
18068 return; 17905 return;
18069@@ -1139,3 +1410,199 @@ good_area: 17906@@ -1140,3 +1411,199 @@ good_area:
18070 17907
18071 up_read(&mm->mmap_sem); 17908 up_read(&mm->mmap_sem);
18072 } 17909 }
@@ -18266,9 +18103,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/fault.c linux-2.6.32.24/arch/x86/mm/fault
18266+ 18103+
18267+ return ret ? -EFAULT : 0; 18104+ return ret ? -EFAULT : 0;
18268+} 18105+}
18269diff -urNp linux-2.6.32.24/arch/x86/mm/gup.c linux-2.6.32.24/arch/x86/mm/gup.c 18106diff -urNp linux-2.6.35.7/arch/x86/mm/gup.c linux-2.6.35.7/arch/x86/mm/gup.c
18270--- linux-2.6.32.24/arch/x86/mm/gup.c 2010-08-13 16:24:37.000000000 -0400 18107--- linux-2.6.35.7/arch/x86/mm/gup.c 2010-08-26 19:47:12.000000000 -0400
18271+++ linux-2.6.32.24/arch/x86/mm/gup.c 2010-10-23 19:59:19.000000000 -0400 18108+++ linux-2.6.35.7/arch/x86/mm/gup.c 2010-09-17 20:12:09.000000000 -0400
18272@@ -237,7 +237,7 @@ int __get_user_pages_fast(unsigned long 18109@@ -237,7 +237,7 @@ int __get_user_pages_fast(unsigned long
18273 addr = start; 18110 addr = start;
18274 len = (unsigned long) nr_pages << PAGE_SHIFT; 18111 len = (unsigned long) nr_pages << PAGE_SHIFT;
@@ -18278,9 +18115,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/gup.c linux-2.6.32.24/arch/x86/mm/gup.c
18278 (void __user *)start, len))) 18115 (void __user *)start, len)))
18279 return 0; 18116 return 0;
18280 18117
18281diff -urNp linux-2.6.32.24/arch/x86/mm/highmem_32.c linux-2.6.32.24/arch/x86/mm/highmem_32.c 18118diff -urNp linux-2.6.35.7/arch/x86/mm/highmem_32.c linux-2.6.35.7/arch/x86/mm/highmem_32.c
18282--- linux-2.6.32.24/arch/x86/mm/highmem_32.c 2010-08-13 16:24:37.000000000 -0400 18119--- linux-2.6.35.7/arch/x86/mm/highmem_32.c 2010-08-26 19:47:12.000000000 -0400
18283+++ linux-2.6.32.24/arch/x86/mm/highmem_32.c 2010-10-23 19:59:19.000000000 -0400 18120+++ linux-2.6.35.7/arch/x86/mm/highmem_32.c 2010-09-17 20:12:09.000000000 -0400
18284@@ -43,7 +43,10 @@ void *kmap_atomic_prot(struct page *page 18121@@ -43,7 +43,10 @@ void *kmap_atomic_prot(struct page *page
18285 idx = type + KM_TYPE_NR*smp_processor_id(); 18122 idx = type + KM_TYPE_NR*smp_processor_id();
18286 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 18123 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
@@ -18292,10 +18129,10 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/highmem_32.c linux-2.6.32.24/arch/x86/mm/
18292 18129
18293 return (void *)vaddr; 18130 return (void *)vaddr;
18294 } 18131 }
18295diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm/hugetlbpage.c 18132diff -urNp linux-2.6.35.7/arch/x86/mm/hugetlbpage.c linux-2.6.35.7/arch/x86/mm/hugetlbpage.c
18296--- linux-2.6.32.24/arch/x86/mm/hugetlbpage.c 2010-08-13 16:24:37.000000000 -0400 18133--- linux-2.6.35.7/arch/x86/mm/hugetlbpage.c 2010-08-26 19:47:12.000000000 -0400
18297+++ linux-2.6.32.24/arch/x86/mm/hugetlbpage.c 2010-10-23 19:59:19.000000000 -0400 18134+++ linux-2.6.35.7/arch/x86/mm/hugetlbpage.c 2010-09-26 22:02:10.000000000 -0400
18298@@ -267,13 +267,20 @@ static unsigned long hugetlb_get_unmappe 18135@@ -266,13 +266,20 @@ static unsigned long hugetlb_get_unmappe
18299 struct hstate *h = hstate_file(file); 18136 struct hstate *h = hstate_file(file);
18300 struct mm_struct *mm = current->mm; 18137 struct mm_struct *mm = current->mm;
18301 struct vm_area_struct *vma; 18138 struct vm_area_struct *vma;
@@ -18320,7 +18157,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18320 } 18157 }
18321 18158
18322 full_search: 18159 full_search:
18323@@ -281,26 +288,27 @@ full_search: 18160@@ -280,26 +287,27 @@ full_search:
18324 18161
18325 for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { 18162 for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
18326 /* At this point: (!vma || addr < vma->vm_end). */ 18163 /* At this point: (!vma || addr < vma->vm_end). */
@@ -18355,7 +18192,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18355 } 18192 }
18356 18193
18357 static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file, 18194 static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
18358@@ -309,10 +317,9 @@ static unsigned long hugetlb_get_unmappe 18195@@ -308,10 +316,9 @@ static unsigned long hugetlb_get_unmappe
18359 { 18196 {
18360 struct hstate *h = hstate_file(file); 18197 struct hstate *h = hstate_file(file);
18361 struct mm_struct *mm = current->mm; 18198 struct mm_struct *mm = current->mm;
@@ -18368,7 +18205,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18368 18205
18369 /* don't allow allocations above current base */ 18206 /* don't allow allocations above current base */
18370 if (mm->free_area_cache > base) 18207 if (mm->free_area_cache > base)
18371@@ -322,7 +329,7 @@ static unsigned long hugetlb_get_unmappe 18208@@ -321,7 +328,7 @@ static unsigned long hugetlb_get_unmappe
18372 largest_hole = 0; 18209 largest_hole = 0;
18373 mm->free_area_cache = base; 18210 mm->free_area_cache = base;
18374 } 18211 }
@@ -18377,7 +18214,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18377 /* make sure it can fit in the remaining address space */ 18214 /* make sure it can fit in the remaining address space */
18378 if (mm->free_area_cache < len) 18215 if (mm->free_area_cache < len)
18379 goto fail; 18216 goto fail;
18380@@ -330,33 +337,27 @@ try_again: 18217@@ -329,33 +336,27 @@ try_again:
18381 /* either no address requested or cant fit in requested address hole */ 18218 /* either no address requested or cant fit in requested address hole */
18382 addr = (mm->free_area_cache - len) & huge_page_mask(h); 18219 addr = (mm->free_area_cache - len) & huge_page_mask(h);
18383 do { 18220 do {
@@ -18421,7 +18258,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18421 18258
18422 /* try just below the current vma->vm_start */ 18259 /* try just below the current vma->vm_start */
18423 addr = (vma->vm_start - len) & huge_page_mask(h); 18260 addr = (vma->vm_start - len) & huge_page_mask(h);
18424@@ -364,22 +365,26 @@ try_again: 18261@@ -363,22 +364,26 @@ try_again:
18425 18262
18426 fail: 18263 fail:
18427 /* 18264 /*
@@ -18459,7 +18296,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18459 mm->cached_hole_size = ~0UL; 18296 mm->cached_hole_size = ~0UL;
18460 addr = hugetlb_get_unmapped_area_bottomup(file, addr0, 18297 addr = hugetlb_get_unmapped_area_bottomup(file, addr0,
18461 len, pgoff, flags); 18298 len, pgoff, flags);
18462@@ -387,6 +392,7 @@ fail: 18299@@ -386,6 +391,7 @@ fail:
18463 /* 18300 /*
18464 * Restore the topdown base: 18301 * Restore the topdown base:
18465 */ 18302 */
@@ -18467,7 +18304,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18467 mm->free_area_cache = base; 18304 mm->free_area_cache = base;
18468 mm->cached_hole_size = ~0UL; 18305 mm->cached_hole_size = ~0UL;
18469 18306
18470@@ -400,10 +406,19 @@ hugetlb_get_unmapped_area(struct file *f 18307@@ -399,10 +405,19 @@ hugetlb_get_unmapped_area(struct file *f
18471 struct hstate *h = hstate_file(file); 18308 struct hstate *h = hstate_file(file);
18472 struct mm_struct *mm = current->mm; 18309 struct mm_struct *mm = current->mm;
18473 struct vm_area_struct *vma; 18310 struct vm_area_struct *vma;
@@ -18488,7 +18325,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18488 return -ENOMEM; 18325 return -ENOMEM;
18489 18326
18490 if (flags & MAP_FIXED) { 18327 if (flags & MAP_FIXED) {
18491@@ -415,8 +430,7 @@ hugetlb_get_unmapped_area(struct file *f 18328@@ -414,8 +429,7 @@ hugetlb_get_unmapped_area(struct file *f
18492 if (addr) { 18329 if (addr) {
18493 addr = ALIGN(addr, huge_page_size(h)); 18330 addr = ALIGN(addr, huge_page_size(h));
18494 vma = find_vma(mm, addr); 18331 vma = find_vma(mm, addr);
@@ -18498,9 +18335,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/hugetlbpage.c linux-2.6.32.24/arch/x86/mm
18498 return addr; 18335 return addr;
18499 } 18336 }
18500 if (mm->get_unmapped_area == arch_get_unmapped_area) 18337 if (mm->get_unmapped_area == arch_get_unmapped_area)
18501diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/init_32.c 18338diff -urNp linux-2.6.35.7/arch/x86/mm/init_32.c linux-2.6.35.7/arch/x86/mm/init_32.c
18502--- linux-2.6.32.24/arch/x86/mm/init_32.c 2010-08-13 16:24:37.000000000 -0400 18339--- linux-2.6.35.7/arch/x86/mm/init_32.c 2010-08-26 19:47:12.000000000 -0400
18503+++ linux-2.6.32.24/arch/x86/mm/init_32.c 2010-10-23 19:59:19.000000000 -0400 18340+++ linux-2.6.35.7/arch/x86/mm/init_32.c 2010-09-17 20:12:09.000000000 -0400
18504@@ -72,36 +72,6 @@ static __init void *alloc_low_page(void) 18341@@ -72,36 +72,6 @@ static __init void *alloc_low_page(void)
18505 } 18342 }
18506 18343
@@ -18616,8 +18453,8 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18616 } 18453 }
18617 18454
18618 /* 18455 /*
18619@@ -243,9 +243,10 @@ kernel_physical_mapping_init(unsigned lo 18456@@ -244,9 +244,10 @@ kernel_physical_mapping_init(unsigned lo
18620 int use_pse = page_size_mask == (1<<PG_LEVEL_2M); 18457 unsigned long last_map_addr = end;
18621 unsigned long start_pfn, end_pfn; 18458 unsigned long start_pfn, end_pfn;
18622 pgd_t *pgd_base = swapper_pg_dir; 18459 pgd_t *pgd_base = swapper_pg_dir;
18623- int pgd_idx, pmd_idx, pte_ofs; 18460- int pgd_idx, pmd_idx, pte_ofs;
@@ -18628,7 +18465,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18628 pmd_t *pmd; 18465 pmd_t *pmd;
18629 pte_t *pte; 18466 pte_t *pte;
18630 unsigned pages_2m, pages_4k; 18467 unsigned pages_2m, pages_4k;
18631@@ -278,8 +279,13 @@ repeat: 18468@@ -279,8 +280,13 @@ repeat:
18632 pfn = start_pfn; 18469 pfn = start_pfn;
18633 pgd_idx = pgd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); 18470 pgd_idx = pgd_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET);
18634 pgd = pgd_base + pgd_idx; 18471 pgd = pgd_base + pgd_idx;
@@ -18644,7 +18481,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18644 18481
18645 if (pfn >= end_pfn) 18482 if (pfn >= end_pfn)
18646 continue; 18483 continue;
18647@@ -291,14 +297,13 @@ repeat: 18484@@ -292,14 +298,13 @@ repeat:
18648 #endif 18485 #endif
18649 for (; pmd_idx < PTRS_PER_PMD && pfn < end_pfn; 18486 for (; pmd_idx < PTRS_PER_PMD && pfn < end_pfn;
18650 pmd++, pmd_idx++) { 18487 pmd++, pmd_idx++) {
@@ -18660,7 +18497,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18660 pgprot_t prot = PAGE_KERNEL_LARGE; 18497 pgprot_t prot = PAGE_KERNEL_LARGE;
18661 /* 18498 /*
18662 * first pass will use the same initial 18499 * first pass will use the same initial
18663@@ -308,11 +313,7 @@ repeat: 18500@@ -309,11 +314,7 @@ repeat:
18664 __pgprot(PTE_IDENT_ATTR | 18501 __pgprot(PTE_IDENT_ATTR |
18665 _PAGE_PSE); 18502 _PAGE_PSE);
18666 18503
@@ -18673,7 +18510,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18673 prot = PAGE_KERNEL_LARGE_EXEC; 18510 prot = PAGE_KERNEL_LARGE_EXEC;
18674 18511
18675 pages_2m++; 18512 pages_2m++;
18676@@ -329,7 +330,7 @@ repeat: 18513@@ -330,7 +331,7 @@ repeat:
18677 pte_ofs = pte_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET); 18514 pte_ofs = pte_index((pfn<<PAGE_SHIFT) + PAGE_OFFSET);
18678 pte += pte_ofs; 18515 pte += pte_ofs;
18679 for (; pte_ofs < PTRS_PER_PTE && pfn < end_pfn; 18516 for (; pte_ofs < PTRS_PER_PTE && pfn < end_pfn;
@@ -18682,7 +18519,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18682 pgprot_t prot = PAGE_KERNEL; 18519 pgprot_t prot = PAGE_KERNEL;
18683 /* 18520 /*
18684 * first pass will use the same initial 18521 * first pass will use the same initial
18685@@ -337,7 +338,7 @@ repeat: 18522@@ -338,7 +339,7 @@ repeat:
18686 */ 18523 */
18687 pgprot_t init_prot = __pgprot(PTE_IDENT_ATTR); 18524 pgprot_t init_prot = __pgprot(PTE_IDENT_ATTR);
18688 18525
@@ -18691,7 +18528,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18691 prot = PAGE_KERNEL_EXEC; 18528 prot = PAGE_KERNEL_EXEC;
18692 18529
18693 pages_4k++; 18530 pages_4k++;
18694@@ -489,7 +490,7 @@ void __init native_pagetable_setup_start 18531@@ -491,7 +492,7 @@ void __init native_pagetable_setup_start
18695 18532
18696 pud = pud_offset(pgd, va); 18533 pud = pud_offset(pgd, va);
18697 pmd = pmd_offset(pud, va); 18534 pmd = pmd_offset(pud, va);
@@ -18700,7 +18537,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18700 break; 18537 break;
18701 18538
18702 pte = pte_offset_kernel(pmd, va); 18539 pte = pte_offset_kernel(pmd, va);
18703@@ -541,9 +542,7 @@ void __init early_ioremap_page_table_ran 18540@@ -543,9 +544,7 @@ void __init early_ioremap_page_table_ran
18704 18541
18705 static void __init pagetable_init(void) 18542 static void __init pagetable_init(void)
18706 { 18543 {
@@ -18711,7 +18548,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18711 } 18548 }
18712 18549
18713 #ifdef CONFIG_ACPI_SLEEP 18550 #ifdef CONFIG_ACPI_SLEEP
18714@@ -551,12 +550,12 @@ static void __init pagetable_init(void) 18551@@ -553,12 +552,12 @@ static void __init pagetable_init(void)
18715 * ACPI suspend needs this for resume, because things like the intel-agp 18552 * ACPI suspend needs this for resume, because things like the intel-agp
18716 * driver might have split up a kernel 4MB mapping. 18553 * driver might have split up a kernel 4MB mapping.
18717 */ 18554 */
@@ -18726,7 +18563,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18726 } 18563 }
18727 #else /* !CONFIG_ACPI_SLEEP */ 18564 #else /* !CONFIG_ACPI_SLEEP */
18728 static inline void save_pg_dir(void) 18565 static inline void save_pg_dir(void)
18729@@ -588,7 +587,7 @@ void zap_low_mappings(bool early) 18566@@ -590,7 +589,7 @@ void zap_low_mappings(bool early)
18730 flush_tlb_all(); 18567 flush_tlb_all();
18731 } 18568 }
18732 18569
@@ -18735,7 +18572,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18735 EXPORT_SYMBOL_GPL(__supported_pte_mask); 18572 EXPORT_SYMBOL_GPL(__supported_pte_mask);
18736 18573
18737 /* user-defined highmem size */ 18574 /* user-defined highmem size */
18738@@ -777,7 +776,7 @@ void __init setup_bootmem_allocator(void 18575@@ -781,7 +780,7 @@ void __init setup_bootmem_allocator(void
18739 * Initialize the boot-time allocator (with low memory only): 18576 * Initialize the boot-time allocator (with low memory only):
18740 */ 18577 */
18741 bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT; 18578 bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT;
@@ -18744,7 +18581,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18744 PAGE_SIZE); 18581 PAGE_SIZE);
18745 if (bootmap == -1L) 18582 if (bootmap == -1L)
18746 panic("Cannot find bootmem map of size %ld\n", bootmap_size); 18583 panic("Cannot find bootmem map of size %ld\n", bootmap_size);
18747@@ -864,6 +863,12 @@ void __init mem_init(void) 18584@@ -871,6 +870,12 @@ void __init mem_init(void)
18748 18585
18749 pci_iommu_alloc(); 18586 pci_iommu_alloc();
18750 18587
@@ -18757,7 +18594,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18757 #ifdef CONFIG_FLATMEM 18594 #ifdef CONFIG_FLATMEM
18758 BUG_ON(!mem_map); 18595 BUG_ON(!mem_map);
18759 #endif 18596 #endif
18760@@ -881,7 +886,7 @@ void __init mem_init(void) 18597@@ -888,7 +893,7 @@ void __init mem_init(void)
18761 set_highmem_pages_init(); 18598 set_highmem_pages_init();
18762 18599
18763 codesize = (unsigned long) &_etext - (unsigned long) &_text; 18600 codesize = (unsigned long) &_etext - (unsigned long) &_text;
@@ -18766,7 +18603,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18766 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 18603 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
18767 18604
18768 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, " 18605 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
18769@@ -923,10 +928,10 @@ void __init mem_init(void) 18606@@ -929,10 +934,10 @@ void __init mem_init(void)
18770 ((unsigned long)&__init_end - 18607 ((unsigned long)&__init_end -
18771 (unsigned long)&__init_begin) >> 10, 18608 (unsigned long)&__init_begin) >> 10,
18772 18609
@@ -18780,7 +18617,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18780 ((unsigned long)&_etext - (unsigned long)&_text) >> 10); 18617 ((unsigned long)&_etext - (unsigned long)&_text) >> 10);
18781 18618
18782 /* 18619 /*
18783@@ -1007,6 +1012,7 @@ void set_kernel_text_rw(void) 18620@@ -1013,6 +1018,7 @@ void set_kernel_text_rw(void)
18784 if (!kernel_set_to_readonly) 18621 if (!kernel_set_to_readonly)
18785 return; 18622 return;
18786 18623
@@ -18788,7 +18625,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18788 pr_debug("Set kernel text: %lx - %lx for read write\n", 18625 pr_debug("Set kernel text: %lx - %lx for read write\n",
18789 start, start+size); 18626 start, start+size);
18790 18627
18791@@ -1021,6 +1027,7 @@ void set_kernel_text_ro(void) 18628@@ -1027,6 +1033,7 @@ void set_kernel_text_ro(void)
18792 if (!kernel_set_to_readonly) 18629 if (!kernel_set_to_readonly)
18793 return; 18630 return;
18794 18631
@@ -18796,7 +18633,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18796 pr_debug("Set kernel text: %lx - %lx for read only\n", 18633 pr_debug("Set kernel text: %lx - %lx for read only\n",
18797 start, start+size); 18634 start, start+size);
18798 18635
18799@@ -1032,6 +1039,7 @@ void mark_rodata_ro(void) 18636@@ -1038,6 +1045,7 @@ void mark_rodata_ro(void)
18800 unsigned long start = PFN_ALIGN(_text); 18637 unsigned long start = PFN_ALIGN(_text);
18801 unsigned long size = PFN_ALIGN(_etext) - start; 18638 unsigned long size = PFN_ALIGN(_etext) - start;
18802 18639
@@ -18804,10 +18641,27 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_32.c linux-2.6.32.24/arch/x86/mm/ini
18804 set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); 18641 set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
18805 printk(KERN_INFO "Write protecting the kernel text: %luk\n", 18642 printk(KERN_INFO "Write protecting the kernel text: %luk\n",
18806 size >> 10); 18643 size >> 10);
18807diff -urNp linux-2.6.32.24/arch/x86/mm/init_64.c linux-2.6.32.24/arch/x86/mm/init_64.c 18644diff -urNp linux-2.6.35.7/arch/x86/mm/init_64.c linux-2.6.35.7/arch/x86/mm/init_64.c
18808--- linux-2.6.32.24/arch/x86/mm/init_64.c 2010-08-13 16:24:37.000000000 -0400 18645--- linux-2.6.35.7/arch/x86/mm/init_64.c 2010-08-26 19:47:12.000000000 -0400
18809+++ linux-2.6.32.24/arch/x86/mm/init_64.c 2010-10-23 19:59:19.000000000 -0400 18646+++ linux-2.6.35.7/arch/x86/mm/init_64.c 2010-09-17 20:12:09.000000000 -0400
18810@@ -164,7 +164,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, 18647@@ -50,7 +50,6 @@
18648 #include <asm/numa.h>
18649 #include <asm/cacheflush.h>
18650 #include <asm/init.h>
18651-#include <linux/bootmem.h>
18652
18653 static unsigned long dma_reserve __initdata;
18654
18655@@ -74,7 +73,7 @@ early_param("gbpages", parse_direct_gbpa
18656 * around without checking the pgd every time.
18657 */
18658
18659-pteval_t __supported_pte_mask __read_mostly = ~_PAGE_IOMAP;
18660+pteval_t __supported_pte_mask __read_only = ~(_PAGE_NX | _PAGE_IOMAP);
18661 EXPORT_SYMBOL_GPL(__supported_pte_mask);
18662
18663 int force_personality32;
18664@@ -165,7 +164,9 @@ void set_pte_vaddr_pud(pud_t *pud_page,
18811 pmd = fill_pmd(pud, vaddr); 18665 pmd = fill_pmd(pud, vaddr);
18812 pte = fill_pte(pmd, vaddr); 18666 pte = fill_pte(pmd, vaddr);
18813 18667
@@ -18817,7 +18671,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_64.c linux-2.6.32.24/arch/x86/mm/ini
18817 18671
18818 /* 18672 /*
18819 * It's enough to flush this one mapping. 18673 * It's enough to flush this one mapping.
18820@@ -223,14 +225,12 @@ static void __init __init_extra_mapping( 18674@@ -224,14 +225,12 @@ static void __init __init_extra_mapping(
18821 pgd = pgd_offset_k((unsigned long)__va(phys)); 18675 pgd = pgd_offset_k((unsigned long)__va(phys));
18822 if (pgd_none(*pgd)) { 18676 if (pgd_none(*pgd)) {
18823 pud = (pud_t *) spp_getpage(); 18677 pud = (pud_t *) spp_getpage();
@@ -18834,7 +18688,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_64.c linux-2.6.32.24/arch/x86/mm/ini
18834 } 18688 }
18835 pmd = pmd_offset(pud, phys); 18689 pmd = pmd_offset(pud, phys);
18836 BUG_ON(!pmd_none(*pmd)); 18690 BUG_ON(!pmd_none(*pmd));
18837@@ -675,6 +675,12 @@ void __init mem_init(void) 18691@@ -680,6 +679,12 @@ void __init mem_init(void)
18838 18692
18839 pci_iommu_alloc(); 18693 pci_iommu_alloc();
18840 18694
@@ -18847,7 +18701,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_64.c linux-2.6.32.24/arch/x86/mm/ini
18847 /* clear_bss() already clear the empty_zero_page */ 18701 /* clear_bss() already clear the empty_zero_page */
18848 18702
18849 reservedpages = 0; 18703 reservedpages = 0;
18850@@ -861,8 +867,8 @@ int kern_addr_valid(unsigned long addr) 18704@@ -886,8 +891,8 @@ int kern_addr_valid(unsigned long addr)
18851 static struct vm_area_struct gate_vma = { 18705 static struct vm_area_struct gate_vma = {
18852 .vm_start = VSYSCALL_START, 18706 .vm_start = VSYSCALL_START,
18853 .vm_end = VSYSCALL_START + (VSYSCALL_MAPPED_PAGES * PAGE_SIZE), 18707 .vm_end = VSYSCALL_START + (VSYSCALL_MAPPED_PAGES * PAGE_SIZE),
@@ -18858,7 +18712,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_64.c linux-2.6.32.24/arch/x86/mm/ini
18858 }; 18712 };
18859 18713
18860 struct vm_area_struct *get_gate_vma(struct task_struct *tsk) 18714 struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
18861@@ -896,7 +902,7 @@ int in_gate_area_no_task(unsigned long a 18715@@ -921,7 +926,7 @@ int in_gate_area_no_task(unsigned long a
18862 18716
18863 const char *arch_vma_name(struct vm_area_struct *vma) 18717 const char *arch_vma_name(struct vm_area_struct *vma)
18864 { 18718 {
@@ -18867,10 +18721,10 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init_64.c linux-2.6.32.24/arch/x86/mm/ini
18867 return "[vdso]"; 18721 return "[vdso]";
18868 if (vma == &gate_vma) 18722 if (vma == &gate_vma)
18869 return "[vsyscall]"; 18723 return "[vsyscall]";
18870diff -urNp linux-2.6.32.24/arch/x86/mm/init.c linux-2.6.32.24/arch/x86/mm/init.c 18724diff -urNp linux-2.6.35.7/arch/x86/mm/init.c linux-2.6.35.7/arch/x86/mm/init.c
18871--- linux-2.6.32.24/arch/x86/mm/init.c 2010-08-13 16:24:37.000000000 -0400 18725--- linux-2.6.35.7/arch/x86/mm/init.c 2010-08-26 19:47:12.000000000 -0400
18872+++ linux-2.6.32.24/arch/x86/mm/init.c 2010-10-23 19:59:19.000000000 -0400 18726+++ linux-2.6.35.7/arch/x86/mm/init.c 2010-09-17 20:12:09.000000000 -0400
18873@@ -69,11 +69,7 @@ static void __init find_early_table_spac 18727@@ -70,11 +70,7 @@ static void __init find_early_table_spac
18874 * cause a hotspot and fill up ZONE_DMA. The page tables 18728 * cause a hotspot and fill up ZONE_DMA. The page tables
18875 * need roughly 0.5KB per GB. 18729 * need roughly 0.5KB per GB.
18876 */ 18730 */
@@ -18883,16 +18737,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init.c linux-2.6.32.24/arch/x86/mm/init.c
18883 e820_table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT, 18737 e820_table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT,
18884 tables, PAGE_SIZE); 18738 tables, PAGE_SIZE);
18885 if (e820_table_start == -1UL) 18739 if (e820_table_start == -1UL)
18886@@ -147,7 +143,7 @@ unsigned long __init_refok init_memory_m 18740@@ -321,7 +317,13 @@ unsigned long __init_refok init_memory_m
18887 #endif
18888
18889 set_nx();
18890- if (nx_enabled)
18891+ if (nx_enabled && cpu_has_nx)
18892 printk(KERN_INFO "NX (Execute Disable) protection: active\n");
18893
18894 /* Enable PSE if available */
18895@@ -331,7 +327,13 @@ unsigned long __init_refok init_memory_m
18896 */ 18741 */
18897 int devmem_is_allowed(unsigned long pagenr) 18742 int devmem_is_allowed(unsigned long pagenr)
18898 { 18743 {
@@ -18907,7 +18752,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init.c linux-2.6.32.24/arch/x86/mm/init.c
18907 return 1; 18752 return 1;
18908 if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) 18753 if (iomem_is_exclusive(pagenr << PAGE_SHIFT))
18909 return 0; 18754 return 0;
18910@@ -379,6 +381,88 @@ void free_init_pages(char *what, unsigne 18755@@ -380,6 +382,88 @@ void free_init_pages(char *what, unsigne
18911 18756
18912 void free_initmem(void) 18757 void free_initmem(void)
18913 { 18758 {
@@ -18996,9 +18841,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/init.c linux-2.6.32.24/arch/x86/mm/init.c
18996 free_init_pages("unused kernel memory", 18841 free_init_pages("unused kernel memory",
18997 (unsigned long)(&__init_begin), 18842 (unsigned long)(&__init_begin),
18998 (unsigned long)(&__init_end)); 18843 (unsigned long)(&__init_end));
18999diff -urNp linux-2.6.32.24/arch/x86/mm/iomap_32.c linux-2.6.32.24/arch/x86/mm/iomap_32.c 18844diff -urNp linux-2.6.35.7/arch/x86/mm/iomap_32.c linux-2.6.35.7/arch/x86/mm/iomap_32.c
19000--- linux-2.6.32.24/arch/x86/mm/iomap_32.c 2010-08-13 16:24:37.000000000 -0400 18845--- linux-2.6.35.7/arch/x86/mm/iomap_32.c 2010-08-26 19:47:12.000000000 -0400
19001+++ linux-2.6.32.24/arch/x86/mm/iomap_32.c 2010-10-23 19:59:19.000000000 -0400 18846+++ linux-2.6.35.7/arch/x86/mm/iomap_32.c 2010-09-17 20:12:09.000000000 -0400
19002@@ -65,7 +65,11 @@ void *kmap_atomic_prot_pfn(unsigned long 18847@@ -65,7 +65,11 @@ void *kmap_atomic_prot_pfn(unsigned long
19003 debug_kmap_atomic(type); 18848 debug_kmap_atomic(type);
19004 idx = type + KM_TYPE_NR * smp_processor_id(); 18849 idx = type + KM_TYPE_NR * smp_processor_id();
@@ -19011,21 +18856,10 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/iomap_32.c linux-2.6.32.24/arch/x86/mm/io
19011 arch_flush_lazy_mmu_mode(); 18856 arch_flush_lazy_mmu_mode();
19012 18857
19013 return (void *)vaddr; 18858 return (void *)vaddr;
19014diff -urNp linux-2.6.32.24/arch/x86/mm/ioremap.c linux-2.6.32.24/arch/x86/mm/ioremap.c 18859diff -urNp linux-2.6.35.7/arch/x86/mm/ioremap.c linux-2.6.35.7/arch/x86/mm/ioremap.c
19015--- linux-2.6.32.24/arch/x86/mm/ioremap.c 2010-08-13 16:24:37.000000000 -0400 18860--- linux-2.6.35.7/arch/x86/mm/ioremap.c 2010-08-26 19:47:12.000000000 -0400
19016+++ linux-2.6.32.24/arch/x86/mm/ioremap.c 2010-10-23 19:59:19.000000000 -0400 18861+++ linux-2.6.35.7/arch/x86/mm/ioremap.c 2010-09-17 20:12:09.000000000 -0400
19017@@ -41,8 +41,8 @@ int page_is_ram(unsigned long pagenr) 18862@@ -100,13 +100,10 @@ static void __iomem *__ioremap_caller(re
19018 * Second special case: Some BIOSen report the PC BIOS
19019 * area (640->1Mb) as ram even though it is not.
19020 */
19021- if (pagenr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
19022- pagenr < (BIOS_END >> PAGE_SHIFT))
19023+ if (pagenr >= (ISA_START_ADDRESS >> PAGE_SHIFT) &&
19024+ pagenr < (ISA_END_ADDRESS >> PAGE_SHIFT))
19025 return 0;
19026
19027 for (i = 0; i < e820.nr_map; i++) {
19028@@ -137,13 +137,10 @@ static void __iomem *__ioremap_caller(re
19029 /* 18863 /*
19030 * Don't allow anybody to remap normal RAM that we're using.. 18864 * Don't allow anybody to remap normal RAM that we're using..
19031 */ 18865 */
@@ -19041,7 +18875,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/ioremap.c linux-2.6.32.24/arch/x86/mm/ior
19041 return NULL; 18875 return NULL;
19042 WARN_ON_ONCE(is_ram); 18876 WARN_ON_ONCE(is_ram);
19043 } 18877 }
19044@@ -407,7 +404,7 @@ static int __init early_ioremap_debug_se 18878@@ -346,7 +343,7 @@ static int __init early_ioremap_debug_se
19045 early_param("early_ioremap_debug", early_ioremap_debug_setup); 18879 early_param("early_ioremap_debug", early_ioremap_debug_setup);
19046 18880
19047 static __initdata int after_paging_init; 18881 static __initdata int after_paging_init;
@@ -19050,7 +18884,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/ioremap.c linux-2.6.32.24/arch/x86/mm/ior
19050 18884
19051 static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) 18885 static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
19052 { 18886 {
19053@@ -439,8 +436,7 @@ void __init early_ioremap_init(void) 18887@@ -378,8 +375,7 @@ void __init early_ioremap_init(void)
19054 slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); 18888 slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
19055 18889
19056 pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); 18890 pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
@@ -19060,9 +18894,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/ioremap.c linux-2.6.32.24/arch/x86/mm/ior
19060 18894
19061 /* 18895 /*
19062 * The boot-ioremap range spans multiple pmds, for which 18896 * The boot-ioremap range spans multiple pmds, for which
19063diff -urNp linux-2.6.32.24/arch/x86/mm/kmemcheck/kmemcheck.c linux-2.6.32.24/arch/x86/mm/kmemcheck/kmemcheck.c 18897diff -urNp linux-2.6.35.7/arch/x86/mm/kmemcheck/kmemcheck.c linux-2.6.35.7/arch/x86/mm/kmemcheck/kmemcheck.c
19064--- linux-2.6.32.24/arch/x86/mm/kmemcheck/kmemcheck.c 2010-08-13 16:24:37.000000000 -0400 18898--- linux-2.6.35.7/arch/x86/mm/kmemcheck/kmemcheck.c 2010-08-26 19:47:12.000000000 -0400
19065+++ linux-2.6.32.24/arch/x86/mm/kmemcheck/kmemcheck.c 2010-10-23 19:59:19.000000000 -0400 18899+++ linux-2.6.35.7/arch/x86/mm/kmemcheck/kmemcheck.c 2010-09-17 20:12:09.000000000 -0400
19066@@ -622,9 +622,9 @@ bool kmemcheck_fault(struct pt_regs *reg 18900@@ -622,9 +622,9 @@ bool kmemcheck_fault(struct pt_regs *reg
19067 * memory (e.g. tracked pages)? For now, we need this to avoid 18901 * memory (e.g. tracked pages)? For now, we need this to avoid
19068 * invoking kmemcheck for PnP BIOS calls. 18902 * invoking kmemcheck for PnP BIOS calls.
@@ -19075,9 +18909,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/kmemcheck/kmemcheck.c linux-2.6.32.24/arc
19075 return false; 18909 return false;
19076 18910
19077 pte = kmemcheck_pte_lookup(address); 18911 pte = kmemcheck_pte_lookup(address);
19078diff -urNp linux-2.6.32.24/arch/x86/mm/mmap.c linux-2.6.32.24/arch/x86/mm/mmap.c 18912diff -urNp linux-2.6.35.7/arch/x86/mm/mmap.c linux-2.6.35.7/arch/x86/mm/mmap.c
19079--- linux-2.6.32.24/arch/x86/mm/mmap.c 2010-08-13 16:24:37.000000000 -0400 18913--- linux-2.6.35.7/arch/x86/mm/mmap.c 2010-08-26 19:47:12.000000000 -0400
19080+++ linux-2.6.32.24/arch/x86/mm/mmap.c 2010-10-23 19:59:19.000000000 -0400 18914+++ linux-2.6.35.7/arch/x86/mm/mmap.c 2010-09-17 20:12:09.000000000 -0400
19081@@ -49,7 +49,7 @@ static unsigned int stack_maxrandom_size 18915@@ -49,7 +49,7 @@ static unsigned int stack_maxrandom_size
19082 * Leave an at least ~128 MB hole with possible stack randomization. 18916 * Leave an at least ~128 MB hole with possible stack randomization.
19083 */ 18917 */
@@ -19094,7 +18928,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/mmap.c linux-2.6.32.24/arch/x86/mm/mmap.c
19094-static unsigned long mmap_base(void) 18928-static unsigned long mmap_base(void)
19095+static unsigned long mmap_base(struct mm_struct *mm) 18929+static unsigned long mmap_base(struct mm_struct *mm)
19096 { 18930 {
19097 unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur; 18931 unsigned long gap = rlimit(RLIMIT_STACK);
19098+ unsigned long pax_task_size = TASK_SIZE; 18932+ unsigned long pax_task_size = TASK_SIZE;
19099+ 18933+
19100+#ifdef CONFIG_PAX_SEGMEXEC 18934+#ifdef CONFIG_PAX_SEGMEXEC
@@ -19159,9 +18993,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/mmap.c linux-2.6.32.24/arch/x86/mm/mmap.c
19159 mm->get_unmapped_area = arch_get_unmapped_area_topdown; 18993 mm->get_unmapped_area = arch_get_unmapped_area_topdown;
19160 mm->unmap_area = arch_unmap_area_topdown; 18994 mm->unmap_area = arch_unmap_area_topdown;
19161 } 18995 }
19162diff -urNp linux-2.6.32.24/arch/x86/mm/numa_32.c linux-2.6.32.24/arch/x86/mm/numa_32.c 18996diff -urNp linux-2.6.35.7/arch/x86/mm/numa_32.c linux-2.6.35.7/arch/x86/mm/numa_32.c
19163--- linux-2.6.32.24/arch/x86/mm/numa_32.c 2010-08-13 16:24:37.000000000 -0400 18997--- linux-2.6.35.7/arch/x86/mm/numa_32.c 2010-08-26 19:47:12.000000000 -0400
19164+++ linux-2.6.32.24/arch/x86/mm/numa_32.c 2010-10-23 19:59:19.000000000 -0400 18998+++ linux-2.6.35.7/arch/x86/mm/numa_32.c 2010-09-17 20:12:09.000000000 -0400
19165@@ -98,7 +98,6 @@ unsigned long node_memmap_size_bytes(int 18999@@ -98,7 +98,6 @@ unsigned long node_memmap_size_bytes(int
19166 } 19000 }
19167 #endif 19001 #endif
@@ -19170,9 +19004,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/numa_32.c linux-2.6.32.24/arch/x86/mm/num
19170 extern unsigned long highend_pfn, highstart_pfn; 19004 extern unsigned long highend_pfn, highstart_pfn;
19171 19005
19172 #define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE) 19006 #define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE)
19173diff -urNp linux-2.6.32.24/arch/x86/mm/pageattr.c linux-2.6.32.24/arch/x86/mm/pageattr.c 19007diff -urNp linux-2.6.35.7/arch/x86/mm/pageattr.c linux-2.6.35.7/arch/x86/mm/pageattr.c
19174--- linux-2.6.32.24/arch/x86/mm/pageattr.c 2010-08-13 16:24:37.000000000 -0400 19008--- linux-2.6.35.7/arch/x86/mm/pageattr.c 2010-08-26 19:47:12.000000000 -0400
19175+++ linux-2.6.32.24/arch/x86/mm/pageattr.c 2010-10-23 19:59:19.000000000 -0400 19009+++ linux-2.6.35.7/arch/x86/mm/pageattr.c 2010-09-17 20:12:09.000000000 -0400
19176@@ -261,16 +261,17 @@ static inline pgprot_t static_protection 19010@@ -261,16 +261,17 @@ static inline pgprot_t static_protection
19177 * PCI BIOS based config access (CONFIG_PCI_GOBIOS) support. 19011 * PCI BIOS based config access (CONFIG_PCI_GOBIOS) support.
19178 */ 19012 */
@@ -19194,22 +19028,29 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pageattr.c linux-2.6.32.24/arch/x86/mm/pa
19194 /* 19028 /*
19195 * The .rodata section needs to be read-only. Using the pfn 19029 * The .rodata section needs to be read-only. Using the pfn
19196 * catches all aliases. 19030 * catches all aliases.
19197@@ -278,6 +279,14 @@ static inline pgprot_t static_protection 19031@@ -278,6 +279,7 @@ static inline pgprot_t static_protection
19198 if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT, 19032 if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT,
19199 __pa((unsigned long)__end_rodata) >> PAGE_SHIFT)) 19033 __pa((unsigned long)__end_rodata) >> PAGE_SHIFT))
19200 pgprot_val(forbidden) |= _PAGE_RW; 19034 pgprot_val(forbidden) |= _PAGE_RW;
19201+#endif 19035+#endif
19202+ 19036
19037 #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
19038 /*
19039@@ -316,6 +318,13 @@ static inline pgprot_t static_protection
19040 }
19041 #endif
19042
19203+#ifdef CONFIG_PAX_KERNEXEC 19043+#ifdef CONFIG_PAX_KERNEXEC
19204+ if (within(pfn, __pa((unsigned long)&_text), __pa((unsigned long)&_sdata))) { 19044+ if (within(pfn, __pa((unsigned long)&_text), __pa((unsigned long)&_sdata))) {
19205+ pgprot_val(forbidden) |= _PAGE_RW; 19045+ pgprot_val(forbidden) |= _PAGE_RW;
19206+ pgprot_val(forbidden) |= _PAGE_NX & __supported_pte_mask; 19046+ pgprot_val(forbidden) |= _PAGE_NX & __supported_pte_mask;
19207+ } 19047+ }
19208+#endif 19048+#endif
19209 19049+
19210 prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden)); 19050 prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
19211 19051
19212@@ -331,23 +340,37 @@ EXPORT_SYMBOL_GPL(lookup_address); 19052 return prot;
19053@@ -368,23 +377,37 @@ EXPORT_SYMBOL_GPL(lookup_address);
19213 static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) 19054 static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
19214 { 19055 {
19215 /* change init_mm */ 19056 /* change init_mm */
@@ -19249,9 +19090,9 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pageattr.c linux-2.6.32.24/arch/x86/mm/pa
19249 } 19090 }
19250 19091
19251 static int 19092 static int
19252diff -urNp linux-2.6.32.24/arch/x86/mm/pageattr-test.c linux-2.6.32.24/arch/x86/mm/pageattr-test.c 19093diff -urNp linux-2.6.35.7/arch/x86/mm/pageattr-test.c linux-2.6.35.7/arch/x86/mm/pageattr-test.c
19253--- linux-2.6.32.24/arch/x86/mm/pageattr-test.c 2010-08-13 16:24:37.000000000 -0400 19094--- linux-2.6.35.7/arch/x86/mm/pageattr-test.c 2010-08-26 19:47:12.000000000 -0400
19254+++ linux-2.6.32.24/arch/x86/mm/pageattr-test.c 2010-10-23 19:59:19.000000000 -0400 19095+++ linux-2.6.35.7/arch/x86/mm/pageattr-test.c 2010-09-17 20:12:09.000000000 -0400
19255@@ -36,7 +36,7 @@ enum { 19096@@ -36,7 +36,7 @@ enum {
19256 19097
19257 static int pte_testbit(pte_t pte) 19098 static int pte_testbit(pte_t pte)
@@ -19261,28 +19102,19 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pageattr-test.c linux-2.6.32.24/arch/x86/
19261 } 19102 }
19262 19103
19263 struct split_state { 19104 struct split_state {
19264diff -urNp linux-2.6.32.24/arch/x86/mm/pat.c linux-2.6.32.24/arch/x86/mm/pat.c 19105diff -urNp linux-2.6.35.7/arch/x86/mm/pat.c linux-2.6.35.7/arch/x86/mm/pat.c
19265--- linux-2.6.32.24/arch/x86/mm/pat.c 2010-08-13 16:24:37.000000000 -0400 19106--- linux-2.6.35.7/arch/x86/mm/pat.c 2010-08-26 19:47:12.000000000 -0400
19266+++ linux-2.6.32.24/arch/x86/mm/pat.c 2010-10-23 19:59:19.000000000 -0400 19107+++ linux-2.6.35.7/arch/x86/mm/pat.c 2010-09-17 20:12:09.000000000 -0400
19267@@ -258,7 +258,7 @@ chk_conflict(struct memtype *new, struct 19108@@ -361,7 +361,7 @@ int free_memtype(u64 start, u64 end)
19268 19109
19269 conflict: 19110 if (!entry) {
19270 printk(KERN_INFO "%s:%d conflicting memory types "
19271- "%Lx-%Lx %s<->%s\n", current->comm, current->pid, new->start,
19272+ "%Lx-%Lx %s<->%s\n", current->comm, task_pid_nr(current), new->start,
19273 new->end, cattr_name(new->type), cattr_name(entry->type));
19274 return -EBUSY;
19275 }
19276@@ -559,7 +559,7 @@ unlock_ret:
19277
19278 if (err) {
19279 printk(KERN_INFO "%s:%d freeing invalid memtype %Lx-%Lx\n", 19111 printk(KERN_INFO "%s:%d freeing invalid memtype %Lx-%Lx\n",
19280- current->comm, current->pid, start, end); 19112- current->comm, current->pid, start, end);
19281+ current->comm, task_pid_nr(current), start, end); 19113+ current->comm, task_pid_nr(current), start, end);
19114 return -EINVAL;
19282 } 19115 }
19283 19116
19284 dprintk("free_memtype request 0x%Lx-0x%Lx\n", start, end); 19117@@ -492,8 +492,8 @@ static inline int range_is_allowed(unsig
19285@@ -689,8 +689,8 @@ static inline int range_is_allowed(unsig
19286 while (cursor < to) { 19118 while (cursor < to) {
19287 if (!devmem_is_allowed(pfn)) { 19119 if (!devmem_is_allowed(pfn)) {
19288 printk(KERN_INFO 19120 printk(KERN_INFO
@@ -19293,7 +19125,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pat.c linux-2.6.32.24/arch/x86/mm/pat.c
19293 return 0; 19125 return 0;
19294 } 19126 }
19295 cursor += PAGE_SIZE; 19127 cursor += PAGE_SIZE;
19296@@ -755,7 +755,7 @@ int kernel_map_sync_memtype(u64 base, un 19128@@ -557,7 +557,7 @@ int kernel_map_sync_memtype(u64 base, un
19297 printk(KERN_INFO 19129 printk(KERN_INFO
19298 "%s:%d ioremap_change_attr failed %s " 19130 "%s:%d ioremap_change_attr failed %s "
19299 "for %Lx-%Lx\n", 19131 "for %Lx-%Lx\n",
@@ -19302,7 +19134,16 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pat.c linux-2.6.32.24/arch/x86/mm/pat.c
19302 cattr_name(flags), 19134 cattr_name(flags),
19303 base, (unsigned long long)(base + size)); 19135 base, (unsigned long long)(base + size));
19304 return -EINVAL; 19136 return -EINVAL;
19305@@ -813,7 +813,7 @@ static int reserve_pfn_range(u64 paddr, 19137@@ -593,7 +593,7 @@ static int reserve_pfn_range(u64 paddr,
19138 if (want_flags != flags) {
19139 printk(KERN_WARNING
19140 "%s:%d map pfn RAM range req %s for %Lx-%Lx, got %s\n",
19141- current->comm, current->pid,
19142+ current->comm, task_pid_nr(current),
19143 cattr_name(want_flags),
19144 (unsigned long long)paddr,
19145 (unsigned long long)(paddr + size),
19146@@ -615,7 +615,7 @@ static int reserve_pfn_range(u64 paddr,
19306 free_memtype(paddr, paddr + size); 19147 free_memtype(paddr, paddr + size);
19307 printk(KERN_ERR "%s:%d map pfn expected mapping type %s" 19148 printk(KERN_ERR "%s:%d map pfn expected mapping type %s"
19308 " for %Lx-%Lx, got %s\n", 19149 " for %Lx-%Lx, got %s\n",
@@ -19311,10 +19152,10 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pat.c linux-2.6.32.24/arch/x86/mm/pat.c
19311 cattr_name(want_flags), 19152 cattr_name(want_flags),
19312 (unsigned long long)paddr, 19153 (unsigned long long)paddr,
19313 (unsigned long long)(paddr + size), 19154 (unsigned long long)(paddr + size),
19314diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable_32.c linux-2.6.32.24/arch/x86/mm/pgtable_32.c 19155diff -urNp linux-2.6.35.7/arch/x86/mm/pgtable_32.c linux-2.6.35.7/arch/x86/mm/pgtable_32.c
19315--- linux-2.6.32.24/arch/x86/mm/pgtable_32.c 2010-08-13 16:24:37.000000000 -0400 19156--- linux-2.6.35.7/arch/x86/mm/pgtable_32.c 2010-08-26 19:47:12.000000000 -0400
19316+++ linux-2.6.32.24/arch/x86/mm/pgtable_32.c 2010-10-23 19:59:19.000000000 -0400 19157+++ linux-2.6.35.7/arch/x86/mm/pgtable_32.c 2010-09-17 20:12:09.000000000 -0400
19317@@ -49,10 +49,13 @@ void set_pte_vaddr(unsigned long vaddr, 19158@@ -48,10 +48,13 @@ void set_pte_vaddr(unsigned long vaddr,
19318 return; 19159 return;
19319 } 19160 }
19320 pte = pte_offset_kernel(pmd, vaddr); 19161 pte = pte_offset_kernel(pmd, vaddr);
@@ -19328,10 +19169,10 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable_32.c linux-2.6.32.24/arch/x86/mm/
19328 19169
19329 /* 19170 /*
19330 * It's enough to flush this one mapping. 19171 * It's enough to flush this one mapping.
19331diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgtable.c 19172diff -urNp linux-2.6.35.7/arch/x86/mm/pgtable.c linux-2.6.35.7/arch/x86/mm/pgtable.c
19332--- linux-2.6.32.24/arch/x86/mm/pgtable.c 2010-08-13 16:24:37.000000000 -0400 19173--- linux-2.6.35.7/arch/x86/mm/pgtable.c 2010-08-26 19:47:12.000000000 -0400
19333+++ linux-2.6.32.24/arch/x86/mm/pgtable.c 2010-10-23 19:59:24.000000000 -0400 19174+++ linux-2.6.35.7/arch/x86/mm/pgtable.c 2010-10-10 15:54:54.000000000 -0400
19334@@ -83,8 +83,58 @@ static inline void pgd_list_del(pgd_t *p 19175@@ -84,8 +84,58 @@ static inline void pgd_list_del(pgd_t *p
19335 list_del(&page->lru); 19176 list_del(&page->lru);
19336 } 19177 }
19337 19178
@@ -19392,7 +19233,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19392 19233
19393 static void pgd_ctor(pgd_t *pgd) 19234 static void pgd_ctor(pgd_t *pgd)
19394 { 19235 {
19395@@ -119,6 +169,7 @@ static void pgd_dtor(pgd_t *pgd) 19236@@ -120,6 +170,7 @@ static void pgd_dtor(pgd_t *pgd)
19396 pgd_list_del(pgd); 19237 pgd_list_del(pgd);
19397 spin_unlock_irqrestore(&pgd_lock, flags); 19238 spin_unlock_irqrestore(&pgd_lock, flags);
19398 } 19239 }
@@ -19400,7 +19241,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19400 19241
19401 /* 19242 /*
19402 * List of all pgd's needed for non-PAE so it can invalidate entries 19243 * List of all pgd's needed for non-PAE so it can invalidate entries
19403@@ -131,7 +182,7 @@ static void pgd_dtor(pgd_t *pgd) 19244@@ -132,7 +183,7 @@ static void pgd_dtor(pgd_t *pgd)
19404 * -- wli 19245 * -- wli
19405 */ 19246 */
19406 19247
@@ -19409,7 +19250,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19409 /* 19250 /*
19410 * In PAE mode, we need to do a cr3 reload (=tlb flush) when 19251 * In PAE mode, we need to do a cr3 reload (=tlb flush) when
19411 * updating the top-level pagetable entries to guarantee the 19252 * updating the top-level pagetable entries to guarantee the
19412@@ -143,7 +194,7 @@ static void pgd_dtor(pgd_t *pgd) 19253@@ -144,7 +195,7 @@ static void pgd_dtor(pgd_t *pgd)
19413 * not shared between pagetables (!SHARED_KERNEL_PMDS), we allocate 19254 * not shared between pagetables (!SHARED_KERNEL_PMDS), we allocate
19414 * and initialize the kernel pmds here. 19255 * and initialize the kernel pmds here.
19415 */ 19256 */
@@ -19418,7 +19259,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19418 19259
19419 void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd) 19260 void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd)
19420 { 19261 {
19421@@ -162,36 +213,38 @@ void pud_populate(struct mm_struct *mm, 19262@@ -163,36 +214,38 @@ void pud_populate(struct mm_struct *mm,
19422 if (mm == current->active_mm) 19263 if (mm == current->active_mm)
19423 write_cr3(read_cr3()); 19264 write_cr3(read_cr3());
19424 } 19265 }
@@ -19468,7 +19309,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19468 return -ENOMEM; 19309 return -ENOMEM;
19469 } 19310 }
19470 19311
19471@@ -204,51 +257,56 @@ static int preallocate_pmds(pmd_t *pmds[ 19312@@ -205,51 +258,56 @@ static int preallocate_pmds(pmd_t *pmds[
19472 * preallocate which never got a corresponding vma will need to be 19313 * preallocate which never got a corresponding vma will need to be
19473 * freed manually. 19314 * freed manually.
19474 */ 19315 */
@@ -19542,7 +19383,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19542 unsigned long flags; 19383 unsigned long flags;
19543 19384
19544 pgd = (pgd_t *)__get_free_page(PGALLOC_GFP); 19385 pgd = (pgd_t *)__get_free_page(PGALLOC_GFP);
19545@@ -258,11 +316,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm) 19386@@ -259,11 +317,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
19546 19387
19547 mm->pgd = pgd; 19388 mm->pgd = pgd;
19548 19389
@@ -19556,7 +19397,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19556 19397
19557 /* 19398 /*
19558 * Make sure that pre-populating the pmds is atomic with 19399 * Make sure that pre-populating the pmds is atomic with
19559@@ -272,14 +330,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm) 19400@@ -273,14 +331,14 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
19560 spin_lock_irqsave(&pgd_lock, flags); 19401 spin_lock_irqsave(&pgd_lock, flags);
19561 19402
19562 pgd_ctor(pgd); 19403 pgd_ctor(pgd);
@@ -19574,7 +19415,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19574 out_free_pgd: 19415 out_free_pgd:
19575 free_page((unsigned long)pgd); 19416 free_page((unsigned long)pgd);
19576 out: 19417 out:
19577@@ -288,7 +346,7 @@ out: 19418@@ -289,7 +347,7 @@ out:
19578 19419
19579 void pgd_free(struct mm_struct *mm, pgd_t *pgd) 19420 void pgd_free(struct mm_struct *mm, pgd_t *pgd)
19580 { 19421 {
@@ -19583,78 +19424,42 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/pgtable.c linux-2.6.32.24/arch/x86/mm/pgt
19583 pgd_dtor(pgd); 19424 pgd_dtor(pgd);
19584 paravirt_pgd_free(mm, pgd); 19425 paravirt_pgd_free(mm, pgd);
19585 free_page((unsigned long)pgd); 19426 free_page((unsigned long)pgd);
19586diff -urNp linux-2.6.32.24/arch/x86/mm/setup_nx.c linux-2.6.32.24/arch/x86/mm/setup_nx.c 19427diff -urNp linux-2.6.35.7/arch/x86/mm/setup_nx.c linux-2.6.35.7/arch/x86/mm/setup_nx.c
19587--- linux-2.6.32.24/arch/x86/mm/setup_nx.c 2010-08-13 16:24:37.000000000 -0400 19428--- linux-2.6.35.7/arch/x86/mm/setup_nx.c 2010-08-26 19:47:12.000000000 -0400
19588+++ linux-2.6.32.24/arch/x86/mm/setup_nx.c 2010-10-23 19:59:19.000000000 -0400 19429+++ linux-2.6.35.7/arch/x86/mm/setup_nx.c 2010-09-17 20:12:09.000000000 -0400
19589@@ -4,11 +4,10 @@ 19430@@ -5,8 +5,10 @@
19590
19591 #include <asm/pgtable.h> 19431 #include <asm/pgtable.h>
19432 #include <asm/proto.h>
19592 19433
19593+#if defined(CONFIG_X86_32) && defined(CONFIG_X86_PAE) 19434+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
19594 int nx_enabled; 19435 static int disable_nx __cpuinitdata;
19595 19436
19596-#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
19597-static int disable_nx __cpuinitdata;
19598-
19599+#ifndef CONFIG_PAX_PAGEEXEC 19437+#ifndef CONFIG_PAX_PAGEEXEC
19600 /* 19438 /*
19601 * noexec = on|off 19439 * noexec = on|off
19602 * 19440 *
19603@@ -22,32 +21,26 @@ static int __init noexec_setup(char *str 19441@@ -28,12 +30,17 @@ static int __init noexec_setup(char *str
19604 if (!str)
19605 return -EINVAL;
19606 if (!strncmp(str, "on", 2)) {
19607- __supported_pte_mask |= _PAGE_NX;
19608- disable_nx = 0;
19609+ nx_enabled = 1;
19610 } else if (!strncmp(str, "off", 3)) {
19611- disable_nx = 1;
19612- __supported_pte_mask &= ~_PAGE_NX;
19613+ nx_enabled = 0;
19614 }
19615 return 0; 19442 return 0;
19616 } 19443 }
19617 early_param("noexec", noexec_setup); 19444 early_param("noexec", noexec_setup);
19618 #endif 19445+#endif
19446+
19619+#endif 19447+#endif
19620 19448
19621 #ifdef CONFIG_X86_PAE 19449 void __cpuinit x86_configure_nx(void)
19622 void __init set_nx(void)
19623 { 19450 {
19624- unsigned int v[4], l, h; 19451+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
19625+ if (!nx_enabled && cpu_has_nx) { 19452 if (cpu_has_nx && !disable_nx)
19626+ unsigned l, h; 19453 __supported_pte_mask |= _PAGE_NX;
19627 19454 else
19628- if (cpu_has_pae && (cpuid_eax(0x80000000) > 0x80000001)) { 19455+#endif
19629- cpuid(0x80000001, &v[0], &v[1], &v[2], &v[3]);
19630-
19631- if ((v[3] & (1 << 20)) && !disable_nx) {
19632- rdmsr(MSR_EFER, l, h);
19633- l |= EFER_NX;
19634- wrmsr(MSR_EFER, l, h);
19635- nx_enabled = 1;
19636- __supported_pte_mask |= _PAGE_NX;
19637- }
19638+ __supported_pte_mask &= ~_PAGE_NX;
19639+ rdmsr(MSR_EFER, l, h);
19640+ l &= ~EFER_NX;
19641+ wrmsr(MSR_EFER, l, h);
19642 }
19643 }
19644 #else
19645@@ -62,7 +55,7 @@ void __cpuinit check_efer(void)
19646 unsigned long efer;
19647
19648 rdmsrl(MSR_EFER, efer);
19649- if (!(efer & EFER_NX) || disable_nx)
19650+ if (!(efer & EFER_NX) || !nx_enabled)
19651 __supported_pte_mask &= ~_PAGE_NX; 19456 __supported_pte_mask &= ~_PAGE_NX;
19652 } 19457 }
19653 #endif 19458
19654diff -urNp linux-2.6.32.24/arch/x86/mm/tlb.c linux-2.6.32.24/arch/x86/mm/tlb.c 19459diff -urNp linux-2.6.35.7/arch/x86/mm/tlb.c linux-2.6.35.7/arch/x86/mm/tlb.c
19655--- linux-2.6.32.24/arch/x86/mm/tlb.c 2010-08-13 16:24:37.000000000 -0400 19460--- linux-2.6.35.7/arch/x86/mm/tlb.c 2010-08-26 19:47:12.000000000 -0400
19656+++ linux-2.6.32.24/arch/x86/mm/tlb.c 2010-10-23 19:59:19.000000000 -0400 19461+++ linux-2.6.35.7/arch/x86/mm/tlb.c 2010-09-17 20:12:09.000000000 -0400
19657@@ -12,7 +12,7 @@ 19462@@ -13,7 +13,7 @@
19658 #include <asm/uv/uv.h> 19463 #include <asm/uv/uv.h>
19659 19464
19660 DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) 19465 DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate)
@@ -19663,7 +19468,7 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/tlb.c linux-2.6.32.24/arch/x86/mm/tlb.c
19663 19468
19664 /* 19469 /*
19665 * Smarter SMP flushing macros. 19470 * Smarter SMP flushing macros.
19666@@ -61,7 +61,11 @@ void leave_mm(int cpu) 19471@@ -62,7 +62,11 @@ void leave_mm(int cpu)
19667 BUG(); 19472 BUG();
19668 cpumask_clear_cpu(cpu, 19473 cpumask_clear_cpu(cpu,
19669 mm_cpumask(percpu_read(cpu_tlbstate.active_mm))); 19474 mm_cpumask(percpu_read(cpu_tlbstate.active_mm)));
@@ -19675,10 +19480,10 @@ diff -urNp linux-2.6.32.24/arch/x86/mm/tlb.c linux-2.6.32.24/arch/x86/mm/tlb.c
19675 } 19480 }
19676 EXPORT_SYMBOL_GPL(leave_mm); 19481 EXPORT_SYMBOL_GPL(leave_mm);
19677 19482
19678diff -urNp linux-2.6.32.24/arch/x86/oprofile/backtrace.c linux-2.6.32.24/arch/x86/oprofile/backtrace.c 19483diff -urNp linux-2.6.35.7/arch/x86/oprofile/backtrace.c linux-2.6.35.7/arch/x86/oprofile/backtrace.c
19679--- linux-2.6.32.24/arch/x86/oprofile/backtrace.c 2010-08-13 16:24:37.000000000 -0400 19484--- linux-2.6.35.7/arch/x86/oprofile/backtrace.c 2010-08-26 19:47:12.000000000 -0400
19680+++ linux-2.6.32.24/arch/x86/oprofile/backtrace.c 2010-10-23 19:59:19.000000000 -0400 19485+++ linux-2.6.35.7/arch/x86/oprofile/backtrace.c 2010-09-17 20:12:09.000000000 -0400
19681@@ -57,7 +57,7 @@ static struct frame_head *dump_user_back 19486@@ -58,7 +58,7 @@ static struct frame_head *dump_user_back
19682 struct frame_head bufhead[2]; 19487 struct frame_head bufhead[2];
19683 19488
19684 /* Also check accessibility of one struct frame_head beyond */ 19489 /* Also check accessibility of one struct frame_head beyond */
@@ -19687,7 +19492,7 @@ diff -urNp linux-2.6.32.24/arch/x86/oprofile/backtrace.c linux-2.6.32.24/arch/x8
19687 return NULL; 19492 return NULL;
19688 if (__copy_from_user_inatomic(bufhead, head, sizeof(bufhead))) 19493 if (__copy_from_user_inatomic(bufhead, head, sizeof(bufhead)))
19689 return NULL; 19494 return NULL;
19690@@ -77,7 +77,7 @@ x86_backtrace(struct pt_regs * const reg 19495@@ -78,7 +78,7 @@ x86_backtrace(struct pt_regs * const reg
19691 { 19496 {
19692 struct frame_head *head = (struct frame_head *)frame_pointer(regs); 19497 struct frame_head *head = (struct frame_head *)frame_pointer(regs);
19693 19498
@@ -19696,9 +19501,9 @@ diff -urNp linux-2.6.32.24/arch/x86/oprofile/backtrace.c linux-2.6.32.24/arch/x8
19696 unsigned long stack = kernel_stack_pointer(regs); 19501 unsigned long stack = kernel_stack_pointer(regs);
19697 if (depth) 19502 if (depth)
19698 dump_trace(NULL, regs, (unsigned long *)stack, 0, 19503 dump_trace(NULL, regs, (unsigned long *)stack, 0,
19699diff -urNp linux-2.6.32.24/arch/x86/oprofile/op_model_p4.c linux-2.6.32.24/arch/x86/oprofile/op_model_p4.c 19504diff -urNp linux-2.6.35.7/arch/x86/oprofile/op_model_p4.c linux-2.6.35.7/arch/x86/oprofile/op_model_p4.c
19700--- linux-2.6.32.24/arch/x86/oprofile/op_model_p4.c 2010-08-13 16:24:37.000000000 -0400 19505--- linux-2.6.35.7/arch/x86/oprofile/op_model_p4.c 2010-08-26 19:47:12.000000000 -0400
19701+++ linux-2.6.32.24/arch/x86/oprofile/op_model_p4.c 2010-10-23 19:59:19.000000000 -0400 19506+++ linux-2.6.35.7/arch/x86/oprofile/op_model_p4.c 2010-09-17 20:12:09.000000000 -0400
19702@@ -50,7 +50,7 @@ static inline void setup_num_counters(vo 19507@@ -50,7 +50,7 @@ static inline void setup_num_counters(vo
19703 #endif 19508 #endif
19704 } 19509 }
@@ -19708,10 +19513,10 @@ diff -urNp linux-2.6.32.24/arch/x86/oprofile/op_model_p4.c linux-2.6.32.24/arch/
19708 { 19513 {
19709 #ifdef CONFIG_SMP 19514 #ifdef CONFIG_SMP
19710 return smp_num_siblings == 2 ? 2 : 1; 19515 return smp_num_siblings == 2 ? 2 : 1;
19711diff -urNp linux-2.6.32.24/arch/x86/pci/common.c linux-2.6.32.24/arch/x86/pci/common.c 19516diff -urNp linux-2.6.35.7/arch/x86/pci/common.c linux-2.6.35.7/arch/x86/pci/common.c
19712--- linux-2.6.32.24/arch/x86/pci/common.c 2010-08-13 16:24:37.000000000 -0400 19517--- linux-2.6.35.7/arch/x86/pci/common.c 2010-08-26 19:47:12.000000000 -0400
19713+++ linux-2.6.32.24/arch/x86/pci/common.c 2010-10-23 19:59:19.000000000 -0400 19518+++ linux-2.6.35.7/arch/x86/pci/common.c 2010-09-17 20:12:09.000000000 -0400
19714@@ -31,8 +31,8 @@ int noioapicreroute = 1; 19519@@ -32,8 +32,8 @@ int noioapicreroute = 1;
19715 int pcibios_last_bus = -1; 19520 int pcibios_last_bus = -1;
19716 unsigned long pirq_table_addr; 19521 unsigned long pirq_table_addr;
19717 struct pci_bus *pci_root_bus; 19522 struct pci_bus *pci_root_bus;
@@ -19722,7 +19527,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/common.c linux-2.6.32.24/arch/x86/pci/co
19722 19527
19723 int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, 19528 int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn,
19724 int reg, int len, u32 *val) 19529 int reg, int len, u32 *val)
19725@@ -370,7 +370,7 @@ static const struct dmi_system_id __devi 19530@@ -365,7 +365,7 @@ static const struct dmi_system_id __devi
19726 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), 19531 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"),
19727 }, 19532 },
19728 }, 19533 },
@@ -19731,9 +19536,9 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/common.c linux-2.6.32.24/arch/x86/pci/co
19731 }; 19536 };
19732 19537
19733 void __init dmi_check_pciprobe(void) 19538 void __init dmi_check_pciprobe(void)
19734diff -urNp linux-2.6.32.24/arch/x86/pci/direct.c linux-2.6.32.24/arch/x86/pci/direct.c 19539diff -urNp linux-2.6.35.7/arch/x86/pci/direct.c linux-2.6.35.7/arch/x86/pci/direct.c
19735--- linux-2.6.32.24/arch/x86/pci/direct.c 2010-08-13 16:24:37.000000000 -0400 19540--- linux-2.6.35.7/arch/x86/pci/direct.c 2010-08-26 19:47:12.000000000 -0400
19736+++ linux-2.6.32.24/arch/x86/pci/direct.c 2010-10-23 19:59:19.000000000 -0400 19541+++ linux-2.6.35.7/arch/x86/pci/direct.c 2010-09-17 20:12:09.000000000 -0400
19737@@ -79,7 +79,7 @@ static int pci_conf1_write(unsigned int 19542@@ -79,7 +79,7 @@ static int pci_conf1_write(unsigned int
19738 19543
19739 #undef PCI_CONF1_ADDRESS 19544 #undef PCI_CONF1_ADDRESS
@@ -19761,9 +19566,9 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/direct.c linux-2.6.32.24/arch/x86/pci/di
19761 { 19566 {
19762 u32 x = 0; 19567 u32 x = 0;
19763 int year, devfn; 19568 int year, devfn;
19764diff -urNp linux-2.6.32.24/arch/x86/pci/fixup.c linux-2.6.32.24/arch/x86/pci/fixup.c 19569diff -urNp linux-2.6.35.7/arch/x86/pci/fixup.c linux-2.6.35.7/arch/x86/pci/fixup.c
19765--- linux-2.6.32.24/arch/x86/pci/fixup.c 2010-08-13 16:24:37.000000000 -0400 19570--- linux-2.6.35.7/arch/x86/pci/fixup.c 2010-08-26 19:47:12.000000000 -0400
19766+++ linux-2.6.32.24/arch/x86/pci/fixup.c 2010-10-23 19:59:19.000000000 -0400 19571+++ linux-2.6.35.7/arch/x86/pci/fixup.c 2010-09-17 20:12:09.000000000 -0400
19767@@ -364,7 +364,7 @@ static const struct dmi_system_id __devi 19572@@ -364,7 +364,7 @@ static const struct dmi_system_id __devi
19768 DMI_MATCH(DMI_PRODUCT_NAME, "MS-6702E"), 19573 DMI_MATCH(DMI_PRODUCT_NAME, "MS-6702E"),
19769 }, 19574 },
@@ -19782,10 +19587,10 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/fixup.c linux-2.6.32.24/arch/x86/pci/fix
19782 }; 19587 };
19783 19588
19784 static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev) 19589 static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev)
19785diff -urNp linux-2.6.32.24/arch/x86/pci/irq.c linux-2.6.32.24/arch/x86/pci/irq.c 19590diff -urNp linux-2.6.35.7/arch/x86/pci/irq.c linux-2.6.35.7/arch/x86/pci/irq.c
19786--- linux-2.6.32.24/arch/x86/pci/irq.c 2010-08-13 16:24:37.000000000 -0400 19591--- linux-2.6.35.7/arch/x86/pci/irq.c 2010-08-26 19:47:12.000000000 -0400
19787+++ linux-2.6.32.24/arch/x86/pci/irq.c 2010-10-23 19:59:19.000000000 -0400 19592+++ linux-2.6.35.7/arch/x86/pci/irq.c 2010-09-17 20:12:09.000000000 -0400
19788@@ -543,7 +543,7 @@ static __init int intel_router_probe(str 19593@@ -542,7 +542,7 @@ static __init int intel_router_probe(str
19789 static struct pci_device_id __initdata pirq_440gx[] = { 19594 static struct pci_device_id __initdata pirq_440gx[] = {
19790 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) }, 19595 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) },
19791 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_2) }, 19596 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_2) },
@@ -19794,7 +19599,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/irq.c linux-2.6.32.24/arch/x86/pci/irq.c
19794 }; 19599 };
19795 19600
19796 /* 440GX has a proprietary PIRQ router -- don't use it */ 19601 /* 440GX has a proprietary PIRQ router -- don't use it */
19797@@ -1109,7 +1109,7 @@ static struct dmi_system_id __initdata p 19602@@ -1113,7 +1113,7 @@ static struct dmi_system_id __initdata p
19798 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), 19603 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
19799 }, 19604 },
19800 }, 19605 },
@@ -19802,11 +19607,11 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/irq.c linux-2.6.32.24/arch/x86/pci/irq.c
19802+ { NULL, NULL, {DMI_MATCH(DMI_NONE, {0})}, NULL } 19607+ { NULL, NULL, {DMI_MATCH(DMI_NONE, {0})}, NULL }
19803 }; 19608 };
19804 19609
19805 int __init pcibios_irq_init(void) 19610 void __init pcibios_irq_init(void)
19806diff -urNp linux-2.6.32.24/arch/x86/pci/mmconfig_32.c linux-2.6.32.24/arch/x86/pci/mmconfig_32.c 19611diff -urNp linux-2.6.35.7/arch/x86/pci/mmconfig_32.c linux-2.6.35.7/arch/x86/pci/mmconfig_32.c
19807--- linux-2.6.32.24/arch/x86/pci/mmconfig_32.c 2010-08-13 16:24:37.000000000 -0400 19612--- linux-2.6.35.7/arch/x86/pci/mmconfig_32.c 2010-08-26 19:47:12.000000000 -0400
19808+++ linux-2.6.32.24/arch/x86/pci/mmconfig_32.c 2010-10-23 19:59:19.000000000 -0400 19613+++ linux-2.6.35.7/arch/x86/pci/mmconfig_32.c 2010-09-17 20:12:09.000000000 -0400
19809@@ -125,7 +125,7 @@ static int pci_mmcfg_write(unsigned int 19614@@ -117,7 +117,7 @@ static int pci_mmcfg_write(unsigned int
19810 return 0; 19615 return 0;
19811 } 19616 }
19812 19617
@@ -19815,10 +19620,10 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/mmconfig_32.c linux-2.6.32.24/arch/x86/p
19815 .read = pci_mmcfg_read, 19620 .read = pci_mmcfg_read,
19816 .write = pci_mmcfg_write, 19621 .write = pci_mmcfg_write,
19817 }; 19622 };
19818diff -urNp linux-2.6.32.24/arch/x86/pci/mmconfig_64.c linux-2.6.32.24/arch/x86/pci/mmconfig_64.c 19623diff -urNp linux-2.6.35.7/arch/x86/pci/mmconfig_64.c linux-2.6.35.7/arch/x86/pci/mmconfig_64.c
19819--- linux-2.6.32.24/arch/x86/pci/mmconfig_64.c 2010-08-13 16:24:37.000000000 -0400 19624--- linux-2.6.35.7/arch/x86/pci/mmconfig_64.c 2010-08-26 19:47:12.000000000 -0400
19820+++ linux-2.6.32.24/arch/x86/pci/mmconfig_64.c 2010-10-23 19:59:19.000000000 -0400 19625+++ linux-2.6.35.7/arch/x86/pci/mmconfig_64.c 2010-09-17 20:12:09.000000000 -0400
19821@@ -104,7 +104,7 @@ static int pci_mmcfg_write(unsigned int 19626@@ -81,7 +81,7 @@ static int pci_mmcfg_write(unsigned int
19822 return 0; 19627 return 0;
19823 } 19628 }
19824 19629
@@ -19827,10 +19632,10 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/mmconfig_64.c linux-2.6.32.24/arch/x86/p
19827 .read = pci_mmcfg_read, 19632 .read = pci_mmcfg_read,
19828 .write = pci_mmcfg_write, 19633 .write = pci_mmcfg_write,
19829 }; 19634 };
19830diff -urNp linux-2.6.32.24/arch/x86/pci/numaq_32.c linux-2.6.32.24/arch/x86/pci/numaq_32.c 19635diff -urNp linux-2.6.35.7/arch/x86/pci/numaq_32.c linux-2.6.35.7/arch/x86/pci/numaq_32.c
19831--- linux-2.6.32.24/arch/x86/pci/numaq_32.c 2010-08-13 16:24:37.000000000 -0400 19636--- linux-2.6.35.7/arch/x86/pci/numaq_32.c 2010-08-26 19:47:12.000000000 -0400
19832+++ linux-2.6.32.24/arch/x86/pci/numaq_32.c 2010-10-23 19:59:19.000000000 -0400 19637+++ linux-2.6.35.7/arch/x86/pci/numaq_32.c 2010-09-17 20:12:09.000000000 -0400
19833@@ -112,7 +112,7 @@ static int pci_conf1_mq_write(unsigned i 19638@@ -108,7 +108,7 @@ static int pci_conf1_mq_write(unsigned i
19834 19639
19835 #undef PCI_CONF1_MQ_ADDRESS 19640 #undef PCI_CONF1_MQ_ADDRESS
19836 19641
@@ -19839,9 +19644,9 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/numaq_32.c linux-2.6.32.24/arch/x86/pci/
19839 .read = pci_conf1_mq_read, 19644 .read = pci_conf1_mq_read,
19840 .write = pci_conf1_mq_write 19645 .write = pci_conf1_mq_write
19841 }; 19646 };
19842diff -urNp linux-2.6.32.24/arch/x86/pci/olpc.c linux-2.6.32.24/arch/x86/pci/olpc.c 19647diff -urNp linux-2.6.35.7/arch/x86/pci/olpc.c linux-2.6.35.7/arch/x86/pci/olpc.c
19843--- linux-2.6.32.24/arch/x86/pci/olpc.c 2010-08-13 16:24:37.000000000 -0400 19648--- linux-2.6.35.7/arch/x86/pci/olpc.c 2010-08-26 19:47:12.000000000 -0400
19844+++ linux-2.6.32.24/arch/x86/pci/olpc.c 2010-10-23 19:59:19.000000000 -0400 19649+++ linux-2.6.35.7/arch/x86/pci/olpc.c 2010-09-17 20:12:09.000000000 -0400
19845@@ -297,7 +297,7 @@ static int pci_olpc_write(unsigned int s 19650@@ -297,7 +297,7 @@ static int pci_olpc_write(unsigned int s
19846 return 0; 19651 return 0;
19847 } 19652 }
@@ -19851,10 +19656,10 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/olpc.c linux-2.6.32.24/arch/x86/pci/olpc
19851 .read = pci_olpc_read, 19656 .read = pci_olpc_read,
19852 .write = pci_olpc_write, 19657 .write = pci_olpc_write,
19853 }; 19658 };
19854diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pcbios.c 19659diff -urNp linux-2.6.35.7/arch/x86/pci/pcbios.c linux-2.6.35.7/arch/x86/pci/pcbios.c
19855--- linux-2.6.32.24/arch/x86/pci/pcbios.c 2010-08-13 16:24:37.000000000 -0400 19660--- linux-2.6.35.7/arch/x86/pci/pcbios.c 2010-08-26 19:47:12.000000000 -0400
19856+++ linux-2.6.32.24/arch/x86/pci/pcbios.c 2010-10-23 19:59:19.000000000 -0400 19661+++ linux-2.6.35.7/arch/x86/pci/pcbios.c 2010-09-17 20:12:09.000000000 -0400
19857@@ -56,50 +56,93 @@ union bios32 { 19662@@ -57,50 +57,93 @@ union bios32 {
19858 static struct { 19663 static struct {
19859 unsigned long address; 19664 unsigned long address;
19860 unsigned short segment; 19665 unsigned short segment;
@@ -19962,7 +19767,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
19962 19767
19963 static int __devinit check_pcibios(void) 19768 static int __devinit check_pcibios(void)
19964 { 19769 {
19965@@ -108,11 +151,13 @@ static int __devinit check_pcibios(void) 19770@@ -109,11 +152,13 @@ static int __devinit check_pcibios(void)
19966 unsigned long flags, pcibios_entry; 19771 unsigned long flags, pcibios_entry;
19967 19772
19968 if ((pcibios_entry = bios32_service(PCI_SERVICE))) { 19773 if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
@@ -19979,7 +19784,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
19979 "jc 1f\n\t" 19784 "jc 1f\n\t"
19980 "xor %%ah, %%ah\n" 19785 "xor %%ah, %%ah\n"
19981 "1:" 19786 "1:"
19982@@ -121,7 +166,8 @@ static int __devinit check_pcibios(void) 19787@@ -122,7 +167,8 @@ static int __devinit check_pcibios(void)
19983 "=b" (ebx), 19788 "=b" (ebx),
19984 "=c" (ecx) 19789 "=c" (ecx)
19985 : "1" (PCIBIOS_PCI_BIOS_PRESENT), 19790 : "1" (PCIBIOS_PCI_BIOS_PRESENT),
@@ -19989,7 +19794,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
19989 : "memory"); 19794 : "memory");
19990 local_irq_restore(flags); 19795 local_irq_restore(flags);
19991 19796
19992@@ -165,7 +211,10 @@ static int pci_bios_read(unsigned int se 19797@@ -166,7 +212,10 @@ static int pci_bios_read(unsigned int se
19993 19798
19994 switch (len) { 19799 switch (len) {
19995 case 1: 19800 case 1:
@@ -20001,7 +19806,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20001 "jc 1f\n\t" 19806 "jc 1f\n\t"
20002 "xor %%ah, %%ah\n" 19807 "xor %%ah, %%ah\n"
20003 "1:" 19808 "1:"
20004@@ -174,7 +223,8 @@ static int pci_bios_read(unsigned int se 19809@@ -175,7 +224,8 @@ static int pci_bios_read(unsigned int se
20005 : "1" (PCIBIOS_READ_CONFIG_BYTE), 19810 : "1" (PCIBIOS_READ_CONFIG_BYTE),
20006 "b" (bx), 19811 "b" (bx),
20007 "D" ((long)reg), 19812 "D" ((long)reg),
@@ -20011,7 +19816,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20011 /* 19816 /*
20012 * Zero-extend the result beyond 8 bits, do not trust the 19817 * Zero-extend the result beyond 8 bits, do not trust the
20013 * BIOS having done it: 19818 * BIOS having done it:
20014@@ -182,7 +232,10 @@ static int pci_bios_read(unsigned int se 19819@@ -183,7 +233,10 @@ static int pci_bios_read(unsigned int se
20015 *value &= 0xff; 19820 *value &= 0xff;
20016 break; 19821 break;
20017 case 2: 19822 case 2:
@@ -20023,7 +19828,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20023 "jc 1f\n\t" 19828 "jc 1f\n\t"
20024 "xor %%ah, %%ah\n" 19829 "xor %%ah, %%ah\n"
20025 "1:" 19830 "1:"
20026@@ -191,7 +244,8 @@ static int pci_bios_read(unsigned int se 19831@@ -192,7 +245,8 @@ static int pci_bios_read(unsigned int se
20027 : "1" (PCIBIOS_READ_CONFIG_WORD), 19832 : "1" (PCIBIOS_READ_CONFIG_WORD),
20028 "b" (bx), 19833 "b" (bx),
20029 "D" ((long)reg), 19834 "D" ((long)reg),
@@ -20033,7 +19838,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20033 /* 19838 /*
20034 * Zero-extend the result beyond 16 bits, do not trust the 19839 * Zero-extend the result beyond 16 bits, do not trust the
20035 * BIOS having done it: 19840 * BIOS having done it:
20036@@ -199,7 +253,10 @@ static int pci_bios_read(unsigned int se 19841@@ -200,7 +254,10 @@ static int pci_bios_read(unsigned int se
20037 *value &= 0xffff; 19842 *value &= 0xffff;
20038 break; 19843 break;
20039 case 4: 19844 case 4:
@@ -20045,7 +19850,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20045 "jc 1f\n\t" 19850 "jc 1f\n\t"
20046 "xor %%ah, %%ah\n" 19851 "xor %%ah, %%ah\n"
20047 "1:" 19852 "1:"
20048@@ -208,7 +265,8 @@ static int pci_bios_read(unsigned int se 19853@@ -209,7 +266,8 @@ static int pci_bios_read(unsigned int se
20049 : "1" (PCIBIOS_READ_CONFIG_DWORD), 19854 : "1" (PCIBIOS_READ_CONFIG_DWORD),
20050 "b" (bx), 19855 "b" (bx),
20051 "D" ((long)reg), 19856 "D" ((long)reg),
@@ -20055,7 +19860,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20055 break; 19860 break;
20056 } 19861 }
20057 19862
20058@@ -231,7 +289,10 @@ static int pci_bios_write(unsigned int s 19863@@ -232,7 +290,10 @@ static int pci_bios_write(unsigned int s
20059 19864
20060 switch (len) { 19865 switch (len) {
20061 case 1: 19866 case 1:
@@ -20067,7 +19872,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20067 "jc 1f\n\t" 19872 "jc 1f\n\t"
20068 "xor %%ah, %%ah\n" 19873 "xor %%ah, %%ah\n"
20069 "1:" 19874 "1:"
20070@@ -240,10 +301,14 @@ static int pci_bios_write(unsigned int s 19875@@ -241,10 +302,14 @@ static int pci_bios_write(unsigned int s
20071 "c" (value), 19876 "c" (value),
20072 "b" (bx), 19877 "b" (bx),
20073 "D" ((long)reg), 19878 "D" ((long)reg),
@@ -20084,7 +19889,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20084 "jc 1f\n\t" 19889 "jc 1f\n\t"
20085 "xor %%ah, %%ah\n" 19890 "xor %%ah, %%ah\n"
20086 "1:" 19891 "1:"
20087@@ -252,10 +317,14 @@ static int pci_bios_write(unsigned int s 19892@@ -253,10 +318,14 @@ static int pci_bios_write(unsigned int s
20088 "c" (value), 19893 "c" (value),
20089 "b" (bx), 19894 "b" (bx),
20090 "D" ((long)reg), 19895 "D" ((long)reg),
@@ -20101,7 +19906,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20101 "jc 1f\n\t" 19906 "jc 1f\n\t"
20102 "xor %%ah, %%ah\n" 19907 "xor %%ah, %%ah\n"
20103 "1:" 19908 "1:"
20104@@ -264,7 +333,8 @@ static int pci_bios_write(unsigned int s 19909@@ -265,7 +334,8 @@ static int pci_bios_write(unsigned int s
20105 "c" (value), 19910 "c" (value),
20106 "b" (bx), 19911 "b" (bx),
20107 "D" ((long)reg), 19912 "D" ((long)reg),
@@ -20111,7 +19916,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20111 break; 19916 break;
20112 } 19917 }
20113 19918
20114@@ -278,7 +348,7 @@ static int pci_bios_write(unsigned int s 19919@@ -279,7 +349,7 @@ static int pci_bios_write(unsigned int s
20115 * Function table for BIOS32 access 19920 * Function table for BIOS32 access
20116 */ 19921 */
20117 19922
@@ -20120,7 +19925,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20120 .read = pci_bios_read, 19925 .read = pci_bios_read,
20121 .write = pci_bios_write 19926 .write = pci_bios_write
20122 }; 19927 };
20123@@ -287,7 +357,7 @@ static struct pci_raw_ops pci_bios_acces 19928@@ -288,7 +358,7 @@ static struct pci_raw_ops pci_bios_acces
20124 * Try to find PCI BIOS. 19929 * Try to find PCI BIOS.
20125 */ 19930 */
20126 19931
@@ -20129,7 +19934,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20129 { 19934 {
20130 union bios32 *check; 19935 union bios32 *check;
20131 unsigned char sum; 19936 unsigned char sum;
20132@@ -368,10 +438,13 @@ struct irq_routing_table * pcibios_get_i 19937@@ -369,10 +439,13 @@ struct irq_routing_table * pcibios_get_i
20133 19938
20134 DBG("PCI: Fetching IRQ routing table... "); 19939 DBG("PCI: Fetching IRQ routing table... ");
20135 __asm__("push %%es\n\t" 19940 __asm__("push %%es\n\t"
@@ -20144,7 +19949,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20144 "jc 1f\n\t" 19949 "jc 1f\n\t"
20145 "xor %%ah, %%ah\n" 19950 "xor %%ah, %%ah\n"
20146 "1:" 19951 "1:"
20147@@ -382,7 +455,8 @@ struct irq_routing_table * pcibios_get_i 19952@@ -383,7 +456,8 @@ struct irq_routing_table * pcibios_get_i
20148 "1" (0), 19953 "1" (0),
20149 "D" ((long) &opt), 19954 "D" ((long) &opt),
20150 "S" (&pci_indirect), 19955 "S" (&pci_indirect),
@@ -20154,7 +19959,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20154 : "memory"); 19959 : "memory");
20155 DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map); 19960 DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map);
20156 if (ret & 0xff00) 19961 if (ret & 0xff00)
20157@@ -406,7 +480,10 @@ int pcibios_set_irq_routing(struct pci_d 19962@@ -407,7 +481,10 @@ int pcibios_set_irq_routing(struct pci_d
20158 { 19963 {
20159 int ret; 19964 int ret;
20160 19965
@@ -20166,7 +19971,7 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20166 "jc 1f\n\t" 19971 "jc 1f\n\t"
20167 "xor %%ah, %%ah\n" 19972 "xor %%ah, %%ah\n"
20168 "1:" 19973 "1:"
20169@@ -414,7 +491,8 @@ int pcibios_set_irq_routing(struct pci_d 19974@@ -415,7 +492,8 @@ int pcibios_set_irq_routing(struct pci_d
20170 : "0" (PCIBIOS_SET_PCI_HW_INT), 19975 : "0" (PCIBIOS_SET_PCI_HW_INT),
20171 "b" ((dev->bus->number << 8) | dev->devfn), 19976 "b" ((dev->bus->number << 8) | dev->devfn),
20172 "c" ((irq << 8) | (pin + 10)), 19977 "c" ((irq << 8) | (pin + 10)),
@@ -20176,10 +19981,10 @@ diff -urNp linux-2.6.32.24/arch/x86/pci/pcbios.c linux-2.6.32.24/arch/x86/pci/pc
20176 return !(ret & 0xff00); 19981 return !(ret & 0xff00);
20177 } 19982 }
20178 EXPORT_SYMBOL(pcibios_set_irq_routing); 19983 EXPORT_SYMBOL(pcibios_set_irq_routing);
20179diff -urNp linux-2.6.32.24/arch/x86/power/cpu.c linux-2.6.32.24/arch/x86/power/cpu.c 19984diff -urNp linux-2.6.35.7/arch/x86/power/cpu.c linux-2.6.35.7/arch/x86/power/cpu.c
20180--- linux-2.6.32.24/arch/x86/power/cpu.c 2010-09-20 17:26:42.000000000 -0400 19985--- linux-2.6.35.7/arch/x86/power/cpu.c 2010-09-20 17:33:09.000000000 -0400
20181+++ linux-2.6.32.24/arch/x86/power/cpu.c 2010-10-23 19:59:19.000000000 -0400 19986+++ linux-2.6.35.7/arch/x86/power/cpu.c 2010-09-20 17:33:32.000000000 -0400
20182@@ -129,7 +129,7 @@ static void do_fpu_end(void) 19987@@ -130,7 +130,7 @@ static void do_fpu_end(void)
20183 static void fix_processor_context(void) 19988 static void fix_processor_context(void)
20184 { 19989 {
20185 int cpu = smp_processor_id(); 19990 int cpu = smp_processor_id();
@@ -20188,7 +19993,7 @@ diff -urNp linux-2.6.32.24/arch/x86/power/cpu.c linux-2.6.32.24/arch/x86/power/c
20188 19993
20189 set_tss_desc(cpu, t); /* 19994 set_tss_desc(cpu, t); /*
20190 * This just modifies memory; should not be 19995 * This just modifies memory; should not be
20191@@ -139,7 +139,9 @@ static void fix_processor_context(void) 19996@@ -140,7 +140,9 @@ static void fix_processor_context(void)
20192 */ 19997 */
20193 19998
20194 #ifdef CONFIG_X86_64 19999 #ifdef CONFIG_X86_64
@@ -20198,9 +20003,9 @@ diff -urNp linux-2.6.32.24/arch/x86/power/cpu.c linux-2.6.32.24/arch/x86/power/c
20198 20003
20199 syscall_init(); /* This sets MSR_*STAR and related */ 20004 syscall_init(); /* This sets MSR_*STAR and related */
20200 #endif 20005 #endif
20201diff -urNp linux-2.6.32.24/arch/x86/vdso/Makefile linux-2.6.32.24/arch/x86/vdso/Makefile 20006diff -urNp linux-2.6.35.7/arch/x86/vdso/Makefile linux-2.6.35.7/arch/x86/vdso/Makefile
20202--- linux-2.6.32.24/arch/x86/vdso/Makefile 2010-08-13 16:24:37.000000000 -0400 20007--- linux-2.6.35.7/arch/x86/vdso/Makefile 2010-08-26 19:47:12.000000000 -0400
20203+++ linux-2.6.32.24/arch/x86/vdso/Makefile 2010-10-23 19:59:19.000000000 -0400 20008+++ linux-2.6.35.7/arch/x86/vdso/Makefile 2010-09-17 20:12:09.000000000 -0400
20204@@ -122,7 +122,7 @@ quiet_cmd_vdso = VDSO $@ 20009@@ -122,7 +122,7 @@ quiet_cmd_vdso = VDSO $@
20205 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 20010 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
20206 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) 20011 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
@@ -20210,9 +20015,9 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/Makefile linux-2.6.32.24/arch/x86/vdso/
20210 GCOV_PROFILE := n 20015 GCOV_PROFILE := n
20211 20016
20212 # 20017 #
20213diff -urNp linux-2.6.32.24/arch/x86/vdso/vclock_gettime.c linux-2.6.32.24/arch/x86/vdso/vclock_gettime.c 20018diff -urNp linux-2.6.35.7/arch/x86/vdso/vclock_gettime.c linux-2.6.35.7/arch/x86/vdso/vclock_gettime.c
20214--- linux-2.6.32.24/arch/x86/vdso/vclock_gettime.c 2010-08-13 16:24:37.000000000 -0400 20019--- linux-2.6.35.7/arch/x86/vdso/vclock_gettime.c 2010-08-26 19:47:12.000000000 -0400
20215+++ linux-2.6.32.24/arch/x86/vdso/vclock_gettime.c 2010-10-23 19:59:19.000000000 -0400 20020+++ linux-2.6.35.7/arch/x86/vdso/vclock_gettime.c 2010-09-17 20:12:09.000000000 -0400
20216@@ -22,24 +22,48 @@ 20021@@ -22,24 +22,48 @@
20217 #include <asm/hpet.h> 20022 #include <asm/hpet.h>
20218 #include <asm/unistd.h> 20023 #include <asm/unistd.h>
@@ -20311,9 +20116,9 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vclock_gettime.c linux-2.6.32.24/arch/x
20311 } 20116 }
20312 int gettimeofday(struct timeval *, struct timezone *) 20117 int gettimeofday(struct timeval *, struct timezone *)
20313 __attribute__((weak, alias("__vdso_gettimeofday"))); 20118 __attribute__((weak, alias("__vdso_gettimeofday")));
20314diff -urNp linux-2.6.32.24/arch/x86/vdso/vdso32-setup.c linux-2.6.32.24/arch/x86/vdso/vdso32-setup.c 20119diff -urNp linux-2.6.35.7/arch/x86/vdso/vdso32-setup.c linux-2.6.35.7/arch/x86/vdso/vdso32-setup.c
20315--- linux-2.6.32.24/arch/x86/vdso/vdso32-setup.c 2010-08-13 16:24:37.000000000 -0400 20120--- linux-2.6.35.7/arch/x86/vdso/vdso32-setup.c 2010-08-26 19:47:12.000000000 -0400
20316+++ linux-2.6.32.24/arch/x86/vdso/vdso32-setup.c 2010-10-23 19:59:19.000000000 -0400 20121+++ linux-2.6.35.7/arch/x86/vdso/vdso32-setup.c 2010-09-17 20:12:09.000000000 -0400
20317@@ -25,6 +25,7 @@ 20122@@ -25,6 +25,7 @@
20318 #include <asm/tlbflush.h> 20123 #include <asm/tlbflush.h>
20319 #include <asm/vdso.h> 20124 #include <asm/vdso.h>
@@ -20371,25 +20176,7 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vdso32-setup.c linux-2.6.32.24/arch/x86
20371 20176
20372 up_write(&mm->mmap_sem); 20177 up_write(&mm->mmap_sem);
20373 20178
20374@@ -388,7 +389,7 @@ static ctl_table abi_table2[] = { 20179@@ -412,8 +413,14 @@ __initcall(ia32_binfmt_init);
20375 .mode = 0644,
20376 .proc_handler = proc_dointvec
20377 },
20378- {}
20379+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
20380 };
20381
20382 static ctl_table abi_root_table2[] = {
20383@@ -398,7 +399,7 @@ static ctl_table abi_root_table2[] = {
20384 .mode = 0555,
20385 .child = abi_table2
20386 },
20387- {}
20388+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
20389 };
20390
20391 static __init int ia32_binfmt_init(void)
20392@@ -413,8 +414,14 @@ __initcall(ia32_binfmt_init);
20393 20180
20394 const char *arch_vma_name(struct vm_area_struct *vma) 20181 const char *arch_vma_name(struct vm_area_struct *vma)
20395 { 20182 {
@@ -20405,7 +20192,7 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vdso32-setup.c linux-2.6.32.24/arch/x86
20405 return NULL; 20192 return NULL;
20406 } 20193 }
20407 20194
20408@@ -423,7 +430,7 @@ struct vm_area_struct *get_gate_vma(stru 20195@@ -422,7 +429,7 @@ struct vm_area_struct *get_gate_vma(stru
20409 struct mm_struct *mm = tsk->mm; 20196 struct mm_struct *mm = tsk->mm;
20410 20197
20411 /* Check to see if this task was created in compat vdso mode */ 20198 /* Check to see if this task was created in compat vdso mode */
@@ -20414,9 +20201,9 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vdso32-setup.c linux-2.6.32.24/arch/x86
20414 return &gate_vma; 20201 return &gate_vma;
20415 return NULL; 20202 return NULL;
20416 } 20203 }
20417diff -urNp linux-2.6.32.24/arch/x86/vdso/vdso.lds.S linux-2.6.32.24/arch/x86/vdso/vdso.lds.S 20204diff -urNp linux-2.6.35.7/arch/x86/vdso/vdso.lds.S linux-2.6.35.7/arch/x86/vdso/vdso.lds.S
20418--- linux-2.6.32.24/arch/x86/vdso/vdso.lds.S 2010-08-13 16:24:37.000000000 -0400 20205--- linux-2.6.35.7/arch/x86/vdso/vdso.lds.S 2010-08-26 19:47:12.000000000 -0400
20419+++ linux-2.6.32.24/arch/x86/vdso/vdso.lds.S 2010-10-23 19:59:19.000000000 -0400 20206+++ linux-2.6.35.7/arch/x86/vdso/vdso.lds.S 2010-09-17 20:12:09.000000000 -0400
20420@@ -35,3 +35,9 @@ VDSO64_PRELINK = VDSO_PRELINK; 20207@@ -35,3 +35,9 @@ VDSO64_PRELINK = VDSO_PRELINK;
20421 #define VEXTERN(x) VDSO64_ ## x = vdso_ ## x; 20208 #define VEXTERN(x) VDSO64_ ## x = vdso_ ## x;
20422 #include "vextern.h" 20209 #include "vextern.h"
@@ -20427,9 +20214,9 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vdso.lds.S linux-2.6.32.24/arch/x86/vds
20427+VEXTERN(fallback_time) 20214+VEXTERN(fallback_time)
20428+VEXTERN(getcpu) 20215+VEXTERN(getcpu)
20429+#undef VEXTERN 20216+#undef VEXTERN
20430diff -urNp linux-2.6.32.24/arch/x86/vdso/vextern.h linux-2.6.32.24/arch/x86/vdso/vextern.h 20217diff -urNp linux-2.6.35.7/arch/x86/vdso/vextern.h linux-2.6.35.7/arch/x86/vdso/vextern.h
20431--- linux-2.6.32.24/arch/x86/vdso/vextern.h 2010-08-13 16:24:37.000000000 -0400 20218--- linux-2.6.35.7/arch/x86/vdso/vextern.h 2010-08-26 19:47:12.000000000 -0400
20432+++ linux-2.6.32.24/arch/x86/vdso/vextern.h 2010-10-23 19:59:19.000000000 -0400 20219+++ linux-2.6.35.7/arch/x86/vdso/vextern.h 2010-09-17 20:12:09.000000000 -0400
20433@@ -11,6 +11,5 @@ 20220@@ -11,6 +11,5 @@
20434 put into vextern.h and be referenced as a pointer with vdso prefix. 20221 put into vextern.h and be referenced as a pointer with vdso prefix.
20435 The main kernel later fills in the values. */ 20222 The main kernel later fills in the values. */
@@ -20437,10 +20224,10 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vextern.h linux-2.6.32.24/arch/x86/vdso
20437-VEXTERN(jiffies) 20224-VEXTERN(jiffies)
20438 VEXTERN(vgetcpu_mode) 20225 VEXTERN(vgetcpu_mode)
20439 VEXTERN(vsyscall_gtod_data) 20226 VEXTERN(vsyscall_gtod_data)
20440diff -urNp linux-2.6.32.24/arch/x86/vdso/vma.c linux-2.6.32.24/arch/x86/vdso/vma.c 20227diff -urNp linux-2.6.35.7/arch/x86/vdso/vma.c linux-2.6.35.7/arch/x86/vdso/vma.c
20441--- linux-2.6.32.24/arch/x86/vdso/vma.c 2010-08-13 16:24:37.000000000 -0400 20228--- linux-2.6.35.7/arch/x86/vdso/vma.c 2010-08-26 19:47:12.000000000 -0400
20442+++ linux-2.6.32.24/arch/x86/vdso/vma.c 2010-10-23 19:59:19.000000000 -0400 20229+++ linux-2.6.35.7/arch/x86/vdso/vma.c 2010-09-17 20:12:09.000000000 -0400
20443@@ -57,7 +57,7 @@ static int __init init_vdso_vars(void) 20230@@ -58,7 +58,7 @@ static int __init init_vdso_vars(void)
20444 if (!vbase) 20231 if (!vbase)
20445 goto oom; 20232 goto oom;
20446 20233
@@ -20449,7 +20236,7 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vma.c linux-2.6.32.24/arch/x86/vdso/vma
20449 printk("VDSO: I'm broken; not ELF\n"); 20236 printk("VDSO: I'm broken; not ELF\n");
20450 vdso_enabled = 0; 20237 vdso_enabled = 0;
20451 } 20238 }
20452@@ -66,6 +66,7 @@ static int __init init_vdso_vars(void) 20239@@ -67,6 +67,7 @@ static int __init init_vdso_vars(void)
20453 *(typeof(__ ## x) **) var_ref(VDSO64_SYMBOL(vbase, x), #x) = &__ ## x; 20240 *(typeof(__ ## x) **) var_ref(VDSO64_SYMBOL(vbase, x), #x) = &__ ## x;
20454 #include "vextern.h" 20241 #include "vextern.h"
20455 #undef VEXTERN 20242 #undef VEXTERN
@@ -20457,7 +20244,7 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vma.c linux-2.6.32.24/arch/x86/vdso/vma
20457 return 0; 20244 return 0;
20458 20245
20459 oom: 20246 oom:
20460@@ -116,7 +117,7 @@ int arch_setup_additional_pages(struct l 20247@@ -117,7 +118,7 @@ int arch_setup_additional_pages(struct l
20461 goto up_fail; 20248 goto up_fail;
20462 } 20249 }
20463 20250
@@ -20466,7 +20253,7 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vma.c linux-2.6.32.24/arch/x86/vdso/vma
20466 20253
20467 ret = install_special_mapping(mm, addr, vdso_size, 20254 ret = install_special_mapping(mm, addr, vdso_size,
20468 VM_READ|VM_EXEC| 20255 VM_READ|VM_EXEC|
20469@@ -124,7 +125,7 @@ int arch_setup_additional_pages(struct l 20256@@ -125,7 +126,7 @@ int arch_setup_additional_pages(struct l
20470 VM_ALWAYSDUMP, 20257 VM_ALWAYSDUMP,
20471 vdso_pages); 20258 vdso_pages);
20472 if (ret) { 20259 if (ret) {
@@ -20475,7 +20262,7 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vma.c linux-2.6.32.24/arch/x86/vdso/vma
20475 goto up_fail; 20262 goto up_fail;
20476 } 20263 }
20477 20264
20478@@ -132,10 +133,3 @@ up_fail: 20265@@ -133,10 +134,3 @@ up_fail:
20479 up_write(&mm->mmap_sem); 20266 up_write(&mm->mmap_sem);
20480 return ret; 20267 return ret;
20481 } 20268 }
@@ -20486,10 +20273,10 @@ diff -urNp linux-2.6.32.24/arch/x86/vdso/vma.c linux-2.6.32.24/arch/x86/vdso/vma
20486- return 0; 20273- return 0;
20487-} 20274-}
20488-__setup("vdso=", vdso_setup); 20275-__setup("vdso=", vdso_setup);
20489diff -urNp linux-2.6.32.24/arch/x86/xen/enlighten.c linux-2.6.32.24/arch/x86/xen/enlighten.c 20276diff -urNp linux-2.6.35.7/arch/x86/xen/enlighten.c linux-2.6.35.7/arch/x86/xen/enlighten.c
20490--- linux-2.6.32.24/arch/x86/xen/enlighten.c 2010-08-13 16:24:37.000000000 -0400 20277--- linux-2.6.35.7/arch/x86/xen/enlighten.c 2010-08-26 19:47:12.000000000 -0400
20491+++ linux-2.6.32.24/arch/x86/xen/enlighten.c 2010-10-23 19:59:19.000000000 -0400 20278+++ linux-2.6.35.7/arch/x86/xen/enlighten.c 2010-09-17 20:12:09.000000000 -0400
20492@@ -71,8 +71,6 @@ EXPORT_SYMBOL_GPL(xen_start_info); 20279@@ -74,8 +74,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
20493 20280
20494 struct shared_info xen_dummy_shared_info; 20281 struct shared_info xen_dummy_shared_info;
20495 20282
@@ -20498,7 +20285,7 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/enlighten.c linux-2.6.32.24/arch/x86/xen
20498 /* 20285 /*
20499 * Point at some empty memory to start with. We map the real shared_info 20286 * Point at some empty memory to start with. We map the real shared_info
20500 * page as soon as fixmap is up and running. 20287 * page as soon as fixmap is up and running.
20501@@ -548,7 +546,7 @@ static void xen_write_idt_entry(gate_des 20288@@ -551,7 +549,7 @@ static void xen_write_idt_entry(gate_des
20502 20289
20503 preempt_disable(); 20290 preempt_disable();
20504 20291
@@ -20507,30 +20294,26 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/enlighten.c linux-2.6.32.24/arch/x86/xen
20507 end = start + __get_cpu_var(idt_desc).size + 1; 20294 end = start + __get_cpu_var(idt_desc).size + 1;
20508 20295
20509 xen_mc_flush(); 20296 xen_mc_flush();
20510@@ -1099,9 +1097,20 @@ asmlinkage void __init xen_start_kernel( 20297@@ -1103,7 +1101,17 @@ asmlinkage void __init xen_start_kernel(
20511 */
20512 __userpte_alloc_gfp &= ~__GFP_HIGHMEM; 20298 __userpte_alloc_gfp &= ~__GFP_HIGHMEM;
20513 20299
20514-#ifdef CONFIG_X86_64
20515 /* Work out if we support NX */ 20300 /* Work out if we support NX */
20516- check_efer(); 20301- x86_configure_nx();
20517+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) 20302+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
20518+ if ((cpuid_eax(0x80000000) & 0xffff0000) == 0x80000000 && 20303+ if ((cpuid_eax(0x80000000) & 0xffff0000) == 0x80000000 &&
20519+ (cpuid_edx(0x80000001) & (1U << (X86_FEATURE_NX & 31)))) { 20304+ (cpuid_edx(0x80000001) & (1U << (X86_FEATURE_NX & 31)))) {
20520+ unsigned l, h; 20305+ unsigned l, h;
20521+ 20306+
20522+#ifdef CONFIG_X86_PAE
20523+ nx_enabled = 1;
20524+#endif
20525+ __supported_pte_mask |= _PAGE_NX; 20307+ __supported_pte_mask |= _PAGE_NX;
20526+ rdmsr(MSR_EFER, l, h); 20308+ rdmsr(MSR_EFER, l, h);
20527+ l |= EFER_NX; 20309+ l |= EFER_NX;
20528+ wrmsr(MSR_EFER, l, h); 20310+ wrmsr(MSR_EFER, l, h);
20529+ } 20311+ }
20530 #endif 20312+#endif
20531 20313
20532 xen_setup_features(); 20314 xen_setup_features();
20533@@ -1133,13 +1142,6 @@ asmlinkage void __init xen_start_kernel( 20315
20316@@ -1134,13 +1142,6 @@ asmlinkage void __init xen_start_kernel(
20534 20317
20535 machine_ops = xen_machine_ops; 20318 machine_ops = xen_machine_ops;
20536 20319
@@ -20544,10 +20327,10 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/enlighten.c linux-2.6.32.24/arch/x86/xen
20544 xen_smp_init(); 20327 xen_smp_init();
20545 20328
20546 pgd = (pgd_t *)xen_start_info->pt_base; 20329 pgd = (pgd_t *)xen_start_info->pt_base;
20547diff -urNp linux-2.6.32.24/arch/x86/xen/mmu.c linux-2.6.32.24/arch/x86/xen/mmu.c 20330diff -urNp linux-2.6.35.7/arch/x86/xen/mmu.c linux-2.6.35.7/arch/x86/xen/mmu.c
20548--- linux-2.6.32.24/arch/x86/xen/mmu.c 2010-08-13 16:24:37.000000000 -0400 20331--- linux-2.6.35.7/arch/x86/xen/mmu.c 2010-08-26 19:47:12.000000000 -0400
20549+++ linux-2.6.32.24/arch/x86/xen/mmu.c 2010-10-23 19:59:19.000000000 -0400 20332+++ linux-2.6.35.7/arch/x86/xen/mmu.c 2010-09-17 20:12:09.000000000 -0400
20550@@ -1711,6 +1711,8 @@ __init pgd_t *xen_setup_kernel_pagetable 20333@@ -1694,6 +1694,8 @@ __init pgd_t *xen_setup_kernel_pagetable
20551 convert_pfn_mfn(init_level4_pgt); 20334 convert_pfn_mfn(init_level4_pgt);
20552 convert_pfn_mfn(level3_ident_pgt); 20335 convert_pfn_mfn(level3_ident_pgt);
20553 convert_pfn_mfn(level3_kernel_pgt); 20336 convert_pfn_mfn(level3_kernel_pgt);
@@ -20556,7 +20339,7 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/mmu.c linux-2.6.32.24/arch/x86/xen/mmu.c
20556 20339
20557 l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd); 20340 l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd);
20558 l2 = m2v(l3[pud_index(__START_KERNEL_map)].pud); 20341 l2 = m2v(l3[pud_index(__START_KERNEL_map)].pud);
20559@@ -1729,7 +1731,10 @@ __init pgd_t *xen_setup_kernel_pagetable 20342@@ -1712,7 +1714,10 @@ __init pgd_t *xen_setup_kernel_pagetable
20560 set_page_prot(init_level4_pgt, PAGE_KERNEL_RO); 20343 set_page_prot(init_level4_pgt, PAGE_KERNEL_RO);
20561 set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO); 20344 set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO);
20562 set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO); 20345 set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO);
@@ -20567,10 +20350,10 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/mmu.c linux-2.6.32.24/arch/x86/xen/mmu.c
20567 set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO); 20350 set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO);
20568 set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO); 20351 set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO);
20569 20352
20570diff -urNp linux-2.6.32.24/arch/x86/xen/smp.c linux-2.6.32.24/arch/x86/xen/smp.c 20353diff -urNp linux-2.6.35.7/arch/x86/xen/smp.c linux-2.6.35.7/arch/x86/xen/smp.c
20571--- linux-2.6.32.24/arch/x86/xen/smp.c 2010-08-13 16:24:37.000000000 -0400 20354--- linux-2.6.35.7/arch/x86/xen/smp.c 2010-08-26 19:47:12.000000000 -0400
20572+++ linux-2.6.32.24/arch/x86/xen/smp.c 2010-10-23 19:59:19.000000000 -0400 20355+++ linux-2.6.35.7/arch/x86/xen/smp.c 2010-09-17 20:12:09.000000000 -0400
20573@@ -167,11 +167,6 @@ static void __init xen_smp_prepare_boot_ 20356@@ -169,11 +169,6 @@ static void __init xen_smp_prepare_boot_
20574 { 20357 {
20575 BUG_ON(smp_processor_id() != 0); 20358 BUG_ON(smp_processor_id() != 0);
20576 native_smp_prepare_boot_cpu(); 20359 native_smp_prepare_boot_cpu();
@@ -20582,7 +20365,7 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/smp.c linux-2.6.32.24/arch/x86/xen/smp.c
20582 xen_setup_vcpu_info_placement(); 20365 xen_setup_vcpu_info_placement();
20583 } 20366 }
20584 20367
20585@@ -231,8 +226,8 @@ cpu_initialize_context(unsigned int cpu, 20368@@ -233,8 +228,8 @@ cpu_initialize_context(unsigned int cpu,
20586 gdt = get_cpu_gdt_table(cpu); 20369 gdt = get_cpu_gdt_table(cpu);
20587 20370
20588 ctxt->flags = VGCF_IN_KERNEL; 20371 ctxt->flags = VGCF_IN_KERNEL;
@@ -20593,9 +20376,9 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/smp.c linux-2.6.32.24/arch/x86/xen/smp.c
20593 ctxt->user_regs.ss = __KERNEL_DS; 20376 ctxt->user_regs.ss = __KERNEL_DS;
20594 #ifdef CONFIG_X86_32 20377 #ifdef CONFIG_X86_32
20595 ctxt->user_regs.fs = __KERNEL_PERCPU; 20378 ctxt->user_regs.fs = __KERNEL_PERCPU;
20596diff -urNp linux-2.6.32.24/arch/x86/xen/xen-head.S linux-2.6.32.24/arch/x86/xen/xen-head.S 20379diff -urNp linux-2.6.35.7/arch/x86/xen/xen-head.S linux-2.6.35.7/arch/x86/xen/xen-head.S
20597--- linux-2.6.32.24/arch/x86/xen/xen-head.S 2010-08-13 16:24:37.000000000 -0400 20380--- linux-2.6.35.7/arch/x86/xen/xen-head.S 2010-08-26 19:47:12.000000000 -0400
20598+++ linux-2.6.32.24/arch/x86/xen/xen-head.S 2010-10-23 19:59:19.000000000 -0400 20381+++ linux-2.6.35.7/arch/x86/xen/xen-head.S 2010-09-17 20:12:09.000000000 -0400
20599@@ -19,6 +19,17 @@ ENTRY(startup_xen) 20382@@ -19,6 +19,17 @@ ENTRY(startup_xen)
20600 #ifdef CONFIG_X86_32 20383 #ifdef CONFIG_X86_32
20601 mov %esi,xen_start_info 20384 mov %esi,xen_start_info
@@ -20614,9 +20397,9 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/xen-head.S linux-2.6.32.24/arch/x86/xen/
20614 #else 20397 #else
20615 mov %rsi,xen_start_info 20398 mov %rsi,xen_start_info
20616 mov $init_thread_union+THREAD_SIZE,%rsp 20399 mov $init_thread_union+THREAD_SIZE,%rsp
20617diff -urNp linux-2.6.32.24/arch/x86/xen/xen-ops.h linux-2.6.32.24/arch/x86/xen/xen-ops.h 20400diff -urNp linux-2.6.35.7/arch/x86/xen/xen-ops.h linux-2.6.35.7/arch/x86/xen/xen-ops.h
20618--- linux-2.6.32.24/arch/x86/xen/xen-ops.h 2010-08-13 16:24:37.000000000 -0400 20401--- linux-2.6.35.7/arch/x86/xen/xen-ops.h 2010-08-26 19:47:12.000000000 -0400
20619+++ linux-2.6.32.24/arch/x86/xen/xen-ops.h 2010-10-23 19:59:19.000000000 -0400 20402+++ linux-2.6.35.7/arch/x86/xen/xen-ops.h 2010-09-17 20:12:09.000000000 -0400
20620@@ -10,8 +10,6 @@ 20403@@ -10,8 +10,6 @@
20621 extern const char xen_hypervisor_callback[]; 20404 extern const char xen_hypervisor_callback[];
20622 extern const char xen_failsafe_callback[]; 20405 extern const char xen_failsafe_callback[];
@@ -20626,21 +20409,9 @@ diff -urNp linux-2.6.32.24/arch/x86/xen/xen-ops.h linux-2.6.32.24/arch/x86/xen/x
20626 struct trap_info; 20409 struct trap_info;
20627 void xen_copy_trap_info(struct trap_info *traps); 20410 void xen_copy_trap_info(struct trap_info *traps);
20628 20411
20629diff -urNp linux-2.6.32.24/block/blk-integrity.c linux-2.6.32.24/block/blk-integrity.c 20412diff -urNp linux-2.6.35.7/block/blk-iopoll.c linux-2.6.35.7/block/blk-iopoll.c
20630--- linux-2.6.32.24/block/blk-integrity.c 2010-08-13 16:24:37.000000000 -0400 20413--- linux-2.6.35.7/block/blk-iopoll.c 2010-08-26 19:47:12.000000000 -0400
20631+++ linux-2.6.32.24/block/blk-integrity.c 2010-10-23 19:59:19.000000000 -0400 20414+++ linux-2.6.35.7/block/blk-iopoll.c 2010-09-17 20:12:09.000000000 -0400
20632@@ -278,7 +278,7 @@ static struct attribute *integrity_attrs
20633 NULL,
20634 };
20635
20636-static struct sysfs_ops integrity_ops = {
20637+static const struct sysfs_ops integrity_ops = {
20638 .show = &integrity_attr_show,
20639 .store = &integrity_attr_store,
20640 };
20641diff -urNp linux-2.6.32.24/block/blk-iopoll.c linux-2.6.32.24/block/blk-iopoll.c
20642--- linux-2.6.32.24/block/blk-iopoll.c 2010-08-13 16:24:37.000000000 -0400
20643+++ linux-2.6.32.24/block/blk-iopoll.c 2010-10-23 19:59:19.000000000 -0400
20644@@ -77,7 +77,7 @@ void blk_iopoll_complete(struct blk_iopo 20415@@ -77,7 +77,7 @@ void blk_iopoll_complete(struct blk_iopo
20645 } 20416 }
20646 EXPORT_SYMBOL(blk_iopoll_complete); 20417 EXPORT_SYMBOL(blk_iopoll_complete);
@@ -20650,9 +20421,9 @@ diff -urNp linux-2.6.32.24/block/blk-iopoll.c linux-2.6.32.24/block/blk-iopoll.c
20650 { 20421 {
20651 struct list_head *list = &__get_cpu_var(blk_cpu_iopoll); 20422 struct list_head *list = &__get_cpu_var(blk_cpu_iopoll);
20652 int rearm = 0, budget = blk_iopoll_budget; 20423 int rearm = 0, budget = blk_iopoll_budget;
20653diff -urNp linux-2.6.32.24/block/blk-map.c linux-2.6.32.24/block/blk-map.c 20424diff -urNp linux-2.6.35.7/block/blk-map.c linux-2.6.35.7/block/blk-map.c
20654--- linux-2.6.32.24/block/blk-map.c 2010-08-13 16:24:37.000000000 -0400 20425--- linux-2.6.35.7/block/blk-map.c 2010-08-26 19:47:12.000000000 -0400
20655+++ linux-2.6.32.24/block/blk-map.c 2010-10-23 19:59:19.000000000 -0400 20426+++ linux-2.6.35.7/block/blk-map.c 2010-09-17 20:12:09.000000000 -0400
20656@@ -54,7 +54,7 @@ static int __blk_rq_map_user(struct requ 20427@@ -54,7 +54,7 @@ static int __blk_rq_map_user(struct requ
20657 * direct dma. else, set up kernel bounce buffers 20428 * direct dma. else, set up kernel bounce buffers
20658 */ 20429 */
@@ -20671,9 +20442,9 @@ diff -urNp linux-2.6.32.24/block/blk-map.c linux-2.6.32.24/block/blk-map.c
20671 if (do_copy) 20442 if (do_copy)
20672 bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading); 20443 bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading);
20673 else 20444 else
20674diff -urNp linux-2.6.32.24/block/blk-softirq.c linux-2.6.32.24/block/blk-softirq.c 20445diff -urNp linux-2.6.35.7/block/blk-softirq.c linux-2.6.35.7/block/blk-softirq.c
20675--- linux-2.6.32.24/block/blk-softirq.c 2010-08-13 16:24:37.000000000 -0400 20446--- linux-2.6.35.7/block/blk-softirq.c 2010-08-26 19:47:12.000000000 -0400
20676+++ linux-2.6.32.24/block/blk-softirq.c 2010-10-23 19:59:19.000000000 -0400 20447+++ linux-2.6.35.7/block/blk-softirq.c 2010-09-17 20:12:09.000000000 -0400
20677@@ -17,7 +17,7 @@ static DEFINE_PER_CPU(struct list_head, 20448@@ -17,7 +17,7 @@ static DEFINE_PER_CPU(struct list_head,
20678 * Softirq action handler - move entries to local list and loop over them 20449 * Softirq action handler - move entries to local list and loop over them
20679 * while passing them to the queue registered handler. 20450 * while passing them to the queue registered handler.
@@ -20683,33 +20454,9 @@ diff -urNp linux-2.6.32.24/block/blk-softirq.c linux-2.6.32.24/block/blk-softirq
20683 { 20454 {
20684 struct list_head *cpu_list, local_list; 20455 struct list_head *cpu_list, local_list;
20685 20456
20686diff -urNp linux-2.6.32.24/block/blk-sysfs.c linux-2.6.32.24/block/blk-sysfs.c 20457diff -urNp linux-2.6.35.7/crypto/lrw.c linux-2.6.35.7/crypto/lrw.c
20687--- linux-2.6.32.24/block/blk-sysfs.c 2010-08-13 16:24:37.000000000 -0400 20458--- linux-2.6.35.7/crypto/lrw.c 2010-08-26 19:47:12.000000000 -0400
20688+++ linux-2.6.32.24/block/blk-sysfs.c 2010-10-23 19:59:19.000000000 -0400 20459+++ linux-2.6.35.7/crypto/lrw.c 2010-09-17 20:12:09.000000000 -0400
20689@@ -414,7 +414,7 @@ static void blk_release_queue(struct kob
20690 kmem_cache_free(blk_requestq_cachep, q);
20691 }
20692
20693-static struct sysfs_ops queue_sysfs_ops = {
20694+static const struct sysfs_ops queue_sysfs_ops = {
20695 .show = queue_attr_show,
20696 .store = queue_attr_store,
20697 };
20698diff -urNp linux-2.6.32.24/block/elevator.c linux-2.6.32.24/block/elevator.c
20699--- linux-2.6.32.24/block/elevator.c 2010-08-13 16:24:37.000000000 -0400
20700+++ linux-2.6.32.24/block/elevator.c 2010-10-23 19:59:19.000000000 -0400
20701@@ -889,7 +889,7 @@ elv_attr_store(struct kobject *kobj, str
20702 return error;
20703 }
20704
20705-static struct sysfs_ops elv_sysfs_ops = {
20706+static const struct sysfs_ops elv_sysfs_ops = {
20707 .show = elv_attr_show,
20708 .store = elv_attr_store,
20709 };
20710diff -urNp linux-2.6.32.24/crypto/lrw.c linux-2.6.32.24/crypto/lrw.c
20711--- linux-2.6.32.24/crypto/lrw.c 2010-08-13 16:24:37.000000000 -0400
20712+++ linux-2.6.32.24/crypto/lrw.c 2010-10-23 19:59:19.000000000 -0400
20713@@ -60,7 +60,7 @@ static int setkey(struct crypto_tfm *par 20460@@ -60,7 +60,7 @@ static int setkey(struct crypto_tfm *par
20714 struct priv *ctx = crypto_tfm_ctx(parent); 20461 struct priv *ctx = crypto_tfm_ctx(parent);
20715 struct crypto_cipher *child = ctx->child; 20462 struct crypto_cipher *child = ctx->child;
@@ -20719,9 +20466,9 @@ diff -urNp linux-2.6.32.24/crypto/lrw.c linux-2.6.32.24/crypto/lrw.c
20719 int bsize = crypto_cipher_blocksize(child); 20466 int bsize = crypto_cipher_blocksize(child);
20720 20467
20721 crypto_cipher_clear_flags(child, CRYPTO_TFM_REQ_MASK); 20468 crypto_cipher_clear_flags(child, CRYPTO_TFM_REQ_MASK);
20722diff -urNp linux-2.6.32.24/Documentation/dontdiff linux-2.6.32.24/Documentation/dontdiff 20469diff -urNp linux-2.6.35.7/Documentation/dontdiff linux-2.6.35.7/Documentation/dontdiff
20723--- linux-2.6.32.24/Documentation/dontdiff 2010-08-13 16:24:37.000000000 -0400 20470--- linux-2.6.35.7/Documentation/dontdiff 2010-08-26 19:47:12.000000000 -0400
20724+++ linux-2.6.32.24/Documentation/dontdiff 2010-10-23 19:59:19.000000000 -0400 20471+++ linux-2.6.35.7/Documentation/dontdiff 2010-09-17 20:12:09.000000000 -0400
20725@@ -3,6 +3,7 @@ 20472@@ -3,6 +3,7 @@
20726 *.bin 20473 *.bin
20727 *.cpio 20474 *.cpio
@@ -20769,13 +20516,21 @@ diff -urNp linux-2.6.32.24/Documentation/dontdiff linux-2.6.32.24/Documentation/
20769 comp*.log 20516 comp*.log
20770 compile.h* 20517 compile.h*
20771 conf 20518 conf
20772@@ -103,13 +114,14 @@ gen_crc32table 20519@@ -100,19 +111,22 @@ fore200e_mkfirm
20520 fore200e_pca_fw.c*
20521 gconf
20522 gen-devlist
20523+gen-kdb_cmds.c
20524 gen_crc32table
20773 gen_init_cpio 20525 gen_init_cpio
20526 generated
20527 genheaders
20774 genksyms 20528 genksyms
20775 *_gray256.c 20529 *_gray256.c
20776+hash 20530+hash
20777 ihex2fw 20531 ihex2fw
20778 ikconfig.h* 20532 ikconfig.h*
20533+inat-tables.c
20779 initramfs_data.cpio 20534 initramfs_data.cpio
20780+initramfs_data.cpio.bz2 20535+initramfs_data.cpio.bz2
20781 initramfs_data.cpio.gz 20536 initramfs_data.cpio.gz
@@ -20785,7 +20540,7 @@ diff -urNp linux-2.6.32.24/Documentation/dontdiff linux-2.6.32.24/Documentation/
20785 keywords.c 20540 keywords.c
20786 ksym.c* 20541 ksym.c*
20787 ksym.h* 20542 ksym.h*
20788@@ -133,7 +145,9 @@ mkboot 20543@@ -136,10 +150,13 @@ mkboot
20789 mkbugboot 20544 mkbugboot
20790 mkcpustr 20545 mkcpustr
20791 mkdep 20546 mkdep
@@ -20795,15 +20550,21 @@ diff -urNp linux-2.6.32.24/Documentation/dontdiff linux-2.6.32.24/Documentation/
20795 mktables 20550 mktables
20796 mktree 20551 mktree
20797 modpost 20552 modpost
20798@@ -149,6 +163,7 @@ patches* 20553+modules.builtin
20554 modules.order
20555 modversions.h*
20556 ncscope.*
20557@@ -151,7 +168,9 @@ parse.h
20558 patches*
20799 pca200e.bin 20559 pca200e.bin
20800 pca200e_ecd.bin2 20560 pca200e_ecd.bin2
20561+perf-archive
20801 piggy.gz 20562 piggy.gz
20802+piggy.S 20563+piggy.S
20803 piggyback 20564 piggyback
20804 pnmtologo 20565 pnmtologo
20805 ppc_defs.h* 20566 ppc_defs.h*
20806@@ -157,12 +172,14 @@ qconf 20567@@ -160,12 +179,14 @@ qconf
20807 raid6altivec*.c 20568 raid6altivec*.c
20808 raid6int*.c 20569 raid6int*.c
20809 raid6tables.c 20570 raid6tables.c
@@ -20818,7 +20579,7 @@ diff -urNp linux-2.6.32.24/Documentation/dontdiff linux-2.6.32.24/Documentation/
20818 sm_tbl* 20579 sm_tbl*
20819 split-include 20580 split-include
20820 syscalltab.h 20581 syscalltab.h
20821@@ -186,14 +203,20 @@ version.h* 20582@@ -189,14 +210,20 @@ version.h*
20822 vmlinux 20583 vmlinux
20823 vmlinux-* 20584 vmlinux-*
20824 vmlinux.aout 20585 vmlinux.aout
@@ -20839,10 +20600,24 @@ diff -urNp linux-2.6.32.24/Documentation/dontdiff linux-2.6.32.24/Documentation/
20839 zImage* 20600 zImage*
20840 zconf.hash.c 20601 zconf.hash.c
20841+zoffset.h 20602+zoffset.h
20842diff -urNp linux-2.6.32.24/Documentation/kernel-parameters.txt linux-2.6.32.24/Documentation/kernel-parameters.txt 20603diff -urNp linux-2.6.35.7/Documentation/filesystems/sysfs.txt linux-2.6.35.7/Documentation/filesystems/sysfs.txt
20843--- linux-2.6.32.24/Documentation/kernel-parameters.txt 2010-08-13 16:24:37.000000000 -0400 20604--- linux-2.6.35.7/Documentation/filesystems/sysfs.txt 2010-08-26 19:47:12.000000000 -0400
20844+++ linux-2.6.32.24/Documentation/kernel-parameters.txt 2010-10-23 19:59:19.000000000 -0400 20605+++ linux-2.6.35.7/Documentation/filesystems/sysfs.txt 2010-09-17 20:12:09.000000000 -0400
20845@@ -1836,6 +1836,12 @@ and is between 256 and 4096 characters. 20606@@ -123,8 +123,8 @@ set of sysfs operations for forwarding r
20607 show and store methods of the attribute owners.
20608
20609 struct sysfs_ops {
20610- ssize_t (*show)(struct kobject *, struct attribute *, char *);
20611- ssize_t (*store)(struct kobject *, struct attribute *, const char *);
20612+ ssize_t (* const show)(struct kobject *, struct attribute *, char *);
20613+ ssize_t (* const store)(struct kobject *, struct attribute *, const char *);
20614 };
20615
20616 [ Subsystems should have already defined a struct kobj_type as a
20617diff -urNp linux-2.6.35.7/Documentation/kernel-parameters.txt linux-2.6.35.7/Documentation/kernel-parameters.txt
20618--- linux-2.6.35.7/Documentation/kernel-parameters.txt 2010-08-26 19:47:12.000000000 -0400
20619+++ linux-2.6.35.7/Documentation/kernel-parameters.txt 2010-09-17 20:12:09.000000000 -0400
20620@@ -1910,6 +1910,12 @@ and is between 256 and 4096 characters.
20846 the specified number of seconds. This is to be used if 20621 the specified number of seconds. This is to be used if
20847 your oopses keep scrolling off the screen. 20622 your oopses keep scrolling off the screen.
20848 20623
@@ -20855,22 +20630,10 @@ diff -urNp linux-2.6.32.24/Documentation/kernel-parameters.txt linux-2.6.32.24/D
20855 pcbit= [HW,ISDN] 20630 pcbit= [HW,ISDN]
20856 20631
20857 pcd. [PARIDE] 20632 pcd. [PARIDE]
20858diff -urNp linux-2.6.32.24/drivers/acpi/acpi_pad.c linux-2.6.32.24/drivers/acpi/acpi_pad.c 20633diff -urNp linux-2.6.35.7/drivers/acpi/battery.c linux-2.6.35.7/drivers/acpi/battery.c
20859--- linux-2.6.32.24/drivers/acpi/acpi_pad.c 2010-08-13 16:24:37.000000000 -0400 20634--- linux-2.6.35.7/drivers/acpi/battery.c 2010-08-26 19:47:12.000000000 -0400
20860+++ linux-2.6.32.24/drivers/acpi/acpi_pad.c 2010-10-23 19:59:19.000000000 -0400 20635+++ linux-2.6.35.7/drivers/acpi/battery.c 2010-09-17 20:12:09.000000000 -0400
20861@@ -30,7 +30,7 @@ 20636@@ -810,7 +810,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
20862 #include <acpi/acpi_bus.h>
20863 #include <acpi/acpi_drivers.h>
20864
20865-#define ACPI_PROCESSOR_AGGREGATOR_CLASS "processor_aggregator"
20866+#define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad"
20867 #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
20868 #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80
20869 static DEFINE_MUTEX(isolated_cpus_lock);
20870diff -urNp linux-2.6.32.24/drivers/acpi/battery.c linux-2.6.32.24/drivers/acpi/battery.c
20871--- linux-2.6.32.24/drivers/acpi/battery.c 2010-08-13 16:24:37.000000000 -0400
20872+++ linux-2.6.32.24/drivers/acpi/battery.c 2010-10-23 19:59:19.000000000 -0400
20873@@ -763,7 +763,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
20874 } 20637 }
20875 20638
20876 static struct battery_file { 20639 static struct battery_file {
@@ -20879,9 +20642,9 @@ diff -urNp linux-2.6.32.24/drivers/acpi/battery.c linux-2.6.32.24/drivers/acpi/b
20879 mode_t mode; 20642 mode_t mode;
20880 const char *name; 20643 const char *name;
20881 } acpi_battery_file[] = { 20644 } acpi_battery_file[] = {
20882diff -urNp linux-2.6.32.24/drivers/acpi/blacklist.c linux-2.6.32.24/drivers/acpi/blacklist.c 20645diff -urNp linux-2.6.35.7/drivers/acpi/blacklist.c linux-2.6.35.7/drivers/acpi/blacklist.c
20883--- linux-2.6.32.24/drivers/acpi/blacklist.c 2010-09-26 17:26:05.000000000 -0400 20646--- linux-2.6.35.7/drivers/acpi/blacklist.c 2010-08-26 19:47:12.000000000 -0400
20884+++ linux-2.6.32.24/drivers/acpi/blacklist.c 2010-10-23 19:59:19.000000000 -0400 20647+++ linux-2.6.35.7/drivers/acpi/blacklist.c 2010-09-17 20:12:09.000000000 -0400
20885@@ -73,7 +73,7 @@ static struct acpi_blacklist_item acpi_b 20648@@ -73,7 +73,7 @@ static struct acpi_blacklist_item acpi_b
20886 {"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal, 20649 {"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal,
20887 "Incorrect _ADR", 1}, 20650 "Incorrect _ADR", 1},
@@ -20891,9 +20654,9 @@ diff -urNp linux-2.6.32.24/drivers/acpi/blacklist.c linux-2.6.32.24/drivers/acpi
20891 }; 20654 };
20892 20655
20893 #if CONFIG_ACPI_BLACKLIST_YEAR 20656 #if CONFIG_ACPI_BLACKLIST_YEAR
20894diff -urNp linux-2.6.32.24/drivers/acpi/dock.c linux-2.6.32.24/drivers/acpi/dock.c 20657diff -urNp linux-2.6.35.7/drivers/acpi/dock.c linux-2.6.35.7/drivers/acpi/dock.c
20895--- linux-2.6.32.24/drivers/acpi/dock.c 2010-08-13 16:24:37.000000000 -0400 20658--- linux-2.6.35.7/drivers/acpi/dock.c 2010-08-26 19:47:12.000000000 -0400
20896+++ linux-2.6.32.24/drivers/acpi/dock.c 2010-10-23 19:59:19.000000000 -0400 20659+++ linux-2.6.35.7/drivers/acpi/dock.c 2010-09-17 20:12:09.000000000 -0400
20897@@ -77,7 +77,7 @@ struct dock_dependent_device { 20660@@ -77,7 +77,7 @@ struct dock_dependent_device {
20898 struct list_head list; 20661 struct list_head list;
20899 struct list_head hotplug_list; 20662 struct list_head hotplug_list;
@@ -20903,7 +20666,7 @@ diff -urNp linux-2.6.32.24/drivers/acpi/dock.c linux-2.6.32.24/drivers/acpi/dock
20903 void *context; 20666 void *context;
20904 }; 20667 };
20905 20668
20906@@ -605,7 +605,7 @@ EXPORT_SYMBOL_GPL(unregister_dock_notifi 20669@@ -589,7 +589,7 @@ EXPORT_SYMBOL_GPL(unregister_dock_notifi
20907 * the dock driver after _DCK is executed. 20670 * the dock driver after _DCK is executed.
20908 */ 20671 */
20909 int 20672 int
@@ -20912,9 +20675,9 @@ diff -urNp linux-2.6.32.24/drivers/acpi/dock.c linux-2.6.32.24/drivers/acpi/dock
20912 void *context) 20675 void *context)
20913 { 20676 {
20914 struct dock_dependent_device *dd; 20677 struct dock_dependent_device *dd;
20915diff -urNp linux-2.6.32.24/drivers/acpi/osl.c linux-2.6.32.24/drivers/acpi/osl.c 20678diff -urNp linux-2.6.35.7/drivers/acpi/osl.c linux-2.6.35.7/drivers/acpi/osl.c
20916--- linux-2.6.32.24/drivers/acpi/osl.c 2010-08-13 16:24:37.000000000 -0400 20679--- linux-2.6.35.7/drivers/acpi/osl.c 2010-08-26 19:47:12.000000000 -0400
20917+++ linux-2.6.32.24/drivers/acpi/osl.c 2010-10-23 19:59:19.000000000 -0400 20680+++ linux-2.6.35.7/drivers/acpi/osl.c 2010-09-17 20:12:09.000000000 -0400
20918@@ -523,6 +523,8 @@ acpi_os_read_memory(acpi_physical_addres 20681@@ -523,6 +523,8 @@ acpi_os_read_memory(acpi_physical_addres
20919 void __iomem *virt_addr; 20682 void __iomem *virt_addr;
20920 20683
@@ -20933,10 +20696,10 @@ diff -urNp linux-2.6.32.24/drivers/acpi/osl.c linux-2.6.32.24/drivers/acpi/osl.c
20933 20696
20934 switch (width) { 20697 switch (width) {
20935 case 8: 20698 case 8:
20936diff -urNp linux-2.6.32.24/drivers/acpi/power_meter.c linux-2.6.32.24/drivers/acpi/power_meter.c 20699diff -urNp linux-2.6.35.7/drivers/acpi/power_meter.c linux-2.6.35.7/drivers/acpi/power_meter.c
20937--- linux-2.6.32.24/drivers/acpi/power_meter.c 2010-08-13 16:24:37.000000000 -0400 20700--- linux-2.6.35.7/drivers/acpi/power_meter.c 2010-08-26 19:47:12.000000000 -0400
20938+++ linux-2.6.32.24/drivers/acpi/power_meter.c 2010-10-23 19:59:19.000000000 -0400 20701+++ linux-2.6.35.7/drivers/acpi/power_meter.c 2010-09-17 20:12:09.000000000 -0400
20939@@ -315,8 +315,6 @@ static ssize_t set_trip(struct device *d 20702@@ -316,8 +316,6 @@ static ssize_t set_trip(struct device *d
20940 return res; 20703 return res;
20941 20704
20942 temp /= 1000; 20705 temp /= 1000;
@@ -20945,9 +20708,9 @@ diff -urNp linux-2.6.32.24/drivers/acpi/power_meter.c linux-2.6.32.24/drivers/ac
20945 20708
20946 mutex_lock(&resource->lock); 20709 mutex_lock(&resource->lock);
20947 resource->trip[attr->index - 7] = temp; 20710 resource->trip[attr->index - 7] = temp;
20948diff -urNp linux-2.6.32.24/drivers/acpi/proc.c linux-2.6.32.24/drivers/acpi/proc.c 20711diff -urNp linux-2.6.35.7/drivers/acpi/proc.c linux-2.6.35.7/drivers/acpi/proc.c
20949--- linux-2.6.32.24/drivers/acpi/proc.c 2010-08-13 16:24:37.000000000 -0400 20712--- linux-2.6.35.7/drivers/acpi/proc.c 2010-08-26 19:47:12.000000000 -0400
20950+++ linux-2.6.32.24/drivers/acpi/proc.c 2010-10-23 19:59:19.000000000 -0400 20713+++ linux-2.6.35.7/drivers/acpi/proc.c 2010-09-17 20:12:09.000000000 -0400
20951@@ -391,20 +391,15 @@ acpi_system_write_wakeup_device(struct f 20714@@ -391,20 +391,15 @@ acpi_system_write_wakeup_device(struct f
20952 size_t count, loff_t * ppos) 20715 size_t count, loff_t * ppos)
20953 { 20716 {
@@ -20983,22 +20746,22 @@ diff -urNp linux-2.6.32.24/drivers/acpi/proc.c linux-2.6.32.24/drivers/acpi/proc
20983 dev->wakeup.state.enabled = 20746 dev->wakeup.state.enabled =
20984 dev->wakeup.state.enabled ? 0 : 1; 20747 dev->wakeup.state.enabled ? 0 : 1;
20985 found_dev = dev; 20748 found_dev = dev;
20986diff -urNp linux-2.6.32.24/drivers/acpi/processor_core.c linux-2.6.32.24/drivers/acpi/processor_core.c 20749diff -urNp linux-2.6.35.7/drivers/acpi/processor_driver.c linux-2.6.35.7/drivers/acpi/processor_driver.c
20987--- linux-2.6.32.24/drivers/acpi/processor_core.c 2010-08-13 16:24:37.000000000 -0400 20750--- linux-2.6.35.7/drivers/acpi/processor_driver.c 2010-08-26 19:47:12.000000000 -0400
20988+++ linux-2.6.32.24/drivers/acpi/processor_core.c 2010-10-23 19:59:19.000000000 -0400 20751+++ linux-2.6.35.7/drivers/acpi/processor_driver.c 2010-09-17 20:12:09.000000000 -0400
20989@@ -796,7 +796,7 @@ static int __cpuinit acpi_processor_add( 20752@@ -586,7 +586,7 @@ static int __cpuinit acpi_processor_add(
20990 return 0; 20753 return 0;
20991 } 20754 #endif
20992 20755
20993- BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0)); 20756- BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0));
20994+ BUG_ON(pr->id >= nr_cpu_ids); 20757+ BUG_ON(pr->id >= nr_cpu_ids);
20995 20758
20996 /* 20759 /*
20997 * Buggy BIOS check 20760 * Buggy BIOS check
20998diff -urNp linux-2.6.32.24/drivers/acpi/processor_idle.c linux-2.6.32.24/drivers/acpi/processor_idle.c 20761diff -urNp linux-2.6.35.7/drivers/acpi/processor_idle.c linux-2.6.35.7/drivers/acpi/processor_idle.c
20999--- linux-2.6.32.24/drivers/acpi/processor_idle.c 2010-08-13 16:24:37.000000000 -0400 20762--- linux-2.6.35.7/drivers/acpi/processor_idle.c 2010-08-26 19:47:12.000000000 -0400
21000+++ linux-2.6.32.24/drivers/acpi/processor_idle.c 2010-10-23 19:59:19.000000000 -0400 20763+++ linux-2.6.35.7/drivers/acpi/processor_idle.c 2010-09-17 20:12:09.000000000 -0400
21001@@ -118,7 +118,7 @@ static struct dmi_system_id __cpuinitdat 20764@@ -124,7 +124,7 @@ static struct dmi_system_id __cpuinitdat
21002 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), 20765 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
21003 DMI_MATCH(DMI_PRODUCT_NAME,"L8400B series Notebook PC")}, 20766 DMI_MATCH(DMI_PRODUCT_NAME,"L8400B series Notebook PC")},
21004 (void *)1}, 20767 (void *)1},
@@ -21007,22 +20770,10 @@ diff -urNp linux-2.6.32.24/drivers/acpi/processor_idle.c linux-2.6.32.24/drivers
21007 }; 20770 };
21008 20771
21009 20772
21010diff -urNp linux-2.6.32.24/drivers/acpi/sbshc.c linux-2.6.32.24/drivers/acpi/sbshc.c 20773diff -urNp linux-2.6.35.7/drivers/acpi/sleep.c linux-2.6.35.7/drivers/acpi/sleep.c
21011--- linux-2.6.32.24/drivers/acpi/sbshc.c 2010-08-13 16:24:37.000000000 -0400 20774--- linux-2.6.35.7/drivers/acpi/sleep.c 2010-08-26 19:47:12.000000000 -0400
21012+++ linux-2.6.32.24/drivers/acpi/sbshc.c 2010-10-23 19:59:19.000000000 -0400 20775+++ linux-2.6.35.7/drivers/acpi/sleep.c 2010-09-17 20:12:09.000000000 -0400
21013@@ -17,7 +17,7 @@ 20776@@ -318,7 +318,7 @@ static int acpi_suspend_state_valid(susp
21014
21015 #define PREFIX "ACPI: "
21016
21017-#define ACPI_SMB_HC_CLASS "smbus_host_controller"
21018+#define ACPI_SMB_HC_CLASS "smbus_host_ctl"
21019 #define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC"
21020
21021 struct acpi_smb_hc {
21022diff -urNp linux-2.6.32.24/drivers/acpi/sleep.c linux-2.6.32.24/drivers/acpi/sleep.c
21023--- linux-2.6.32.24/drivers/acpi/sleep.c 2010-08-13 16:24:37.000000000 -0400
21024+++ linux-2.6.32.24/drivers/acpi/sleep.c 2010-10-23 19:59:19.000000000 -0400
21025@@ -283,7 +283,7 @@ static int acpi_suspend_state_valid(susp
21026 } 20777 }
21027 } 20778 }
21028 20779
@@ -21031,7 +20782,7 @@ diff -urNp linux-2.6.32.24/drivers/acpi/sleep.c linux-2.6.32.24/drivers/acpi/sle
21031 .valid = acpi_suspend_state_valid, 20782 .valid = acpi_suspend_state_valid,
21032 .begin = acpi_suspend_begin, 20783 .begin = acpi_suspend_begin,
21033 .prepare_late = acpi_pm_prepare, 20784 .prepare_late = acpi_pm_prepare,
21034@@ -311,7 +311,7 @@ static int acpi_suspend_begin_old(suspen 20785@@ -346,7 +346,7 @@ static int acpi_suspend_begin_old(suspen
21035 * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has 20786 * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
21036 * been requested. 20787 * been requested.
21037 */ 20788 */
@@ -21039,8 +20790,8 @@ diff -urNp linux-2.6.32.24/drivers/acpi/sleep.c linux-2.6.32.24/drivers/acpi/sle
21039+static const struct platform_suspend_ops acpi_suspend_ops_old = { 20790+static const struct platform_suspend_ops acpi_suspend_ops_old = {
21040 .valid = acpi_suspend_state_valid, 20791 .valid = acpi_suspend_state_valid,
21041 .begin = acpi_suspend_begin_old, 20792 .begin = acpi_suspend_begin_old,
21042 .prepare_late = acpi_pm_disable_gpes, 20793 .prepare_late = acpi_pm_freeze,
21043@@ -460,7 +460,7 @@ static void acpi_pm_enable_gpes(void) 20794@@ -478,7 +478,7 @@ static void acpi_pm_thaw(void)
21044 acpi_enable_all_runtime_gpes(); 20795 acpi_enable_all_runtime_gpes();
21045 } 20796 }
21046 20797
@@ -21049,7 +20800,7 @@ diff -urNp linux-2.6.32.24/drivers/acpi/sleep.c linux-2.6.32.24/drivers/acpi/sle
21049 .begin = acpi_hibernation_begin, 20800 .begin = acpi_hibernation_begin,
21050 .end = acpi_pm_end, 20801 .end = acpi_pm_end,
21051 .pre_snapshot = acpi_hibernation_pre_snapshot, 20802 .pre_snapshot = acpi_hibernation_pre_snapshot,
21052@@ -513,7 +513,7 @@ static int acpi_hibernation_pre_snapshot 20803@@ -528,7 +528,7 @@ static int acpi_hibernation_pre_snapshot
21053 * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has 20804 * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
21054 * been requested. 20805 * been requested.
21055 */ 20806 */
@@ -21058,10 +20809,10 @@ diff -urNp linux-2.6.32.24/drivers/acpi/sleep.c linux-2.6.32.24/drivers/acpi/sle
21058 .begin = acpi_hibernation_begin_old, 20809 .begin = acpi_hibernation_begin_old,
21059 .end = acpi_pm_end, 20810 .end = acpi_pm_end,
21060 .pre_snapshot = acpi_hibernation_pre_snapshot_old, 20811 .pre_snapshot = acpi_hibernation_pre_snapshot_old,
21061diff -urNp linux-2.6.32.24/drivers/acpi/video.c linux-2.6.32.24/drivers/acpi/video.c 20812diff -urNp linux-2.6.35.7/drivers/acpi/video.c linux-2.6.35.7/drivers/acpi/video.c
21062--- linux-2.6.32.24/drivers/acpi/video.c 2010-08-13 16:24:37.000000000 -0400 20813--- linux-2.6.35.7/drivers/acpi/video.c 2010-08-26 19:47:12.000000000 -0400
21063+++ linux-2.6.32.24/drivers/acpi/video.c 2010-10-23 19:59:19.000000000 -0400 20814+++ linux-2.6.35.7/drivers/acpi/video.c 2010-09-17 20:12:09.000000000 -0400
21064@@ -359,7 +359,7 @@ static int acpi_video_set_brightness(str 20815@@ -363,7 +363,7 @@ static int acpi_video_set_brightness(str
21065 vd->brightness->levels[request_level]); 20816 vd->brightness->levels[request_level]);
21066 } 20817 }
21067 20818
@@ -21070,21 +20821,12 @@ diff -urNp linux-2.6.32.24/drivers/acpi/video.c linux-2.6.32.24/drivers/acpi/vid
21070 .get_brightness = acpi_video_get_brightness, 20821 .get_brightness = acpi_video_get_brightness,
21071 .update_status = acpi_video_set_brightness, 20822 .update_status = acpi_video_set_brightness,
21072 }; 20823 };
21073diff -urNp linux-2.6.32.24/drivers/ata/ahci.c linux-2.6.32.24/drivers/ata/ahci.c 20824diff -urNp linux-2.6.35.7/drivers/ata/ahci.c linux-2.6.35.7/drivers/ata/ahci.c
21074--- linux-2.6.32.24/drivers/ata/ahci.c 2010-08-13 16:24:37.000000000 -0400 20825--- linux-2.6.35.7/drivers/ata/ahci.c 2010-08-26 19:47:12.000000000 -0400
21075+++ linux-2.6.32.24/drivers/ata/ahci.c 2010-10-23 19:59:19.000000000 -0400 20826+++ linux-2.6.35.7/drivers/ata/ahci.c 2010-09-17 20:12:09.000000000 -0400
21076@@ -387,7 +387,7 @@ static struct scsi_host_template ahci_sh 20827@@ -89,17 +89,17 @@ static int ahci_pci_device_suspend(struc
21077 .sdev_attrs = ahci_sdev_attrs, 20828 static int ahci_pci_device_resume(struct pci_dev *pdev);
21078 }; 20829 #endif
21079
21080-static struct ata_port_operations ahci_ops = {
21081+static const struct ata_port_operations ahci_ops = {
21082 .inherits = &sata_pmp_port_ops,
21083
21084 .qc_defer = sata_pmp_qc_defer_cmd_switch,
21085@@ -424,17 +424,17 @@ static struct ata_port_operations ahci_o
21086 .port_stop = ahci_port_stop,
21087 };
21088 20830
21089-static struct ata_port_operations ahci_vt8251_ops = { 20831-static struct ata_port_operations ahci_vt8251_ops = {
21090+static const struct ata_port_operations ahci_vt8251_ops = { 20832+static const struct ata_port_operations ahci_vt8251_ops = {
@@ -21103,7 +20845,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/ahci.c linux-2.6.32.24/drivers/ata/ahci.c
21103 .inherits = &ahci_ops, 20845 .inherits = &ahci_ops,
21104 .softreset = ahci_sb600_softreset, 20846 .softreset = ahci_sb600_softreset,
21105 .pmp_softreset = ahci_sb600_softreset, 20847 .pmp_softreset = ahci_sb600_softreset,
21106@@ -687,7 +687,7 @@ static const struct pci_device_id ahci_p 20848@@ -370,7 +370,7 @@ static const struct pci_device_id ahci_p
21107 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 20849 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
21108 PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci }, 20850 PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
21109 20851
@@ -21112,10 +20854,22 @@ diff -urNp linux-2.6.32.24/drivers/ata/ahci.c linux-2.6.32.24/drivers/ata/ahci.c
21112 }; 20854 };
21113 20855
21114 20856
21115diff -urNp linux-2.6.32.24/drivers/ata/ata_generic.c linux-2.6.32.24/drivers/ata/ata_generic.c 20857diff -urNp linux-2.6.35.7/drivers/ata/ahci.h linux-2.6.35.7/drivers/ata/ahci.h
21116--- linux-2.6.32.24/drivers/ata/ata_generic.c 2010-08-13 16:24:37.000000000 -0400 20858--- linux-2.6.35.7/drivers/ata/ahci.h 2010-08-26 19:47:12.000000000 -0400
21117+++ linux-2.6.32.24/drivers/ata/ata_generic.c 2010-10-23 19:59:19.000000000 -0400 20859+++ linux-2.6.35.7/drivers/ata/ahci.h 2010-09-17 20:12:09.000000000 -0400
21118@@ -95,7 +95,7 @@ static struct scsi_host_template generic 20860@@ -298,7 +298,7 @@ struct ahci_host_priv {
20861 extern int ahci_ignore_sss;
20862
20863 extern struct scsi_host_template ahci_sht;
20864-extern struct ata_port_operations ahci_ops;
20865+extern const struct ata_port_operations ahci_ops;
20866
20867 void ahci_save_initial_config(struct device *dev,
20868 struct ahci_host_priv *hpriv,
20869diff -urNp linux-2.6.35.7/drivers/ata/ata_generic.c linux-2.6.35.7/drivers/ata/ata_generic.c
20870--- linux-2.6.35.7/drivers/ata/ata_generic.c 2010-08-26 19:47:12.000000000 -0400
20871+++ linux-2.6.35.7/drivers/ata/ata_generic.c 2010-09-17 20:12:09.000000000 -0400
20872@@ -104,7 +104,7 @@ static struct scsi_host_template generic
21119 ATA_BMDMA_SHT(DRV_NAME), 20873 ATA_BMDMA_SHT(DRV_NAME),
21120 }; 20874 };
21121 20875
@@ -21124,10 +20878,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/ata_generic.c linux-2.6.32.24/drivers/ata
21124 .inherits = &ata_bmdma_port_ops, 20878 .inherits = &ata_bmdma_port_ops,
21125 .cable_detect = ata_cable_unknown, 20879 .cable_detect = ata_cable_unknown,
21126 .set_mode = generic_set_mode, 20880 .set_mode = generic_set_mode,
21127diff -urNp linux-2.6.32.24/drivers/ata/ata_piix.c linux-2.6.32.24/drivers/ata/ata_piix.c 20881diff -urNp linux-2.6.35.7/drivers/ata/ata_piix.c linux-2.6.35.7/drivers/ata/ata_piix.c
21128--- linux-2.6.32.24/drivers/ata/ata_piix.c 2010-08-13 16:24:37.000000000 -0400 20882--- linux-2.6.35.7/drivers/ata/ata_piix.c 2010-08-26 19:47:12.000000000 -0400
21129+++ linux-2.6.32.24/drivers/ata/ata_piix.c 2010-10-23 19:59:19.000000000 -0400 20883+++ linux-2.6.35.7/drivers/ata/ata_piix.c 2010-09-17 20:12:09.000000000 -0400
21130@@ -300,7 +300,7 @@ static const struct pci_device_id piix_p 20884@@ -302,7 +302,7 @@ static const struct pci_device_id piix_p
21131 { 0x8086, 0x1c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 20885 { 0x8086, 0x1c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
21132 /* SATA Controller IDE (CPT) */ 20886 /* SATA Controller IDE (CPT) */
21133 { 0x8086, 0x1c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 20887 { 0x8086, 0x1c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
@@ -21136,16 +20890,22 @@ diff -urNp linux-2.6.32.24/drivers/ata/ata_piix.c linux-2.6.32.24/drivers/ata/at
21136 }; 20890 };
21137 20891
21138 static struct pci_driver piix_pci_driver = { 20892 static struct pci_driver piix_pci_driver = {
21139@@ -318,7 +318,7 @@ static struct scsi_host_template piix_sh 20893@@ -320,12 +320,12 @@ static struct scsi_host_template piix_sh
21140 ATA_BMDMA_SHT(DRV_NAME), 20894 ATA_BMDMA_SHT(DRV_NAME),
21141 }; 20895 };
21142 20896
20897-static struct ata_port_operations piix_sata_ops = {
20898+static const struct ata_port_operations piix_sata_ops = {
20899 .inherits = &ata_bmdma32_port_ops,
20900 .sff_irq_check = piix_irq_check,
20901 };
20902
21143-static struct ata_port_operations piix_pata_ops = { 20903-static struct ata_port_operations piix_pata_ops = {
21144+static const struct ata_port_operations piix_pata_ops = { 20904+static const struct ata_port_operations piix_pata_ops = {
21145 .inherits = &ata_bmdma32_port_ops, 20905 .inherits = &piix_sata_ops,
21146 .cable_detect = ata_cable_40wire, 20906 .cable_detect = ata_cable_40wire,
21147 .set_piomode = piix_set_piomode, 20907 .set_piomode = piix_set_piomode,
21148@@ -326,22 +326,22 @@ static struct ata_port_operations piix_p 20908@@ -333,18 +333,18 @@ static struct ata_port_operations piix_p
21149 .prereset = piix_pata_prereset, 20909 .prereset = piix_pata_prereset,
21150 }; 20910 };
21151 20911
@@ -21162,17 +20922,12 @@ diff -urNp linux-2.6.32.24/drivers/ata/ata_piix.c linux-2.6.32.24/drivers/ata/at
21162 .set_dmamode = ich_set_dmamode, 20922 .set_dmamode = ich_set_dmamode,
21163 }; 20923 };
21164 20924
21165-static struct ata_port_operations piix_sata_ops = {
21166+static const struct ata_port_operations piix_sata_ops = {
21167 .inherits = &ata_bmdma_port_ops,
21168 };
21169
21170-static struct ata_port_operations piix_sidpr_sata_ops = { 20925-static struct ata_port_operations piix_sidpr_sata_ops = {
21171+static const struct ata_port_operations piix_sidpr_sata_ops = { 20926+static const struct ata_port_operations piix_sidpr_sata_ops = {
21172 .inherits = &piix_sata_ops, 20927 .inherits = &piix_sata_ops,
21173 .hardreset = sata_std_hardreset, 20928 .hardreset = sata_std_hardreset,
21174 .scr_read = piix_sidpr_scr_read, 20929 .scr_read = piix_sidpr_scr_read,
21175@@ -617,7 +617,7 @@ static const struct ich_laptop ich_lapto 20930@@ -620,7 +620,7 @@ static const struct ich_laptop ich_lapto
21176 { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ 20931 { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */
21177 { 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */ 20932 { 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */
21178 /* end marker */ 20933 /* end marker */
@@ -21181,7 +20936,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/ata_piix.c linux-2.6.32.24/drivers/ata/at
21181 }; 20936 };
21182 20937
21183 /** 20938 /**
21184@@ -1101,7 +1101,7 @@ static int piix_broken_suspend(void) 20939@@ -1112,7 +1112,7 @@ static int piix_broken_suspend(void)
21185 }, 20940 },
21186 }, 20941 },
21187 20942
@@ -21190,10 +20945,22 @@ diff -urNp linux-2.6.32.24/drivers/ata/ata_piix.c linux-2.6.32.24/drivers/ata/at
21190 }; 20945 };
21191 static const char *oemstrs[] = { 20946 static const char *oemstrs[] = {
21192 "Tecra M3,", 20947 "Tecra M3,",
21193diff -urNp linux-2.6.32.24/drivers/ata/libata-acpi.c linux-2.6.32.24/drivers/ata/libata-acpi.c 20948diff -urNp linux-2.6.35.7/drivers/ata/libahci.c linux-2.6.35.7/drivers/ata/libahci.c
21194--- linux-2.6.32.24/drivers/ata/libata-acpi.c 2010-08-13 16:24:37.000000000 -0400 20949--- linux-2.6.35.7/drivers/ata/libahci.c 2010-09-20 17:33:09.000000000 -0400
21195+++ linux-2.6.32.24/drivers/ata/libata-acpi.c 2010-10-23 19:59:19.000000000 -0400 20950+++ linux-2.6.35.7/drivers/ata/libahci.c 2010-09-20 17:33:32.000000000 -0400
21196@@ -223,12 +223,12 @@ static void ata_acpi_dev_uevent(acpi_han 20951@@ -149,7 +149,7 @@ struct scsi_host_template ahci_sht = {
20952 };
20953 EXPORT_SYMBOL_GPL(ahci_sht);
20954
20955-struct ata_port_operations ahci_ops = {
20956+const struct ata_port_operations ahci_ops = {
20957 .inherits = &sata_pmp_port_ops,
20958
20959 .qc_defer = ahci_pmp_qc_defer,
20960diff -urNp linux-2.6.35.7/drivers/ata/libata-acpi.c linux-2.6.35.7/drivers/ata/libata-acpi.c
20961--- linux-2.6.35.7/drivers/ata/libata-acpi.c 2010-08-26 19:47:12.000000000 -0400
20962+++ linux-2.6.35.7/drivers/ata/libata-acpi.c 2010-09-17 20:12:09.000000000 -0400
20963@@ -224,12 +224,12 @@ static void ata_acpi_dev_uevent(acpi_han
21197 ata_acpi_uevent(dev->link->ap, dev, event); 20964 ata_acpi_uevent(dev->link->ap, dev, event);
21198 } 20965 }
21199 20966
@@ -21208,10 +20975,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-acpi.c linux-2.6.32.24/drivers/ata
21208 .handler = ata_acpi_ap_notify_dock, 20975 .handler = ata_acpi_ap_notify_dock,
21209 .uevent = ata_acpi_ap_uevent, 20976 .uevent = ata_acpi_ap_uevent,
21210 }; 20977 };
21211diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata/libata-core.c 20978diff -urNp linux-2.6.35.7/drivers/ata/libata-core.c linux-2.6.35.7/drivers/ata/libata-core.c
21212--- linux-2.6.32.24/drivers/ata/libata-core.c 2010-09-20 17:26:42.000000000 -0400 20979--- linux-2.6.35.7/drivers/ata/libata-core.c 2010-09-20 17:33:09.000000000 -0400
21213+++ linux-2.6.32.24/drivers/ata/libata-core.c 2010-10-23 19:59:24.000000000 -0400 20980+++ linux-2.6.35.7/drivers/ata/libata-core.c 2010-10-11 22:41:44.000000000 -0400
21214@@ -900,7 +900,7 @@ static const struct ata_xfer_ent { 20981@@ -901,7 +901,7 @@ static const struct ata_xfer_ent {
21215 { ATA_SHIFT_PIO, ATA_NR_PIO_MODES, XFER_PIO_0 }, 20982 { ATA_SHIFT_PIO, ATA_NR_PIO_MODES, XFER_PIO_0 },
21216 { ATA_SHIFT_MWDMA, ATA_NR_MWDMA_MODES, XFER_MW_DMA_0 }, 20983 { ATA_SHIFT_MWDMA, ATA_NR_MWDMA_MODES, XFER_MW_DMA_0 },
21217 { ATA_SHIFT_UDMA, ATA_NR_UDMA_MODES, XFER_UDMA_0 }, 20984 { ATA_SHIFT_UDMA, ATA_NR_UDMA_MODES, XFER_UDMA_0 },
@@ -21220,7 +20987,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21220 }; 20987 };
21221 20988
21222 /** 20989 /**
21223@@ -3168,7 +3168,7 @@ static const struct ata_timing ata_timin 20990@@ -3073,7 +3073,7 @@ static const struct ata_timing ata_timin
21224 { XFER_UDMA_5, 0, 0, 0, 0, 0, 0, 0, 0, 20 }, 20991 { XFER_UDMA_5, 0, 0, 0, 0, 0, 0, 0, 0, 20 },
21225 { XFER_UDMA_6, 0, 0, 0, 0, 0, 0, 0, 0, 15 }, 20992 { XFER_UDMA_6, 0, 0, 0, 0, 0, 0, 0, 0, 15 },
21226 20993
@@ -21229,7 +20996,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21229 }; 20996 };
21230 20997
21231 #define ENOUGH(v, unit) (((v)-1)/(unit)+1) 20998 #define ENOUGH(v, unit) (((v)-1)/(unit)+1)
21232@@ -4393,7 +4393,7 @@ static const struct ata_blacklist_entry 20999@@ -4323,7 +4323,7 @@ static const struct ata_blacklist_entry
21233 { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER }, 21000 { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
21234 21001
21235 /* End Marker */ 21002 /* End Marker */
@@ -21238,7 +21005,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21238 }; 21005 };
21239 21006
21240 static int strn_pattern_cmp(const char *patt, const char *name, int wildchar) 21007 static int strn_pattern_cmp(const char *patt, const char *name, int wildchar)
21241@@ -4954,7 +4954,7 @@ void ata_qc_free(struct ata_queued_cmd * 21008@@ -4884,7 +4884,7 @@ void ata_qc_free(struct ata_queued_cmd *
21242 struct ata_port *ap; 21009 struct ata_port *ap;
21243 unsigned int tag; 21010 unsigned int tag;
21244 21011
@@ -21247,7 +21014,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21247 ap = qc->ap; 21014 ap = qc->ap;
21248 21015
21249 qc->flags = 0; 21016 qc->flags = 0;
21250@@ -4970,7 +4970,7 @@ void __ata_qc_complete(struct ata_queued 21017@@ -4900,7 +4900,7 @@ void __ata_qc_complete(struct ata_queued
21251 struct ata_port *ap; 21018 struct ata_port *ap;
21252 struct ata_link *link; 21019 struct ata_link *link;
21253 21020
@@ -21256,7 +21023,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21256 WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE)); 21023 WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
21257 ap = qc->ap; 21024 ap = qc->ap;
21258 link = qc->dev->link; 21025 link = qc->dev->link;
21259@@ -5981,7 +5981,7 @@ static void ata_host_stop(struct device 21026@@ -5881,7 +5881,7 @@ static void ata_host_stop(struct device
21260 * LOCKING: 21027 * LOCKING:
21261 * None. 21028 * None.
21262 */ 21029 */
@@ -21265,7 +21032,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21265 { 21032 {
21266 static DEFINE_SPINLOCK(lock); 21033 static DEFINE_SPINLOCK(lock);
21267 const struct ata_port_operations *cur; 21034 const struct ata_port_operations *cur;
21268@@ -5993,6 +5993,7 @@ static void ata_finalize_port_ops(struct 21035@@ -5893,6 +5893,7 @@ static void ata_finalize_port_ops(struct
21269 return; 21036 return;
21270 21037
21271 spin_lock(&lock); 21038 spin_lock(&lock);
@@ -21273,7 +21040,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21273 21040
21274 for (cur = ops->inherits; cur; cur = cur->inherits) { 21041 for (cur = ops->inherits; cur; cur = cur->inherits) {
21275 void **inherit = (void **)cur; 21042 void **inherit = (void **)cur;
21276@@ -6006,8 +6007,9 @@ static void ata_finalize_port_ops(struct 21043@@ -5906,8 +5907,9 @@ static void ata_finalize_port_ops(struct
21277 if (IS_ERR(*pp)) 21044 if (IS_ERR(*pp))
21278 *pp = NULL; 21045 *pp = NULL;
21279 21046
@@ -21284,7 +21051,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21284 spin_unlock(&lock); 21051 spin_unlock(&lock);
21285 } 21052 }
21286 21053
21287@@ -6104,7 +6106,7 @@ int ata_host_start(struct ata_host *host 21054@@ -6004,7 +6006,7 @@ int ata_host_start(struct ata_host *host
21288 */ 21055 */
21289 /* KILLME - the only user left is ipr */ 21056 /* KILLME - the only user left is ipr */
21290 void ata_host_init(struct ata_host *host, struct device *dev, 21057 void ata_host_init(struct ata_host *host, struct device *dev,
@@ -21293,7 +21060,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21293 { 21060 {
21294 spin_lock_init(&host->lock); 21061 spin_lock_init(&host->lock);
21295 host->dev = dev; 21062 host->dev = dev;
21296@@ -6767,7 +6769,7 @@ static void ata_dummy_error_handler(stru 21063@@ -6654,7 +6656,7 @@ static void ata_dummy_error_handler(stru
21297 /* truly dummy */ 21064 /* truly dummy */
21298 } 21065 }
21299 21066
@@ -21302,10 +21069,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-core.c linux-2.6.32.24/drivers/ata
21302 .qc_prep = ata_noop_qc_prep, 21069 .qc_prep = ata_noop_qc_prep,
21303 .qc_issue = ata_dummy_qc_issue, 21070 .qc_issue = ata_dummy_qc_issue,
21304 .error_handler = ata_dummy_error_handler, 21071 .error_handler = ata_dummy_error_handler,
21305diff -urNp linux-2.6.32.24/drivers/ata/libata-eh.c linux-2.6.32.24/drivers/ata/libata-eh.c 21072diff -urNp linux-2.6.35.7/drivers/ata/libata-eh.c linux-2.6.35.7/drivers/ata/libata-eh.c
21306--- linux-2.6.32.24/drivers/ata/libata-eh.c 2010-09-20 17:26:42.000000000 -0400 21073--- linux-2.6.35.7/drivers/ata/libata-eh.c 2010-09-20 17:33:09.000000000 -0400
21307+++ linux-2.6.32.24/drivers/ata/libata-eh.c 2010-10-23 19:59:19.000000000 -0400 21074+++ linux-2.6.35.7/drivers/ata/libata-eh.c 2010-09-20 17:33:32.000000000 -0400
21308@@ -3590,7 +3590,7 @@ void ata_do_eh(struct ata_port *ap, ata_ 21075@@ -3684,7 +3684,7 @@ void ata_do_eh(struct ata_port *ap, ata_
21309 */ 21076 */
21310 void ata_std_error_handler(struct ata_port *ap) 21077 void ata_std_error_handler(struct ata_port *ap)
21311 { 21078 {
@@ -21314,10 +21081,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-eh.c linux-2.6.32.24/drivers/ata/l
21314 ata_reset_fn_t hardreset = ops->hardreset; 21081 ata_reset_fn_t hardreset = ops->hardreset;
21315 21082
21316 /* ignore built-in hardreset if SCR access is not available */ 21083 /* ignore built-in hardreset if SCR access is not available */
21317diff -urNp linux-2.6.32.24/drivers/ata/libata-pmp.c linux-2.6.32.24/drivers/ata/libata-pmp.c 21084diff -urNp linux-2.6.35.7/drivers/ata/libata-pmp.c linux-2.6.35.7/drivers/ata/libata-pmp.c
21318--- linux-2.6.32.24/drivers/ata/libata-pmp.c 2010-08-13 16:24:37.000000000 -0400 21085--- linux-2.6.35.7/drivers/ata/libata-pmp.c 2010-08-26 19:47:12.000000000 -0400
21319+++ linux-2.6.32.24/drivers/ata/libata-pmp.c 2010-10-23 19:59:19.000000000 -0400 21086+++ linux-2.6.35.7/drivers/ata/libata-pmp.c 2010-09-17 20:12:09.000000000 -0400
21320@@ -841,7 +841,7 @@ static int sata_pmp_handle_link_fail(str 21087@@ -868,7 +868,7 @@ static int sata_pmp_handle_link_fail(str
21321 */ 21088 */
21322 static int sata_pmp_eh_recover(struct ata_port *ap) 21089 static int sata_pmp_eh_recover(struct ata_port *ap)
21323 { 21090 {
@@ -21326,10 +21093,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/libata-pmp.c linux-2.6.32.24/drivers/ata/
21326 int pmp_tries, link_tries[SATA_PMP_MAX_PORTS]; 21093 int pmp_tries, link_tries[SATA_PMP_MAX_PORTS];
21327 struct ata_link *pmp_link = &ap->link; 21094 struct ata_link *pmp_link = &ap->link;
21328 struct ata_device *pmp_dev = pmp_link->device; 21095 struct ata_device *pmp_dev = pmp_link->device;
21329diff -urNp linux-2.6.32.24/drivers/ata/pata_acpi.c linux-2.6.32.24/drivers/ata/pata_acpi.c 21096diff -urNp linux-2.6.35.7/drivers/ata/pata_acpi.c linux-2.6.35.7/drivers/ata/pata_acpi.c
21330--- linux-2.6.32.24/drivers/ata/pata_acpi.c 2010-08-13 16:24:37.000000000 -0400 21097--- linux-2.6.35.7/drivers/ata/pata_acpi.c 2010-08-26 19:47:12.000000000 -0400
21331+++ linux-2.6.32.24/drivers/ata/pata_acpi.c 2010-10-23 19:59:19.000000000 -0400 21098+++ linux-2.6.35.7/drivers/ata/pata_acpi.c 2010-09-17 20:12:09.000000000 -0400
21332@@ -215,7 +215,7 @@ static struct scsi_host_template pacpi_s 21099@@ -216,7 +216,7 @@ static struct scsi_host_template pacpi_s
21333 ATA_BMDMA_SHT(DRV_NAME), 21100 ATA_BMDMA_SHT(DRV_NAME),
21334 }; 21101 };
21335 21102
@@ -21338,10 +21105,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_acpi.c linux-2.6.32.24/drivers/ata/p
21338 .inherits = &ata_bmdma_port_ops, 21105 .inherits = &ata_bmdma_port_ops,
21339 .qc_issue = pacpi_qc_issue, 21106 .qc_issue = pacpi_qc_issue,
21340 .cable_detect = pacpi_cable_detect, 21107 .cable_detect = pacpi_cable_detect,
21341diff -urNp linux-2.6.32.24/drivers/ata/pata_ali.c linux-2.6.32.24/drivers/ata/pata_ali.c 21108diff -urNp linux-2.6.35.7/drivers/ata/pata_ali.c linux-2.6.35.7/drivers/ata/pata_ali.c
21342--- linux-2.6.32.24/drivers/ata/pata_ali.c 2010-08-13 16:24:37.000000000 -0400 21109--- linux-2.6.35.7/drivers/ata/pata_ali.c 2010-08-26 19:47:12.000000000 -0400
21343+++ linux-2.6.32.24/drivers/ata/pata_ali.c 2010-10-23 19:59:19.000000000 -0400 21110+++ linux-2.6.35.7/drivers/ata/pata_ali.c 2010-09-17 20:12:09.000000000 -0400
21344@@ -365,7 +365,7 @@ static struct scsi_host_template ali_sht 21111@@ -363,7 +363,7 @@ static struct scsi_host_template ali_sht
21345 * Port operations for PIO only ALi 21112 * Port operations for PIO only ALi
21346 */ 21113 */
21347 21114
@@ -21350,7 +21117,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ali.c linux-2.6.32.24/drivers/ata/pa
21350 .inherits = &ata_sff_port_ops, 21117 .inherits = &ata_sff_port_ops,
21351 .cable_detect = ata_cable_40wire, 21118 .cable_detect = ata_cable_40wire,
21352 .set_piomode = ali_set_piomode, 21119 .set_piomode = ali_set_piomode,
21353@@ -382,7 +382,7 @@ static const struct ata_port_operations 21120@@ -380,7 +380,7 @@ static const struct ata_port_operations
21354 * Port operations for DMA capable ALi without cable 21121 * Port operations for DMA capable ALi without cable
21355 * detect 21122 * detect
21356 */ 21123 */
@@ -21359,7 +21126,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ali.c linux-2.6.32.24/drivers/ata/pa
21359 .inherits = &ali_dma_base_ops, 21126 .inherits = &ali_dma_base_ops,
21360 .cable_detect = ata_cable_40wire, 21127 .cable_detect = ata_cable_40wire,
21361 .mode_filter = ali_20_filter, 21128 .mode_filter = ali_20_filter,
21362@@ -393,7 +393,7 @@ static struct ata_port_operations ali_20 21129@@ -391,7 +391,7 @@ static struct ata_port_operations ali_20
21363 /* 21130 /*
21364 * Port operations for DMA capable ALi with cable detect 21131 * Port operations for DMA capable ALi with cable detect
21365 */ 21132 */
@@ -21368,7 +21135,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ali.c linux-2.6.32.24/drivers/ata/pa
21368 .inherits = &ali_dma_base_ops, 21135 .inherits = &ali_dma_base_ops,
21369 .check_atapi_dma = ali_check_atapi_dma, 21136 .check_atapi_dma = ali_check_atapi_dma,
21370 .cable_detect = ali_c2_cable_detect, 21137 .cable_detect = ali_c2_cable_detect,
21371@@ -404,7 +404,7 @@ static struct ata_port_operations ali_c2 21138@@ -402,7 +402,7 @@ static struct ata_port_operations ali_c2
21372 /* 21139 /*
21373 * Port operations for DMA capable ALi with cable detect 21140 * Port operations for DMA capable ALi with cable detect
21374 */ 21141 */
@@ -21377,7 +21144,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ali.c linux-2.6.32.24/drivers/ata/pa
21377 .inherits = &ali_dma_base_ops, 21144 .inherits = &ali_dma_base_ops,
21378 .check_atapi_dma = ali_check_atapi_dma, 21145 .check_atapi_dma = ali_check_atapi_dma,
21379 .cable_detect = ali_c2_cable_detect, 21146 .cable_detect = ali_c2_cable_detect,
21380@@ -414,7 +414,7 @@ static struct ata_port_operations ali_c4 21147@@ -412,7 +412,7 @@ static struct ata_port_operations ali_c4
21381 /* 21148 /*
21382 * Port operations for DMA capable ALi with cable detect and LBA48 21149 * Port operations for DMA capable ALi with cable detect and LBA48
21383 */ 21150 */
@@ -21386,9 +21153,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ali.c linux-2.6.32.24/drivers/ata/pa
21386 .inherits = &ali_dma_base_ops, 21153 .inherits = &ali_dma_base_ops,
21387 .check_atapi_dma = ali_check_atapi_dma, 21154 .check_atapi_dma = ali_check_atapi_dma,
21388 .dev_config = ali_warn_atapi_dma, 21155 .dev_config = ali_warn_atapi_dma,
21389diff -urNp linux-2.6.32.24/drivers/ata/pata_amd.c linux-2.6.32.24/drivers/ata/pata_amd.c 21156diff -urNp linux-2.6.35.7/drivers/ata/pata_amd.c linux-2.6.35.7/drivers/ata/pata_amd.c
21390--- linux-2.6.32.24/drivers/ata/pata_amd.c 2010-08-13 16:24:37.000000000 -0400 21157--- linux-2.6.35.7/drivers/ata/pata_amd.c 2010-08-26 19:47:12.000000000 -0400
21391+++ linux-2.6.32.24/drivers/ata/pata_amd.c 2010-10-23 19:59:19.000000000 -0400 21158+++ linux-2.6.35.7/drivers/ata/pata_amd.c 2010-09-17 20:12:09.000000000 -0400
21392@@ -397,28 +397,28 @@ static const struct ata_port_operations 21159@@ -397,28 +397,28 @@ static const struct ata_port_operations
21393 .prereset = amd_pre_reset, 21160 .prereset = amd_pre_reset,
21394 }; 21161 };
@@ -21438,9 +21205,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_amd.c linux-2.6.32.24/drivers/ata/pa
21438 .inherits = &nv_base_port_ops, 21205 .inherits = &nv_base_port_ops,
21439 .set_piomode = nv133_set_piomode, 21206 .set_piomode = nv133_set_piomode,
21440 .set_dmamode = nv133_set_dmamode, 21207 .set_dmamode = nv133_set_dmamode,
21441diff -urNp linux-2.6.32.24/drivers/ata/pata_artop.c linux-2.6.32.24/drivers/ata/pata_artop.c 21208diff -urNp linux-2.6.35.7/drivers/ata/pata_artop.c linux-2.6.35.7/drivers/ata/pata_artop.c
21442--- linux-2.6.32.24/drivers/ata/pata_artop.c 2010-08-13 16:24:37.000000000 -0400 21209--- linux-2.6.35.7/drivers/ata/pata_artop.c 2010-08-26 19:47:12.000000000 -0400
21443+++ linux-2.6.32.24/drivers/ata/pata_artop.c 2010-10-23 19:59:19.000000000 -0400 21210+++ linux-2.6.35.7/drivers/ata/pata_artop.c 2010-09-17 20:12:09.000000000 -0400
21444@@ -311,7 +311,7 @@ static struct scsi_host_template artop_s 21211@@ -311,7 +311,7 @@ static struct scsi_host_template artop_s
21445 ATA_BMDMA_SHT(DRV_NAME), 21212 ATA_BMDMA_SHT(DRV_NAME),
21446 }; 21213 };
@@ -21459,10 +21226,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_artop.c linux-2.6.32.24/drivers/ata/
21459 .inherits = &ata_bmdma_port_ops, 21226 .inherits = &ata_bmdma_port_ops,
21460 .cable_detect = artop6260_cable_detect, 21227 .cable_detect = artop6260_cable_detect,
21461 .set_piomode = artop6260_set_piomode, 21228 .set_piomode = artop6260_set_piomode,
21462diff -urNp linux-2.6.32.24/drivers/ata/pata_at32.c linux-2.6.32.24/drivers/ata/pata_at32.c 21229diff -urNp linux-2.6.35.7/drivers/ata/pata_at32.c linux-2.6.35.7/drivers/ata/pata_at32.c
21463--- linux-2.6.32.24/drivers/ata/pata_at32.c 2010-08-13 16:24:37.000000000 -0400 21230--- linux-2.6.35.7/drivers/ata/pata_at32.c 2010-08-26 19:47:12.000000000 -0400
21464+++ linux-2.6.32.24/drivers/ata/pata_at32.c 2010-10-23 19:59:19.000000000 -0400 21231+++ linux-2.6.35.7/drivers/ata/pata_at32.c 2010-09-17 20:12:09.000000000 -0400
21465@@ -172,7 +172,7 @@ static struct scsi_host_template at32_sh 21232@@ -173,7 +173,7 @@ static struct scsi_host_template at32_sh
21466 ATA_PIO_SHT(DRV_NAME), 21233 ATA_PIO_SHT(DRV_NAME),
21467 }; 21234 };
21468 21235
@@ -21471,10 +21238,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_at32.c linux-2.6.32.24/drivers/ata/p
21471 .inherits = &ata_sff_port_ops, 21238 .inherits = &ata_sff_port_ops,
21472 .cable_detect = ata_cable_40wire, 21239 .cable_detect = ata_cable_40wire,
21473 .set_piomode = pata_at32_set_piomode, 21240 .set_piomode = pata_at32_set_piomode,
21474diff -urNp linux-2.6.32.24/drivers/ata/pata_at91.c linux-2.6.32.24/drivers/ata/pata_at91.c 21241diff -urNp linux-2.6.35.7/drivers/ata/pata_at91.c linux-2.6.35.7/drivers/ata/pata_at91.c
21475--- linux-2.6.32.24/drivers/ata/pata_at91.c 2010-08-13 16:24:37.000000000 -0400 21242--- linux-2.6.35.7/drivers/ata/pata_at91.c 2010-08-26 19:47:12.000000000 -0400
21476+++ linux-2.6.32.24/drivers/ata/pata_at91.c 2010-10-23 19:59:19.000000000 -0400 21243+++ linux-2.6.35.7/drivers/ata/pata_at91.c 2010-09-17 20:12:09.000000000 -0400
21477@@ -195,7 +195,7 @@ static struct scsi_host_template pata_at 21244@@ -196,7 +196,7 @@ static struct scsi_host_template pata_at
21478 ATA_PIO_SHT(DRV_NAME), 21245 ATA_PIO_SHT(DRV_NAME),
21479 }; 21246 };
21480 21247
@@ -21483,10 +21250,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_at91.c linux-2.6.32.24/drivers/ata/p
21483 .inherits = &ata_sff_port_ops, 21250 .inherits = &ata_sff_port_ops,
21484 21251
21485 .sff_data_xfer = pata_at91_data_xfer_noirq, 21252 .sff_data_xfer = pata_at91_data_xfer_noirq,
21486diff -urNp linux-2.6.32.24/drivers/ata/pata_atiixp.c linux-2.6.32.24/drivers/ata/pata_atiixp.c 21253diff -urNp linux-2.6.35.7/drivers/ata/pata_atiixp.c linux-2.6.35.7/drivers/ata/pata_atiixp.c
21487--- linux-2.6.32.24/drivers/ata/pata_atiixp.c 2010-08-13 16:24:37.000000000 -0400 21254--- linux-2.6.35.7/drivers/ata/pata_atiixp.c 2010-08-26 19:47:12.000000000 -0400
21488+++ linux-2.6.32.24/drivers/ata/pata_atiixp.c 2010-10-23 19:59:19.000000000 -0400 21255+++ linux-2.6.35.7/drivers/ata/pata_atiixp.c 2010-09-17 20:12:09.000000000 -0400
21489@@ -205,7 +205,7 @@ static struct scsi_host_template atiixp_ 21256@@ -214,7 +214,7 @@ static struct scsi_host_template atiixp_
21490 .sg_tablesize = LIBATA_DUMB_MAX_PRD, 21257 .sg_tablesize = LIBATA_DUMB_MAX_PRD,
21491 }; 21258 };
21492 21259
@@ -21494,11 +21261,11 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_atiixp.c linux-2.6.32.24/drivers/ata
21494+static const struct ata_port_operations atiixp_port_ops = { 21261+static const struct ata_port_operations atiixp_port_ops = {
21495 .inherits = &ata_bmdma_port_ops, 21262 .inherits = &ata_bmdma_port_ops,
21496 21263
21497 .qc_prep = ata_sff_dumb_qc_prep, 21264 .qc_prep = ata_bmdma_dumb_qc_prep,
21498diff -urNp linux-2.6.32.24/drivers/ata/pata_atp867x.c linux-2.6.32.24/drivers/ata/pata_atp867x.c 21265diff -urNp linux-2.6.35.7/drivers/ata/pata_atp867x.c linux-2.6.35.7/drivers/ata/pata_atp867x.c
21499--- linux-2.6.32.24/drivers/ata/pata_atp867x.c 2010-08-13 16:24:37.000000000 -0400 21266--- linux-2.6.35.7/drivers/ata/pata_atp867x.c 2010-08-26 19:47:12.000000000 -0400
21500+++ linux-2.6.32.24/drivers/ata/pata_atp867x.c 2010-10-23 19:59:19.000000000 -0400 21267+++ linux-2.6.35.7/drivers/ata/pata_atp867x.c 2010-09-17 20:12:09.000000000 -0400
21501@@ -274,7 +274,7 @@ static struct scsi_host_template atp867x 21268@@ -275,7 +275,7 @@ static struct scsi_host_template atp867x
21502 ATA_BMDMA_SHT(DRV_NAME), 21269 ATA_BMDMA_SHT(DRV_NAME),
21503 }; 21270 };
21504 21271
@@ -21507,34 +21274,34 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_atp867x.c linux-2.6.32.24/drivers/at
21507 .inherits = &ata_bmdma_port_ops, 21274 .inherits = &ata_bmdma_port_ops,
21508 .cable_detect = atp867x_cable_detect, 21275 .cable_detect = atp867x_cable_detect,
21509 .set_piomode = atp867x_set_piomode, 21276 .set_piomode = atp867x_set_piomode,
21510diff -urNp linux-2.6.32.24/drivers/ata/pata_bf54x.c linux-2.6.32.24/drivers/ata/pata_bf54x.c 21277diff -urNp linux-2.6.35.7/drivers/ata/pata_bf54x.c linux-2.6.35.7/drivers/ata/pata_bf54x.c
21511--- linux-2.6.32.24/drivers/ata/pata_bf54x.c 2010-08-13 16:24:37.000000000 -0400 21278--- linux-2.6.35.7/drivers/ata/pata_bf54x.c 2010-08-26 19:47:12.000000000 -0400
21512+++ linux-2.6.32.24/drivers/ata/pata_bf54x.c 2010-10-23 19:59:19.000000000 -0400 21279+++ linux-2.6.35.7/drivers/ata/pata_bf54x.c 2010-09-17 20:12:09.000000000 -0400
21513@@ -1464,7 +1464,7 @@ static struct scsi_host_template bfin_sh 21280@@ -1420,7 +1420,7 @@ static struct scsi_host_template bfin_sh
21514 .dma_boundary = ATA_DMA_BOUNDARY, 21281 .dma_boundary = ATA_DMA_BOUNDARY,
21515 }; 21282 };
21516 21283
21517-static struct ata_port_operations bfin_pata_ops = { 21284-static struct ata_port_operations bfin_pata_ops = {
21518+static const struct ata_port_operations bfin_pata_ops = { 21285+static const struct ata_port_operations bfin_pata_ops = {
21519 .inherits = &ata_sff_port_ops, 21286 .inherits = &ata_bmdma_port_ops,
21520 21287
21521 .set_piomode = bfin_set_piomode, 21288 .set_piomode = bfin_set_piomode,
21522diff -urNp linux-2.6.32.24/drivers/ata/pata_cmd640.c linux-2.6.32.24/drivers/ata/pata_cmd640.c 21289diff -urNp linux-2.6.35.7/drivers/ata/pata_cmd640.c linux-2.6.35.7/drivers/ata/pata_cmd640.c
21523--- linux-2.6.32.24/drivers/ata/pata_cmd640.c 2010-08-13 16:24:37.000000000 -0400 21290--- linux-2.6.35.7/drivers/ata/pata_cmd640.c 2010-08-26 19:47:12.000000000 -0400
21524+++ linux-2.6.32.24/drivers/ata/pata_cmd640.c 2010-10-23 19:59:19.000000000 -0400 21291+++ linux-2.6.35.7/drivers/ata/pata_cmd640.c 2010-09-17 20:12:09.000000000 -0400
21525@@ -168,7 +168,7 @@ static struct scsi_host_template cmd640_ 21292@@ -165,7 +165,7 @@ static struct scsi_host_template cmd640_
21526 ATA_BMDMA_SHT(DRV_NAME), 21293 ATA_PIO_SHT(DRV_NAME),
21527 }; 21294 };
21528 21295
21529-static struct ata_port_operations cmd640_port_ops = { 21296-static struct ata_port_operations cmd640_port_ops = {
21530+static const struct ata_port_operations cmd640_port_ops = { 21297+static const struct ata_port_operations cmd640_port_ops = {
21531 .inherits = &ata_bmdma_port_ops, 21298 .inherits = &ata_sff_port_ops,
21532 /* In theory xfer_noirq is not needed once we kill the prefetcher */ 21299 /* In theory xfer_noirq is not needed once we kill the prefetcher */
21533 .sff_data_xfer = ata_sff_data_xfer_noirq, 21300 .sff_data_xfer = ata_sff_data_xfer_noirq,
21534diff -urNp linux-2.6.32.24/drivers/ata/pata_cmd64x.c linux-2.6.32.24/drivers/ata/pata_cmd64x.c 21301diff -urNp linux-2.6.35.7/drivers/ata/pata_cmd64x.c linux-2.6.35.7/drivers/ata/pata_cmd64x.c
21535--- linux-2.6.32.24/drivers/ata/pata_cmd64x.c 2010-08-13 16:24:37.000000000 -0400 21302--- linux-2.6.35.7/drivers/ata/pata_cmd64x.c 2010-09-20 17:33:09.000000000 -0400
21536+++ linux-2.6.32.24/drivers/ata/pata_cmd64x.c 2010-10-23 19:59:19.000000000 -0400 21303+++ linux-2.6.35.7/drivers/ata/pata_cmd64x.c 2010-09-20 17:33:32.000000000 -0400
21537@@ -275,18 +275,18 @@ static const struct ata_port_operations 21304@@ -268,18 +268,18 @@ static const struct ata_port_operations
21538 .set_dmamode = cmd64x_set_dmamode, 21305 .set_dmamode = cmd64x_set_dmamode,
21539 }; 21306 };
21540 21307
@@ -21556,21 +21323,21 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_cmd64x.c linux-2.6.32.24/drivers/ata
21556 .inherits = &cmd64x_base_ops, 21323 .inherits = &cmd64x_base_ops,
21557 .bmdma_stop = cmd648_bmdma_stop, 21324 .bmdma_stop = cmd648_bmdma_stop,
21558 .cable_detect = cmd648_cable_detect, 21325 .cable_detect = cmd648_cable_detect,
21559diff -urNp linux-2.6.32.24/drivers/ata/pata_cs5520.c linux-2.6.32.24/drivers/ata/pata_cs5520.c 21326diff -urNp linux-2.6.35.7/drivers/ata/pata_cs5520.c linux-2.6.35.7/drivers/ata/pata_cs5520.c
21560--- linux-2.6.32.24/drivers/ata/pata_cs5520.c 2010-08-13 16:24:37.000000000 -0400 21327--- linux-2.6.35.7/drivers/ata/pata_cs5520.c 2010-08-26 19:47:12.000000000 -0400
21561+++ linux-2.6.32.24/drivers/ata/pata_cs5520.c 2010-10-23 19:59:19.000000000 -0400 21328+++ linux-2.6.35.7/drivers/ata/pata_cs5520.c 2010-09-17 20:12:09.000000000 -0400
21562@@ -144,7 +144,7 @@ static struct scsi_host_template cs5520_ 21329@@ -108,7 +108,7 @@ static struct scsi_host_template cs5520_
21563 .sg_tablesize = LIBATA_DUMB_MAX_PRD, 21330 .sg_tablesize = LIBATA_DUMB_MAX_PRD,
21564 }; 21331 };
21565 21332
21566-static struct ata_port_operations cs5520_port_ops = { 21333-static struct ata_port_operations cs5520_port_ops = {
21567+static const struct ata_port_operations cs5520_port_ops = { 21334+static const struct ata_port_operations cs5520_port_ops = {
21568 .inherits = &ata_bmdma_port_ops, 21335 .inherits = &ata_bmdma_port_ops,
21569 .qc_prep = ata_sff_dumb_qc_prep, 21336 .qc_prep = ata_bmdma_dumb_qc_prep,
21570 .cable_detect = ata_cable_40wire, 21337 .cable_detect = ata_cable_40wire,
21571diff -urNp linux-2.6.32.24/drivers/ata/pata_cs5530.c linux-2.6.32.24/drivers/ata/pata_cs5530.c 21338diff -urNp linux-2.6.35.7/drivers/ata/pata_cs5530.c linux-2.6.35.7/drivers/ata/pata_cs5530.c
21572--- linux-2.6.32.24/drivers/ata/pata_cs5530.c 2010-08-13 16:24:37.000000000 -0400 21339--- linux-2.6.35.7/drivers/ata/pata_cs5530.c 2010-08-26 19:47:12.000000000 -0400
21573+++ linux-2.6.32.24/drivers/ata/pata_cs5530.c 2010-10-23 19:59:19.000000000 -0400 21340+++ linux-2.6.35.7/drivers/ata/pata_cs5530.c 2010-09-17 20:12:09.000000000 -0400
21574@@ -164,7 +164,7 @@ static struct scsi_host_template cs5530_ 21341@@ -164,7 +164,7 @@ static struct scsi_host_template cs5530_
21575 .sg_tablesize = LIBATA_DUMB_MAX_PRD, 21342 .sg_tablesize = LIBATA_DUMB_MAX_PRD,
21576 }; 21343 };
@@ -21579,10 +21346,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_cs5530.c linux-2.6.32.24/drivers/ata
21579+static const struct ata_port_operations cs5530_port_ops = { 21346+static const struct ata_port_operations cs5530_port_ops = {
21580 .inherits = &ata_bmdma_port_ops, 21347 .inherits = &ata_bmdma_port_ops,
21581 21348
21582 .qc_prep = ata_sff_dumb_qc_prep, 21349 .qc_prep = ata_bmdma_dumb_qc_prep,
21583diff -urNp linux-2.6.32.24/drivers/ata/pata_cs5535.c linux-2.6.32.24/drivers/ata/pata_cs5535.c 21350diff -urNp linux-2.6.35.7/drivers/ata/pata_cs5535.c linux-2.6.35.7/drivers/ata/pata_cs5535.c
21584--- linux-2.6.32.24/drivers/ata/pata_cs5535.c 2010-08-13 16:24:37.000000000 -0400 21351--- linux-2.6.35.7/drivers/ata/pata_cs5535.c 2010-08-26 19:47:12.000000000 -0400
21585+++ linux-2.6.32.24/drivers/ata/pata_cs5535.c 2010-10-23 19:59:19.000000000 -0400 21352+++ linux-2.6.35.7/drivers/ata/pata_cs5535.c 2010-09-17 20:12:09.000000000 -0400
21586@@ -160,7 +160,7 @@ static struct scsi_host_template cs5535_ 21353@@ -160,7 +160,7 @@ static struct scsi_host_template cs5535_
21587 ATA_BMDMA_SHT(DRV_NAME), 21354 ATA_BMDMA_SHT(DRV_NAME),
21588 }; 21355 };
@@ -21592,22 +21359,22 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_cs5535.c linux-2.6.32.24/drivers/ata
21592 .inherits = &ata_bmdma_port_ops, 21359 .inherits = &ata_bmdma_port_ops,
21593 .cable_detect = cs5535_cable_detect, 21360 .cable_detect = cs5535_cable_detect,
21594 .set_piomode = cs5535_set_piomode, 21361 .set_piomode = cs5535_set_piomode,
21595diff -urNp linux-2.6.32.24/drivers/ata/pata_cs5536.c linux-2.6.32.24/drivers/ata/pata_cs5536.c 21362diff -urNp linux-2.6.35.7/drivers/ata/pata_cs5536.c linux-2.6.35.7/drivers/ata/pata_cs5536.c
21596--- linux-2.6.32.24/drivers/ata/pata_cs5536.c 2010-08-13 16:24:37.000000000 -0400 21363--- linux-2.6.35.7/drivers/ata/pata_cs5536.c 2010-08-26 19:47:12.000000000 -0400
21597+++ linux-2.6.32.24/drivers/ata/pata_cs5536.c 2010-10-23 19:59:19.000000000 -0400 21364+++ linux-2.6.35.7/drivers/ata/pata_cs5536.c 2010-09-17 20:12:09.000000000 -0400
21598@@ -223,7 +223,7 @@ static struct scsi_host_template cs5536_ 21365@@ -223,7 +223,7 @@ static struct scsi_host_template cs5536_
21599 ATA_BMDMA_SHT(DRV_NAME), 21366 ATA_BMDMA_SHT(DRV_NAME),
21600 }; 21367 };
21601 21368
21602-static struct ata_port_operations cs5536_port_ops = { 21369-static struct ata_port_operations cs5536_port_ops = {
21603+static const struct ata_port_operations cs5536_port_ops = { 21370+static const struct ata_port_operations cs5536_port_ops = {
21604 .inherits = &ata_bmdma_port_ops, 21371 .inherits = &ata_bmdma32_port_ops,
21605 .cable_detect = cs5536_cable_detect, 21372 .cable_detect = cs5536_cable_detect,
21606 .set_piomode = cs5536_set_piomode, 21373 .set_piomode = cs5536_set_piomode,
21607diff -urNp linux-2.6.32.24/drivers/ata/pata_cypress.c linux-2.6.32.24/drivers/ata/pata_cypress.c 21374diff -urNp linux-2.6.35.7/drivers/ata/pata_cypress.c linux-2.6.35.7/drivers/ata/pata_cypress.c
21608--- linux-2.6.32.24/drivers/ata/pata_cypress.c 2010-08-13 16:24:37.000000000 -0400 21375--- linux-2.6.35.7/drivers/ata/pata_cypress.c 2010-08-26 19:47:12.000000000 -0400
21609+++ linux-2.6.32.24/drivers/ata/pata_cypress.c 2010-10-23 19:59:19.000000000 -0400 21376+++ linux-2.6.35.7/drivers/ata/pata_cypress.c 2010-09-17 20:12:09.000000000 -0400
21610@@ -113,7 +113,7 @@ static struct scsi_host_template cy82c69 21377@@ -115,7 +115,7 @@ static struct scsi_host_template cy82c69
21611 ATA_BMDMA_SHT(DRV_NAME), 21378 ATA_BMDMA_SHT(DRV_NAME),
21612 }; 21379 };
21613 21380
@@ -21616,10 +21383,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_cypress.c linux-2.6.32.24/drivers/at
21616 .inherits = &ata_bmdma_port_ops, 21383 .inherits = &ata_bmdma_port_ops,
21617 .cable_detect = ata_cable_40wire, 21384 .cable_detect = ata_cable_40wire,
21618 .set_piomode = cy82c693_set_piomode, 21385 .set_piomode = cy82c693_set_piomode,
21619diff -urNp linux-2.6.32.24/drivers/ata/pata_efar.c linux-2.6.32.24/drivers/ata/pata_efar.c 21386diff -urNp linux-2.6.35.7/drivers/ata/pata_efar.c linux-2.6.35.7/drivers/ata/pata_efar.c
21620--- linux-2.6.32.24/drivers/ata/pata_efar.c 2010-08-13 16:24:37.000000000 -0400 21387--- linux-2.6.35.7/drivers/ata/pata_efar.c 2010-08-26 19:47:12.000000000 -0400
21621+++ linux-2.6.32.24/drivers/ata/pata_efar.c 2010-10-23 19:59:19.000000000 -0400 21388+++ linux-2.6.35.7/drivers/ata/pata_efar.c 2010-09-17 20:12:09.000000000 -0400
21622@@ -222,7 +222,7 @@ static struct scsi_host_template efar_sh 21389@@ -238,7 +238,7 @@ static struct scsi_host_template efar_sh
21623 ATA_BMDMA_SHT(DRV_NAME), 21390 ATA_BMDMA_SHT(DRV_NAME),
21624 }; 21391 };
21625 21392
@@ -21628,10 +21395,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_efar.c linux-2.6.32.24/drivers/ata/p
21628 .inherits = &ata_bmdma_port_ops, 21395 .inherits = &ata_bmdma_port_ops,
21629 .cable_detect = efar_cable_detect, 21396 .cable_detect = efar_cable_detect,
21630 .set_piomode = efar_set_piomode, 21397 .set_piomode = efar_set_piomode,
21631diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt366.c linux-2.6.32.24/drivers/ata/pata_hpt366.c 21398diff -urNp linux-2.6.35.7/drivers/ata/pata_hpt366.c linux-2.6.35.7/drivers/ata/pata_hpt366.c
21632--- linux-2.6.32.24/drivers/ata/pata_hpt366.c 2010-08-13 16:24:37.000000000 -0400 21399--- linux-2.6.35.7/drivers/ata/pata_hpt366.c 2010-08-26 19:47:12.000000000 -0400
21633+++ linux-2.6.32.24/drivers/ata/pata_hpt366.c 2010-10-23 19:59:19.000000000 -0400 21400+++ linux-2.6.35.7/drivers/ata/pata_hpt366.c 2010-09-17 20:12:09.000000000 -0400
21634@@ -282,7 +282,7 @@ static struct scsi_host_template hpt36x_ 21401@@ -269,7 +269,7 @@ static struct scsi_host_template hpt36x_
21635 * Configuration for HPT366/68 21402 * Configuration for HPT366/68
21636 */ 21403 */
21637 21404
@@ -21640,10 +21407,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt366.c linux-2.6.32.24/drivers/ata
21640 .inherits = &ata_bmdma_port_ops, 21407 .inherits = &ata_bmdma_port_ops,
21641 .cable_detect = hpt36x_cable_detect, 21408 .cable_detect = hpt36x_cable_detect,
21642 .mode_filter = hpt366_filter, 21409 .mode_filter = hpt366_filter,
21643diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt37x.c linux-2.6.32.24/drivers/ata/pata_hpt37x.c 21410diff -urNp linux-2.6.35.7/drivers/ata/pata_hpt37x.c linux-2.6.35.7/drivers/ata/pata_hpt37x.c
21644--- linux-2.6.32.24/drivers/ata/pata_hpt37x.c 2010-08-13 16:24:37.000000000 -0400 21411--- linux-2.6.35.7/drivers/ata/pata_hpt37x.c 2010-08-26 19:47:12.000000000 -0400
21645+++ linux-2.6.32.24/drivers/ata/pata_hpt37x.c 2010-10-23 19:59:19.000000000 -0400 21412+++ linux-2.6.35.7/drivers/ata/pata_hpt37x.c 2010-09-17 20:12:09.000000000 -0400
21646@@ -576,7 +576,7 @@ static struct scsi_host_template hpt37x_ 21413@@ -564,7 +564,7 @@ static struct scsi_host_template hpt37x_
21647 * Configuration for HPT370 21414 * Configuration for HPT370
21648 */ 21415 */
21649 21416
@@ -21652,7 +21419,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt37x.c linux-2.6.32.24/drivers/ata
21652 .inherits = &ata_bmdma_port_ops, 21419 .inherits = &ata_bmdma_port_ops,
21653 21420
21654 .bmdma_stop = hpt370_bmdma_stop, 21421 .bmdma_stop = hpt370_bmdma_stop,
21655@@ -591,7 +591,7 @@ static struct ata_port_operations hpt370 21422@@ -580,7 +580,7 @@ static struct ata_port_operations hpt370
21656 * Configuration for HPT370A. Close to 370 but less filters 21423 * Configuration for HPT370A. Close to 370 but less filters
21657 */ 21424 */
21658 21425
@@ -21661,7 +21428,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt37x.c linux-2.6.32.24/drivers/ata
21661 .inherits = &hpt370_port_ops, 21428 .inherits = &hpt370_port_ops,
21662 .mode_filter = hpt370a_filter, 21429 .mode_filter = hpt370a_filter,
21663 }; 21430 };
21664@@ -601,7 +601,7 @@ static struct ata_port_operations hpt370 21431@@ -590,7 +590,7 @@ static struct ata_port_operations hpt370
21665 * and DMA mode setting functionality. 21432 * and DMA mode setting functionality.
21666 */ 21433 */
21667 21434
@@ -21670,19 +21437,19 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt37x.c linux-2.6.32.24/drivers/ata
21670 .inherits = &ata_bmdma_port_ops, 21437 .inherits = &ata_bmdma_port_ops,
21671 21438
21672 .bmdma_stop = hpt37x_bmdma_stop, 21439 .bmdma_stop = hpt37x_bmdma_stop,
21673@@ -616,7 +616,7 @@ static struct ata_port_operations hpt372 21440@@ -606,7 +606,7 @@ static struct ata_port_operations hpt372
21674 * but we have a different cable detection procedure for function 1. 21441 * but we have a different cable detection procedure for function 1.
21675 */ 21442 */
21676 21443
21677-static struct ata_port_operations hpt374_fn1_port_ops = { 21444-static struct ata_port_operations hpt374_fn1_port_ops = {
21678+static const struct ata_port_operations hpt374_fn1_port_ops = { 21445+static const struct ata_port_operations hpt374_fn1_port_ops = {
21679 .inherits = &hpt372_port_ops, 21446 .inherits = &hpt372_port_ops,
21680 .prereset = hpt374_fn1_pre_reset, 21447 .cable_detect = hpt374_fn1_cable_detect,
21681 }; 21448 .prereset = hpt37x_pre_reset,
21682diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt3x2n.c linux-2.6.32.24/drivers/ata/pata_hpt3x2n.c 21449diff -urNp linux-2.6.35.7/drivers/ata/pata_hpt3x2n.c linux-2.6.35.7/drivers/ata/pata_hpt3x2n.c
21683--- linux-2.6.32.24/drivers/ata/pata_hpt3x2n.c 2010-08-13 16:24:37.000000000 -0400 21450--- linux-2.6.35.7/drivers/ata/pata_hpt3x2n.c 2010-08-26 19:47:12.000000000 -0400
21684+++ linux-2.6.32.24/drivers/ata/pata_hpt3x2n.c 2010-10-23 19:59:19.000000000 -0400 21451+++ linux-2.6.35.7/drivers/ata/pata_hpt3x2n.c 2010-09-17 20:12:09.000000000 -0400
21685@@ -337,7 +337,7 @@ static struct scsi_host_template hpt3x2n 21452@@ -331,7 +331,7 @@ static struct scsi_host_template hpt3x2n
21686 * Configuration for HPT3x2n. 21453 * Configuration for HPT3x2n.
21687 */ 21454 */
21688 21455
@@ -21691,9 +21458,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt3x2n.c linux-2.6.32.24/drivers/at
21691 .inherits = &ata_bmdma_port_ops, 21458 .inherits = &ata_bmdma_port_ops,
21692 21459
21693 .bmdma_stop = hpt3x2n_bmdma_stop, 21460 .bmdma_stop = hpt3x2n_bmdma_stop,
21694diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt3x3.c linux-2.6.32.24/drivers/ata/pata_hpt3x3.c 21461diff -urNp linux-2.6.35.7/drivers/ata/pata_hpt3x3.c linux-2.6.35.7/drivers/ata/pata_hpt3x3.c
21695--- linux-2.6.32.24/drivers/ata/pata_hpt3x3.c 2010-08-13 16:24:37.000000000 -0400 21462--- linux-2.6.35.7/drivers/ata/pata_hpt3x3.c 2010-08-26 19:47:12.000000000 -0400
21696+++ linux-2.6.32.24/drivers/ata/pata_hpt3x3.c 2010-10-23 19:59:19.000000000 -0400 21463+++ linux-2.6.35.7/drivers/ata/pata_hpt3x3.c 2010-09-17 20:12:09.000000000 -0400
21697@@ -141,7 +141,7 @@ static struct scsi_host_template hpt3x3_ 21464@@ -141,7 +141,7 @@ static struct scsi_host_template hpt3x3_
21698 ATA_BMDMA_SHT(DRV_NAME), 21465 ATA_BMDMA_SHT(DRV_NAME),
21699 }; 21466 };
@@ -21703,21 +21470,21 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_hpt3x3.c linux-2.6.32.24/drivers/ata
21703 .inherits = &ata_bmdma_port_ops, 21470 .inherits = &ata_bmdma_port_ops,
21704 .cable_detect = ata_cable_40wire, 21471 .cable_detect = ata_cable_40wire,
21705 .set_piomode = hpt3x3_set_piomode, 21472 .set_piomode = hpt3x3_set_piomode,
21706diff -urNp linux-2.6.32.24/drivers/ata/pata_icside.c linux-2.6.32.24/drivers/ata/pata_icside.c 21473diff -urNp linux-2.6.35.7/drivers/ata/pata_icside.c linux-2.6.35.7/drivers/ata/pata_icside.c
21707--- linux-2.6.32.24/drivers/ata/pata_icside.c 2010-08-13 16:24:37.000000000 -0400 21474--- linux-2.6.35.7/drivers/ata/pata_icside.c 2010-08-26 19:47:12.000000000 -0400
21708+++ linux-2.6.32.24/drivers/ata/pata_icside.c 2010-10-23 19:59:19.000000000 -0400 21475+++ linux-2.6.35.7/drivers/ata/pata_icside.c 2010-09-17 20:12:09.000000000 -0400
21709@@ -319,7 +319,7 @@ static void pata_icside_postreset(struct 21476@@ -320,7 +320,7 @@ static void pata_icside_postreset(struct
21710 } 21477 }
21711 } 21478 }
21712 21479
21713-static struct ata_port_operations pata_icside_port_ops = { 21480-static struct ata_port_operations pata_icside_port_ops = {
21714+static const struct ata_port_operations pata_icside_port_ops = { 21481+static const struct ata_port_operations pata_icside_port_ops = {
21715 .inherits = &ata_sff_port_ops, 21482 .inherits = &ata_bmdma_port_ops,
21716 /* no need to build any PRD tables for DMA */ 21483 /* no need to build any PRD tables for DMA */
21717 .qc_prep = ata_noop_qc_prep, 21484 .qc_prep = ata_noop_qc_prep,
21718diff -urNp linux-2.6.32.24/drivers/ata/pata_isapnp.c linux-2.6.32.24/drivers/ata/pata_isapnp.c 21485diff -urNp linux-2.6.35.7/drivers/ata/pata_isapnp.c linux-2.6.35.7/drivers/ata/pata_isapnp.c
21719--- linux-2.6.32.24/drivers/ata/pata_isapnp.c 2010-08-13 16:24:37.000000000 -0400 21486--- linux-2.6.35.7/drivers/ata/pata_isapnp.c 2010-08-26 19:47:12.000000000 -0400
21720+++ linux-2.6.32.24/drivers/ata/pata_isapnp.c 2010-10-23 19:59:19.000000000 -0400 21487+++ linux-2.6.35.7/drivers/ata/pata_isapnp.c 2010-09-17 20:12:09.000000000 -0400
21721@@ -23,12 +23,12 @@ static struct scsi_host_template isapnp_ 21488@@ -23,12 +23,12 @@ static struct scsi_host_template isapnp_
21722 ATA_PIO_SHT(DRV_NAME), 21489 ATA_PIO_SHT(DRV_NAME),
21723 }; 21490 };
@@ -21733,10 +21500,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_isapnp.c linux-2.6.32.24/drivers/ata
21733 .inherits = &ata_sff_port_ops, 21500 .inherits = &ata_sff_port_ops,
21734 .cable_detect = ata_cable_40wire, 21501 .cable_detect = ata_cable_40wire,
21735 /* No altstatus so we don't want to use the lost interrupt poll */ 21502 /* No altstatus so we don't want to use the lost interrupt poll */
21736diff -urNp linux-2.6.32.24/drivers/ata/pata_it8213.c linux-2.6.32.24/drivers/ata/pata_it8213.c 21503diff -urNp linux-2.6.35.7/drivers/ata/pata_it8213.c linux-2.6.35.7/drivers/ata/pata_it8213.c
21737--- linux-2.6.32.24/drivers/ata/pata_it8213.c 2010-08-13 16:24:37.000000000 -0400 21504--- linux-2.6.35.7/drivers/ata/pata_it8213.c 2010-08-26 19:47:12.000000000 -0400
21738+++ linux-2.6.32.24/drivers/ata/pata_it8213.c 2010-10-23 19:59:19.000000000 -0400 21505+++ linux-2.6.35.7/drivers/ata/pata_it8213.c 2010-09-17 20:12:09.000000000 -0400
21739@@ -234,7 +234,7 @@ static struct scsi_host_template it8213_ 21506@@ -233,7 +233,7 @@ static struct scsi_host_template it8213_
21740 }; 21507 };
21741 21508
21742 21509
@@ -21745,10 +21512,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_it8213.c linux-2.6.32.24/drivers/ata
21745 .inherits = &ata_bmdma_port_ops, 21512 .inherits = &ata_bmdma_port_ops,
21746 .cable_detect = it8213_cable_detect, 21513 .cable_detect = it8213_cable_detect,
21747 .set_piomode = it8213_set_piomode, 21514 .set_piomode = it8213_set_piomode,
21748diff -urNp linux-2.6.32.24/drivers/ata/pata_it821x.c linux-2.6.32.24/drivers/ata/pata_it821x.c 21515diff -urNp linux-2.6.35.7/drivers/ata/pata_it821x.c linux-2.6.35.7/drivers/ata/pata_it821x.c
21749--- linux-2.6.32.24/drivers/ata/pata_it821x.c 2010-08-13 16:24:37.000000000 -0400 21516--- linux-2.6.35.7/drivers/ata/pata_it821x.c 2010-08-26 19:47:12.000000000 -0400
21750+++ linux-2.6.32.24/drivers/ata/pata_it821x.c 2010-10-23 19:59:19.000000000 -0400 21517+++ linux-2.6.35.7/drivers/ata/pata_it821x.c 2010-09-17 20:12:09.000000000 -0400
21751@@ -800,7 +800,7 @@ static struct scsi_host_template it821x_ 21518@@ -801,7 +801,7 @@ static struct scsi_host_template it821x_
21752 ATA_BMDMA_SHT(DRV_NAME), 21519 ATA_BMDMA_SHT(DRV_NAME),
21753 }; 21520 };
21754 21521
@@ -21757,7 +21524,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_it821x.c linux-2.6.32.24/drivers/ata
21757 .inherits = &ata_bmdma_port_ops, 21524 .inherits = &ata_bmdma_port_ops,
21758 21525
21759 .check_atapi_dma= it821x_check_atapi_dma, 21526 .check_atapi_dma= it821x_check_atapi_dma,
21760@@ -814,7 +814,7 @@ static struct ata_port_operations it821x 21527@@ -815,7 +815,7 @@ static struct ata_port_operations it821x
21761 .port_start = it821x_port_start, 21528 .port_start = it821x_port_start,
21762 }; 21529 };
21763 21530
@@ -21766,7 +21533,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_it821x.c linux-2.6.32.24/drivers/ata
21766 .inherits = &ata_bmdma_port_ops, 21533 .inherits = &ata_bmdma_port_ops,
21767 21534
21768 .check_atapi_dma= it821x_check_atapi_dma, 21535 .check_atapi_dma= it821x_check_atapi_dma,
21769@@ -830,7 +830,7 @@ static struct ata_port_operations it821x 21536@@ -831,7 +831,7 @@ static struct ata_port_operations it821x
21770 .port_start = it821x_port_start, 21537 .port_start = it821x_port_start,
21771 }; 21538 };
21772 21539
@@ -21775,9 +21542,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_it821x.c linux-2.6.32.24/drivers/ata
21775 .inherits = &ata_bmdma_port_ops, 21542 .inherits = &ata_bmdma_port_ops,
21776 21543
21777 .check_atapi_dma= it821x_check_atapi_dma, 21544 .check_atapi_dma= it821x_check_atapi_dma,
21778diff -urNp linux-2.6.32.24/drivers/ata/pata_ixp4xx_cf.c linux-2.6.32.24/drivers/ata/pata_ixp4xx_cf.c 21545diff -urNp linux-2.6.35.7/drivers/ata/pata_ixp4xx_cf.c linux-2.6.35.7/drivers/ata/pata_ixp4xx_cf.c
21779--- linux-2.6.32.24/drivers/ata/pata_ixp4xx_cf.c 2010-08-13 16:24:37.000000000 -0400 21546--- linux-2.6.35.7/drivers/ata/pata_ixp4xx_cf.c 2010-08-26 19:47:12.000000000 -0400
21780+++ linux-2.6.32.24/drivers/ata/pata_ixp4xx_cf.c 2010-10-23 19:59:19.000000000 -0400 21547+++ linux-2.6.35.7/drivers/ata/pata_ixp4xx_cf.c 2010-09-17 20:12:09.000000000 -0400
21781@@ -89,7 +89,7 @@ static struct scsi_host_template ixp4xx_ 21548@@ -89,7 +89,7 @@ static struct scsi_host_template ixp4xx_
21782 ATA_PIO_SHT(DRV_NAME), 21549 ATA_PIO_SHT(DRV_NAME),
21783 }; 21550 };
@@ -21787,9 +21554,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ixp4xx_cf.c linux-2.6.32.24/drivers/
21787 .inherits = &ata_sff_port_ops, 21554 .inherits = &ata_sff_port_ops,
21788 .sff_data_xfer = ixp4xx_mmio_data_xfer, 21555 .sff_data_xfer = ixp4xx_mmio_data_xfer,
21789 .cable_detect = ata_cable_40wire, 21556 .cable_detect = ata_cable_40wire,
21790diff -urNp linux-2.6.32.24/drivers/ata/pata_jmicron.c linux-2.6.32.24/drivers/ata/pata_jmicron.c 21557diff -urNp linux-2.6.35.7/drivers/ata/pata_jmicron.c linux-2.6.35.7/drivers/ata/pata_jmicron.c
21791--- linux-2.6.32.24/drivers/ata/pata_jmicron.c 2010-08-13 16:24:37.000000000 -0400 21558--- linux-2.6.35.7/drivers/ata/pata_jmicron.c 2010-08-26 19:47:12.000000000 -0400
21792+++ linux-2.6.32.24/drivers/ata/pata_jmicron.c 2010-10-23 19:59:19.000000000 -0400 21559+++ linux-2.6.35.7/drivers/ata/pata_jmicron.c 2010-09-17 20:12:09.000000000 -0400
21793@@ -111,7 +111,7 @@ static struct scsi_host_template jmicron 21560@@ -111,7 +111,7 @@ static struct scsi_host_template jmicron
21794 ATA_BMDMA_SHT(DRV_NAME), 21561 ATA_BMDMA_SHT(DRV_NAME),
21795 }; 21562 };
@@ -21799,10 +21566,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_jmicron.c linux-2.6.32.24/drivers/at
21799 .inherits = &ata_bmdma_port_ops, 21566 .inherits = &ata_bmdma_port_ops,
21800 .prereset = jmicron_pre_reset, 21567 .prereset = jmicron_pre_reset,
21801 }; 21568 };
21802diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata/pata_legacy.c 21569diff -urNp linux-2.6.35.7/drivers/ata/pata_legacy.c linux-2.6.35.7/drivers/ata/pata_legacy.c
21803--- linux-2.6.32.24/drivers/ata/pata_legacy.c 2010-08-13 16:24:37.000000000 -0400 21570--- linux-2.6.35.7/drivers/ata/pata_legacy.c 2010-08-26 19:47:12.000000000 -0400
21804+++ linux-2.6.32.24/drivers/ata/pata_legacy.c 2010-10-23 19:59:19.000000000 -0400 21571+++ linux-2.6.35.7/drivers/ata/pata_legacy.c 2010-09-17 20:12:09.000000000 -0400
21805@@ -106,7 +106,7 @@ struct legacy_probe { 21572@@ -113,7 +113,7 @@ struct legacy_probe {
21806 21573
21807 struct legacy_controller { 21574 struct legacy_controller {
21808 const char *name; 21575 const char *name;
@@ -21811,7 +21578,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21811 unsigned int pio_mask; 21578 unsigned int pio_mask;
21812 unsigned int flags; 21579 unsigned int flags;
21813 unsigned int pflags; 21580 unsigned int pflags;
21814@@ -223,12 +223,12 @@ static const struct ata_port_operations 21581@@ -230,12 +230,12 @@ static const struct ata_port_operations
21815 * pio_mask as well. 21582 * pio_mask as well.
21816 */ 21583 */
21817 21584
@@ -21826,7 +21593,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21826 .inherits = &legacy_base_port_ops, 21593 .inherits = &legacy_base_port_ops,
21827 .sff_data_xfer = ata_sff_data_xfer_noirq, 21594 .sff_data_xfer = ata_sff_data_xfer_noirq,
21828 .set_mode = legacy_set_mode, 21595 .set_mode = legacy_set_mode,
21829@@ -324,7 +324,7 @@ static unsigned int pdc_data_xfer_vlb(st 21596@@ -331,7 +331,7 @@ static unsigned int pdc_data_xfer_vlb(st
21830 return buflen; 21597 return buflen;
21831 } 21598 }
21832 21599
@@ -21835,7 +21602,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21835 .inherits = &legacy_base_port_ops, 21602 .inherits = &legacy_base_port_ops,
21836 .set_piomode = pdc20230_set_piomode, 21603 .set_piomode = pdc20230_set_piomode,
21837 .sff_data_xfer = pdc_data_xfer_vlb, 21604 .sff_data_xfer = pdc_data_xfer_vlb,
21838@@ -357,7 +357,7 @@ static void ht6560a_set_piomode(struct a 21605@@ -364,7 +364,7 @@ static void ht6560a_set_piomode(struct a
21839 ioread8(ap->ioaddr.status_addr); 21606 ioread8(ap->ioaddr.status_addr);
21840 } 21607 }
21841 21608
@@ -21844,7 +21611,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21844 .inherits = &legacy_base_port_ops, 21611 .inherits = &legacy_base_port_ops,
21845 .set_piomode = ht6560a_set_piomode, 21612 .set_piomode = ht6560a_set_piomode,
21846 }; 21613 };
21847@@ -400,7 +400,7 @@ static void ht6560b_set_piomode(struct a 21614@@ -407,7 +407,7 @@ static void ht6560b_set_piomode(struct a
21848 ioread8(ap->ioaddr.status_addr); 21615 ioread8(ap->ioaddr.status_addr);
21849 } 21616 }
21850 21617
@@ -21853,7 +21620,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21853 .inherits = &legacy_base_port_ops, 21620 .inherits = &legacy_base_port_ops,
21854 .set_piomode = ht6560b_set_piomode, 21621 .set_piomode = ht6560b_set_piomode,
21855 }; 21622 };
21856@@ -499,7 +499,7 @@ static void opti82c611a_set_piomode(stru 21623@@ -506,7 +506,7 @@ static void opti82c611a_set_piomode(stru
21857 } 21624 }
21858 21625
21859 21626
@@ -21862,7 +21629,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21862 .inherits = &legacy_base_port_ops, 21629 .inherits = &legacy_base_port_ops,
21863 .set_piomode = opti82c611a_set_piomode, 21630 .set_piomode = opti82c611a_set_piomode,
21864 }; 21631 };
21865@@ -609,7 +609,7 @@ static unsigned int opti82c46x_qc_issue( 21632@@ -616,7 +616,7 @@ static unsigned int opti82c46x_qc_issue(
21866 return ata_sff_qc_issue(qc); 21633 return ata_sff_qc_issue(qc);
21867 } 21634 }
21868 21635
@@ -21871,7 +21638,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21871 .inherits = &legacy_base_port_ops, 21638 .inherits = &legacy_base_port_ops,
21872 .set_piomode = opti82c46x_set_piomode, 21639 .set_piomode = opti82c46x_set_piomode,
21873 .qc_issue = opti82c46x_qc_issue, 21640 .qc_issue = opti82c46x_qc_issue,
21874@@ -771,20 +771,20 @@ static int qdi_port(struct platform_devi 21641@@ -778,20 +778,20 @@ static int qdi_port(struct platform_devi
21875 return 0; 21642 return 0;
21876 } 21643 }
21877 21644
@@ -21894,8 +21661,8 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21894+static const struct ata_port_operations qdi6580dp_port_ops = { 21661+static const struct ata_port_operations qdi6580dp_port_ops = {
21895 .inherits = &legacy_base_port_ops, 21662 .inherits = &legacy_base_port_ops,
21896 .set_piomode = qdi6580dp_set_piomode, 21663 .set_piomode = qdi6580dp_set_piomode,
21897 .sff_data_xfer = vlb32_data_xfer, 21664 .qc_issue = qdi_qc_issue,
21898@@ -855,7 +855,7 @@ static int winbond_port(struct platform_ 21665@@ -863,7 +863,7 @@ static int winbond_port(struct platform_
21899 return 0; 21666 return 0;
21900 } 21667 }
21901 21668
@@ -21904,7 +21671,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21904 .inherits = &legacy_base_port_ops, 21671 .inherits = &legacy_base_port_ops,
21905 .set_piomode = winbond_set_piomode, 21672 .set_piomode = winbond_set_piomode,
21906 .sff_data_xfer = vlb32_data_xfer, 21673 .sff_data_xfer = vlb32_data_xfer,
21907@@ -978,7 +978,7 @@ static __init int legacy_init_one(struct 21674@@ -986,7 +986,7 @@ static __init int legacy_init_one(struct
21908 int pio_modes = controller->pio_mask; 21675 int pio_modes = controller->pio_mask;
21909 unsigned long io = probe->port; 21676 unsigned long io = probe->port;
21910 u32 mask = (1 << probe->slot); 21677 u32 mask = (1 << probe->slot);
@@ -21913,9 +21680,23 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_legacy.c linux-2.6.32.24/drivers/ata
21913 struct legacy_data *ld = &legacy_data[probe->slot]; 21680 struct legacy_data *ld = &legacy_data[probe->slot];
21914 struct ata_host *host = NULL; 21681 struct ata_host *host = NULL;
21915 struct ata_port *ap; 21682 struct ata_port *ap;
21916diff -urNp linux-2.6.32.24/drivers/ata/pata_marvell.c linux-2.6.32.24/drivers/ata/pata_marvell.c 21683diff -urNp linux-2.6.35.7/drivers/ata/pata_macio.c linux-2.6.35.7/drivers/ata/pata_macio.c
21917--- linux-2.6.32.24/drivers/ata/pata_marvell.c 2010-08-13 16:24:37.000000000 -0400 21684--- linux-2.6.35.7/drivers/ata/pata_macio.c 2010-08-26 19:47:12.000000000 -0400
21918+++ linux-2.6.32.24/drivers/ata/pata_marvell.c 2010-10-23 19:59:19.000000000 -0400 21685+++ linux-2.6.35.7/drivers/ata/pata_macio.c 2010-09-17 20:12:09.000000000 -0400
21686@@ -918,9 +918,8 @@ static struct scsi_host_template pata_ma
21687 .slave_configure = pata_macio_slave_config,
21688 };
21689
21690-static struct ata_port_operations pata_macio_ops = {
21691+static const struct ata_port_operations pata_macio_ops = {
21692 .inherits = &ata_bmdma_port_ops,
21693-
21694 .freeze = pata_macio_freeze,
21695 .set_piomode = pata_macio_set_timings,
21696 .set_dmamode = pata_macio_set_timings,
21697diff -urNp linux-2.6.35.7/drivers/ata/pata_marvell.c linux-2.6.35.7/drivers/ata/pata_marvell.c
21698--- linux-2.6.35.7/drivers/ata/pata_marvell.c 2010-08-26 19:47:12.000000000 -0400
21699+++ linux-2.6.35.7/drivers/ata/pata_marvell.c 2010-09-17 20:12:09.000000000 -0400
21919@@ -100,7 +100,7 @@ static struct scsi_host_template marvell 21700@@ -100,7 +100,7 @@ static struct scsi_host_template marvell
21920 ATA_BMDMA_SHT(DRV_NAME), 21701 ATA_BMDMA_SHT(DRV_NAME),
21921 }; 21702 };
@@ -21925,9 +21706,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_marvell.c linux-2.6.32.24/drivers/at
21925 .inherits = &ata_bmdma_port_ops, 21706 .inherits = &ata_bmdma_port_ops,
21926 .cable_detect = marvell_cable_detect, 21707 .cable_detect = marvell_cable_detect,
21927 .prereset = marvell_pre_reset, 21708 .prereset = marvell_pre_reset,
21928diff -urNp linux-2.6.32.24/drivers/ata/pata_mpc52xx.c linux-2.6.32.24/drivers/ata/pata_mpc52xx.c 21709diff -urNp linux-2.6.35.7/drivers/ata/pata_mpc52xx.c linux-2.6.35.7/drivers/ata/pata_mpc52xx.c
21929--- linux-2.6.32.24/drivers/ata/pata_mpc52xx.c 2010-08-13 16:24:37.000000000 -0400 21710--- linux-2.6.35.7/drivers/ata/pata_mpc52xx.c 2010-08-26 19:47:12.000000000 -0400
21930+++ linux-2.6.32.24/drivers/ata/pata_mpc52xx.c 2010-10-23 19:59:19.000000000 -0400 21711+++ linux-2.6.35.7/drivers/ata/pata_mpc52xx.c 2010-09-17 20:12:09.000000000 -0400
21931@@ -609,7 +609,7 @@ static struct scsi_host_template mpc52xx 21712@@ -609,7 +609,7 @@ static struct scsi_host_template mpc52xx
21932 ATA_PIO_SHT(DRV_NAME), 21713 ATA_PIO_SHT(DRV_NAME),
21933 }; 21714 };
@@ -21937,9 +21718,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_mpc52xx.c linux-2.6.32.24/drivers/at
21937 .inherits = &ata_sff_port_ops, 21718 .inherits = &ata_sff_port_ops,
21938 .sff_dev_select = mpc52xx_ata_dev_select, 21719 .sff_dev_select = mpc52xx_ata_dev_select,
21939 .set_piomode = mpc52xx_ata_set_piomode, 21720 .set_piomode = mpc52xx_ata_set_piomode,
21940diff -urNp linux-2.6.32.24/drivers/ata/pata_mpiix.c linux-2.6.32.24/drivers/ata/pata_mpiix.c 21721diff -urNp linux-2.6.35.7/drivers/ata/pata_mpiix.c linux-2.6.35.7/drivers/ata/pata_mpiix.c
21941--- linux-2.6.32.24/drivers/ata/pata_mpiix.c 2010-08-13 16:24:37.000000000 -0400 21722--- linux-2.6.35.7/drivers/ata/pata_mpiix.c 2010-08-26 19:47:12.000000000 -0400
21942+++ linux-2.6.32.24/drivers/ata/pata_mpiix.c 2010-10-23 19:59:19.000000000 -0400 21723+++ linux-2.6.35.7/drivers/ata/pata_mpiix.c 2010-09-17 20:12:09.000000000 -0400
21943@@ -140,7 +140,7 @@ static struct scsi_host_template mpiix_s 21724@@ -140,7 +140,7 @@ static struct scsi_host_template mpiix_s
21944 ATA_PIO_SHT(DRV_NAME), 21725 ATA_PIO_SHT(DRV_NAME),
21945 }; 21726 };
@@ -21949,9 +21730,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_mpiix.c linux-2.6.32.24/drivers/ata/
21949 .inherits = &ata_sff_port_ops, 21730 .inherits = &ata_sff_port_ops,
21950 .qc_issue = mpiix_qc_issue, 21731 .qc_issue = mpiix_qc_issue,
21951 .cable_detect = ata_cable_40wire, 21732 .cable_detect = ata_cable_40wire,
21952diff -urNp linux-2.6.32.24/drivers/ata/pata_netcell.c linux-2.6.32.24/drivers/ata/pata_netcell.c 21733diff -urNp linux-2.6.35.7/drivers/ata/pata_netcell.c linux-2.6.35.7/drivers/ata/pata_netcell.c
21953--- linux-2.6.32.24/drivers/ata/pata_netcell.c 2010-08-13 16:24:37.000000000 -0400 21734--- linux-2.6.35.7/drivers/ata/pata_netcell.c 2010-08-26 19:47:12.000000000 -0400
21954+++ linux-2.6.32.24/drivers/ata/pata_netcell.c 2010-10-23 19:59:19.000000000 -0400 21735+++ linux-2.6.35.7/drivers/ata/pata_netcell.c 2010-09-17 20:12:09.000000000 -0400
21955@@ -34,7 +34,7 @@ static struct scsi_host_template netcell 21736@@ -34,7 +34,7 @@ static struct scsi_host_template netcell
21956 ATA_BMDMA_SHT(DRV_NAME), 21737 ATA_BMDMA_SHT(DRV_NAME),
21957 }; 21738 };
@@ -21961,9 +21742,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_netcell.c linux-2.6.32.24/drivers/at
21961 .inherits = &ata_bmdma_port_ops, 21742 .inherits = &ata_bmdma_port_ops,
21962 .cable_detect = ata_cable_80wire, 21743 .cable_detect = ata_cable_80wire,
21963 .read_id = netcell_read_id, 21744 .read_id = netcell_read_id,
21964diff -urNp linux-2.6.32.24/drivers/ata/pata_ninja32.c linux-2.6.32.24/drivers/ata/pata_ninja32.c 21745diff -urNp linux-2.6.35.7/drivers/ata/pata_ninja32.c linux-2.6.35.7/drivers/ata/pata_ninja32.c
21965--- linux-2.6.32.24/drivers/ata/pata_ninja32.c 2010-08-13 16:24:37.000000000 -0400 21746--- linux-2.6.35.7/drivers/ata/pata_ninja32.c 2010-08-26 19:47:12.000000000 -0400
21966+++ linux-2.6.32.24/drivers/ata/pata_ninja32.c 2010-10-23 19:59:19.000000000 -0400 21747+++ linux-2.6.35.7/drivers/ata/pata_ninja32.c 2010-09-17 20:12:09.000000000 -0400
21967@@ -81,7 +81,7 @@ static struct scsi_host_template ninja32 21748@@ -81,7 +81,7 @@ static struct scsi_host_template ninja32
21968 ATA_BMDMA_SHT(DRV_NAME), 21749 ATA_BMDMA_SHT(DRV_NAME),
21969 }; 21750 };
@@ -21973,9 +21754,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ninja32.c linux-2.6.32.24/drivers/at
21973 .inherits = &ata_bmdma_port_ops, 21754 .inherits = &ata_bmdma_port_ops,
21974 .sff_dev_select = ninja32_dev_select, 21755 .sff_dev_select = ninja32_dev_select,
21975 .cable_detect = ata_cable_40wire, 21756 .cable_detect = ata_cable_40wire,
21976diff -urNp linux-2.6.32.24/drivers/ata/pata_ns87410.c linux-2.6.32.24/drivers/ata/pata_ns87410.c 21757diff -urNp linux-2.6.35.7/drivers/ata/pata_ns87410.c linux-2.6.35.7/drivers/ata/pata_ns87410.c
21977--- linux-2.6.32.24/drivers/ata/pata_ns87410.c 2010-08-13 16:24:37.000000000 -0400 21758--- linux-2.6.35.7/drivers/ata/pata_ns87410.c 2010-08-26 19:47:12.000000000 -0400
21978+++ linux-2.6.32.24/drivers/ata/pata_ns87410.c 2010-10-23 19:59:19.000000000 -0400 21759+++ linux-2.6.35.7/drivers/ata/pata_ns87410.c 2010-09-17 20:12:09.000000000 -0400
21979@@ -132,7 +132,7 @@ static struct scsi_host_template ns87410 21760@@ -132,7 +132,7 @@ static struct scsi_host_template ns87410
21980 ATA_PIO_SHT(DRV_NAME), 21761 ATA_PIO_SHT(DRV_NAME),
21981 }; 21762 };
@@ -21985,9 +21766,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ns87410.c linux-2.6.32.24/drivers/at
21985 .inherits = &ata_sff_port_ops, 21766 .inherits = &ata_sff_port_ops,
21986 .qc_issue = ns87410_qc_issue, 21767 .qc_issue = ns87410_qc_issue,
21987 .cable_detect = ata_cable_40wire, 21768 .cable_detect = ata_cable_40wire,
21988diff -urNp linux-2.6.32.24/drivers/ata/pata_ns87415.c linux-2.6.32.24/drivers/ata/pata_ns87415.c 21769diff -urNp linux-2.6.35.7/drivers/ata/pata_ns87415.c linux-2.6.35.7/drivers/ata/pata_ns87415.c
21989--- linux-2.6.32.24/drivers/ata/pata_ns87415.c 2010-08-13 16:24:37.000000000 -0400 21770--- linux-2.6.35.7/drivers/ata/pata_ns87415.c 2010-08-26 19:47:12.000000000 -0400
21990+++ linux-2.6.32.24/drivers/ata/pata_ns87415.c 2010-10-23 19:59:19.000000000 -0400 21771+++ linux-2.6.35.7/drivers/ata/pata_ns87415.c 2010-09-17 20:12:09.000000000 -0400
21991@@ -299,7 +299,7 @@ static u8 ns87560_bmdma_status(struct at 21772@@ -299,7 +299,7 @@ static u8 ns87560_bmdma_status(struct at
21992 } 21773 }
21993 #endif /* 87560 SuperIO Support */ 21774 #endif /* 87560 SuperIO Support */
@@ -22006,10 +21787,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_ns87415.c linux-2.6.32.24/drivers/at
22006 .inherits = &ns87415_pata_ops, 21787 .inherits = &ns87415_pata_ops,
22007 .sff_tf_read = ns87560_tf_read, 21788 .sff_tf_read = ns87560_tf_read,
22008 .sff_check_status = ns87560_check_status, 21789 .sff_check_status = ns87560_check_status,
22009diff -urNp linux-2.6.32.24/drivers/ata/pata_octeon_cf.c linux-2.6.32.24/drivers/ata/pata_octeon_cf.c 21790diff -urNp linux-2.6.35.7/drivers/ata/pata_octeon_cf.c linux-2.6.35.7/drivers/ata/pata_octeon_cf.c
22010--- linux-2.6.32.24/drivers/ata/pata_octeon_cf.c 2010-08-13 16:24:37.000000000 -0400 21791--- linux-2.6.35.7/drivers/ata/pata_octeon_cf.c 2010-08-26 19:47:12.000000000 -0400
22011+++ linux-2.6.32.24/drivers/ata/pata_octeon_cf.c 2010-10-23 19:59:19.000000000 -0400 21792+++ linux-2.6.35.7/drivers/ata/pata_octeon_cf.c 2010-09-17 20:12:09.000000000 -0400
22012@@ -801,6 +801,7 @@ static unsigned int octeon_cf_qc_issue(s 21793@@ -782,6 +782,7 @@ static unsigned int octeon_cf_qc_issue(s
22013 return 0; 21794 return 0;
22014 } 21795 }
22015 21796
@@ -22017,9 +21798,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_octeon_cf.c linux-2.6.32.24/drivers/
22017 static struct ata_port_operations octeon_cf_ops = { 21798 static struct ata_port_operations octeon_cf_ops = {
22018 .inherits = &ata_sff_port_ops, 21799 .inherits = &ata_sff_port_ops,
22019 .check_atapi_dma = octeon_cf_check_atapi_dma, 21800 .check_atapi_dma = octeon_cf_check_atapi_dma,
22020diff -urNp linux-2.6.32.24/drivers/ata/pata_oldpiix.c linux-2.6.32.24/drivers/ata/pata_oldpiix.c 21801diff -urNp linux-2.6.35.7/drivers/ata/pata_oldpiix.c linux-2.6.35.7/drivers/ata/pata_oldpiix.c
22021--- linux-2.6.32.24/drivers/ata/pata_oldpiix.c 2010-08-13 16:24:37.000000000 -0400 21802--- linux-2.6.35.7/drivers/ata/pata_oldpiix.c 2010-08-26 19:47:12.000000000 -0400
22022+++ linux-2.6.32.24/drivers/ata/pata_oldpiix.c 2010-10-23 19:59:19.000000000 -0400 21803+++ linux-2.6.35.7/drivers/ata/pata_oldpiix.c 2010-09-17 20:12:09.000000000 -0400
22023@@ -208,7 +208,7 @@ static struct scsi_host_template oldpiix 21804@@ -208,7 +208,7 @@ static struct scsi_host_template oldpiix
22024 ATA_BMDMA_SHT(DRV_NAME), 21805 ATA_BMDMA_SHT(DRV_NAME),
22025 }; 21806 };
@@ -22029,9 +21810,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_oldpiix.c linux-2.6.32.24/drivers/at
22029 .inherits = &ata_bmdma_port_ops, 21810 .inherits = &ata_bmdma_port_ops,
22030 .qc_issue = oldpiix_qc_issue, 21811 .qc_issue = oldpiix_qc_issue,
22031 .cable_detect = ata_cable_40wire, 21812 .cable_detect = ata_cable_40wire,
22032diff -urNp linux-2.6.32.24/drivers/ata/pata_opti.c linux-2.6.32.24/drivers/ata/pata_opti.c 21813diff -urNp linux-2.6.35.7/drivers/ata/pata_opti.c linux-2.6.35.7/drivers/ata/pata_opti.c
22033--- linux-2.6.32.24/drivers/ata/pata_opti.c 2010-08-13 16:24:37.000000000 -0400 21814--- linux-2.6.35.7/drivers/ata/pata_opti.c 2010-08-26 19:47:12.000000000 -0400
22034+++ linux-2.6.32.24/drivers/ata/pata_opti.c 2010-10-23 19:59:19.000000000 -0400 21815+++ linux-2.6.35.7/drivers/ata/pata_opti.c 2010-09-17 20:12:09.000000000 -0400
22035@@ -152,7 +152,7 @@ static struct scsi_host_template opti_sh 21816@@ -152,7 +152,7 @@ static struct scsi_host_template opti_sh
22036 ATA_PIO_SHT(DRV_NAME), 21817 ATA_PIO_SHT(DRV_NAME),
22037 }; 21818 };
@@ -22041,9 +21822,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_opti.c linux-2.6.32.24/drivers/ata/p
22041 .inherits = &ata_sff_port_ops, 21822 .inherits = &ata_sff_port_ops,
22042 .cable_detect = ata_cable_40wire, 21823 .cable_detect = ata_cable_40wire,
22043 .set_piomode = opti_set_piomode, 21824 .set_piomode = opti_set_piomode,
22044diff -urNp linux-2.6.32.24/drivers/ata/pata_optidma.c linux-2.6.32.24/drivers/ata/pata_optidma.c 21825diff -urNp linux-2.6.35.7/drivers/ata/pata_optidma.c linux-2.6.35.7/drivers/ata/pata_optidma.c
22045--- linux-2.6.32.24/drivers/ata/pata_optidma.c 2010-08-13 16:24:37.000000000 -0400 21826--- linux-2.6.35.7/drivers/ata/pata_optidma.c 2010-08-26 19:47:12.000000000 -0400
22046+++ linux-2.6.32.24/drivers/ata/pata_optidma.c 2010-10-23 19:59:19.000000000 -0400 21827+++ linux-2.6.35.7/drivers/ata/pata_optidma.c 2010-09-17 20:12:09.000000000 -0400
22047@@ -337,7 +337,7 @@ static struct scsi_host_template optidma 21828@@ -337,7 +337,7 @@ static struct scsi_host_template optidma
22048 ATA_BMDMA_SHT(DRV_NAME), 21829 ATA_BMDMA_SHT(DRV_NAME),
22049 }; 21830 };
@@ -22062,9 +21843,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_optidma.c linux-2.6.32.24/drivers/at
22062 .inherits = &optidma_port_ops, 21843 .inherits = &optidma_port_ops,
22063 .set_piomode = optiplus_set_pio_mode, 21844 .set_piomode = optiplus_set_pio_mode,
22064 .set_dmamode = optiplus_set_dma_mode, 21845 .set_dmamode = optiplus_set_dma_mode,
22065diff -urNp linux-2.6.32.24/drivers/ata/pata_palmld.c linux-2.6.32.24/drivers/ata/pata_palmld.c 21846diff -urNp linux-2.6.35.7/drivers/ata/pata_palmld.c linux-2.6.35.7/drivers/ata/pata_palmld.c
22066--- linux-2.6.32.24/drivers/ata/pata_palmld.c 2010-08-13 16:24:37.000000000 -0400 21847--- linux-2.6.35.7/drivers/ata/pata_palmld.c 2010-08-26 19:47:12.000000000 -0400
22067+++ linux-2.6.32.24/drivers/ata/pata_palmld.c 2010-10-23 19:59:19.000000000 -0400 21848+++ linux-2.6.35.7/drivers/ata/pata_palmld.c 2010-09-17 20:12:09.000000000 -0400
22068@@ -37,7 +37,7 @@ static struct scsi_host_template palmld_ 21849@@ -37,7 +37,7 @@ static struct scsi_host_template palmld_
22069 ATA_PIO_SHT(DRV_NAME), 21850 ATA_PIO_SHT(DRV_NAME),
22070 }; 21851 };
@@ -22074,10 +21855,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_palmld.c linux-2.6.32.24/drivers/ata
22074 .inherits = &ata_sff_port_ops, 21855 .inherits = &ata_sff_port_ops,
22075 .sff_data_xfer = ata_sff_data_xfer_noirq, 21856 .sff_data_xfer = ata_sff_data_xfer_noirq,
22076 .cable_detect = ata_cable_40wire, 21857 .cable_detect = ata_cable_40wire,
22077diff -urNp linux-2.6.32.24/drivers/ata/pata_pcmcia.c linux-2.6.32.24/drivers/ata/pata_pcmcia.c 21858diff -urNp linux-2.6.35.7/drivers/ata/pata_pcmcia.c linux-2.6.35.7/drivers/ata/pata_pcmcia.c
22078--- linux-2.6.32.24/drivers/ata/pata_pcmcia.c 2010-08-13 16:24:37.000000000 -0400 21859--- linux-2.6.35.7/drivers/ata/pata_pcmcia.c 2010-08-26 19:47:12.000000000 -0400
22079+++ linux-2.6.32.24/drivers/ata/pata_pcmcia.c 2010-10-23 19:59:19.000000000 -0400 21860+++ linux-2.6.35.7/drivers/ata/pata_pcmcia.c 2010-09-17 20:12:09.000000000 -0400
22080@@ -162,14 +162,14 @@ static struct scsi_host_template pcmcia_ 21861@@ -153,14 +153,14 @@ static struct scsi_host_template pcmcia_
22081 ATA_PIO_SHT(DRV_NAME), 21862 ATA_PIO_SHT(DRV_NAME),
22082 }; 21863 };
22083 21864
@@ -22094,18 +21875,18 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_pcmcia.c linux-2.6.32.24/drivers/ata
22094 .inherits = &ata_sff_port_ops, 21875 .inherits = &ata_sff_port_ops,
22095 .sff_data_xfer = ata_data_xfer_8bit, 21876 .sff_data_xfer = ata_data_xfer_8bit,
22096 .cable_detect = ata_cable_40wire, 21877 .cable_detect = ata_cable_40wire,
22097@@ -256,7 +256,7 @@ static int pcmcia_init_one(struct pcmcia 21878@@ -243,7 +243,7 @@ static int pcmcia_init_one(struct pcmcia
22098 unsigned long io_base, ctl_base; 21879 unsigned long io_base, ctl_base;
22099 void __iomem *io_addr, *ctl_addr; 21880 void __iomem *io_addr, *ctl_addr;
22100 int n_ports = 1; 21881 int n_ports = 1;
22101- struct ata_port_operations *ops = &pcmcia_port_ops; 21882- struct ata_port_operations *ops = &pcmcia_port_ops;
22102+ const struct ata_port_operations *ops = &pcmcia_port_ops; 21883+ const struct ata_port_operations *ops = &pcmcia_port_ops;
22103 21884
22104 info = kzalloc(sizeof(*info), GFP_KERNEL); 21885 /* Set up attributes in order to probe card and get resources */
22105 if (info == NULL) 21886 pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
22106diff -urNp linux-2.6.32.24/drivers/ata/pata_pdc2027x.c linux-2.6.32.24/drivers/ata/pata_pdc2027x.c 21887diff -urNp linux-2.6.35.7/drivers/ata/pata_pdc2027x.c linux-2.6.35.7/drivers/ata/pata_pdc2027x.c
22107--- linux-2.6.32.24/drivers/ata/pata_pdc2027x.c 2010-08-13 16:24:37.000000000 -0400 21888--- linux-2.6.35.7/drivers/ata/pata_pdc2027x.c 2010-08-26 19:47:12.000000000 -0400
22108+++ linux-2.6.32.24/drivers/ata/pata_pdc2027x.c 2010-10-23 19:59:19.000000000 -0400 21889+++ linux-2.6.35.7/drivers/ata/pata_pdc2027x.c 2010-09-17 20:12:09.000000000 -0400
22109@@ -132,14 +132,14 @@ static struct scsi_host_template pdc2027 21890@@ -132,14 +132,14 @@ static struct scsi_host_template pdc2027
22110 ATA_BMDMA_SHT(DRV_NAME), 21891 ATA_BMDMA_SHT(DRV_NAME),
22111 }; 21892 };
@@ -22123,9 +21904,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_pdc2027x.c linux-2.6.32.24/drivers/a
22123 .inherits = &pdc2027x_pata100_ops, 21904 .inherits = &pdc2027x_pata100_ops,
22124 .mode_filter = pdc2027x_mode_filter, 21905 .mode_filter = pdc2027x_mode_filter,
22125 .set_piomode = pdc2027x_set_piomode, 21906 .set_piomode = pdc2027x_set_piomode,
22126diff -urNp linux-2.6.32.24/drivers/ata/pata_pdc202xx_old.c linux-2.6.32.24/drivers/ata/pata_pdc202xx_old.c 21907diff -urNp linux-2.6.35.7/drivers/ata/pata_pdc202xx_old.c linux-2.6.35.7/drivers/ata/pata_pdc202xx_old.c
22127--- linux-2.6.32.24/drivers/ata/pata_pdc202xx_old.c 2010-09-26 17:26:05.000000000 -0400 21908--- linux-2.6.35.7/drivers/ata/pata_pdc202xx_old.c 2010-08-26 19:47:12.000000000 -0400
22128+++ linux-2.6.32.24/drivers/ata/pata_pdc202xx_old.c 2010-10-23 19:59:19.000000000 -0400 21909+++ linux-2.6.35.7/drivers/ata/pata_pdc202xx_old.c 2010-09-17 20:12:09.000000000 -0400
22129@@ -274,7 +274,7 @@ static struct scsi_host_template pdc202x 21910@@ -274,7 +274,7 @@ static struct scsi_host_template pdc202x
22130 ATA_BMDMA_SHT(DRV_NAME), 21911 ATA_BMDMA_SHT(DRV_NAME),
22131 }; 21912 };
@@ -22144,9 +21925,21 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_pdc202xx_old.c linux-2.6.32.24/drive
22144 .inherits = &pdc2024x_port_ops, 21925 .inherits = &pdc2024x_port_ops,
22145 21926
22146 .check_atapi_dma = pdc2026x_check_atapi_dma, 21927 .check_atapi_dma = pdc2026x_check_atapi_dma,
22147diff -urNp linux-2.6.32.24/drivers/ata/pata_platform.c linux-2.6.32.24/drivers/ata/pata_platform.c 21928diff -urNp linux-2.6.35.7/drivers/ata/pata_piccolo.c linux-2.6.35.7/drivers/ata/pata_piccolo.c
22148--- linux-2.6.32.24/drivers/ata/pata_platform.c 2010-08-13 16:24:37.000000000 -0400 21929--- linux-2.6.35.7/drivers/ata/pata_piccolo.c 2010-08-26 19:47:12.000000000 -0400
22149+++ linux-2.6.32.24/drivers/ata/pata_platform.c 2010-10-23 19:59:19.000000000 -0400 21930+++ linux-2.6.35.7/drivers/ata/pata_piccolo.c 2010-09-17 20:12:09.000000000 -0400
21931@@ -67,7 +67,7 @@ static struct scsi_host_template tosh_sh
21932 ATA_BMDMA_SHT(DRV_NAME),
21933 };
21934
21935-static struct ata_port_operations tosh_port_ops = {
21936+static const struct ata_port_operations tosh_port_ops = {
21937 .inherits = &ata_bmdma_port_ops,
21938 .cable_detect = ata_cable_unknown,
21939 .set_piomode = tosh_set_piomode,
21940diff -urNp linux-2.6.35.7/drivers/ata/pata_platform.c linux-2.6.35.7/drivers/ata/pata_platform.c
21941--- linux-2.6.35.7/drivers/ata/pata_platform.c 2010-08-26 19:47:12.000000000 -0400
21942+++ linux-2.6.35.7/drivers/ata/pata_platform.c 2010-09-17 20:12:09.000000000 -0400
22150@@ -48,7 +48,7 @@ static struct scsi_host_template pata_pl 21943@@ -48,7 +48,7 @@ static struct scsi_host_template pata_pl
22151 ATA_PIO_SHT(DRV_NAME), 21944 ATA_PIO_SHT(DRV_NAME),
22152 }; 21945 };
@@ -22156,9 +21949,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_platform.c linux-2.6.32.24/drivers/a
22156 .inherits = &ata_sff_port_ops, 21949 .inherits = &ata_sff_port_ops,
22157 .sff_data_xfer = ata_sff_data_xfer_noirq, 21950 .sff_data_xfer = ata_sff_data_xfer_noirq,
22158 .cable_detect = ata_cable_unknown, 21951 .cable_detect = ata_cable_unknown,
22159diff -urNp linux-2.6.32.24/drivers/ata/pata_qdi.c linux-2.6.32.24/drivers/ata/pata_qdi.c 21952diff -urNp linux-2.6.35.7/drivers/ata/pata_qdi.c linux-2.6.35.7/drivers/ata/pata_qdi.c
22160--- linux-2.6.32.24/drivers/ata/pata_qdi.c 2010-08-13 16:24:37.000000000 -0400 21953--- linux-2.6.35.7/drivers/ata/pata_qdi.c 2010-08-26 19:47:12.000000000 -0400
22161+++ linux-2.6.32.24/drivers/ata/pata_qdi.c 2010-10-23 19:59:19.000000000 -0400 21954+++ linux-2.6.35.7/drivers/ata/pata_qdi.c 2010-09-17 20:12:09.000000000 -0400
22162@@ -157,7 +157,7 @@ static struct scsi_host_template qdi_sht 21955@@ -157,7 +157,7 @@ static struct scsi_host_template qdi_sht
22163 ATA_PIO_SHT(DRV_NAME), 21956 ATA_PIO_SHT(DRV_NAME),
22164 }; 21957 };
@@ -22177,9 +21970,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_qdi.c linux-2.6.32.24/drivers/ata/pa
22177 .inherits = &qdi6500_port_ops, 21970 .inherits = &qdi6500_port_ops,
22178 .set_piomode = qdi6580_set_piomode, 21971 .set_piomode = qdi6580_set_piomode,
22179 }; 21972 };
22180diff -urNp linux-2.6.32.24/drivers/ata/pata_radisys.c linux-2.6.32.24/drivers/ata/pata_radisys.c 21973diff -urNp linux-2.6.35.7/drivers/ata/pata_radisys.c linux-2.6.35.7/drivers/ata/pata_radisys.c
22181--- linux-2.6.32.24/drivers/ata/pata_radisys.c 2010-08-13 16:24:37.000000000 -0400 21974--- linux-2.6.35.7/drivers/ata/pata_radisys.c 2010-08-26 19:47:12.000000000 -0400
22182+++ linux-2.6.32.24/drivers/ata/pata_radisys.c 2010-10-23 19:59:19.000000000 -0400 21975+++ linux-2.6.35.7/drivers/ata/pata_radisys.c 2010-09-17 20:12:09.000000000 -0400
22183@@ -187,7 +187,7 @@ static struct scsi_host_template radisys 21976@@ -187,7 +187,7 @@ static struct scsi_host_template radisys
22184 ATA_BMDMA_SHT(DRV_NAME), 21977 ATA_BMDMA_SHT(DRV_NAME),
22185 }; 21978 };
@@ -22189,10 +21982,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_radisys.c linux-2.6.32.24/drivers/at
22189 .inherits = &ata_bmdma_port_ops, 21982 .inherits = &ata_bmdma_port_ops,
22190 .qc_issue = radisys_qc_issue, 21983 .qc_issue = radisys_qc_issue,
22191 .cable_detect = ata_cable_unknown, 21984 .cable_detect = ata_cable_unknown,
22192diff -urNp linux-2.6.32.24/drivers/ata/pata_rb532_cf.c linux-2.6.32.24/drivers/ata/pata_rb532_cf.c 21985diff -urNp linux-2.6.35.7/drivers/ata/pata_rb532_cf.c linux-2.6.35.7/drivers/ata/pata_rb532_cf.c
22193--- linux-2.6.32.24/drivers/ata/pata_rb532_cf.c 2010-08-13 16:24:37.000000000 -0400 21986--- linux-2.6.35.7/drivers/ata/pata_rb532_cf.c 2010-08-26 19:47:12.000000000 -0400
22194+++ linux-2.6.32.24/drivers/ata/pata_rb532_cf.c 2010-10-23 19:59:19.000000000 -0400 21987+++ linux-2.6.35.7/drivers/ata/pata_rb532_cf.c 2010-09-17 20:12:09.000000000 -0400
22195@@ -68,7 +68,7 @@ static irqreturn_t rb532_pata_irq_handle 21988@@ -69,7 +69,7 @@ static irqreturn_t rb532_pata_irq_handle
22196 return IRQ_HANDLED; 21989 return IRQ_HANDLED;
22197 } 21990 }
22198 21991
@@ -22201,10 +21994,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_rb532_cf.c linux-2.6.32.24/drivers/a
22201 .inherits = &ata_sff_port_ops, 21994 .inherits = &ata_sff_port_ops,
22202 .sff_data_xfer = ata_sff_data_xfer32, 21995 .sff_data_xfer = ata_sff_data_xfer32,
22203 }; 21996 };
22204diff -urNp linux-2.6.32.24/drivers/ata/pata_rdc.c linux-2.6.32.24/drivers/ata/pata_rdc.c 21997diff -urNp linux-2.6.35.7/drivers/ata/pata_rdc.c linux-2.6.35.7/drivers/ata/pata_rdc.c
22205--- linux-2.6.32.24/drivers/ata/pata_rdc.c 2010-08-13 16:24:37.000000000 -0400 21998--- linux-2.6.35.7/drivers/ata/pata_rdc.c 2010-08-26 19:47:12.000000000 -0400
22206+++ linux-2.6.32.24/drivers/ata/pata_rdc.c 2010-10-23 19:59:19.000000000 -0400 21999+++ linux-2.6.35.7/drivers/ata/pata_rdc.c 2010-09-17 20:12:09.000000000 -0400
22207@@ -272,7 +272,7 @@ static void rdc_set_dmamode(struct ata_p 22000@@ -273,7 +273,7 @@ static void rdc_set_dmamode(struct ata_p
22208 pci_write_config_byte(dev, 0x48, udma_enable); 22001 pci_write_config_byte(dev, 0x48, udma_enable);
22209 } 22002 }
22210 22003
@@ -22213,9 +22006,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_rdc.c linux-2.6.32.24/drivers/ata/pa
22213 .inherits = &ata_bmdma32_port_ops, 22006 .inherits = &ata_bmdma32_port_ops,
22214 .cable_detect = rdc_pata_cable_detect, 22007 .cable_detect = rdc_pata_cable_detect,
22215 .set_piomode = rdc_set_piomode, 22008 .set_piomode = rdc_set_piomode,
22216diff -urNp linux-2.6.32.24/drivers/ata/pata_rz1000.c linux-2.6.32.24/drivers/ata/pata_rz1000.c 22009diff -urNp linux-2.6.35.7/drivers/ata/pata_rz1000.c linux-2.6.35.7/drivers/ata/pata_rz1000.c
22217--- linux-2.6.32.24/drivers/ata/pata_rz1000.c 2010-08-13 16:24:37.000000000 -0400 22010--- linux-2.6.35.7/drivers/ata/pata_rz1000.c 2010-08-26 19:47:12.000000000 -0400
22218+++ linux-2.6.32.24/drivers/ata/pata_rz1000.c 2010-10-23 19:59:19.000000000 -0400 22011+++ linux-2.6.35.7/drivers/ata/pata_rz1000.c 2010-09-17 20:12:09.000000000 -0400
22219@@ -54,7 +54,7 @@ static struct scsi_host_template rz1000_ 22012@@ -54,7 +54,7 @@ static struct scsi_host_template rz1000_
22220 ATA_PIO_SHT(DRV_NAME), 22013 ATA_PIO_SHT(DRV_NAME),
22221 }; 22014 };
@@ -22225,9 +22018,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_rz1000.c linux-2.6.32.24/drivers/ata
22225 .inherits = &ata_sff_port_ops, 22018 .inherits = &ata_sff_port_ops,
22226 .cable_detect = ata_cable_40wire, 22019 .cable_detect = ata_cable_40wire,
22227 .set_mode = rz1000_set_mode, 22020 .set_mode = rz1000_set_mode,
22228diff -urNp linux-2.6.32.24/drivers/ata/pata_sc1200.c linux-2.6.32.24/drivers/ata/pata_sc1200.c 22021diff -urNp linux-2.6.35.7/drivers/ata/pata_sc1200.c linux-2.6.35.7/drivers/ata/pata_sc1200.c
22229--- linux-2.6.32.24/drivers/ata/pata_sc1200.c 2010-08-13 16:24:37.000000000 -0400 22022--- linux-2.6.35.7/drivers/ata/pata_sc1200.c 2010-08-26 19:47:12.000000000 -0400
22230+++ linux-2.6.32.24/drivers/ata/pata_sc1200.c 2010-10-23 19:59:19.000000000 -0400 22023+++ linux-2.6.35.7/drivers/ata/pata_sc1200.c 2010-09-17 20:12:09.000000000 -0400
22231@@ -207,7 +207,7 @@ static struct scsi_host_template sc1200_ 22024@@ -207,7 +207,7 @@ static struct scsi_host_template sc1200_
22232 .sg_tablesize = LIBATA_DUMB_MAX_PRD, 22025 .sg_tablesize = LIBATA_DUMB_MAX_PRD,
22233 }; 22026 };
@@ -22235,12 +22028,12 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_sc1200.c linux-2.6.32.24/drivers/ata
22235-static struct ata_port_operations sc1200_port_ops = { 22028-static struct ata_port_operations sc1200_port_ops = {
22236+static const struct ata_port_operations sc1200_port_ops = { 22029+static const struct ata_port_operations sc1200_port_ops = {
22237 .inherits = &ata_bmdma_port_ops, 22030 .inherits = &ata_bmdma_port_ops,
22238 .qc_prep = ata_sff_dumb_qc_prep, 22031 .qc_prep = ata_bmdma_dumb_qc_prep,
22239 .qc_issue = sc1200_qc_issue, 22032 .qc_issue = sc1200_qc_issue,
22240diff -urNp linux-2.6.32.24/drivers/ata/pata_scc.c linux-2.6.32.24/drivers/ata/pata_scc.c 22033diff -urNp linux-2.6.35.7/drivers/ata/pata_scc.c linux-2.6.35.7/drivers/ata/pata_scc.c
22241--- linux-2.6.32.24/drivers/ata/pata_scc.c 2010-08-13 16:24:37.000000000 -0400 22034--- linux-2.6.35.7/drivers/ata/pata_scc.c 2010-08-26 19:47:12.000000000 -0400
22242+++ linux-2.6.32.24/drivers/ata/pata_scc.c 2010-10-23 19:59:19.000000000 -0400 22035+++ linux-2.6.35.7/drivers/ata/pata_scc.c 2010-09-17 20:12:09.000000000 -0400
22243@@ -965,7 +965,7 @@ static struct scsi_host_template scc_sht 22036@@ -927,7 +927,7 @@ static struct scsi_host_template scc_sht
22244 ATA_BMDMA_SHT(DRV_NAME), 22037 ATA_BMDMA_SHT(DRV_NAME),
22245 }; 22038 };
22246 22039
@@ -22249,9 +22042,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_scc.c linux-2.6.32.24/drivers/ata/pa
22249 .inherits = &ata_bmdma_port_ops, 22042 .inherits = &ata_bmdma_port_ops,
22250 22043
22251 .set_piomode = scc_set_piomode, 22044 .set_piomode = scc_set_piomode,
22252diff -urNp linux-2.6.32.24/drivers/ata/pata_sch.c linux-2.6.32.24/drivers/ata/pata_sch.c 22045diff -urNp linux-2.6.35.7/drivers/ata/pata_sch.c linux-2.6.35.7/drivers/ata/pata_sch.c
22253--- linux-2.6.32.24/drivers/ata/pata_sch.c 2010-08-13 16:24:37.000000000 -0400 22046--- linux-2.6.35.7/drivers/ata/pata_sch.c 2010-08-26 19:47:12.000000000 -0400
22254+++ linux-2.6.32.24/drivers/ata/pata_sch.c 2010-10-23 19:59:19.000000000 -0400 22047+++ linux-2.6.35.7/drivers/ata/pata_sch.c 2010-09-17 20:12:09.000000000 -0400
22255@@ -75,7 +75,7 @@ static struct scsi_host_template sch_sht 22048@@ -75,7 +75,7 @@ static struct scsi_host_template sch_sht
22256 ATA_BMDMA_SHT(DRV_NAME), 22049 ATA_BMDMA_SHT(DRV_NAME),
22257 }; 22050 };
@@ -22261,10 +22054,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_sch.c linux-2.6.32.24/drivers/ata/pa
22261 .inherits = &ata_bmdma_port_ops, 22054 .inherits = &ata_bmdma_port_ops,
22262 .cable_detect = ata_cable_unknown, 22055 .cable_detect = ata_cable_unknown,
22263 .set_piomode = sch_set_piomode, 22056 .set_piomode = sch_set_piomode,
22264diff -urNp linux-2.6.32.24/drivers/ata/pata_serverworks.c linux-2.6.32.24/drivers/ata/pata_serverworks.c 22057diff -urNp linux-2.6.35.7/drivers/ata/pata_serverworks.c linux-2.6.35.7/drivers/ata/pata_serverworks.c
22265--- linux-2.6.32.24/drivers/ata/pata_serverworks.c 2010-08-13 16:24:37.000000000 -0400 22058--- linux-2.6.35.7/drivers/ata/pata_serverworks.c 2010-08-26 19:47:12.000000000 -0400
22266+++ linux-2.6.32.24/drivers/ata/pata_serverworks.c 2010-10-23 19:59:19.000000000 -0400 22059+++ linux-2.6.35.7/drivers/ata/pata_serverworks.c 2010-09-17 20:12:09.000000000 -0400
22267@@ -299,7 +299,7 @@ static struct scsi_host_template serverw 22060@@ -300,7 +300,7 @@ static struct scsi_host_template serverw
22268 ATA_BMDMA_SHT(DRV_NAME), 22061 ATA_BMDMA_SHT(DRV_NAME),
22269 }; 22062 };
22270 22063
@@ -22273,7 +22066,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_serverworks.c linux-2.6.32.24/driver
22273 .inherits = &ata_bmdma_port_ops, 22066 .inherits = &ata_bmdma_port_ops,
22274 .cable_detect = serverworks_cable_detect, 22067 .cable_detect = serverworks_cable_detect,
22275 .mode_filter = serverworks_osb4_filter, 22068 .mode_filter = serverworks_osb4_filter,
22276@@ -307,7 +307,7 @@ static struct ata_port_operations server 22069@@ -308,7 +308,7 @@ static struct ata_port_operations server
22277 .set_dmamode = serverworks_set_dmamode, 22070 .set_dmamode = serverworks_set_dmamode,
22278 }; 22071 };
22279 22072
@@ -22282,21 +22075,22 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_serverworks.c linux-2.6.32.24/driver
22282 .inherits = &serverworks_osb4_port_ops, 22075 .inherits = &serverworks_osb4_port_ops,
22283 .mode_filter = serverworks_csb_filter, 22076 .mode_filter = serverworks_csb_filter,
22284 }; 22077 };
22285diff -urNp linux-2.6.32.24/drivers/ata/pata_sil680.c linux-2.6.32.24/drivers/ata/pata_sil680.c 22078diff -urNp linux-2.6.35.7/drivers/ata/pata_sil680.c linux-2.6.35.7/drivers/ata/pata_sil680.c
22286--- linux-2.6.32.24/drivers/ata/pata_sil680.c 2010-08-13 16:24:37.000000000 -0400 22079--- linux-2.6.35.7/drivers/ata/pata_sil680.c 2010-08-26 19:47:12.000000000 -0400
22287+++ linux-2.6.32.24/drivers/ata/pata_sil680.c 2010-10-23 19:59:19.000000000 -0400 22080+++ linux-2.6.35.7/drivers/ata/pata_sil680.c 2010-09-17 20:12:09.000000000 -0400
22288@@ -194,7 +194,7 @@ static struct scsi_host_template sil680_ 22081@@ -214,8 +214,7 @@ static struct scsi_host_template sil680_
22289 ATA_BMDMA_SHT(DRV_NAME), 22082 ATA_BMDMA_SHT(DRV_NAME),
22290 }; 22083 };
22291 22084
22085-
22292-static struct ata_port_operations sil680_port_ops = { 22086-static struct ata_port_operations sil680_port_ops = {
22293+static const struct ata_port_operations sil680_port_ops = { 22087+static const struct ata_port_operations sil680_port_ops = {
22294 .inherits = &ata_bmdma32_port_ops, 22088 .inherits = &ata_bmdma32_port_ops,
22295 .cable_detect = sil680_cable_detect, 22089 .sff_exec_command = sil680_sff_exec_command,
22296 .set_piomode = sil680_set_piomode, 22090 .cable_detect = sil680_cable_detect,
22297diff -urNp linux-2.6.32.24/drivers/ata/pata_sis.c linux-2.6.32.24/drivers/ata/pata_sis.c 22091diff -urNp linux-2.6.35.7/drivers/ata/pata_sis.c linux-2.6.35.7/drivers/ata/pata_sis.c
22298--- linux-2.6.32.24/drivers/ata/pata_sis.c 2010-08-13 16:24:37.000000000 -0400 22092--- linux-2.6.35.7/drivers/ata/pata_sis.c 2010-08-26 19:47:12.000000000 -0400
22299+++ linux-2.6.32.24/drivers/ata/pata_sis.c 2010-10-23 19:59:19.000000000 -0400 22093+++ linux-2.6.35.7/drivers/ata/pata_sis.c 2010-09-17 20:12:09.000000000 -0400
22300@@ -503,47 +503,47 @@ static struct scsi_host_template sis_sht 22094@@ -503,47 +503,47 @@ static struct scsi_host_template sis_sht
22301 ATA_BMDMA_SHT(DRV_NAME), 22095 ATA_BMDMA_SHT(DRV_NAME),
22302 }; 22096 };
@@ -22352,9 +22146,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_sis.c linux-2.6.32.24/drivers/ata/pa
22352 .inherits = &sis_base_ops, 22146 .inherits = &sis_base_ops,
22353 .set_piomode = sis_old_set_piomode, 22147 .set_piomode = sis_old_set_piomode,
22354 .set_dmamode = sis_old_set_dmamode, 22148 .set_dmamode = sis_old_set_dmamode,
22355diff -urNp linux-2.6.32.24/drivers/ata/pata_sl82c105.c linux-2.6.32.24/drivers/ata/pata_sl82c105.c 22149diff -urNp linux-2.6.35.7/drivers/ata/pata_sl82c105.c linux-2.6.35.7/drivers/ata/pata_sl82c105.c
22356--- linux-2.6.32.24/drivers/ata/pata_sl82c105.c 2010-08-13 16:24:37.000000000 -0400 22150--- linux-2.6.35.7/drivers/ata/pata_sl82c105.c 2010-08-26 19:47:12.000000000 -0400
22357+++ linux-2.6.32.24/drivers/ata/pata_sl82c105.c 2010-10-23 19:59:19.000000000 -0400 22151+++ linux-2.6.35.7/drivers/ata/pata_sl82c105.c 2010-09-17 20:12:09.000000000 -0400
22358@@ -231,7 +231,7 @@ static struct scsi_host_template sl82c10 22152@@ -231,7 +231,7 @@ static struct scsi_host_template sl82c10
22359 ATA_BMDMA_SHT(DRV_NAME), 22153 ATA_BMDMA_SHT(DRV_NAME),
22360 }; 22154 };
@@ -22364,9 +22158,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_sl82c105.c linux-2.6.32.24/drivers/a
22364 .inherits = &ata_bmdma_port_ops, 22158 .inherits = &ata_bmdma_port_ops,
22365 .qc_defer = sl82c105_qc_defer, 22159 .qc_defer = sl82c105_qc_defer,
22366 .bmdma_start = sl82c105_bmdma_start, 22160 .bmdma_start = sl82c105_bmdma_start,
22367diff -urNp linux-2.6.32.24/drivers/ata/pata_triflex.c linux-2.6.32.24/drivers/ata/pata_triflex.c 22161diff -urNp linux-2.6.35.7/drivers/ata/pata_triflex.c linux-2.6.35.7/drivers/ata/pata_triflex.c
22368--- linux-2.6.32.24/drivers/ata/pata_triflex.c 2010-08-13 16:24:37.000000000 -0400 22162--- linux-2.6.35.7/drivers/ata/pata_triflex.c 2010-08-26 19:47:12.000000000 -0400
22369+++ linux-2.6.32.24/drivers/ata/pata_triflex.c 2010-10-23 19:59:19.000000000 -0400 22163+++ linux-2.6.35.7/drivers/ata/pata_triflex.c 2010-09-17 20:12:09.000000000 -0400
22370@@ -178,7 +178,7 @@ static struct scsi_host_template triflex 22164@@ -178,7 +178,7 @@ static struct scsi_host_template triflex
22371 ATA_BMDMA_SHT(DRV_NAME), 22165 ATA_BMDMA_SHT(DRV_NAME),
22372 }; 22166 };
@@ -22376,10 +22170,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_triflex.c linux-2.6.32.24/drivers/at
22376 .inherits = &ata_bmdma_port_ops, 22170 .inherits = &ata_bmdma_port_ops,
22377 .bmdma_start = triflex_bmdma_start, 22171 .bmdma_start = triflex_bmdma_start,
22378 .bmdma_stop = triflex_bmdma_stop, 22172 .bmdma_stop = triflex_bmdma_stop,
22379diff -urNp linux-2.6.32.24/drivers/ata/pata_via.c linux-2.6.32.24/drivers/ata/pata_via.c 22173diff -urNp linux-2.6.35.7/drivers/ata/pata_via.c linux-2.6.35.7/drivers/ata/pata_via.c
22380--- linux-2.6.32.24/drivers/ata/pata_via.c 2010-08-13 16:24:37.000000000 -0400 22174--- linux-2.6.35.7/drivers/ata/pata_via.c 2010-09-20 17:33:09.000000000 -0400
22381+++ linux-2.6.32.24/drivers/ata/pata_via.c 2010-10-23 19:59:19.000000000 -0400 22175+++ linux-2.6.35.7/drivers/ata/pata_via.c 2010-09-20 17:33:32.000000000 -0400
22382@@ -419,7 +419,7 @@ static struct scsi_host_template via_sht 22176@@ -441,7 +441,7 @@ static struct scsi_host_template via_sht
22383 ATA_BMDMA_SHT(DRV_NAME), 22177 ATA_BMDMA_SHT(DRV_NAME),
22384 }; 22178 };
22385 22179
@@ -22388,8 +22182,8 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_via.c linux-2.6.32.24/drivers/ata/pa
22388 .inherits = &ata_bmdma_port_ops, 22182 .inherits = &ata_bmdma_port_ops,
22389 .cable_detect = via_cable_detect, 22183 .cable_detect = via_cable_detect,
22390 .set_piomode = via_set_piomode, 22184 .set_piomode = via_set_piomode,
22391@@ -429,7 +429,7 @@ static struct ata_port_operations via_po 22185@@ -452,7 +452,7 @@ static struct ata_port_operations via_po
22392 .port_start = via_port_start, 22186 .mode_filter = via_mode_filter,
22393 }; 22187 };
22394 22188
22395-static struct ata_port_operations via_port_ops_noirq = { 22189-static struct ata_port_operations via_port_ops_noirq = {
@@ -22397,9 +22191,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_via.c linux-2.6.32.24/drivers/ata/pa
22397 .inherits = &via_port_ops, 22191 .inherits = &via_port_ops,
22398 .sff_data_xfer = ata_sff_data_xfer_noirq, 22192 .sff_data_xfer = ata_sff_data_xfer_noirq,
22399 }; 22193 };
22400diff -urNp linux-2.6.32.24/drivers/ata/pata_winbond.c linux-2.6.32.24/drivers/ata/pata_winbond.c 22194diff -urNp linux-2.6.35.7/drivers/ata/pata_winbond.c linux-2.6.35.7/drivers/ata/pata_winbond.c
22401--- linux-2.6.32.24/drivers/ata/pata_winbond.c 2010-08-13 16:24:37.000000000 -0400 22195--- linux-2.6.35.7/drivers/ata/pata_winbond.c 2010-08-26 19:47:12.000000000 -0400
22402+++ linux-2.6.32.24/drivers/ata/pata_winbond.c 2010-10-23 19:59:19.000000000 -0400 22196+++ linux-2.6.35.7/drivers/ata/pata_winbond.c 2010-09-17 20:12:09.000000000 -0400
22403@@ -125,7 +125,7 @@ static struct scsi_host_template winbond 22197@@ -125,7 +125,7 @@ static struct scsi_host_template winbond
22404 ATA_PIO_SHT(DRV_NAME), 22198 ATA_PIO_SHT(DRV_NAME),
22405 }; 22199 };
@@ -22409,10 +22203,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pata_winbond.c linux-2.6.32.24/drivers/at
22409 .inherits = &ata_sff_port_ops, 22203 .inherits = &ata_sff_port_ops,
22410 .sff_data_xfer = winbond_data_xfer, 22204 .sff_data_xfer = winbond_data_xfer,
22411 .cable_detect = ata_cable_40wire, 22205 .cable_detect = ata_cable_40wire,
22412diff -urNp linux-2.6.32.24/drivers/ata/pdc_adma.c linux-2.6.32.24/drivers/ata/pdc_adma.c 22206diff -urNp linux-2.6.35.7/drivers/ata/pdc_adma.c linux-2.6.35.7/drivers/ata/pdc_adma.c
22413--- linux-2.6.32.24/drivers/ata/pdc_adma.c 2010-08-13 16:24:37.000000000 -0400 22207--- linux-2.6.35.7/drivers/ata/pdc_adma.c 2010-08-26 19:47:12.000000000 -0400
22414+++ linux-2.6.32.24/drivers/ata/pdc_adma.c 2010-10-23 19:59:19.000000000 -0400 22208+++ linux-2.6.35.7/drivers/ata/pdc_adma.c 2010-09-17 20:12:09.000000000 -0400
22415@@ -145,7 +145,7 @@ static struct scsi_host_template adma_at 22209@@ -146,7 +146,7 @@ static struct scsi_host_template adma_at
22416 .dma_boundary = ADMA_DMA_BOUNDARY, 22210 .dma_boundary = ADMA_DMA_BOUNDARY,
22417 }; 22211 };
22418 22212
@@ -22421,10 +22215,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/pdc_adma.c linux-2.6.32.24/drivers/ata/pd
22421 .inherits = &ata_sff_port_ops, 22215 .inherits = &ata_sff_port_ops,
22422 22216
22423 .lost_interrupt = ATA_OP_NULL, 22217 .lost_interrupt = ATA_OP_NULL,
22424diff -urNp linux-2.6.32.24/drivers/ata/sata_fsl.c linux-2.6.32.24/drivers/ata/sata_fsl.c 22218diff -urNp linux-2.6.35.7/drivers/ata/sata_fsl.c linux-2.6.35.7/drivers/ata/sata_fsl.c
22425--- linux-2.6.32.24/drivers/ata/sata_fsl.c 2010-08-13 16:24:37.000000000 -0400 22219--- linux-2.6.35.7/drivers/ata/sata_fsl.c 2010-08-26 19:47:12.000000000 -0400
22426+++ linux-2.6.32.24/drivers/ata/sata_fsl.c 2010-10-23 19:59:19.000000000 -0400 22220+++ linux-2.6.35.7/drivers/ata/sata_fsl.c 2010-09-17 20:12:09.000000000 -0400
22427@@ -1258,7 +1258,7 @@ static struct scsi_host_template sata_fs 22221@@ -1261,7 +1261,7 @@ static struct scsi_host_template sata_fs
22428 .dma_boundary = ATA_DMA_BOUNDARY, 22222 .dma_boundary = ATA_DMA_BOUNDARY,
22429 }; 22223 };
22430 22224
@@ -22433,10 +22227,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_fsl.c linux-2.6.32.24/drivers/ata/sa
22433 .inherits = &sata_pmp_port_ops, 22227 .inherits = &sata_pmp_port_ops,
22434 22228
22435 .qc_defer = ata_std_qc_defer, 22229 .qc_defer = ata_std_qc_defer,
22436diff -urNp linux-2.6.32.24/drivers/ata/sata_inic162x.c linux-2.6.32.24/drivers/ata/sata_inic162x.c 22230diff -urNp linux-2.6.35.7/drivers/ata/sata_inic162x.c linux-2.6.35.7/drivers/ata/sata_inic162x.c
22437--- linux-2.6.32.24/drivers/ata/sata_inic162x.c 2010-08-13 16:24:37.000000000 -0400 22231--- linux-2.6.35.7/drivers/ata/sata_inic162x.c 2010-08-26 19:47:12.000000000 -0400
22438+++ linux-2.6.32.24/drivers/ata/sata_inic162x.c 2010-10-23 19:59:19.000000000 -0400 22232+++ linux-2.6.35.7/drivers/ata/sata_inic162x.c 2010-09-17 20:12:09.000000000 -0400
22439@@ -721,7 +721,7 @@ static int inic_port_start(struct ata_po 22233@@ -705,7 +705,7 @@ static int inic_port_start(struct ata_po
22440 return 0; 22234 return 0;
22441 } 22235 }
22442 22236
@@ -22445,10 +22239,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_inic162x.c linux-2.6.32.24/drivers/a
22445 .inherits = &sata_port_ops, 22239 .inherits = &sata_port_ops,
22446 22240
22447 .check_atapi_dma = inic_check_atapi_dma, 22241 .check_atapi_dma = inic_check_atapi_dma,
22448diff -urNp linux-2.6.32.24/drivers/ata/sata_mv.c linux-2.6.32.24/drivers/ata/sata_mv.c 22242diff -urNp linux-2.6.35.7/drivers/ata/sata_mv.c linux-2.6.35.7/drivers/ata/sata_mv.c
22449--- linux-2.6.32.24/drivers/ata/sata_mv.c 2010-09-20 17:26:42.000000000 -0400 22243--- linux-2.6.35.7/drivers/ata/sata_mv.c 2010-09-20 17:33:09.000000000 -0400
22450+++ linux-2.6.32.24/drivers/ata/sata_mv.c 2010-10-23 19:59:19.000000000 -0400 22244+++ linux-2.6.35.7/drivers/ata/sata_mv.c 2010-09-20 17:33:32.000000000 -0400
22451@@ -656,7 +656,7 @@ static struct scsi_host_template mv6_sht 22245@@ -663,7 +663,7 @@ static struct scsi_host_template mv6_sht
22452 .dma_boundary = MV_DMA_BOUNDARY, 22246 .dma_boundary = MV_DMA_BOUNDARY,
22453 }; 22247 };
22454 22248
@@ -22457,17 +22251,17 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_mv.c linux-2.6.32.24/drivers/ata/sat
22457 .inherits = &ata_sff_port_ops, 22251 .inherits = &ata_sff_port_ops,
22458 22252
22459 .lost_interrupt = ATA_OP_NULL, 22253 .lost_interrupt = ATA_OP_NULL,
22460@@ -678,7 +678,7 @@ static struct ata_port_operations mv5_op 22254@@ -683,7 +683,7 @@ static struct ata_port_operations mv5_op
22461 .port_stop = mv_port_stop, 22255 .port_stop = mv_port_stop,
22462 }; 22256 };
22463 22257
22464-static struct ata_port_operations mv6_ops = { 22258-static struct ata_port_operations mv6_ops = {
22465+static const struct ata_port_operations mv6_ops = { 22259+static const struct ata_port_operations mv6_ops = {
22466 .inherits = &mv5_ops, 22260 .inherits = &ata_bmdma_port_ops,
22467 .dev_config = mv6_dev_config, 22261
22468 .scr_read = mv_scr_read, 22262 .lost_interrupt = ATA_OP_NULL,
22469@@ -698,7 +698,7 @@ static struct ata_port_operations mv6_op 22263@@ -717,7 +717,7 @@ static struct ata_port_operations mv6_op
22470 .bmdma_status = mv_bmdma_status, 22264 .port_stop = mv_port_stop,
22471 }; 22265 };
22472 22266
22473-static struct ata_port_operations mv_iie_ops = { 22267-static struct ata_port_operations mv_iie_ops = {
@@ -22475,10 +22269,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_mv.c linux-2.6.32.24/drivers/ata/sat
22475 .inherits = &mv6_ops, 22269 .inherits = &mv6_ops,
22476 .dev_config = ATA_OP_NULL, 22270 .dev_config = ATA_OP_NULL,
22477 .qc_prep = mv_qc_prep_iie, 22271 .qc_prep = mv_qc_prep_iie,
22478diff -urNp linux-2.6.32.24/drivers/ata/sata_nv.c linux-2.6.32.24/drivers/ata/sata_nv.c 22272diff -urNp linux-2.6.35.7/drivers/ata/sata_nv.c linux-2.6.35.7/drivers/ata/sata_nv.c
22479--- linux-2.6.32.24/drivers/ata/sata_nv.c 2010-08-13 16:24:37.000000000 -0400 22273--- linux-2.6.35.7/drivers/ata/sata_nv.c 2010-08-26 19:47:12.000000000 -0400
22480+++ linux-2.6.32.24/drivers/ata/sata_nv.c 2010-10-23 19:59:19.000000000 -0400 22274+++ linux-2.6.35.7/drivers/ata/sata_nv.c 2010-09-17 20:12:09.000000000 -0400
22481@@ -464,7 +464,7 @@ static struct scsi_host_template nv_swnc 22275@@ -465,7 +465,7 @@ static struct scsi_host_template nv_swnc
22482 * cases. Define nv_hardreset() which only kicks in for post-boot 22276 * cases. Define nv_hardreset() which only kicks in for post-boot
22483 * probing and use it for all variants. 22277 * probing and use it for all variants.
22484 */ 22278 */
@@ -22487,7 +22281,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_nv.c linux-2.6.32.24/drivers/ata/sat
22487 .inherits = &ata_bmdma_port_ops, 22281 .inherits = &ata_bmdma_port_ops,
22488 .lost_interrupt = ATA_OP_NULL, 22282 .lost_interrupt = ATA_OP_NULL,
22489 .scr_read = nv_scr_read, 22283 .scr_read = nv_scr_read,
22490@@ -472,20 +472,20 @@ static struct ata_port_operations nv_gen 22284@@ -473,20 +473,20 @@ static struct ata_port_operations nv_gen
22491 .hardreset = nv_hardreset, 22285 .hardreset = nv_hardreset,
22492 }; 22286 };
22493 22287
@@ -22511,7 +22305,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_nv.c linux-2.6.32.24/drivers/ata/sat
22511 .inherits = &nv_ck804_ops, 22305 .inherits = &nv_ck804_ops,
22512 22306
22513 .check_atapi_dma = nv_adma_check_atapi_dma, 22307 .check_atapi_dma = nv_adma_check_atapi_dma,
22514@@ -509,7 +509,7 @@ static struct ata_port_operations nv_adm 22308@@ -510,7 +510,7 @@ static struct ata_port_operations nv_adm
22515 .host_stop = nv_adma_host_stop, 22309 .host_stop = nv_adma_host_stop,
22516 }; 22310 };
22517 22311
@@ -22520,10 +22314,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_nv.c linux-2.6.32.24/drivers/ata/sat
22520 .inherits = &nv_generic_ops, 22314 .inherits = &nv_generic_ops,
22521 22315
22522 .qc_defer = ata_std_qc_defer, 22316 .qc_defer = ata_std_qc_defer,
22523diff -urNp linux-2.6.32.24/drivers/ata/sata_promise.c linux-2.6.32.24/drivers/ata/sata_promise.c 22317diff -urNp linux-2.6.35.7/drivers/ata/sata_promise.c linux-2.6.35.7/drivers/ata/sata_promise.c
22524--- linux-2.6.32.24/drivers/ata/sata_promise.c 2010-08-13 16:24:37.000000000 -0400 22318--- linux-2.6.35.7/drivers/ata/sata_promise.c 2010-08-26 19:47:12.000000000 -0400
22525+++ linux-2.6.32.24/drivers/ata/sata_promise.c 2010-10-23 19:59:19.000000000 -0400 22319+++ linux-2.6.35.7/drivers/ata/sata_promise.c 2010-09-17 20:12:09.000000000 -0400
22526@@ -195,7 +195,7 @@ static const struct ata_port_operations 22320@@ -196,7 +196,7 @@ static const struct ata_port_operations
22527 .error_handler = pdc_error_handler, 22321 .error_handler = pdc_error_handler,
22528 }; 22322 };
22529 22323
@@ -22532,7 +22326,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_promise.c linux-2.6.32.24/drivers/at
22532 .inherits = &pdc_common_ops, 22326 .inherits = &pdc_common_ops,
22533 .cable_detect = pdc_sata_cable_detect, 22327 .cable_detect = pdc_sata_cable_detect,
22534 .freeze = pdc_sata_freeze, 22328 .freeze = pdc_sata_freeze,
22535@@ -208,14 +208,14 @@ static struct ata_port_operations pdc_sa 22329@@ -209,14 +209,14 @@ static struct ata_port_operations pdc_sa
22536 22330
22537 /* First-generation chips need a more restrictive ->check_atapi_dma op, 22331 /* First-generation chips need a more restrictive ->check_atapi_dma op,
22538 and ->freeze/thaw that ignore the hotplug controls. */ 22332 and ->freeze/thaw that ignore the hotplug controls. */
@@ -22549,10 +22343,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_promise.c linux-2.6.32.24/drivers/at
22549 .inherits = &pdc_common_ops, 22343 .inherits = &pdc_common_ops,
22550 .cable_detect = pdc_pata_cable_detect, 22344 .cable_detect = pdc_pata_cable_detect,
22551 .freeze = pdc_freeze, 22345 .freeze = pdc_freeze,
22552diff -urNp linux-2.6.32.24/drivers/ata/sata_qstor.c linux-2.6.32.24/drivers/ata/sata_qstor.c 22346diff -urNp linux-2.6.35.7/drivers/ata/sata_qstor.c linux-2.6.35.7/drivers/ata/sata_qstor.c
22553--- linux-2.6.32.24/drivers/ata/sata_qstor.c 2010-08-13 16:24:37.000000000 -0400 22347--- linux-2.6.35.7/drivers/ata/sata_qstor.c 2010-08-26 19:47:12.000000000 -0400
22554+++ linux-2.6.32.24/drivers/ata/sata_qstor.c 2010-10-23 19:59:19.000000000 -0400 22348+++ linux-2.6.35.7/drivers/ata/sata_qstor.c 2010-09-17 20:12:09.000000000 -0400
22555@@ -132,7 +132,7 @@ static struct scsi_host_template qs_ata_ 22349@@ -131,7 +131,7 @@ static struct scsi_host_template qs_ata_
22556 .dma_boundary = QS_DMA_BOUNDARY, 22350 .dma_boundary = QS_DMA_BOUNDARY,
22557 }; 22351 };
22558 22352
@@ -22561,10 +22355,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_qstor.c linux-2.6.32.24/drivers/ata/
22561 .inherits = &ata_sff_port_ops, 22355 .inherits = &ata_sff_port_ops,
22562 22356
22563 .check_atapi_dma = qs_check_atapi_dma, 22357 .check_atapi_dma = qs_check_atapi_dma,
22564diff -urNp linux-2.6.32.24/drivers/ata/sata_sil24.c linux-2.6.32.24/drivers/ata/sata_sil24.c 22358diff -urNp linux-2.6.35.7/drivers/ata/sata_sil24.c linux-2.6.35.7/drivers/ata/sata_sil24.c
22565--- linux-2.6.32.24/drivers/ata/sata_sil24.c 2010-08-13 16:24:37.000000000 -0400 22359--- linux-2.6.35.7/drivers/ata/sata_sil24.c 2010-08-26 19:47:12.000000000 -0400
22566+++ linux-2.6.32.24/drivers/ata/sata_sil24.c 2010-10-23 19:59:19.000000000 -0400 22360+++ linux-2.6.35.7/drivers/ata/sata_sil24.c 2010-09-17 20:12:09.000000000 -0400
22567@@ -388,7 +388,7 @@ static struct scsi_host_template sil24_s 22361@@ -389,7 +389,7 @@ static struct scsi_host_template sil24_s
22568 .dma_boundary = ATA_DMA_BOUNDARY, 22362 .dma_boundary = ATA_DMA_BOUNDARY,
22569 }; 22363 };
22570 22364
@@ -22573,9 +22367,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_sil24.c linux-2.6.32.24/drivers/ata/
22573 .inherits = &sata_pmp_port_ops, 22367 .inherits = &sata_pmp_port_ops,
22574 22368
22575 .qc_defer = sil24_qc_defer, 22369 .qc_defer = sil24_qc_defer,
22576diff -urNp linux-2.6.32.24/drivers/ata/sata_sil.c linux-2.6.32.24/drivers/ata/sata_sil.c 22370diff -urNp linux-2.6.35.7/drivers/ata/sata_sil.c linux-2.6.35.7/drivers/ata/sata_sil.c
22577--- linux-2.6.32.24/drivers/ata/sata_sil.c 2010-08-13 16:24:37.000000000 -0400 22371--- linux-2.6.35.7/drivers/ata/sata_sil.c 2010-08-26 19:47:12.000000000 -0400
22578+++ linux-2.6.32.24/drivers/ata/sata_sil.c 2010-10-23 19:59:19.000000000 -0400 22372+++ linux-2.6.35.7/drivers/ata/sata_sil.c 2010-09-17 20:12:09.000000000 -0400
22579@@ -182,7 +182,7 @@ static struct scsi_host_template sil_sht 22373@@ -182,7 +182,7 @@ static struct scsi_host_template sil_sht
22580 .sg_tablesize = ATA_MAX_PRD 22374 .sg_tablesize = ATA_MAX_PRD
22581 }; 22375 };
@@ -22585,9 +22379,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_sil.c linux-2.6.32.24/drivers/ata/sa
22585 .inherits = &ata_bmdma32_port_ops, 22379 .inherits = &ata_bmdma32_port_ops,
22586 .dev_config = sil_dev_config, 22380 .dev_config = sil_dev_config,
22587 .set_mode = sil_set_mode, 22381 .set_mode = sil_set_mode,
22588diff -urNp linux-2.6.32.24/drivers/ata/sata_sis.c linux-2.6.32.24/drivers/ata/sata_sis.c 22382diff -urNp linux-2.6.35.7/drivers/ata/sata_sis.c linux-2.6.35.7/drivers/ata/sata_sis.c
22589--- linux-2.6.32.24/drivers/ata/sata_sis.c 2010-08-13 16:24:37.000000000 -0400 22383--- linux-2.6.35.7/drivers/ata/sata_sis.c 2010-08-26 19:47:12.000000000 -0400
22590+++ linux-2.6.32.24/drivers/ata/sata_sis.c 2010-10-23 19:59:19.000000000 -0400 22384+++ linux-2.6.35.7/drivers/ata/sata_sis.c 2010-09-17 20:12:09.000000000 -0400
22591@@ -89,7 +89,7 @@ static struct scsi_host_template sis_sht 22385@@ -89,7 +89,7 @@ static struct scsi_host_template sis_sht
22592 ATA_BMDMA_SHT(DRV_NAME), 22386 ATA_BMDMA_SHT(DRV_NAME),
22593 }; 22387 };
@@ -22597,9 +22391,9 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_sis.c linux-2.6.32.24/drivers/ata/sa
22597 .inherits = &ata_bmdma_port_ops, 22391 .inherits = &ata_bmdma_port_ops,
22598 .scr_read = sis_scr_read, 22392 .scr_read = sis_scr_read,
22599 .scr_write = sis_scr_write, 22393 .scr_write = sis_scr_write,
22600diff -urNp linux-2.6.32.24/drivers/ata/sata_svw.c linux-2.6.32.24/drivers/ata/sata_svw.c 22394diff -urNp linux-2.6.35.7/drivers/ata/sata_svw.c linux-2.6.35.7/drivers/ata/sata_svw.c
22601--- linux-2.6.32.24/drivers/ata/sata_svw.c 2010-08-13 16:24:37.000000000 -0400 22395--- linux-2.6.35.7/drivers/ata/sata_svw.c 2010-08-26 19:47:12.000000000 -0400
22602+++ linux-2.6.32.24/drivers/ata/sata_svw.c 2010-10-23 19:59:19.000000000 -0400 22396+++ linux-2.6.35.7/drivers/ata/sata_svw.c 2010-09-17 20:12:09.000000000 -0400
22603@@ -344,7 +344,7 @@ static struct scsi_host_template k2_sata 22397@@ -344,7 +344,7 @@ static struct scsi_host_template k2_sata
22604 }; 22398 };
22605 22399
@@ -22609,10 +22403,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_svw.c linux-2.6.32.24/drivers/ata/sa
22609 .inherits = &ata_bmdma_port_ops, 22403 .inherits = &ata_bmdma_port_ops,
22610 .sff_tf_load = k2_sata_tf_load, 22404 .sff_tf_load = k2_sata_tf_load,
22611 .sff_tf_read = k2_sata_tf_read, 22405 .sff_tf_read = k2_sata_tf_read,
22612diff -urNp linux-2.6.32.24/drivers/ata/sata_sx4.c linux-2.6.32.24/drivers/ata/sata_sx4.c 22406diff -urNp linux-2.6.35.7/drivers/ata/sata_sx4.c linux-2.6.35.7/drivers/ata/sata_sx4.c
22613--- linux-2.6.32.24/drivers/ata/sata_sx4.c 2010-08-13 16:24:37.000000000 -0400 22407--- linux-2.6.35.7/drivers/ata/sata_sx4.c 2010-08-26 19:47:12.000000000 -0400
22614+++ linux-2.6.32.24/drivers/ata/sata_sx4.c 2010-10-23 19:59:19.000000000 -0400 22408+++ linux-2.6.35.7/drivers/ata/sata_sx4.c 2010-09-17 20:12:09.000000000 -0400
22615@@ -248,7 +248,7 @@ static struct scsi_host_template pdc_sat 22409@@ -249,7 +249,7 @@ static struct scsi_host_template pdc_sat
22616 }; 22410 };
22617 22411
22618 /* TODO: inherit from base port_ops after converting to new EH */ 22412 /* TODO: inherit from base port_ops after converting to new EH */
@@ -22621,10 +22415,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_sx4.c linux-2.6.32.24/drivers/ata/sa
22621 .inherits = &ata_sff_port_ops, 22415 .inherits = &ata_sff_port_ops,
22622 22416
22623 .check_atapi_dma = pdc_check_atapi_dma, 22417 .check_atapi_dma = pdc_check_atapi_dma,
22624diff -urNp linux-2.6.32.24/drivers/ata/sata_uli.c linux-2.6.32.24/drivers/ata/sata_uli.c 22418diff -urNp linux-2.6.35.7/drivers/ata/sata_uli.c linux-2.6.35.7/drivers/ata/sata_uli.c
22625--- linux-2.6.32.24/drivers/ata/sata_uli.c 2010-08-13 16:24:37.000000000 -0400 22419--- linux-2.6.35.7/drivers/ata/sata_uli.c 2010-08-26 19:47:12.000000000 -0400
22626+++ linux-2.6.32.24/drivers/ata/sata_uli.c 2010-10-23 19:59:19.000000000 -0400 22420+++ linux-2.6.35.7/drivers/ata/sata_uli.c 2010-09-17 20:12:09.000000000 -0400
22627@@ -79,7 +79,7 @@ static struct scsi_host_template uli_sht 22421@@ -80,7 +80,7 @@ static struct scsi_host_template uli_sht
22628 ATA_BMDMA_SHT(DRV_NAME), 22422 ATA_BMDMA_SHT(DRV_NAME),
22629 }; 22423 };
22630 22424
@@ -22633,10 +22427,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_uli.c linux-2.6.32.24/drivers/ata/sa
22633 .inherits = &ata_bmdma_port_ops, 22427 .inherits = &ata_bmdma_port_ops,
22634 .scr_read = uli_scr_read, 22428 .scr_read = uli_scr_read,
22635 .scr_write = uli_scr_write, 22429 .scr_write = uli_scr_write,
22636diff -urNp linux-2.6.32.24/drivers/ata/sata_via.c linux-2.6.32.24/drivers/ata/sata_via.c 22430diff -urNp linux-2.6.35.7/drivers/ata/sata_via.c linux-2.6.35.7/drivers/ata/sata_via.c
22637--- linux-2.6.32.24/drivers/ata/sata_via.c 2010-08-13 16:24:37.000000000 -0400 22431--- linux-2.6.35.7/drivers/ata/sata_via.c 2010-08-26 19:47:12.000000000 -0400
22638+++ linux-2.6.32.24/drivers/ata/sata_via.c 2010-10-23 19:59:19.000000000 -0400 22432+++ linux-2.6.35.7/drivers/ata/sata_via.c 2010-09-17 20:12:09.000000000 -0400
22639@@ -112,31 +112,31 @@ static struct scsi_host_template svia_sh 22433@@ -115,32 +115,32 @@ static struct scsi_host_template svia_sh
22640 ATA_BMDMA_SHT(DRV_NAME), 22434 ATA_BMDMA_SHT(DRV_NAME),
22641 }; 22435 };
22642 22436
@@ -22651,6 +22445,7 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_via.c linux-2.6.32.24/drivers/ata/sa
22651 .inherits = &svia_base_ops, 22445 .inherits = &svia_base_ops,
22652 .freeze = svia_noop_freeze, 22446 .freeze = svia_noop_freeze,
22653 .prereset = vt6420_prereset, 22447 .prereset = vt6420_prereset,
22448 .bmdma_start = vt6420_bmdma_start,
22654 }; 22449 };
22655 22450
22656-static struct ata_port_operations vt6421_pata_ops = { 22451-static struct ata_port_operations vt6421_pata_ops = {
@@ -22673,10 +22468,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_via.c linux-2.6.32.24/drivers/ata/sa
22673 .inherits = &svia_base_ops, 22468 .inherits = &svia_base_ops,
22674 .hardreset = sata_std_hardreset, 22469 .hardreset = sata_std_hardreset,
22675 .scr_read = vt8251_scr_read, 22470 .scr_read = vt8251_scr_read,
22676diff -urNp linux-2.6.32.24/drivers/ata/sata_vsc.c linux-2.6.32.24/drivers/ata/sata_vsc.c 22471diff -urNp linux-2.6.35.7/drivers/ata/sata_vsc.c linux-2.6.35.7/drivers/ata/sata_vsc.c
22677--- linux-2.6.32.24/drivers/ata/sata_vsc.c 2010-08-13 16:24:37.000000000 -0400 22472--- linux-2.6.35.7/drivers/ata/sata_vsc.c 2010-08-26 19:47:12.000000000 -0400
22678+++ linux-2.6.32.24/drivers/ata/sata_vsc.c 2010-10-23 19:59:19.000000000 -0400 22473+++ linux-2.6.35.7/drivers/ata/sata_vsc.c 2010-09-17 20:12:09.000000000 -0400
22679@@ -306,7 +306,7 @@ static struct scsi_host_template vsc_sat 22474@@ -300,7 +300,7 @@ static struct scsi_host_template vsc_sat
22680 }; 22475 };
22681 22476
22682 22477
@@ -22685,10 +22480,10 @@ diff -urNp linux-2.6.32.24/drivers/ata/sata_vsc.c linux-2.6.32.24/drivers/ata/sa
22685 .inherits = &ata_bmdma_port_ops, 22480 .inherits = &ata_bmdma_port_ops,
22686 /* The IRQ handling is not quite standard SFF behaviour so we 22481 /* The IRQ handling is not quite standard SFF behaviour so we
22687 cannot use the default lost interrupt handler */ 22482 cannot use the default lost interrupt handler */
22688diff -urNp linux-2.6.32.24/drivers/atm/adummy.c linux-2.6.32.24/drivers/atm/adummy.c 22483diff -urNp linux-2.6.35.7/drivers/atm/adummy.c linux-2.6.35.7/drivers/atm/adummy.c
22689--- linux-2.6.32.24/drivers/atm/adummy.c 2010-08-13 16:24:37.000000000 -0400 22484--- linux-2.6.35.7/drivers/atm/adummy.c 2010-08-26 19:47:12.000000000 -0400
22690+++ linux-2.6.32.24/drivers/atm/adummy.c 2010-10-23 19:59:19.000000000 -0400 22485+++ linux-2.6.35.7/drivers/atm/adummy.c 2010-09-17 20:12:09.000000000 -0400
22691@@ -77,7 +77,7 @@ adummy_send(struct atm_vcc *vcc, struct 22486@@ -78,7 +78,7 @@ adummy_send(struct atm_vcc *vcc, struct
22692 vcc->pop(vcc, skb); 22487 vcc->pop(vcc, skb);
22693 else 22488 else
22694 dev_kfree_skb_any(skb); 22489 dev_kfree_skb_any(skb);
@@ -22697,10 +22492,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/adummy.c linux-2.6.32.24/drivers/atm/adum
22697 22492
22698 return 0; 22493 return 0;
22699 } 22494 }
22700diff -urNp linux-2.6.32.24/drivers/atm/ambassador.c linux-2.6.32.24/drivers/atm/ambassador.c 22495diff -urNp linux-2.6.35.7/drivers/atm/ambassador.c linux-2.6.35.7/drivers/atm/ambassador.c
22701--- linux-2.6.32.24/drivers/atm/ambassador.c 2010-08-13 16:24:37.000000000 -0400 22496--- linux-2.6.35.7/drivers/atm/ambassador.c 2010-08-26 19:47:12.000000000 -0400
22702+++ linux-2.6.32.24/drivers/atm/ambassador.c 2010-10-23 19:59:19.000000000 -0400 22497+++ linux-2.6.35.7/drivers/atm/ambassador.c 2010-09-17 20:12:09.000000000 -0400
22703@@ -453,7 +453,7 @@ static void tx_complete (amb_dev * dev, 22498@@ -454,7 +454,7 @@ static void tx_complete (amb_dev * dev,
22704 PRINTD (DBG_FLOW|DBG_TX, "tx_complete %p %p", dev, tx); 22499 PRINTD (DBG_FLOW|DBG_TX, "tx_complete %p %p", dev, tx);
22705 22500
22706 // VC layer stats 22501 // VC layer stats
@@ -22709,7 +22504,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/ambassador.c linux-2.6.32.24/drivers/atm/
22709 22504
22710 // free the descriptor 22505 // free the descriptor
22711 kfree (tx_descr); 22506 kfree (tx_descr);
22712@@ -494,7 +494,7 @@ static void rx_complete (amb_dev * dev, 22507@@ -495,7 +495,7 @@ static void rx_complete (amb_dev * dev,
22713 dump_skb ("<<<", vc, skb); 22508 dump_skb ("<<<", vc, skb);
22714 22509
22715 // VC layer stats 22510 // VC layer stats
@@ -22718,7 +22513,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/ambassador.c linux-2.6.32.24/drivers/atm/
22718 __net_timestamp(skb); 22513 __net_timestamp(skb);
22719 // end of our responsability 22514 // end of our responsability
22720 atm_vcc->push (atm_vcc, skb); 22515 atm_vcc->push (atm_vcc, skb);
22721@@ -509,7 +509,7 @@ static void rx_complete (amb_dev * dev, 22516@@ -510,7 +510,7 @@ static void rx_complete (amb_dev * dev,
22722 } else { 22517 } else {
22723 PRINTK (KERN_INFO, "dropped over-size frame"); 22518 PRINTK (KERN_INFO, "dropped over-size frame");
22724 // should we count this? 22519 // should we count this?
@@ -22727,7 +22522,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/ambassador.c linux-2.6.32.24/drivers/atm/
22727 } 22522 }
22728 22523
22729 } else { 22524 } else {
22730@@ -1341,7 +1341,7 @@ static int amb_send (struct atm_vcc * at 22525@@ -1342,7 +1342,7 @@ static int amb_send (struct atm_vcc * at
22731 } 22526 }
22732 22527
22733 if (check_area (skb->data, skb->len)) { 22528 if (check_area (skb->data, skb->len)) {
@@ -22736,10 +22531,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/ambassador.c linux-2.6.32.24/drivers/atm/
22736 return -ENOMEM; // ? 22531 return -ENOMEM; // ?
22737 } 22532 }
22738 22533
22739diff -urNp linux-2.6.32.24/drivers/atm/atmtcp.c linux-2.6.32.24/drivers/atm/atmtcp.c 22534diff -urNp linux-2.6.35.7/drivers/atm/atmtcp.c linux-2.6.35.7/drivers/atm/atmtcp.c
22740--- linux-2.6.32.24/drivers/atm/atmtcp.c 2010-08-13 16:24:37.000000000 -0400 22535--- linux-2.6.35.7/drivers/atm/atmtcp.c 2010-08-26 19:47:12.000000000 -0400
22741+++ linux-2.6.32.24/drivers/atm/atmtcp.c 2010-10-23 19:59:19.000000000 -0400 22536+++ linux-2.6.35.7/drivers/atm/atmtcp.c 2010-09-17 20:12:09.000000000 -0400
22742@@ -206,7 +206,7 @@ static int atmtcp_v_send(struct atm_vcc 22537@@ -207,7 +207,7 @@ static int atmtcp_v_send(struct atm_vcc
22743 if (vcc->pop) vcc->pop(vcc,skb); 22538 if (vcc->pop) vcc->pop(vcc,skb);
22744 else dev_kfree_skb(skb); 22539 else dev_kfree_skb(skb);
22745 if (dev_data) return 0; 22540 if (dev_data) return 0;
@@ -22748,7 +22543,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/atmtcp.c linux-2.6.32.24/drivers/atm/atmt
22748 return -ENOLINK; 22543 return -ENOLINK;
22749 } 22544 }
22750 size = skb->len+sizeof(struct atmtcp_hdr); 22545 size = skb->len+sizeof(struct atmtcp_hdr);
22751@@ -214,7 +214,7 @@ static int atmtcp_v_send(struct atm_vcc 22546@@ -215,7 +215,7 @@ static int atmtcp_v_send(struct atm_vcc
22752 if (!new_skb) { 22547 if (!new_skb) {
22753 if (vcc->pop) vcc->pop(vcc,skb); 22548 if (vcc->pop) vcc->pop(vcc,skb);
22754 else dev_kfree_skb(skb); 22549 else dev_kfree_skb(skb);
@@ -22757,7 +22552,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/atmtcp.c linux-2.6.32.24/drivers/atm/atmt
22757 return -ENOBUFS; 22552 return -ENOBUFS;
22758 } 22553 }
22759 hdr = (void *) skb_put(new_skb,sizeof(struct atmtcp_hdr)); 22554 hdr = (void *) skb_put(new_skb,sizeof(struct atmtcp_hdr));
22760@@ -225,8 +225,8 @@ static int atmtcp_v_send(struct atm_vcc 22555@@ -226,8 +226,8 @@ static int atmtcp_v_send(struct atm_vcc
22761 if (vcc->pop) vcc->pop(vcc,skb); 22556 if (vcc->pop) vcc->pop(vcc,skb);
22762 else dev_kfree_skb(skb); 22557 else dev_kfree_skb(skb);
22763 out_vcc->push(out_vcc,new_skb); 22558 out_vcc->push(out_vcc,new_skb);
@@ -22768,7 +22563,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/atmtcp.c linux-2.6.32.24/drivers/atm/atmt
22768 return 0; 22563 return 0;
22769 } 22564 }
22770 22565
22771@@ -300,7 +300,7 @@ static int atmtcp_c_send(struct atm_vcc 22566@@ -301,7 +301,7 @@ static int atmtcp_c_send(struct atm_vcc
22772 out_vcc = find_vcc(dev, ntohs(hdr->vpi), ntohs(hdr->vci)); 22567 out_vcc = find_vcc(dev, ntohs(hdr->vpi), ntohs(hdr->vci));
22773 read_unlock(&vcc_sklist_lock); 22568 read_unlock(&vcc_sklist_lock);
22774 if (!out_vcc) { 22569 if (!out_vcc) {
@@ -22777,7 +22572,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/atmtcp.c linux-2.6.32.24/drivers/atm/atmt
22777 goto done; 22572 goto done;
22778 } 22573 }
22779 skb_pull(skb,sizeof(struct atmtcp_hdr)); 22574 skb_pull(skb,sizeof(struct atmtcp_hdr));
22780@@ -312,8 +312,8 @@ static int atmtcp_c_send(struct atm_vcc 22575@@ -313,8 +313,8 @@ static int atmtcp_c_send(struct atm_vcc
22781 __net_timestamp(new_skb); 22576 __net_timestamp(new_skb);
22782 skb_copy_from_linear_data(skb, skb_put(new_skb, skb->len), skb->len); 22577 skb_copy_from_linear_data(skb, skb_put(new_skb, skb->len), skb->len);
22783 out_vcc->push(out_vcc,new_skb); 22578 out_vcc->push(out_vcc,new_skb);
@@ -22788,10 +22583,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/atmtcp.c linux-2.6.32.24/drivers/atm/atmt
22788 done: 22583 done:
22789 if (vcc->pop) vcc->pop(vcc,skb); 22584 if (vcc->pop) vcc->pop(vcc,skb);
22790 else dev_kfree_skb(skb); 22585 else dev_kfree_skb(skb);
22791diff -urNp linux-2.6.32.24/drivers/atm/eni.c linux-2.6.32.24/drivers/atm/eni.c 22586diff -urNp linux-2.6.35.7/drivers/atm/eni.c linux-2.6.35.7/drivers/atm/eni.c
22792--- linux-2.6.32.24/drivers/atm/eni.c 2010-08-13 16:24:37.000000000 -0400 22587--- linux-2.6.35.7/drivers/atm/eni.c 2010-08-26 19:47:12.000000000 -0400
22793+++ linux-2.6.32.24/drivers/atm/eni.c 2010-10-23 19:59:19.000000000 -0400 22588+++ linux-2.6.35.7/drivers/atm/eni.c 2010-09-17 20:12:09.000000000 -0400
22794@@ -525,7 +525,7 @@ static int rx_aal0(struct atm_vcc *vcc) 22589@@ -526,7 +526,7 @@ static int rx_aal0(struct atm_vcc *vcc)
22795 DPRINTK(DEV_LABEL "(itf %d): trashing empty cell\n", 22590 DPRINTK(DEV_LABEL "(itf %d): trashing empty cell\n",
22796 vcc->dev->number); 22591 vcc->dev->number);
22797 length = 0; 22592 length = 0;
@@ -22800,7 +22595,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/eni.c linux-2.6.32.24/drivers/atm/eni.c
22800 } 22595 }
22801 else { 22596 else {
22802 length = ATM_CELL_SIZE-1; /* no HEC */ 22597 length = ATM_CELL_SIZE-1; /* no HEC */
22803@@ -580,7 +580,7 @@ static int rx_aal5(struct atm_vcc *vcc) 22598@@ -581,7 +581,7 @@ static int rx_aal5(struct atm_vcc *vcc)
22804 size); 22599 size);
22805 } 22600 }
22806 eff = length = 0; 22601 eff = length = 0;
@@ -22809,7 +22604,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/eni.c linux-2.6.32.24/drivers/atm/eni.c
22809 } 22604 }
22810 else { 22605 else {
22811 size = (descr & MID_RED_COUNT)*(ATM_CELL_PAYLOAD >> 2); 22606 size = (descr & MID_RED_COUNT)*(ATM_CELL_PAYLOAD >> 2);
22812@@ -597,7 +597,7 @@ static int rx_aal5(struct atm_vcc *vcc) 22607@@ -598,7 +598,7 @@ static int rx_aal5(struct atm_vcc *vcc)
22813 "(VCI=%d,length=%ld,size=%ld (descr 0x%lx))\n", 22608 "(VCI=%d,length=%ld,size=%ld (descr 0x%lx))\n",
22814 vcc->dev->number,vcc->vci,length,size << 2,descr); 22609 vcc->dev->number,vcc->vci,length,size << 2,descr);
22815 length = eff = 0; 22610 length = eff = 0;
@@ -22818,7 +22613,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/eni.c linux-2.6.32.24/drivers/atm/eni.c
22818 } 22613 }
22819 } 22614 }
22820 skb = eff ? atm_alloc_charge(vcc,eff << 2,GFP_ATOMIC) : NULL; 22615 skb = eff ? atm_alloc_charge(vcc,eff << 2,GFP_ATOMIC) : NULL;
22821@@ -770,7 +770,7 @@ rx_dequeued++; 22616@@ -771,7 +771,7 @@ rx_dequeued++;
22822 vcc->push(vcc,skb); 22617 vcc->push(vcc,skb);
22823 pushed++; 22618 pushed++;
22824 } 22619 }
@@ -22827,7 +22622,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/eni.c linux-2.6.32.24/drivers/atm/eni.c
22827 } 22622 }
22828 wake_up(&eni_dev->rx_wait); 22623 wake_up(&eni_dev->rx_wait);
22829 } 22624 }
22830@@ -1227,7 +1227,7 @@ static void dequeue_tx(struct atm_dev *d 22625@@ -1228,7 +1228,7 @@ static void dequeue_tx(struct atm_dev *d
22831 PCI_DMA_TODEVICE); 22626 PCI_DMA_TODEVICE);
22832 if (vcc->pop) vcc->pop(vcc,skb); 22627 if (vcc->pop) vcc->pop(vcc,skb);
22833 else dev_kfree_skb_irq(skb); 22628 else dev_kfree_skb_irq(skb);
@@ -22836,10 +22631,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/eni.c linux-2.6.32.24/drivers/atm/eni.c
22836 wake_up(&eni_dev->tx_wait); 22631 wake_up(&eni_dev->tx_wait);
22837 dma_complete++; 22632 dma_complete++;
22838 } 22633 }
22839diff -urNp linux-2.6.32.24/drivers/atm/firestream.c linux-2.6.32.24/drivers/atm/firestream.c 22634diff -urNp linux-2.6.35.7/drivers/atm/firestream.c linux-2.6.35.7/drivers/atm/firestream.c
22840--- linux-2.6.32.24/drivers/atm/firestream.c 2010-08-13 16:24:37.000000000 -0400 22635--- linux-2.6.35.7/drivers/atm/firestream.c 2010-08-26 19:47:12.000000000 -0400
22841+++ linux-2.6.32.24/drivers/atm/firestream.c 2010-10-23 19:59:19.000000000 -0400 22636+++ linux-2.6.35.7/drivers/atm/firestream.c 2010-09-17 20:12:09.000000000 -0400
22842@@ -748,7 +748,7 @@ static void process_txdone_queue (struct 22637@@ -749,7 +749,7 @@ static void process_txdone_queue (struct
22843 } 22638 }
22844 } 22639 }
22845 22640
@@ -22848,7 +22643,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/firestream.c linux-2.6.32.24/drivers/atm/
22848 22643
22849 fs_dprintk (FS_DEBUG_TXMEM, "i"); 22644 fs_dprintk (FS_DEBUG_TXMEM, "i");
22850 fs_dprintk (FS_DEBUG_ALLOC, "Free t-skb: %p\n", skb); 22645 fs_dprintk (FS_DEBUG_ALLOC, "Free t-skb: %p\n", skb);
22851@@ -815,7 +815,7 @@ static void process_incoming (struct fs_ 22646@@ -816,7 +816,7 @@ static void process_incoming (struct fs_
22852 #endif 22647 #endif
22853 skb_put (skb, qe->p1 & 0xffff); 22648 skb_put (skb, qe->p1 & 0xffff);
22854 ATM_SKB(skb)->vcc = atm_vcc; 22649 ATM_SKB(skb)->vcc = atm_vcc;
@@ -22857,7 +22652,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/firestream.c linux-2.6.32.24/drivers/atm/
22857 __net_timestamp(skb); 22652 __net_timestamp(skb);
22858 fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p (pushed)\n", skb); 22653 fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p (pushed)\n", skb);
22859 atm_vcc->push (atm_vcc, skb); 22654 atm_vcc->push (atm_vcc, skb);
22860@@ -836,12 +836,12 @@ static void process_incoming (struct fs_ 22655@@ -837,12 +837,12 @@ static void process_incoming (struct fs_
22861 kfree (pe); 22656 kfree (pe);
22862 } 22657 }
22863 if (atm_vcc) 22658 if (atm_vcc)
@@ -22872,10 +22667,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/firestream.c linux-2.6.32.24/drivers/atm/
22872 break; 22667 break;
22873 default: /* Hmm. Haven't written the code to handle the others yet... -- REW */ 22668 default: /* Hmm. Haven't written the code to handle the others yet... -- REW */
22874 printk (KERN_WARNING "Don't know what to do with RX status %x: %s.\n", 22669 printk (KERN_WARNING "Don't know what to do with RX status %x: %s.\n",
22875diff -urNp linux-2.6.32.24/drivers/atm/fore200e.c linux-2.6.32.24/drivers/atm/fore200e.c 22670diff -urNp linux-2.6.35.7/drivers/atm/fore200e.c linux-2.6.35.7/drivers/atm/fore200e.c
22876--- linux-2.6.32.24/drivers/atm/fore200e.c 2010-08-13 16:24:37.000000000 -0400 22671--- linux-2.6.35.7/drivers/atm/fore200e.c 2010-08-26 19:47:12.000000000 -0400
22877+++ linux-2.6.32.24/drivers/atm/fore200e.c 2010-10-23 19:59:19.000000000 -0400 22672+++ linux-2.6.35.7/drivers/atm/fore200e.c 2010-09-17 20:12:09.000000000 -0400
22878@@ -931,9 +931,9 @@ fore200e_tx_irq(struct fore200e* fore200 22673@@ -933,9 +933,9 @@ fore200e_tx_irq(struct fore200e* fore200
22879 #endif 22674 #endif
22880 /* check error condition */ 22675 /* check error condition */
22881 if (*entry->status & STATUS_ERROR) 22676 if (*entry->status & STATUS_ERROR)
@@ -22887,7 +22682,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/fore200e.c linux-2.6.32.24/drivers/atm/fo
22887 } 22682 }
22888 } 22683 }
22889 22684
22890@@ -1082,7 +1082,7 @@ fore200e_push_rpd(struct fore200e* fore2 22685@@ -1084,7 +1084,7 @@ fore200e_push_rpd(struct fore200e* fore2
22891 if (skb == NULL) { 22686 if (skb == NULL) {
22892 DPRINTK(2, "unable to alloc new skb, rx PDU length = %d\n", pdu_len); 22687 DPRINTK(2, "unable to alloc new skb, rx PDU length = %d\n", pdu_len);
22893 22688
@@ -22896,7 +22691,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/fore200e.c linux-2.6.32.24/drivers/atm/fo
22896 return -ENOMEM; 22691 return -ENOMEM;
22897 } 22692 }
22898 22693
22899@@ -1125,14 +1125,14 @@ fore200e_push_rpd(struct fore200e* fore2 22694@@ -1127,14 +1127,14 @@ fore200e_push_rpd(struct fore200e* fore2
22900 22695
22901 dev_kfree_skb_any(skb); 22696 dev_kfree_skb_any(skb);
22902 22697
@@ -22913,7 +22708,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/fore200e.c linux-2.6.32.24/drivers/atm/fo
22913 22708
22914 ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0); 22709 ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0);
22915 22710
22916@@ -1210,7 +1210,7 @@ fore200e_rx_irq(struct fore200e* fore200 22711@@ -1212,7 +1212,7 @@ fore200e_rx_irq(struct fore200e* fore200
22917 DPRINTK(2, "damaged PDU on %d.%d.%d\n", 22712 DPRINTK(2, "damaged PDU on %d.%d.%d\n",
22918 fore200e->atm_dev->number, 22713 fore200e->atm_dev->number,
22919 entry->rpd->atm_header.vpi, entry->rpd->atm_header.vci); 22714 entry->rpd->atm_header.vpi, entry->rpd->atm_header.vci);
@@ -22922,7 +22717,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/fore200e.c linux-2.6.32.24/drivers/atm/fo
22922 } 22717 }
22923 } 22718 }
22924 22719
22925@@ -1655,7 +1655,7 @@ fore200e_send(struct atm_vcc *vcc, struc 22720@@ -1657,7 +1657,7 @@ fore200e_send(struct atm_vcc *vcc, struc
22926 goto retry_here; 22721 goto retry_here;
22927 } 22722 }
22928 22723
@@ -22931,10 +22726,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/fore200e.c linux-2.6.32.24/drivers/atm/fo
22931 22726
22932 fore200e->tx_sat++; 22727 fore200e->tx_sat++;
22933 DPRINTK(2, "tx queue of device %s is saturated, PDU dropped - heartbeat is %08x\n", 22728 DPRINTK(2, "tx queue of device %s is saturated, PDU dropped - heartbeat is %08x\n",
22934diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c 22729diff -urNp linux-2.6.35.7/drivers/atm/he.c linux-2.6.35.7/drivers/atm/he.c
22935--- linux-2.6.32.24/drivers/atm/he.c 2010-08-13 16:24:37.000000000 -0400 22730--- linux-2.6.35.7/drivers/atm/he.c 2010-08-26 19:47:12.000000000 -0400
22936+++ linux-2.6.32.24/drivers/atm/he.c 2010-10-23 19:59:19.000000000 -0400 22731+++ linux-2.6.35.7/drivers/atm/he.c 2010-09-17 20:12:09.000000000 -0400
22937@@ -1769,7 +1769,7 @@ he_service_rbrq(struct he_dev *he_dev, i 22732@@ -1770,7 +1770,7 @@ he_service_rbrq(struct he_dev *he_dev, i
22938 22733
22939 if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) { 22734 if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
22940 hprintk("HBUF_ERR! (cid 0x%x)\n", cid); 22735 hprintk("HBUF_ERR! (cid 0x%x)\n", cid);
@@ -22943,7 +22738,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
22943 goto return_host_buffers; 22738 goto return_host_buffers;
22944 } 22739 }
22945 22740
22946@@ -1802,7 +1802,7 @@ he_service_rbrq(struct he_dev *he_dev, i 22741@@ -1803,7 +1803,7 @@ he_service_rbrq(struct he_dev *he_dev, i
22947 RBRQ_LEN_ERR(he_dev->rbrq_head) 22742 RBRQ_LEN_ERR(he_dev->rbrq_head)
22948 ? "LEN_ERR" : "", 22743 ? "LEN_ERR" : "",
22949 vcc->vpi, vcc->vci); 22744 vcc->vpi, vcc->vci);
@@ -22952,7 +22747,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
22952 goto return_host_buffers; 22747 goto return_host_buffers;
22953 } 22748 }
22954 22749
22955@@ -1861,7 +1861,7 @@ he_service_rbrq(struct he_dev *he_dev, i 22750@@ -1862,7 +1862,7 @@ he_service_rbrq(struct he_dev *he_dev, i
22956 vcc->push(vcc, skb); 22751 vcc->push(vcc, skb);
22957 spin_lock(&he_dev->global_lock); 22752 spin_lock(&he_dev->global_lock);
22958 22753
@@ -22961,7 +22756,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
22961 22756
22962 return_host_buffers: 22757 return_host_buffers:
22963 ++pdus_assembled; 22758 ++pdus_assembled;
22964@@ -2206,7 +2206,7 @@ __enqueue_tpd(struct he_dev *he_dev, str 22759@@ -2207,7 +2207,7 @@ __enqueue_tpd(struct he_dev *he_dev, str
22965 tpd->vcc->pop(tpd->vcc, tpd->skb); 22760 tpd->vcc->pop(tpd->vcc, tpd->skb);
22966 else 22761 else
22967 dev_kfree_skb_any(tpd->skb); 22762 dev_kfree_skb_any(tpd->skb);
@@ -22970,7 +22765,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
22970 } 22765 }
22971 pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status)); 22766 pci_pool_free(he_dev->tpd_pool, tpd, TPD_ADDR(tpd->status));
22972 return; 22767 return;
22973@@ -2618,7 +2618,7 @@ he_send(struct atm_vcc *vcc, struct sk_b 22768@@ -2619,7 +2619,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
22974 vcc->pop(vcc, skb); 22769 vcc->pop(vcc, skb);
22975 else 22770 else
22976 dev_kfree_skb_any(skb); 22771 dev_kfree_skb_any(skb);
@@ -22979,7 +22774,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
22979 return -EINVAL; 22774 return -EINVAL;
22980 } 22775 }
22981 22776
22982@@ -2629,7 +2629,7 @@ he_send(struct atm_vcc *vcc, struct sk_b 22777@@ -2630,7 +2630,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
22983 vcc->pop(vcc, skb); 22778 vcc->pop(vcc, skb);
22984 else 22779 else
22985 dev_kfree_skb_any(skb); 22780 dev_kfree_skb_any(skb);
@@ -22988,7 +22783,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
22988 return -EINVAL; 22783 return -EINVAL;
22989 } 22784 }
22990 #endif 22785 #endif
22991@@ -2641,7 +2641,7 @@ he_send(struct atm_vcc *vcc, struct sk_b 22786@@ -2642,7 +2642,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
22992 vcc->pop(vcc, skb); 22787 vcc->pop(vcc, skb);
22993 else 22788 else
22994 dev_kfree_skb_any(skb); 22789 dev_kfree_skb_any(skb);
@@ -22997,7 +22792,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
22997 spin_unlock_irqrestore(&he_dev->global_lock, flags); 22792 spin_unlock_irqrestore(&he_dev->global_lock, flags);
22998 return -ENOMEM; 22793 return -ENOMEM;
22999 } 22794 }
23000@@ -2683,7 +2683,7 @@ he_send(struct atm_vcc *vcc, struct sk_b 22795@@ -2684,7 +2684,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
23001 vcc->pop(vcc, skb); 22796 vcc->pop(vcc, skb);
23002 else 22797 else
23003 dev_kfree_skb_any(skb); 22798 dev_kfree_skb_any(skb);
@@ -23006,7 +22801,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
23006 spin_unlock_irqrestore(&he_dev->global_lock, flags); 22801 spin_unlock_irqrestore(&he_dev->global_lock, flags);
23007 return -ENOMEM; 22802 return -ENOMEM;
23008 } 22803 }
23009@@ -2714,7 +2714,7 @@ he_send(struct atm_vcc *vcc, struct sk_b 22804@@ -2715,7 +2715,7 @@ he_send(struct atm_vcc *vcc, struct sk_b
23010 __enqueue_tpd(he_dev, tpd, cid); 22805 __enqueue_tpd(he_dev, tpd, cid);
23011 spin_unlock_irqrestore(&he_dev->global_lock, flags); 22806 spin_unlock_irqrestore(&he_dev->global_lock, flags);
23012 22807
@@ -23015,10 +22810,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/he.c linux-2.6.32.24/drivers/atm/he.c
23015 22810
23016 return 0; 22811 return 0;
23017 } 22812 }
23018diff -urNp linux-2.6.32.24/drivers/atm/horizon.c linux-2.6.32.24/drivers/atm/horizon.c 22813diff -urNp linux-2.6.35.7/drivers/atm/horizon.c linux-2.6.35.7/drivers/atm/horizon.c
23019--- linux-2.6.32.24/drivers/atm/horizon.c 2010-08-13 16:24:37.000000000 -0400 22814--- linux-2.6.35.7/drivers/atm/horizon.c 2010-08-26 19:47:12.000000000 -0400
23020+++ linux-2.6.32.24/drivers/atm/horizon.c 2010-10-23 19:59:19.000000000 -0400 22815+++ linux-2.6.35.7/drivers/atm/horizon.c 2010-09-17 20:12:09.000000000 -0400
23021@@ -1033,7 +1033,7 @@ static void rx_schedule (hrz_dev * dev, 22816@@ -1034,7 +1034,7 @@ static void rx_schedule (hrz_dev * dev,
23022 { 22817 {
23023 struct atm_vcc * vcc = ATM_SKB(skb)->vcc; 22818 struct atm_vcc * vcc = ATM_SKB(skb)->vcc;
23024 // VC layer stats 22819 // VC layer stats
@@ -23027,7 +22822,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/horizon.c linux-2.6.32.24/drivers/atm/hor
23027 __net_timestamp(skb); 22822 __net_timestamp(skb);
23028 // end of our responsability 22823 // end of our responsability
23029 vcc->push (vcc, skb); 22824 vcc->push (vcc, skb);
23030@@ -1185,7 +1185,7 @@ static void tx_schedule (hrz_dev * const 22825@@ -1186,7 +1186,7 @@ static void tx_schedule (hrz_dev * const
23031 dev->tx_iovec = NULL; 22826 dev->tx_iovec = NULL;
23032 22827
23033 // VC layer stats 22828 // VC layer stats
@@ -23036,10 +22831,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/horizon.c linux-2.6.32.24/drivers/atm/hor
23036 22831
23037 // free the skb 22832 // free the skb
23038 hrz_kfree_skb (skb); 22833 hrz_kfree_skb (skb);
23039diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/idt77252.c 22834diff -urNp linux-2.6.35.7/drivers/atm/idt77252.c linux-2.6.35.7/drivers/atm/idt77252.c
23040--- linux-2.6.32.24/drivers/atm/idt77252.c 2010-08-13 16:24:37.000000000 -0400 22835--- linux-2.6.35.7/drivers/atm/idt77252.c 2010-08-26 19:47:12.000000000 -0400
23041+++ linux-2.6.32.24/drivers/atm/idt77252.c 2010-10-23 19:59:19.000000000 -0400 22836+++ linux-2.6.35.7/drivers/atm/idt77252.c 2010-09-17 20:12:09.000000000 -0400
23042@@ -810,7 +810,7 @@ drain_scq(struct idt77252_dev *card, str 22837@@ -811,7 +811,7 @@ drain_scq(struct idt77252_dev *card, str
23043 else 22838 else
23044 dev_kfree_skb(skb); 22839 dev_kfree_skb(skb);
23045 22840
@@ -23048,7 +22843,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23048 } 22843 }
23049 22844
23050 atomic_dec(&scq->used); 22845 atomic_dec(&scq->used);
23051@@ -1073,13 +1073,13 @@ dequeue_rx(struct idt77252_dev *card, st 22846@@ -1074,13 +1074,13 @@ dequeue_rx(struct idt77252_dev *card, st
23052 if ((sb = dev_alloc_skb(64)) == NULL) { 22847 if ((sb = dev_alloc_skb(64)) == NULL) {
23053 printk("%s: Can't allocate buffers for aal0.\n", 22848 printk("%s: Can't allocate buffers for aal0.\n",
23054 card->name); 22849 card->name);
@@ -23064,7 +22859,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23064 dev_kfree_skb(sb); 22859 dev_kfree_skb(sb);
23065 break; 22860 break;
23066 } 22861 }
23067@@ -1096,7 +1096,7 @@ dequeue_rx(struct idt77252_dev *card, st 22862@@ -1097,7 +1097,7 @@ dequeue_rx(struct idt77252_dev *card, st
23068 ATM_SKB(sb)->vcc = vcc; 22863 ATM_SKB(sb)->vcc = vcc;
23069 __net_timestamp(sb); 22864 __net_timestamp(sb);
23070 vcc->push(vcc, sb); 22865 vcc->push(vcc, sb);
@@ -23073,7 +22868,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23073 22868
23074 cell += ATM_CELL_PAYLOAD; 22869 cell += ATM_CELL_PAYLOAD;
23075 } 22870 }
23076@@ -1133,13 +1133,13 @@ dequeue_rx(struct idt77252_dev *card, st 22871@@ -1134,13 +1134,13 @@ dequeue_rx(struct idt77252_dev *card, st
23077 "(CDC: %08x)\n", 22872 "(CDC: %08x)\n",
23078 card->name, len, rpp->len, readl(SAR_REG_CDC)); 22873 card->name, len, rpp->len, readl(SAR_REG_CDC));
23079 recycle_rx_pool_skb(card, rpp); 22874 recycle_rx_pool_skb(card, rpp);
@@ -23089,7 +22884,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23089 return; 22884 return;
23090 } 22885 }
23091 if (skb_queue_len(&rpp->queue) > 1) { 22886 if (skb_queue_len(&rpp->queue) > 1) {
23092@@ -1150,7 +1150,7 @@ dequeue_rx(struct idt77252_dev *card, st 22887@@ -1151,7 +1151,7 @@ dequeue_rx(struct idt77252_dev *card, st
23093 RXPRINTK("%s: Can't alloc RX skb.\n", 22888 RXPRINTK("%s: Can't alloc RX skb.\n",
23094 card->name); 22889 card->name);
23095 recycle_rx_pool_skb(card, rpp); 22890 recycle_rx_pool_skb(card, rpp);
@@ -23098,7 +22893,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23098 return; 22893 return;
23099 } 22894 }
23100 if (!atm_charge(vcc, skb->truesize)) { 22895 if (!atm_charge(vcc, skb->truesize)) {
23101@@ -1169,7 +1169,7 @@ dequeue_rx(struct idt77252_dev *card, st 22896@@ -1170,7 +1170,7 @@ dequeue_rx(struct idt77252_dev *card, st
23102 __net_timestamp(skb); 22897 __net_timestamp(skb);
23103 22898
23104 vcc->push(vcc, skb); 22899 vcc->push(vcc, skb);
@@ -23107,7 +22902,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23107 22902
23108 return; 22903 return;
23109 } 22904 }
23110@@ -1191,7 +1191,7 @@ dequeue_rx(struct idt77252_dev *card, st 22905@@ -1192,7 +1192,7 @@ dequeue_rx(struct idt77252_dev *card, st
23111 __net_timestamp(skb); 22906 __net_timestamp(skb);
23112 22907
23113 vcc->push(vcc, skb); 22908 vcc->push(vcc, skb);
@@ -23116,7 +22911,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23116 22911
23117 if (skb->truesize > SAR_FB_SIZE_3) 22912 if (skb->truesize > SAR_FB_SIZE_3)
23118 add_rx_skb(card, 3, SAR_FB_SIZE_3, 1); 22913 add_rx_skb(card, 3, SAR_FB_SIZE_3, 1);
23119@@ -1303,14 +1303,14 @@ idt77252_rx_raw(struct idt77252_dev *car 22914@@ -1304,14 +1304,14 @@ idt77252_rx_raw(struct idt77252_dev *car
23120 if (vcc->qos.aal != ATM_AAL0) { 22915 if (vcc->qos.aal != ATM_AAL0) {
23121 RPRINTK("%s: raw cell for non AAL0 vc %u.%u\n", 22916 RPRINTK("%s: raw cell for non AAL0 vc %u.%u\n",
23122 card->name, vpi, vci); 22917 card->name, vpi, vci);
@@ -23133,7 +22928,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23133 goto drop; 22928 goto drop;
23134 } 22929 }
23135 22930
23136@@ -1329,7 +1329,7 @@ idt77252_rx_raw(struct idt77252_dev *car 22931@@ -1330,7 +1330,7 @@ idt77252_rx_raw(struct idt77252_dev *car
23137 ATM_SKB(sb)->vcc = vcc; 22932 ATM_SKB(sb)->vcc = vcc;
23138 __net_timestamp(sb); 22933 __net_timestamp(sb);
23139 vcc->push(vcc, sb); 22934 vcc->push(vcc, sb);
@@ -23142,7 +22937,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23142 22937
23143 drop: 22938 drop:
23144 skb_pull(queue, 64); 22939 skb_pull(queue, 64);
23145@@ -1954,13 +1954,13 @@ idt77252_send_skb(struct atm_vcc *vcc, s 22940@@ -1955,13 +1955,13 @@ idt77252_send_skb(struct atm_vcc *vcc, s
23146 22941
23147 if (vc == NULL) { 22942 if (vc == NULL) {
23148 printk("%s: NULL connection in send().\n", card->name); 22943 printk("%s: NULL connection in send().\n", card->name);
@@ -23158,7 +22953,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23158 dev_kfree_skb(skb); 22953 dev_kfree_skb(skb);
23159 return -EINVAL; 22954 return -EINVAL;
23160 } 22955 }
23161@@ -1972,14 +1972,14 @@ idt77252_send_skb(struct atm_vcc *vcc, s 22956@@ -1973,14 +1973,14 @@ idt77252_send_skb(struct atm_vcc *vcc, s
23162 break; 22957 break;
23163 default: 22958 default:
23164 printk("%s: Unsupported AAL: %d\n", card->name, vcc->qos.aal); 22959 printk("%s: Unsupported AAL: %d\n", card->name, vcc->qos.aal);
@@ -23175,7 +22970,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23175 dev_kfree_skb(skb); 22970 dev_kfree_skb(skb);
23176 return -EINVAL; 22971 return -EINVAL;
23177 } 22972 }
23178@@ -1987,7 +1987,7 @@ idt77252_send_skb(struct atm_vcc *vcc, s 22973@@ -1988,7 +1988,7 @@ idt77252_send_skb(struct atm_vcc *vcc, s
23179 22974
23180 err = queue_skb(card, vc, skb, oam); 22975 err = queue_skb(card, vc, skb, oam);
23181 if (err) { 22976 if (err) {
@@ -23184,7 +22979,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23184 dev_kfree_skb(skb); 22979 dev_kfree_skb(skb);
23185 return err; 22980 return err;
23186 } 22981 }
23187@@ -2010,7 +2010,7 @@ idt77252_send_oam(struct atm_vcc *vcc, v 22982@@ -2011,7 +2011,7 @@ idt77252_send_oam(struct atm_vcc *vcc, v
23188 skb = dev_alloc_skb(64); 22983 skb = dev_alloc_skb(64);
23189 if (!skb) { 22984 if (!skb) {
23190 printk("%s: Out of memory in send_oam().\n", card->name); 22985 printk("%s: Out of memory in send_oam().\n", card->name);
@@ -23193,10 +22988,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/idt77252.c linux-2.6.32.24/drivers/atm/id
23193 return -ENOMEM; 22988 return -ENOMEM;
23194 } 22989 }
23195 atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); 22990 atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
23196diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/iphase.c 22991diff -urNp linux-2.6.35.7/drivers/atm/iphase.c linux-2.6.35.7/drivers/atm/iphase.c
23197--- linux-2.6.32.24/drivers/atm/iphase.c 2010-08-13 16:24:37.000000000 -0400 22992--- linux-2.6.35.7/drivers/atm/iphase.c 2010-08-26 19:47:12.000000000 -0400
23198+++ linux-2.6.32.24/drivers/atm/iphase.c 2010-10-23 19:59:19.000000000 -0400 22993+++ linux-2.6.35.7/drivers/atm/iphase.c 2010-09-17 20:12:09.000000000 -0400
23199@@ -1123,7 +1123,7 @@ static int rx_pkt(struct atm_dev *dev) 22994@@ -1124,7 +1124,7 @@ static int rx_pkt(struct atm_dev *dev)
23200 status = (u_short) (buf_desc_ptr->desc_mode); 22995 status = (u_short) (buf_desc_ptr->desc_mode);
23201 if (status & (RX_CER | RX_PTE | RX_OFL)) 22996 if (status & (RX_CER | RX_PTE | RX_OFL))
23202 { 22997 {
@@ -23205,7 +23000,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/ipha
23205 IF_ERR(printk("IA: bad packet, dropping it");) 23000 IF_ERR(printk("IA: bad packet, dropping it");)
23206 if (status & RX_CER) { 23001 if (status & RX_CER) {
23207 IF_ERR(printk(" cause: packet CRC error\n");) 23002 IF_ERR(printk(" cause: packet CRC error\n");)
23208@@ -1146,7 +1146,7 @@ static int rx_pkt(struct atm_dev *dev) 23003@@ -1147,7 +1147,7 @@ static int rx_pkt(struct atm_dev *dev)
23209 len = dma_addr - buf_addr; 23004 len = dma_addr - buf_addr;
23210 if (len > iadev->rx_buf_sz) { 23005 if (len > iadev->rx_buf_sz) {
23211 printk("Over %d bytes sdu received, dropped!!!\n", iadev->rx_buf_sz); 23006 printk("Over %d bytes sdu received, dropped!!!\n", iadev->rx_buf_sz);
@@ -23214,7 +23009,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/ipha
23214 goto out_free_desc; 23009 goto out_free_desc;
23215 } 23010 }
23216 23011
23217@@ -1296,7 +1296,7 @@ static void rx_dle_intr(struct atm_dev * 23012@@ -1297,7 +1297,7 @@ static void rx_dle_intr(struct atm_dev *
23218 ia_vcc = INPH_IA_VCC(vcc); 23013 ia_vcc = INPH_IA_VCC(vcc);
23219 if (ia_vcc == NULL) 23014 if (ia_vcc == NULL)
23220 { 23015 {
@@ -23223,7 +23018,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/ipha
23223 dev_kfree_skb_any(skb); 23018 dev_kfree_skb_any(skb);
23224 atm_return(vcc, atm_guess_pdu2truesize(len)); 23019 atm_return(vcc, atm_guess_pdu2truesize(len));
23225 goto INCR_DLE; 23020 goto INCR_DLE;
23226@@ -1308,7 +1308,7 @@ static void rx_dle_intr(struct atm_dev * 23021@@ -1309,7 +1309,7 @@ static void rx_dle_intr(struct atm_dev *
23227 if ((length > iadev->rx_buf_sz) || (length > 23022 if ((length > iadev->rx_buf_sz) || (length >
23228 (skb->len - sizeof(struct cpcs_trailer)))) 23023 (skb->len - sizeof(struct cpcs_trailer))))
23229 { 23024 {
@@ -23232,7 +23027,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/ipha
23232 IF_ERR(printk("rx_dle_intr: Bad AAL5 trailer %d (skb len %d)", 23027 IF_ERR(printk("rx_dle_intr: Bad AAL5 trailer %d (skb len %d)",
23233 length, skb->len);) 23028 length, skb->len);)
23234 dev_kfree_skb_any(skb); 23029 dev_kfree_skb_any(skb);
23235@@ -1324,7 +1324,7 @@ static void rx_dle_intr(struct atm_dev * 23030@@ -1325,7 +1325,7 @@ static void rx_dle_intr(struct atm_dev *
23236 23031
23237 IF_RX(printk("rx_dle_intr: skb push");) 23032 IF_RX(printk("rx_dle_intr: skb push");)
23238 vcc->push(vcc,skb); 23033 vcc->push(vcc,skb);
@@ -23241,7 +23036,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/ipha
23241 iadev->rx_pkt_cnt++; 23036 iadev->rx_pkt_cnt++;
23242 } 23037 }
23243 INCR_DLE: 23038 INCR_DLE:
23244@@ -2806,15 +2806,15 @@ static int ia_ioctl(struct atm_dev *dev, 23039@@ -2807,15 +2807,15 @@ static int ia_ioctl(struct atm_dev *dev,
23245 { 23040 {
23246 struct k_sonet_stats *stats; 23041 struct k_sonet_stats *stats;
23247 stats = &PRIV(_ia_dev[board])->sonet_stats; 23042 stats = &PRIV(_ia_dev[board])->sonet_stats;
@@ -23266,7 +23061,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/ipha
23266 } 23061 }
23267 ia_cmds.status = 0; 23062 ia_cmds.status = 0;
23268 break; 23063 break;
23269@@ -2919,7 +2919,7 @@ static int ia_pkt_tx (struct atm_vcc *vc 23064@@ -2920,7 +2920,7 @@ static int ia_pkt_tx (struct atm_vcc *vc
23270 if ((desc == 0) || (desc > iadev->num_tx_desc)) 23065 if ((desc == 0) || (desc > iadev->num_tx_desc))
23271 { 23066 {
23272 IF_ERR(printk(DEV_LABEL "invalid desc for send: %d\n", desc);) 23067 IF_ERR(printk(DEV_LABEL "invalid desc for send: %d\n", desc);)
@@ -23275,7 +23070,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/ipha
23275 if (vcc->pop) 23070 if (vcc->pop)
23276 vcc->pop(vcc, skb); 23071 vcc->pop(vcc, skb);
23277 else 23072 else
23278@@ -3024,14 +3024,14 @@ static int ia_pkt_tx (struct atm_vcc *vc 23073@@ -3025,14 +3025,14 @@ static int ia_pkt_tx (struct atm_vcc *vc
23279 ATM_DESC(skb) = vcc->vci; 23074 ATM_DESC(skb) = vcc->vci;
23280 skb_queue_tail(&iadev->tx_dma_q, skb); 23075 skb_queue_tail(&iadev->tx_dma_q, skb);
23281 23076
@@ -23292,10 +23087,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/iphase.c linux-2.6.32.24/drivers/atm/ipha
23292 if (iavcc->vc_desc_cnt > 10) { 23087 if (iavcc->vc_desc_cnt > 10) {
23293 vcc->tx_quota = vcc->tx_quota * 3 / 4; 23088 vcc->tx_quota = vcc->tx_quota * 3 / 4;
23294 printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota ); 23089 printk("Tx1: vcc->tx_quota = %d \n", (u32)vcc->tx_quota );
23295diff -urNp linux-2.6.32.24/drivers/atm/lanai.c linux-2.6.32.24/drivers/atm/lanai.c 23090diff -urNp linux-2.6.35.7/drivers/atm/lanai.c linux-2.6.35.7/drivers/atm/lanai.c
23296--- linux-2.6.32.24/drivers/atm/lanai.c 2010-08-13 16:24:37.000000000 -0400 23091--- linux-2.6.35.7/drivers/atm/lanai.c 2010-08-26 19:47:12.000000000 -0400
23297+++ linux-2.6.32.24/drivers/atm/lanai.c 2010-10-23 19:59:19.000000000 -0400 23092+++ linux-2.6.35.7/drivers/atm/lanai.c 2010-09-17 20:12:09.000000000 -0400
23298@@ -1305,7 +1305,7 @@ static void lanai_send_one_aal5(struct l 23093@@ -1303,7 +1303,7 @@ static void lanai_send_one_aal5(struct l
23299 vcc_tx_add_aal5_trailer(lvcc, skb->len, 0, 0); 23094 vcc_tx_add_aal5_trailer(lvcc, skb->len, 0, 0);
23300 lanai_endtx(lanai, lvcc); 23095 lanai_endtx(lanai, lvcc);
23301 lanai_free_skb(lvcc->tx.atmvcc, skb); 23096 lanai_free_skb(lvcc->tx.atmvcc, skb);
@@ -23304,7 +23099,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/lanai.c linux-2.6.32.24/drivers/atm/lanai
23304 } 23099 }
23305 23100
23306 /* Try to fill the buffer - don't call unless there is backlog */ 23101 /* Try to fill the buffer - don't call unless there is backlog */
23307@@ -1428,7 +1428,7 @@ static void vcc_rx_aal5(struct lanai_vcc 23102@@ -1426,7 +1426,7 @@ static void vcc_rx_aal5(struct lanai_vcc
23308 ATM_SKB(skb)->vcc = lvcc->rx.atmvcc; 23103 ATM_SKB(skb)->vcc = lvcc->rx.atmvcc;
23309 __net_timestamp(skb); 23104 __net_timestamp(skb);
23310 lvcc->rx.atmvcc->push(lvcc->rx.atmvcc, skb); 23105 lvcc->rx.atmvcc->push(lvcc->rx.atmvcc, skb);
@@ -23313,7 +23108,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/lanai.c linux-2.6.32.24/drivers/atm/lanai
23313 out: 23108 out:
23314 lvcc->rx.buf.ptr = end; 23109 lvcc->rx.buf.ptr = end;
23315 cardvcc_write(lvcc, endptr, vcc_rxreadptr); 23110 cardvcc_write(lvcc, endptr, vcc_rxreadptr);
23316@@ -1670,7 +1670,7 @@ static int handle_service(struct lanai_d 23111@@ -1668,7 +1668,7 @@ static int handle_service(struct lanai_d
23317 DPRINTK("(itf %d) got RX service entry 0x%X for non-AAL5 " 23112 DPRINTK("(itf %d) got RX service entry 0x%X for non-AAL5 "
23318 "vcc %d\n", lanai->number, (unsigned int) s, vci); 23113 "vcc %d\n", lanai->number, (unsigned int) s, vci);
23319 lanai->stats.service_rxnotaal5++; 23114 lanai->stats.service_rxnotaal5++;
@@ -23322,7 +23117,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/lanai.c linux-2.6.32.24/drivers/atm/lanai
23322 return 0; 23117 return 0;
23323 } 23118 }
23324 if (likely(!(s & (SERVICE_TRASH | SERVICE_STREAM | SERVICE_CRCERR)))) { 23119 if (likely(!(s & (SERVICE_TRASH | SERVICE_STREAM | SERVICE_CRCERR)))) {
23325@@ -1682,7 +1682,7 @@ static int handle_service(struct lanai_d 23120@@ -1680,7 +1680,7 @@ static int handle_service(struct lanai_d
23326 int bytes; 23121 int bytes;
23327 read_unlock(&vcc_sklist_lock); 23122 read_unlock(&vcc_sklist_lock);
23328 DPRINTK("got trashed rx pdu on vci %d\n", vci); 23123 DPRINTK("got trashed rx pdu on vci %d\n", vci);
@@ -23331,7 +23126,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/lanai.c linux-2.6.32.24/drivers/atm/lanai
23331 lvcc->stats.x.aal5.service_trash++; 23126 lvcc->stats.x.aal5.service_trash++;
23332 bytes = (SERVICE_GET_END(s) * 16) - 23127 bytes = (SERVICE_GET_END(s) * 16) -
23333 (((unsigned long) lvcc->rx.buf.ptr) - 23128 (((unsigned long) lvcc->rx.buf.ptr) -
23334@@ -1694,7 +1694,7 @@ static int handle_service(struct lanai_d 23129@@ -1692,7 +1692,7 @@ static int handle_service(struct lanai_d
23335 } 23130 }
23336 if (s & SERVICE_STREAM) { 23131 if (s & SERVICE_STREAM) {
23337 read_unlock(&vcc_sklist_lock); 23132 read_unlock(&vcc_sklist_lock);
@@ -23340,7 +23135,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/lanai.c linux-2.6.32.24/drivers/atm/lanai
23340 lvcc->stats.x.aal5.service_stream++; 23135 lvcc->stats.x.aal5.service_stream++;
23341 printk(KERN_ERR DEV_LABEL "(itf %d): Got AAL5 stream " 23136 printk(KERN_ERR DEV_LABEL "(itf %d): Got AAL5 stream "
23342 "PDU on VCI %d!\n", lanai->number, vci); 23137 "PDU on VCI %d!\n", lanai->number, vci);
23343@@ -1702,7 +1702,7 @@ static int handle_service(struct lanai_d 23138@@ -1700,7 +1700,7 @@ static int handle_service(struct lanai_d
23344 return 0; 23139 return 0;
23345 } 23140 }
23346 DPRINTK("got rx crc error on vci %d\n", vci); 23141 DPRINTK("got rx crc error on vci %d\n", vci);
@@ -23349,10 +23144,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/lanai.c linux-2.6.32.24/drivers/atm/lanai
23349 lvcc->stats.x.aal5.service_rxcrc++; 23144 lvcc->stats.x.aal5.service_rxcrc++;
23350 lvcc->rx.buf.ptr = &lvcc->rx.buf.start[SERVICE_GET_END(s) * 4]; 23145 lvcc->rx.buf.ptr = &lvcc->rx.buf.start[SERVICE_GET_END(s) * 4];
23351 cardvcc_write(lvcc, SERVICE_GET_END(s), vcc_rxreadptr); 23146 cardvcc_write(lvcc, SERVICE_GET_END(s), vcc_rxreadptr);
23352diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nicstar.c 23147diff -urNp linux-2.6.35.7/drivers/atm/nicstar.c linux-2.6.35.7/drivers/atm/nicstar.c
23353--- linux-2.6.32.24/drivers/atm/nicstar.c 2010-08-13 16:24:37.000000000 -0400 23148--- linux-2.6.35.7/drivers/atm/nicstar.c 2010-08-26 19:47:12.000000000 -0400
23354+++ linux-2.6.32.24/drivers/atm/nicstar.c 2010-10-23 19:59:19.000000000 -0400 23149+++ linux-2.6.35.7/drivers/atm/nicstar.c 2010-09-17 20:12:09.000000000 -0400
23355@@ -1723,7 +1723,7 @@ static int ns_send(struct atm_vcc *vcc, 23150@@ -1722,7 +1722,7 @@ static int ns_send(struct atm_vcc *vcc,
23356 if ((vc = (vc_map *) vcc->dev_data) == NULL) 23151 if ((vc = (vc_map *) vcc->dev_data) == NULL)
23357 { 23152 {
23358 printk("nicstar%d: vcc->dev_data == NULL on ns_send().\n", card->index); 23153 printk("nicstar%d: vcc->dev_data == NULL on ns_send().\n", card->index);
@@ -23361,7 +23156,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23361 dev_kfree_skb_any(skb); 23156 dev_kfree_skb_any(skb);
23362 return -EINVAL; 23157 return -EINVAL;
23363 } 23158 }
23364@@ -1731,7 +1731,7 @@ static int ns_send(struct atm_vcc *vcc, 23159@@ -1730,7 +1730,7 @@ static int ns_send(struct atm_vcc *vcc,
23365 if (!vc->tx) 23160 if (!vc->tx)
23366 { 23161 {
23367 printk("nicstar%d: Trying to transmit on a non-tx VC.\n", card->index); 23162 printk("nicstar%d: Trying to transmit on a non-tx VC.\n", card->index);
@@ -23370,7 +23165,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23370 dev_kfree_skb_any(skb); 23165 dev_kfree_skb_any(skb);
23371 return -EINVAL; 23166 return -EINVAL;
23372 } 23167 }
23373@@ -1739,7 +1739,7 @@ static int ns_send(struct atm_vcc *vcc, 23168@@ -1738,7 +1738,7 @@ static int ns_send(struct atm_vcc *vcc,
23374 if (vcc->qos.aal != ATM_AAL5 && vcc->qos.aal != ATM_AAL0) 23169 if (vcc->qos.aal != ATM_AAL5 && vcc->qos.aal != ATM_AAL0)
23375 { 23170 {
23376 printk("nicstar%d: Only AAL0 and AAL5 are supported.\n", card->index); 23171 printk("nicstar%d: Only AAL0 and AAL5 are supported.\n", card->index);
@@ -23379,7 +23174,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23379 dev_kfree_skb_any(skb); 23174 dev_kfree_skb_any(skb);
23380 return -EINVAL; 23175 return -EINVAL;
23381 } 23176 }
23382@@ -1747,7 +1747,7 @@ static int ns_send(struct atm_vcc *vcc, 23177@@ -1746,7 +1746,7 @@ static int ns_send(struct atm_vcc *vcc,
23383 if (skb_shinfo(skb)->nr_frags != 0) 23178 if (skb_shinfo(skb)->nr_frags != 0)
23384 { 23179 {
23385 printk("nicstar%d: No scatter-gather yet.\n", card->index); 23180 printk("nicstar%d: No scatter-gather yet.\n", card->index);
@@ -23388,7 +23183,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23388 dev_kfree_skb_any(skb); 23183 dev_kfree_skb_any(skb);
23389 return -EINVAL; 23184 return -EINVAL;
23390 } 23185 }
23391@@ -1792,11 +1792,11 @@ static int ns_send(struct atm_vcc *vcc, 23186@@ -1791,11 +1791,11 @@ static int ns_send(struct atm_vcc *vcc,
23392 23187
23393 if (push_scqe(card, vc, scq, &scqe, skb) != 0) 23188 if (push_scqe(card, vc, scq, &scqe, skb) != 0)
23394 { 23189 {
@@ -23402,7 +23197,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23402 23197
23403 return 0; 23198 return 0;
23404 } 23199 }
23405@@ -2111,14 +2111,14 @@ static void dequeue_rx(ns_dev *card, ns_ 23200@@ -2110,14 +2110,14 @@ static void dequeue_rx(ns_dev *card, ns_
23406 { 23201 {
23407 printk("nicstar%d: Can't allocate buffers for aal0.\n", 23202 printk("nicstar%d: Can't allocate buffers for aal0.\n",
23408 card->index); 23203 card->index);
@@ -23419,7 +23214,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23419 dev_kfree_skb_any(sb); 23214 dev_kfree_skb_any(sb);
23420 break; 23215 break;
23421 } 23216 }
23422@@ -2133,7 +2133,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23217@@ -2132,7 +2132,7 @@ static void dequeue_rx(ns_dev *card, ns_
23423 ATM_SKB(sb)->vcc = vcc; 23218 ATM_SKB(sb)->vcc = vcc;
23424 __net_timestamp(sb); 23219 __net_timestamp(sb);
23425 vcc->push(vcc, sb); 23220 vcc->push(vcc, sb);
@@ -23428,7 +23223,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23428 cell += ATM_CELL_PAYLOAD; 23223 cell += ATM_CELL_PAYLOAD;
23429 } 23224 }
23430 23225
23431@@ -2152,7 +2152,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23226@@ -2151,7 +2151,7 @@ static void dequeue_rx(ns_dev *card, ns_
23432 if (iovb == NULL) 23227 if (iovb == NULL)
23433 { 23228 {
23434 printk("nicstar%d: Out of iovec buffers.\n", card->index); 23229 printk("nicstar%d: Out of iovec buffers.\n", card->index);
@@ -23437,7 +23232,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23437 recycle_rx_buf(card, skb); 23232 recycle_rx_buf(card, skb);
23438 return; 23233 return;
23439 } 23234 }
23440@@ -2182,7 +2182,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23235@@ -2181,7 +2181,7 @@ static void dequeue_rx(ns_dev *card, ns_
23441 else if (NS_SKB(iovb)->iovcnt >= NS_MAX_IOVECS) 23236 else if (NS_SKB(iovb)->iovcnt >= NS_MAX_IOVECS)
23442 { 23237 {
23443 printk("nicstar%d: received too big AAL5 SDU.\n", card->index); 23238 printk("nicstar%d: received too big AAL5 SDU.\n", card->index);
@@ -23446,7 +23241,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23446 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, NS_MAX_IOVECS); 23241 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, NS_MAX_IOVECS);
23447 NS_SKB(iovb)->iovcnt = 0; 23242 NS_SKB(iovb)->iovcnt = 0;
23448 iovb->len = 0; 23243 iovb->len = 0;
23449@@ -2202,7 +2202,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23244@@ -2201,7 +2201,7 @@ static void dequeue_rx(ns_dev *card, ns_
23450 printk("nicstar%d: Expected a small buffer, and this is not one.\n", 23245 printk("nicstar%d: Expected a small buffer, and this is not one.\n",
23451 card->index); 23246 card->index);
23452 which_list(card, skb); 23247 which_list(card, skb);
@@ -23455,7 +23250,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23455 recycle_rx_buf(card, skb); 23250 recycle_rx_buf(card, skb);
23456 vc->rx_iov = NULL; 23251 vc->rx_iov = NULL;
23457 recycle_iov_buf(card, iovb); 23252 recycle_iov_buf(card, iovb);
23458@@ -2216,7 +2216,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23253@@ -2215,7 +2215,7 @@ static void dequeue_rx(ns_dev *card, ns_
23459 printk("nicstar%d: Expected a large buffer, and this is not one.\n", 23254 printk("nicstar%d: Expected a large buffer, and this is not one.\n",
23460 card->index); 23255 card->index);
23461 which_list(card, skb); 23256 which_list(card, skb);
@@ -23464,7 +23259,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23464 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, 23259 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data,
23465 NS_SKB(iovb)->iovcnt); 23260 NS_SKB(iovb)->iovcnt);
23466 vc->rx_iov = NULL; 23261 vc->rx_iov = NULL;
23467@@ -2240,7 +2240,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23262@@ -2239,7 +2239,7 @@ static void dequeue_rx(ns_dev *card, ns_
23468 printk(" - PDU size mismatch.\n"); 23263 printk(" - PDU size mismatch.\n");
23469 else 23264 else
23470 printk(".\n"); 23265 printk(".\n");
@@ -23473,7 +23268,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23473 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, 23268 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data,
23474 NS_SKB(iovb)->iovcnt); 23269 NS_SKB(iovb)->iovcnt);
23475 vc->rx_iov = NULL; 23270 vc->rx_iov = NULL;
23476@@ -2256,7 +2256,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23271@@ -2255,7 +2255,7 @@ static void dequeue_rx(ns_dev *card, ns_
23477 if (!atm_charge(vcc, skb->truesize)) 23272 if (!atm_charge(vcc, skb->truesize))
23478 { 23273 {
23479 push_rxbufs(card, skb); 23274 push_rxbufs(card, skb);
@@ -23482,7 +23277,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23482 } 23277 }
23483 else 23278 else
23484 { 23279 {
23485@@ -2268,7 +2268,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23280@@ -2267,7 +2267,7 @@ static void dequeue_rx(ns_dev *card, ns_
23486 ATM_SKB(skb)->vcc = vcc; 23281 ATM_SKB(skb)->vcc = vcc;
23487 __net_timestamp(skb); 23282 __net_timestamp(skb);
23488 vcc->push(vcc, skb); 23283 vcc->push(vcc, skb);
@@ -23491,7 +23286,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23491 } 23286 }
23492 } 23287 }
23493 else if (NS_SKB(iovb)->iovcnt == 2) /* One small plus one large buffer */ 23288 else if (NS_SKB(iovb)->iovcnt == 2) /* One small plus one large buffer */
23494@@ -2283,7 +2283,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23289@@ -2282,7 +2282,7 @@ static void dequeue_rx(ns_dev *card, ns_
23495 if (!atm_charge(vcc, sb->truesize)) 23290 if (!atm_charge(vcc, sb->truesize))
23496 { 23291 {
23497 push_rxbufs(card, sb); 23292 push_rxbufs(card, sb);
@@ -23500,7 +23295,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23500 } 23295 }
23501 else 23296 else
23502 { 23297 {
23503@@ -2295,7 +2295,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23298@@ -2294,7 +2294,7 @@ static void dequeue_rx(ns_dev *card, ns_
23504 ATM_SKB(sb)->vcc = vcc; 23299 ATM_SKB(sb)->vcc = vcc;
23505 __net_timestamp(sb); 23300 __net_timestamp(sb);
23506 vcc->push(vcc, sb); 23301 vcc->push(vcc, sb);
@@ -23509,7 +23304,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23509 } 23304 }
23510 23305
23511 push_rxbufs(card, skb); 23306 push_rxbufs(card, skb);
23512@@ -2306,7 +2306,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23307@@ -2305,7 +2305,7 @@ static void dequeue_rx(ns_dev *card, ns_
23513 if (!atm_charge(vcc, skb->truesize)) 23308 if (!atm_charge(vcc, skb->truesize))
23514 { 23309 {
23515 push_rxbufs(card, skb); 23310 push_rxbufs(card, skb);
@@ -23518,7 +23313,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23518 } 23313 }
23519 else 23314 else
23520 { 23315 {
23521@@ -2320,7 +2320,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23316@@ -2319,7 +2319,7 @@ static void dequeue_rx(ns_dev *card, ns_
23522 ATM_SKB(skb)->vcc = vcc; 23317 ATM_SKB(skb)->vcc = vcc;
23523 __net_timestamp(skb); 23318 __net_timestamp(skb);
23524 vcc->push(vcc, skb); 23319 vcc->push(vcc, skb);
@@ -23527,7 +23322,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23527 } 23322 }
23528 23323
23529 push_rxbufs(card, sb); 23324 push_rxbufs(card, sb);
23530@@ -2342,7 +2342,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23325@@ -2341,7 +2341,7 @@ static void dequeue_rx(ns_dev *card, ns_
23531 if (hb == NULL) 23326 if (hb == NULL)
23532 { 23327 {
23533 printk("nicstar%d: Out of huge buffers.\n", card->index); 23328 printk("nicstar%d: Out of huge buffers.\n", card->index);
@@ -23536,7 +23331,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23536 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, 23331 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data,
23537 NS_SKB(iovb)->iovcnt); 23332 NS_SKB(iovb)->iovcnt);
23538 vc->rx_iov = NULL; 23333 vc->rx_iov = NULL;
23539@@ -2393,7 +2393,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23334@@ -2392,7 +2392,7 @@ static void dequeue_rx(ns_dev *card, ns_
23540 } 23335 }
23541 else 23336 else
23542 dev_kfree_skb_any(hb); 23337 dev_kfree_skb_any(hb);
@@ -23545,7 +23340,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23545 } 23340 }
23546 else 23341 else
23547 { 23342 {
23548@@ -2427,7 +2427,7 @@ static void dequeue_rx(ns_dev *card, ns_ 23343@@ -2426,7 +2426,7 @@ static void dequeue_rx(ns_dev *card, ns_
23549 #endif /* NS_USE_DESTRUCTORS */ 23344 #endif /* NS_USE_DESTRUCTORS */
23550 __net_timestamp(hb); 23345 __net_timestamp(hb);
23551 vcc->push(vcc, hb); 23346 vcc->push(vcc, hb);
@@ -23554,10 +23349,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/nicstar.c linux-2.6.32.24/drivers/atm/nic
23554 } 23349 }
23555 } 23350 }
23556 23351
23557diff -urNp linux-2.6.32.24/drivers/atm/solos-pci.c linux-2.6.32.24/drivers/atm/solos-pci.c 23352diff -urNp linux-2.6.35.7/drivers/atm/solos-pci.c linux-2.6.35.7/drivers/atm/solos-pci.c
23558--- linux-2.6.32.24/drivers/atm/solos-pci.c 2010-08-13 16:24:37.000000000 -0400 23353--- linux-2.6.35.7/drivers/atm/solos-pci.c 2010-08-26 19:47:12.000000000 -0400
23559+++ linux-2.6.32.24/drivers/atm/solos-pci.c 2010-10-23 19:59:19.000000000 -0400 23354+++ linux-2.6.35.7/drivers/atm/solos-pci.c 2010-09-17 20:12:09.000000000 -0400
23560@@ -708,7 +708,7 @@ void solos_bh(unsigned long card_arg) 23355@@ -715,7 +715,7 @@ void solos_bh(unsigned long card_arg)
23561 } 23356 }
23562 atm_charge(vcc, skb->truesize); 23357 atm_charge(vcc, skb->truesize);
23563 vcc->push(vcc, skb); 23358 vcc->push(vcc, skb);
@@ -23566,7 +23361,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/solos-pci.c linux-2.6.32.24/drivers/atm/s
23566 break; 23361 break;
23567 23362
23568 case PKT_STATUS: 23363 case PKT_STATUS:
23569@@ -1016,7 +1016,7 @@ static uint32_t fpga_tx(struct solos_car 23364@@ -1023,7 +1023,7 @@ static uint32_t fpga_tx(struct solos_car
23570 vcc = SKB_CB(oldskb)->vcc; 23365 vcc = SKB_CB(oldskb)->vcc;
23571 23366
23572 if (vcc) { 23367 if (vcc) {
@@ -23575,10 +23370,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/solos-pci.c linux-2.6.32.24/drivers/atm/s
23575 solos_pop(vcc, oldskb); 23370 solos_pop(vcc, oldskb);
23576 } else 23371 } else
23577 dev_kfree_skb_irq(oldskb); 23372 dev_kfree_skb_irq(oldskb);
23578diff -urNp linux-2.6.32.24/drivers/atm/suni.c linux-2.6.32.24/drivers/atm/suni.c 23373diff -urNp linux-2.6.35.7/drivers/atm/suni.c linux-2.6.35.7/drivers/atm/suni.c
23579--- linux-2.6.32.24/drivers/atm/suni.c 2010-08-13 16:24:37.000000000 -0400 23374--- linux-2.6.35.7/drivers/atm/suni.c 2010-08-26 19:47:12.000000000 -0400
23580+++ linux-2.6.32.24/drivers/atm/suni.c 2010-10-23 19:59:19.000000000 -0400 23375+++ linux-2.6.35.7/drivers/atm/suni.c 2010-09-17 20:12:09.000000000 -0400
23581@@ -49,8 +49,8 @@ static DEFINE_SPINLOCK(sunis_lock); 23376@@ -50,8 +50,8 @@ static DEFINE_SPINLOCK(sunis_lock);
23582 23377
23583 23378
23584 #define ADD_LIMITED(s,v) \ 23379 #define ADD_LIMITED(s,v) \
@@ -23589,10 +23384,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/suni.c linux-2.6.32.24/drivers/atm/suni.c
23589 23384
23590 23385
23591 static void suni_hz(unsigned long from_timer) 23386 static void suni_hz(unsigned long from_timer)
23592diff -urNp linux-2.6.32.24/drivers/atm/uPD98402.c linux-2.6.32.24/drivers/atm/uPD98402.c 23387diff -urNp linux-2.6.35.7/drivers/atm/uPD98402.c linux-2.6.35.7/drivers/atm/uPD98402.c
23593--- linux-2.6.32.24/drivers/atm/uPD98402.c 2010-08-13 16:24:37.000000000 -0400 23388--- linux-2.6.35.7/drivers/atm/uPD98402.c 2010-08-26 19:47:12.000000000 -0400
23594+++ linux-2.6.32.24/drivers/atm/uPD98402.c 2010-10-23 19:59:19.000000000 -0400 23389+++ linux-2.6.35.7/drivers/atm/uPD98402.c 2010-09-17 20:12:09.000000000 -0400
23595@@ -41,7 +41,7 @@ static int fetch_stats(struct atm_dev *d 23390@@ -42,7 +42,7 @@ static int fetch_stats(struct atm_dev *d
23596 struct sonet_stats tmp; 23391 struct sonet_stats tmp;
23597 int error = 0; 23392 int error = 0;
23598 23393
@@ -23601,7 +23396,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/uPD98402.c linux-2.6.32.24/drivers/atm/uP
23601 sonet_copy_stats(&PRIV(dev)->sonet_stats,&tmp); 23396 sonet_copy_stats(&PRIV(dev)->sonet_stats,&tmp);
23602 if (arg) error = copy_to_user(arg,&tmp,sizeof(tmp)); 23397 if (arg) error = copy_to_user(arg,&tmp,sizeof(tmp));
23603 if (zero && !error) { 23398 if (zero && !error) {
23604@@ -160,9 +160,9 @@ static int uPD98402_ioctl(struct atm_dev 23399@@ -161,9 +161,9 @@ static int uPD98402_ioctl(struct atm_dev
23605 23400
23606 23401
23607 #define ADD_LIMITED(s,v) \ 23402 #define ADD_LIMITED(s,v) \
@@ -23614,7 +23409,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/uPD98402.c linux-2.6.32.24/drivers/atm/uP
23614 23409
23615 23410
23616 static void stat_event(struct atm_dev *dev) 23411 static void stat_event(struct atm_dev *dev)
23617@@ -193,7 +193,7 @@ static void uPD98402_int(struct atm_dev 23412@@ -194,7 +194,7 @@ static void uPD98402_int(struct atm_dev
23618 if (reason & uPD98402_INT_PFM) stat_event(dev); 23413 if (reason & uPD98402_INT_PFM) stat_event(dev);
23619 if (reason & uPD98402_INT_PCO) { 23414 if (reason & uPD98402_INT_PCO) {
23620 (void) GET(PCOCR); /* clear interrupt cause */ 23415 (void) GET(PCOCR); /* clear interrupt cause */
@@ -23623,7 +23418,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/uPD98402.c linux-2.6.32.24/drivers/atm/uP
23623 &PRIV(dev)->sonet_stats.uncorr_hcs); 23418 &PRIV(dev)->sonet_stats.uncorr_hcs);
23624 } 23419 }
23625 if ((reason & uPD98402_INT_RFO) && 23420 if ((reason & uPD98402_INT_RFO) &&
23626@@ -221,9 +221,9 @@ static int uPD98402_start(struct atm_dev 23421@@ -222,9 +222,9 @@ static int uPD98402_start(struct atm_dev
23627 PUT(~(uPD98402_INT_PFM | uPD98402_INT_ALM | uPD98402_INT_RFO | 23422 PUT(~(uPD98402_INT_PFM | uPD98402_INT_ALM | uPD98402_INT_RFO |
23628 uPD98402_INT_LOS),PIMR); /* enable them */ 23423 uPD98402_INT_LOS),PIMR); /* enable them */
23629 (void) fetch_stats(dev,NULL,1); /* clear kernel counters */ 23424 (void) fetch_stats(dev,NULL,1); /* clear kernel counters */
@@ -23636,10 +23431,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/uPD98402.c linux-2.6.32.24/drivers/atm/uP
23636 return 0; 23431 return 0;
23637 } 23432 }
23638 23433
23639diff -urNp linux-2.6.32.24/drivers/atm/zatm.c linux-2.6.32.24/drivers/atm/zatm.c 23434diff -urNp linux-2.6.35.7/drivers/atm/zatm.c linux-2.6.35.7/drivers/atm/zatm.c
23640--- linux-2.6.32.24/drivers/atm/zatm.c 2010-08-13 16:24:37.000000000 -0400 23435--- linux-2.6.35.7/drivers/atm/zatm.c 2010-08-26 19:47:12.000000000 -0400
23641+++ linux-2.6.32.24/drivers/atm/zatm.c 2010-10-23 19:59:19.000000000 -0400 23436+++ linux-2.6.35.7/drivers/atm/zatm.c 2010-09-17 20:12:09.000000000 -0400
23642@@ -458,7 +458,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy 23437@@ -459,7 +459,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy
23643 } 23438 }
23644 if (!size) { 23439 if (!size) {
23645 dev_kfree_skb_irq(skb); 23440 dev_kfree_skb_irq(skb);
@@ -23648,7 +23443,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/zatm.c linux-2.6.32.24/drivers/atm/zatm.c
23648 continue; 23443 continue;
23649 } 23444 }
23650 if (!atm_charge(vcc,skb->truesize)) { 23445 if (!atm_charge(vcc,skb->truesize)) {
23651@@ -468,7 +468,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy 23446@@ -469,7 +469,7 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy
23652 skb->len = size; 23447 skb->len = size;
23653 ATM_SKB(skb)->vcc = vcc; 23448 ATM_SKB(skb)->vcc = vcc;
23654 vcc->push(vcc,skb); 23449 vcc->push(vcc,skb);
@@ -23657,7 +23452,7 @@ diff -urNp linux-2.6.32.24/drivers/atm/zatm.c linux-2.6.32.24/drivers/atm/zatm.c
23657 } 23452 }
23658 zout(pos & 0xffff,MTA(mbx)); 23453 zout(pos & 0xffff,MTA(mbx));
23659 #if 0 /* probably a stupid idea */ 23454 #if 0 /* probably a stupid idea */
23660@@ -732,7 +732,7 @@ if (*ZATM_PRV_DSC(skb) != (uPD98401_TXPD 23455@@ -733,7 +733,7 @@ if (*ZATM_PRV_DSC(skb) != (uPD98401_TXPD
23661 skb_queue_head(&zatm_vcc->backlog,skb); 23456 skb_queue_head(&zatm_vcc->backlog,skb);
23662 break; 23457 break;
23663 } 23458 }
@@ -23666,115 +23461,10 @@ diff -urNp linux-2.6.32.24/drivers/atm/zatm.c linux-2.6.32.24/drivers/atm/zatm.c
23666 wake_up(&zatm_vcc->tx_wait); 23461 wake_up(&zatm_vcc->tx_wait);
23667 } 23462 }
23668 23463
23669diff -urNp linux-2.6.32.24/drivers/base/bus.c linux-2.6.32.24/drivers/base/bus.c 23464diff -urNp linux-2.6.35.7/drivers/block/pktcdvd.c linux-2.6.35.7/drivers/block/pktcdvd.c
23670--- linux-2.6.32.24/drivers/base/bus.c 2010-08-13 16:24:37.000000000 -0400 23465--- linux-2.6.35.7/drivers/block/pktcdvd.c 2010-08-26 19:47:12.000000000 -0400
23671+++ linux-2.6.32.24/drivers/base/bus.c 2010-10-23 19:59:19.000000000 -0400 23466+++ linux-2.6.35.7/drivers/block/pktcdvd.c 2010-09-27 18:50:29.000000000 -0400
23672@@ -70,7 +70,7 @@ static ssize_t drv_attr_store(struct kob 23467@@ -2368,7 +2368,7 @@ static void pkt_release_dev(struct pktcd
23673 return ret;
23674 }
23675
23676-static struct sysfs_ops driver_sysfs_ops = {
23677+static const struct sysfs_ops driver_sysfs_ops = {
23678 .show = drv_attr_show,
23679 .store = drv_attr_store,
23680 };
23681@@ -115,7 +115,7 @@ static ssize_t bus_attr_store(struct kob
23682 return ret;
23683 }
23684
23685-static struct sysfs_ops bus_sysfs_ops = {
23686+static const struct sysfs_ops bus_sysfs_ops = {
23687 .show = bus_attr_show,
23688 .store = bus_attr_store,
23689 };
23690@@ -154,7 +154,7 @@ static int bus_uevent_filter(struct kset
23691 return 0;
23692 }
23693
23694-static struct kset_uevent_ops bus_uevent_ops = {
23695+static const struct kset_uevent_ops bus_uevent_ops = {
23696 .filter = bus_uevent_filter,
23697 };
23698
23699diff -urNp linux-2.6.32.24/drivers/base/class.c linux-2.6.32.24/drivers/base/class.c
23700--- linux-2.6.32.24/drivers/base/class.c 2010-08-13 16:24:37.000000000 -0400
23701+++ linux-2.6.32.24/drivers/base/class.c 2010-10-23 19:59:19.000000000 -0400
23702@@ -63,7 +63,7 @@ static void class_release(struct kobject
23703 kfree(cp);
23704 }
23705
23706-static struct sysfs_ops class_sysfs_ops = {
23707+static const struct sysfs_ops class_sysfs_ops = {
23708 .show = class_attr_show,
23709 .store = class_attr_store,
23710 };
23711diff -urNp linux-2.6.32.24/drivers/base/core.c linux-2.6.32.24/drivers/base/core.c
23712--- linux-2.6.32.24/drivers/base/core.c 2010-08-13 16:24:37.000000000 -0400
23713+++ linux-2.6.32.24/drivers/base/core.c 2010-10-23 19:59:19.000000000 -0400
23714@@ -100,7 +100,7 @@ static ssize_t dev_attr_store(struct kob
23715 return ret;
23716 }
23717
23718-static struct sysfs_ops dev_sysfs_ops = {
23719+static const struct sysfs_ops dev_sysfs_ops = {
23720 .show = dev_attr_show,
23721 .store = dev_attr_store,
23722 };
23723@@ -252,7 +252,7 @@ static int dev_uevent(struct kset *kset,
23724 return retval;
23725 }
23726
23727-static struct kset_uevent_ops device_uevent_ops = {
23728+static const struct kset_uevent_ops device_uevent_ops = {
23729 .filter = dev_uevent_filter,
23730 .name = dev_uevent_name,
23731 .uevent = dev_uevent,
23732diff -urNp linux-2.6.32.24/drivers/base/memory.c linux-2.6.32.24/drivers/base/memory.c
23733--- linux-2.6.32.24/drivers/base/memory.c 2010-08-13 16:24:37.000000000 -0400
23734+++ linux-2.6.32.24/drivers/base/memory.c 2010-10-23 19:59:19.000000000 -0400
23735@@ -44,7 +44,7 @@ static int memory_uevent(struct kset *ks
23736 return retval;
23737 }
23738
23739-static struct kset_uevent_ops memory_uevent_ops = {
23740+static const struct kset_uevent_ops memory_uevent_ops = {
23741 .name = memory_uevent_name,
23742 .uevent = memory_uevent,
23743 };
23744diff -urNp linux-2.6.32.24/drivers/base/sys.c linux-2.6.32.24/drivers/base/sys.c
23745--- linux-2.6.32.24/drivers/base/sys.c 2010-08-13 16:24:37.000000000 -0400
23746+++ linux-2.6.32.24/drivers/base/sys.c 2010-10-23 19:59:19.000000000 -0400
23747@@ -54,7 +54,7 @@ sysdev_store(struct kobject *kobj, struc
23748 return -EIO;
23749 }
23750
23751-static struct sysfs_ops sysfs_ops = {
23752+static const struct sysfs_ops sysfs_ops = {
23753 .show = sysdev_show,
23754 .store = sysdev_store,
23755 };
23756@@ -104,7 +104,7 @@ static ssize_t sysdev_class_store(struct
23757 return -EIO;
23758 }
23759
23760-static struct sysfs_ops sysfs_class_ops = {
23761+static const struct sysfs_ops sysfs_class_ops = {
23762 .show = sysdev_class_show,
23763 .store = sysdev_class_store,
23764 };
23765diff -urNp linux-2.6.32.24/drivers/block/pktcdvd.c linux-2.6.32.24/drivers/block/pktcdvd.c
23766--- linux-2.6.32.24/drivers/block/pktcdvd.c 2010-08-13 16:24:37.000000000 -0400
23767+++ linux-2.6.32.24/drivers/block/pktcdvd.c 2010-10-23 19:59:19.000000000 -0400
23768@@ -284,7 +284,7 @@ static ssize_t kobj_pkt_store(struct kob
23769 return len;
23770 }
23771
23772-static struct sysfs_ops kobj_pkt_ops = {
23773+static const struct sysfs_ops kobj_pkt_ops = {
23774 .show = kobj_pkt_show,
23775 .store = kobj_pkt_store
23776 };
23777@@ -2408,7 +2408,7 @@ static void pkt_release_dev(struct pktcd
23778 pkt_shrink_pktlist(pd); 23468 pkt_shrink_pktlist(pd);
23779 } 23469 }
23780 23470
@@ -23783,10 +23473,10 @@ diff -urNp linux-2.6.32.24/drivers/block/pktcdvd.c linux-2.6.32.24/drivers/block
23783 { 23473 {
23784 if (dev_minor >= MAX_WRITERS) 23474 if (dev_minor >= MAX_WRITERS)
23785 return NULL; 23475 return NULL;
23786diff -urNp linux-2.6.32.24/drivers/char/agp/frontend.c linux-2.6.32.24/drivers/char/agp/frontend.c 23476diff -urNp linux-2.6.35.7/drivers/char/agp/frontend.c linux-2.6.35.7/drivers/char/agp/frontend.c
23787--- linux-2.6.32.24/drivers/char/agp/frontend.c 2010-08-13 16:24:37.000000000 -0400 23477--- linux-2.6.35.7/drivers/char/agp/frontend.c 2010-08-26 19:47:12.000000000 -0400
23788+++ linux-2.6.32.24/drivers/char/agp/frontend.c 2010-10-23 19:59:19.000000000 -0400 23478+++ linux-2.6.35.7/drivers/char/agp/frontend.c 2010-09-17 20:12:09.000000000 -0400
23789@@ -824,7 +824,7 @@ static int agpioc_reserve_wrap(struct ag 23479@@ -818,7 +818,7 @@ static int agpioc_reserve_wrap(struct ag
23790 if (copy_from_user(&reserve, arg, sizeof(struct agp_region))) 23480 if (copy_from_user(&reserve, arg, sizeof(struct agp_region)))
23791 return -EFAULT; 23481 return -EFAULT;
23792 23482
@@ -23795,31 +23485,31 @@ diff -urNp linux-2.6.32.24/drivers/char/agp/frontend.c linux-2.6.32.24/drivers/c
23795 return -EFAULT; 23485 return -EFAULT;
23796 23486
23797 client = agp_find_client_by_pid(reserve.pid); 23487 client = agp_find_client_by_pid(reserve.pid);
23798diff -urNp linux-2.6.32.24/drivers/char/agp/intel-agp.c linux-2.6.32.24/drivers/char/agp/intel-agp.c 23488diff -urNp linux-2.6.35.7/drivers/char/agp/intel-agp.c linux-2.6.35.7/drivers/char/agp/intel-agp.c
23799--- linux-2.6.32.24/drivers/char/agp/intel-agp.c 2010-08-13 16:24:37.000000000 -0400 23489--- linux-2.6.35.7/drivers/char/agp/intel-agp.c 2010-09-26 17:32:11.000000000 -0400
23800+++ linux-2.6.32.24/drivers/char/agp/intel-agp.c 2010-10-23 19:59:19.000000000 -0400 23490+++ linux-2.6.35.7/drivers/char/agp/intel-agp.c 2010-09-26 17:35:29.000000000 -0400
23801@@ -2564,7 +2564,7 @@ static struct pci_device_id agp_intel_pc 23491@@ -1054,7 +1054,7 @@ static struct pci_device_id agp_intel_pc
23802 ID(PCI_DEVICE_ID_INTEL_IGDNG_M_HB), 23492 ID(PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB),
23803 ID(PCI_DEVICE_ID_INTEL_IGDNG_MA_HB), 23493 ID(PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB),
23804 ID(PCI_DEVICE_ID_INTEL_IGDNG_MC2_HB), 23494 ID(PCI_DEVICE_ID_INTEL_SANDYBRIDGE_S_HB),
23805- { } 23495- { }
23806+ { 0, 0, 0, 0, 0, 0, 0 } 23496+ { 0, 0, 0, 0, 0, 0, 0 }
23807 }; 23497 };
23808 23498
23809 MODULE_DEVICE_TABLE(pci, agp_intel_pci_table); 23499 MODULE_DEVICE_TABLE(pci, agp_intel_pci_table);
23810diff -urNp linux-2.6.32.24/drivers/char/hpet.c linux-2.6.32.24/drivers/char/hpet.c 23500diff -urNp linux-2.6.35.7/drivers/char/hpet.c linux-2.6.35.7/drivers/char/hpet.c
23811--- linux-2.6.32.24/drivers/char/hpet.c 2010-08-13 16:24:37.000000000 -0400 23501--- linux-2.6.35.7/drivers/char/hpet.c 2010-08-26 19:47:12.000000000 -0400
23812+++ linux-2.6.32.24/drivers/char/hpet.c 2010-10-23 19:59:19.000000000 -0400 23502+++ linux-2.6.35.7/drivers/char/hpet.c 2010-09-17 20:12:09.000000000 -0400
23813@@ -430,7 +430,7 @@ static int hpet_release(struct inode *in 23503@@ -429,7 +429,7 @@ static int hpet_release(struct inode *in
23814 return 0; 23504 return 0;
23815 } 23505 }
23816 23506
23817-static int hpet_ioctl_common(struct hpet_dev *, int, unsigned long, int); 23507-static int hpet_ioctl_common(struct hpet_dev *, int, unsigned long, int);
23818+static int hpet_ioctl_common(struct hpet_dev *, unsigned int, unsigned long, int); 23508+static int hpet_ioctl_common(struct hpet_dev *, unsigned int, unsigned long, int);
23819 23509
23820 static int 23510 static long hpet_ioctl(struct file *file, unsigned int cmd,
23821 hpet_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 23511 unsigned long arg)
23822@@ -550,7 +550,7 @@ static inline unsigned long hpet_time_di 23512@@ -553,7 +553,7 @@ static inline unsigned long hpet_time_di
23823 } 23513 }
23824 23514
23825 static int 23515 static int
@@ -23837,114 +23527,21 @@ diff -urNp linux-2.6.32.24/drivers/char/hpet.c linux-2.6.32.24/drivers/char/hpet
23837 23527
23838 static int __init hpet_init(void) 23528 static int __init hpet_init(void)
23839 { 23529 {
23840diff -urNp linux-2.6.32.24/drivers/char/hvc_beat.c linux-2.6.32.24/drivers/char/hvc_beat.c 23530diff -urNp linux-2.6.35.7/drivers/char/hvc_console.h linux-2.6.35.7/drivers/char/hvc_console.h
23841--- linux-2.6.32.24/drivers/char/hvc_beat.c 2010-08-13 16:24:37.000000000 -0400 23531--- linux-2.6.35.7/drivers/char/hvc_console.h 2010-08-26 19:47:12.000000000 -0400
23842+++ linux-2.6.32.24/drivers/char/hvc_beat.c 2010-10-23 19:59:19.000000000 -0400 23532+++ linux-2.6.35.7/drivers/char/hvc_console.h 2010-09-17 20:12:09.000000000 -0400
23843@@ -84,7 +84,7 @@ static int hvc_beat_put_chars(uint32_t v 23533@@ -82,6 +82,7 @@ extern int hvc_instantiate(uint32_t vter
23844 return cnt;
23845 }
23846
23847-static struct hv_ops hvc_beat_get_put_ops = {
23848+static const struct hv_ops hvc_beat_get_put_ops = {
23849 .get_chars = hvc_beat_get_chars,
23850 .put_chars = hvc_beat_put_chars,
23851 };
23852diff -urNp linux-2.6.32.24/drivers/char/hvc_console.c linux-2.6.32.24/drivers/char/hvc_console.c
23853--- linux-2.6.32.24/drivers/char/hvc_console.c 2010-08-13 16:24:37.000000000 -0400
23854+++ linux-2.6.32.24/drivers/char/hvc_console.c 2010-10-23 19:59:19.000000000 -0400
23855@@ -125,7 +125,7 @@ static struct hvc_struct *hvc_get_by_ind
23856 * console interfaces but can still be used as a tty device. This has to be
23857 * static because kmalloc will not work during early console init.
23858 */
23859-static struct hv_ops *cons_ops[MAX_NR_HVC_CONSOLES];
23860+static const struct hv_ops *cons_ops[MAX_NR_HVC_CONSOLES];
23861 static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] =
23862 {[0 ... MAX_NR_HVC_CONSOLES - 1] = -1};
23863
23864@@ -247,7 +247,7 @@ static void destroy_hvc_struct(struct kr
23865 * vty adapters do NOT get an hvc_instantiate() callback since they
23866 * appear after early console init.
23867 */
23868-int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops)
23869+int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops)
23870 {
23871 struct hvc_struct *hp;
23872
23873@@ -749,7 +749,7 @@ static const struct tty_operations hvc_o
23874 };
23875
23876 struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
23877- struct hv_ops *ops, int outbuf_size)
23878+ const struct hv_ops *ops, int outbuf_size)
23879 {
23880 struct hvc_struct *hp;
23881 int i;
23882diff -urNp linux-2.6.32.24/drivers/char/hvc_console.h linux-2.6.32.24/drivers/char/hvc_console.h
23883--- linux-2.6.32.24/drivers/char/hvc_console.h 2010-08-13 16:24:37.000000000 -0400
23884+++ linux-2.6.32.24/drivers/char/hvc_console.h 2010-10-23 19:59:19.000000000 -0400
23885@@ -55,7 +55,7 @@ struct hvc_struct {
23886 int outbuf_size;
23887 int n_outbuf;
23888 uint32_t vtermno;
23889- struct hv_ops *ops;
23890+ const struct hv_ops *ops;
23891 int irq_requested;
23892 int data;
23893 struct winsize ws;
23894@@ -76,11 +76,11 @@ struct hv_ops {
23895 };
23896
23897 /* Register a vterm and a slot index for use as a console (console_init) */
23898-extern int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops);
23899+extern int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops);
23900
23901 /* register a vterm for hvc tty operation (module_init or hotplug add) */ 23534 /* register a vterm for hvc tty operation (module_init or hotplug add) */
23902 extern struct hvc_struct * __devinit hvc_alloc(uint32_t vtermno, int data, 23535 extern struct hvc_struct * hvc_alloc(uint32_t vtermno, int data,
23903- struct hv_ops *ops, int outbuf_size); 23536 const struct hv_ops *ops, int outbuf_size);
23904+ const struct hv_ops *ops, int outbuf_size); 23537+
23905 /* remove a vterm from hvc tty operation (module_exit or hotplug remove) */ 23538 /* remove a vterm from hvc tty operation (module_exit or hotplug remove) */
23906 extern int hvc_remove(struct hvc_struct *hp); 23539 extern int hvc_remove(struct hvc_struct *hp);
23907 23540
23908diff -urNp linux-2.6.32.24/drivers/char/hvc_iseries.c linux-2.6.32.24/drivers/char/hvc_iseries.c 23541diff -urNp linux-2.6.35.7/drivers/char/hvcs.c linux-2.6.35.7/drivers/char/hvcs.c
23909--- linux-2.6.32.24/drivers/char/hvc_iseries.c 2010-08-13 16:24:37.000000000 -0400 23542--- linux-2.6.35.7/drivers/char/hvcs.c 2010-08-26 19:47:12.000000000 -0400
23910+++ linux-2.6.32.24/drivers/char/hvc_iseries.c 2010-10-23 19:59:19.000000000 -0400 23543+++ linux-2.6.35.7/drivers/char/hvcs.c 2010-09-17 20:12:09.000000000 -0400
23911@@ -197,7 +197,7 @@ done: 23544@@ -270,7 +270,7 @@ struct hvcs_struct {
23912 return sent;
23913 }
23914
23915-static struct hv_ops hvc_get_put_ops = {
23916+static const struct hv_ops hvc_get_put_ops = {
23917 .get_chars = get_chars,
23918 .put_chars = put_chars,
23919 .notifier_add = notifier_add_irq,
23920diff -urNp linux-2.6.32.24/drivers/char/hvc_iucv.c linux-2.6.32.24/drivers/char/hvc_iucv.c
23921--- linux-2.6.32.24/drivers/char/hvc_iucv.c 2010-08-13 16:24:37.000000000 -0400
23922+++ linux-2.6.32.24/drivers/char/hvc_iucv.c 2010-10-23 19:59:19.000000000 -0400
23923@@ -922,7 +922,7 @@ static int hvc_iucv_pm_restore_thaw(stru
23924
23925
23926 /* HVC operations */
23927-static struct hv_ops hvc_iucv_ops = {
23928+static const struct hv_ops hvc_iucv_ops = {
23929 .get_chars = hvc_iucv_get_chars,
23930 .put_chars = hvc_iucv_put_chars,
23931 .notifier_add = hvc_iucv_notifier_add,
23932diff -urNp linux-2.6.32.24/drivers/char/hvc_rtas.c linux-2.6.32.24/drivers/char/hvc_rtas.c
23933--- linux-2.6.32.24/drivers/char/hvc_rtas.c 2010-08-13 16:24:37.000000000 -0400
23934+++ linux-2.6.32.24/drivers/char/hvc_rtas.c 2010-10-23 19:59:19.000000000 -0400
23935@@ -71,7 +71,7 @@ static int hvc_rtas_read_console(uint32_
23936 return i;
23937 }
23938
23939-static struct hv_ops hvc_rtas_get_put_ops = {
23940+static const struct hv_ops hvc_rtas_get_put_ops = {
23941 .get_chars = hvc_rtas_read_console,
23942 .put_chars = hvc_rtas_write_console,
23943 };
23944diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs.c
23945--- linux-2.6.32.24/drivers/char/hvcs.c 2010-08-13 16:24:37.000000000 -0400
23946+++ linux-2.6.32.24/drivers/char/hvcs.c 2010-10-23 19:59:19.000000000 -0400
23947@@ -269,7 +269,7 @@ struct hvcs_struct {
23948 unsigned int index; 23545 unsigned int index;
23949 23546
23950 struct tty_struct *tty; 23547 struct tty_struct *tty;
@@ -23953,7 +23550,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
23953 23550
23954 /* 23551 /*
23955 * Used to tell the driver kernel_thread what operations need to take 23552 * Used to tell the driver kernel_thread what operations need to take
23956@@ -419,7 +419,7 @@ static ssize_t hvcs_vterm_state_store(st 23553@@ -420,7 +420,7 @@ static ssize_t hvcs_vterm_state_store(st
23957 23554
23958 spin_lock_irqsave(&hvcsd->lock, flags); 23555 spin_lock_irqsave(&hvcsd->lock, flags);
23959 23556
@@ -23962,7 +23559,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
23962 spin_unlock_irqrestore(&hvcsd->lock, flags); 23559 spin_unlock_irqrestore(&hvcsd->lock, flags);
23963 printk(KERN_INFO "HVCS: vterm state unchanged. " 23560 printk(KERN_INFO "HVCS: vterm state unchanged. "
23964 "The hvcs device node is still in use.\n"); 23561 "The hvcs device node is still in use.\n");
23965@@ -1135,7 +1135,7 @@ static int hvcs_open(struct tty_struct * 23562@@ -1136,7 +1136,7 @@ static int hvcs_open(struct tty_struct *
23966 if ((retval = hvcs_partner_connect(hvcsd))) 23563 if ((retval = hvcs_partner_connect(hvcsd)))
23967 goto error_release; 23564 goto error_release;
23968 23565
@@ -23971,7 +23568,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
23971 hvcsd->tty = tty; 23568 hvcsd->tty = tty;
23972 tty->driver_data = hvcsd; 23569 tty->driver_data = hvcsd;
23973 23570
23974@@ -1169,7 +1169,7 @@ fast_open: 23571@@ -1170,7 +1170,7 @@ fast_open:
23975 23572
23976 spin_lock_irqsave(&hvcsd->lock, flags); 23573 spin_lock_irqsave(&hvcsd->lock, flags);
23977 kref_get(&hvcsd->kref); 23574 kref_get(&hvcsd->kref);
@@ -23980,7 +23577,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
23980 hvcsd->todo_mask |= HVCS_SCHED_READ; 23577 hvcsd->todo_mask |= HVCS_SCHED_READ;
23981 spin_unlock_irqrestore(&hvcsd->lock, flags); 23578 spin_unlock_irqrestore(&hvcsd->lock, flags);
23982 23579
23983@@ -1213,7 +1213,7 @@ static void hvcs_close(struct tty_struct 23580@@ -1214,7 +1214,7 @@ static void hvcs_close(struct tty_struct
23984 hvcsd = tty->driver_data; 23581 hvcsd = tty->driver_data;
23985 23582
23986 spin_lock_irqsave(&hvcsd->lock, flags); 23583 spin_lock_irqsave(&hvcsd->lock, flags);
@@ -23989,7 +23586,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
23989 23586
23990 vio_disable_interrupts(hvcsd->vdev); 23587 vio_disable_interrupts(hvcsd->vdev);
23991 23588
23992@@ -1239,10 +1239,10 @@ static void hvcs_close(struct tty_struct 23589@@ -1240,10 +1240,10 @@ static void hvcs_close(struct tty_struct
23993 free_irq(irq, hvcsd); 23590 free_irq(irq, hvcsd);
23994 kref_put(&hvcsd->kref, destroy_hvcs_struct); 23591 kref_put(&hvcsd->kref, destroy_hvcs_struct);
23995 return; 23592 return;
@@ -24002,7 +23599,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
24002 } 23599 }
24003 23600
24004 spin_unlock_irqrestore(&hvcsd->lock, flags); 23601 spin_unlock_irqrestore(&hvcsd->lock, flags);
24005@@ -1258,7 +1258,7 @@ static void hvcs_hangup(struct tty_struc 23602@@ -1259,7 +1259,7 @@ static void hvcs_hangup(struct tty_struc
24006 23603
24007 spin_lock_irqsave(&hvcsd->lock, flags); 23604 spin_lock_irqsave(&hvcsd->lock, flags);
24008 /* Preserve this so that we know how many kref refs to put */ 23605 /* Preserve this so that we know how many kref refs to put */
@@ -24011,7 +23608,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
24011 23608
24012 /* 23609 /*
24013 * Don't kref put inside the spinlock because the destruction 23610 * Don't kref put inside the spinlock because the destruction
24014@@ -1273,7 +1273,7 @@ static void hvcs_hangup(struct tty_struc 23611@@ -1274,7 +1274,7 @@ static void hvcs_hangup(struct tty_struc
24015 hvcsd->tty->driver_data = NULL; 23612 hvcsd->tty->driver_data = NULL;
24016 hvcsd->tty = NULL; 23613 hvcsd->tty = NULL;
24017 23614
@@ -24020,7 +23617,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
24020 23617
24021 /* This will drop any buffered data on the floor which is OK in a hangup 23618 /* This will drop any buffered data on the floor which is OK in a hangup
24022 * scenario. */ 23619 * scenario. */
24023@@ -1344,7 +1344,7 @@ static int hvcs_write(struct tty_struct 23620@@ -1345,7 +1345,7 @@ static int hvcs_write(struct tty_struct
24024 * the middle of a write operation? This is a crummy place to do this 23621 * the middle of a write operation? This is a crummy place to do this
24025 * but we want to keep it all in the spinlock. 23622 * but we want to keep it all in the spinlock.
24026 */ 23623 */
@@ -24029,7 +23626,7 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
24029 spin_unlock_irqrestore(&hvcsd->lock, flags); 23626 spin_unlock_irqrestore(&hvcsd->lock, flags);
24030 return -ENODEV; 23627 return -ENODEV;
24031 } 23628 }
24032@@ -1418,7 +1418,7 @@ static int hvcs_write_room(struct tty_st 23629@@ -1419,7 +1419,7 @@ static int hvcs_write_room(struct tty_st
24033 { 23630 {
24034 struct hvcs_struct *hvcsd = tty->driver_data; 23631 struct hvcs_struct *hvcsd = tty->driver_data;
24035 23632
@@ -24038,45 +23635,9 @@ diff -urNp linux-2.6.32.24/drivers/char/hvcs.c linux-2.6.32.24/drivers/char/hvcs
24038 return 0; 23635 return 0;
24039 23636
24040 return HVCS_BUFF_LEN - hvcsd->chars_in_buffer; 23637 return HVCS_BUFF_LEN - hvcsd->chars_in_buffer;
24041diff -urNp linux-2.6.32.24/drivers/char/hvc_udbg.c linux-2.6.32.24/drivers/char/hvc_udbg.c 23638diff -urNp linux-2.6.35.7/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.35.7/drivers/char/ipmi/ipmi_msghandler.c
24042--- linux-2.6.32.24/drivers/char/hvc_udbg.c 2010-08-13 16:24:37.000000000 -0400 23639--- linux-2.6.35.7/drivers/char/ipmi/ipmi_msghandler.c 2010-08-26 19:47:12.000000000 -0400
24043+++ linux-2.6.32.24/drivers/char/hvc_udbg.c 2010-10-23 19:59:19.000000000 -0400 23640+++ linux-2.6.35.7/drivers/char/ipmi/ipmi_msghandler.c 2010-09-17 20:12:09.000000000 -0400
24044@@ -58,7 +58,7 @@ static int hvc_udbg_get(uint32_t vtermno
24045 return i;
24046 }
24047
24048-static struct hv_ops hvc_udbg_ops = {
24049+static const struct hv_ops hvc_udbg_ops = {
24050 .get_chars = hvc_udbg_get,
24051 .put_chars = hvc_udbg_put,
24052 };
24053diff -urNp linux-2.6.32.24/drivers/char/hvc_vio.c linux-2.6.32.24/drivers/char/hvc_vio.c
24054--- linux-2.6.32.24/drivers/char/hvc_vio.c 2010-08-13 16:24:37.000000000 -0400
24055+++ linux-2.6.32.24/drivers/char/hvc_vio.c 2010-10-23 19:59:19.000000000 -0400
24056@@ -77,7 +77,7 @@ static int filtered_get_chars(uint32_t v
24057 return got;
24058 }
24059
24060-static struct hv_ops hvc_get_put_ops = {
24061+static const struct hv_ops hvc_get_put_ops = {
24062 .get_chars = filtered_get_chars,
24063 .put_chars = hvc_put_chars,
24064 .notifier_add = notifier_add_irq,
24065diff -urNp linux-2.6.32.24/drivers/char/hvc_xen.c linux-2.6.32.24/drivers/char/hvc_xen.c
24066--- linux-2.6.32.24/drivers/char/hvc_xen.c 2010-08-13 16:24:37.000000000 -0400
24067+++ linux-2.6.32.24/drivers/char/hvc_xen.c 2010-10-23 19:59:19.000000000 -0400
24068@@ -120,7 +120,7 @@ static int read_console(uint32_t vtermno
24069 return recv;
24070 }
24071
24072-static struct hv_ops hvc_ops = {
24073+static const struct hv_ops hvc_ops = {
24074 .get_chars = read_console,
24075 .put_chars = write_console,
24076 .notifier_add = notifier_add_irq,
24077diff -urNp linux-2.6.32.24/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.32.24/drivers/char/ipmi/ipmi_msghandler.c
24078--- linux-2.6.32.24/drivers/char/ipmi/ipmi_msghandler.c 2010-08-13 16:24:37.000000000 -0400
24079+++ linux-2.6.32.24/drivers/char/ipmi/ipmi_msghandler.c 2010-10-23 19:59:19.000000000 -0400
24080@@ -414,7 +414,7 @@ struct ipmi_smi { 23641@@ -414,7 +414,7 @@ struct ipmi_smi {
24081 struct proc_dir_entry *proc_dir; 23642 struct proc_dir_entry *proc_dir;
24082 char proc_dir_name[10]; 23643 char proc_dir_name[10];
@@ -24098,7 +23659,7 @@ diff -urNp linux-2.6.32.24/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.32.24/d
24098 23659
24099 static int is_lan_addr(struct ipmi_addr *addr) 23660 static int is_lan_addr(struct ipmi_addr *addr)
24100 { 23661 {
24101@@ -2808,7 +2808,7 @@ int ipmi_register_smi(struct ipmi_smi_ha 23662@@ -2817,7 +2817,7 @@ int ipmi_register_smi(struct ipmi_smi_ha
24102 INIT_LIST_HEAD(&intf->cmd_rcvrs); 23663 INIT_LIST_HEAD(&intf->cmd_rcvrs);
24103 init_waitqueue_head(&intf->waitq); 23664 init_waitqueue_head(&intf->waitq);
24104 for (i = 0; i < IPMI_NUM_STATS; i++) 23665 for (i = 0; i < IPMI_NUM_STATS; i++)
@@ -24107,10 +23668,10 @@ diff -urNp linux-2.6.32.24/drivers/char/ipmi/ipmi_msghandler.c linux-2.6.32.24/d
24107 23668
24108 intf->proc_dir = NULL; 23669 intf->proc_dir = NULL;
24109 23670
24110diff -urNp linux-2.6.32.24/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.32.24/drivers/char/ipmi/ipmi_si_intf.c 23671diff -urNp linux-2.6.35.7/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.35.7/drivers/char/ipmi/ipmi_si_intf.c
24111--- linux-2.6.32.24/drivers/char/ipmi/ipmi_si_intf.c 2010-08-13 16:24:37.000000000 -0400 23672--- linux-2.6.35.7/drivers/char/ipmi/ipmi_si_intf.c 2010-08-26 19:47:12.000000000 -0400
24112+++ linux-2.6.32.24/drivers/char/ipmi/ipmi_si_intf.c 2010-10-23 19:59:19.000000000 -0400 23673+++ linux-2.6.35.7/drivers/char/ipmi/ipmi_si_intf.c 2010-09-17 20:12:09.000000000 -0400
24113@@ -277,7 +277,7 @@ struct smi_info { 23674@@ -286,7 +286,7 @@ struct smi_info {
24114 unsigned char slave_addr; 23675 unsigned char slave_addr;
24115 23676
24116 /* Counters and things for the proc filesystem. */ 23677 /* Counters and things for the proc filesystem. */
@@ -24119,7 +23680,7 @@ diff -urNp linux-2.6.32.24/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.32.24/driv
24119 23680
24120 struct task_struct *thread; 23681 struct task_struct *thread;
24121 23682
24122@@ -285,9 +285,9 @@ struct smi_info { 23683@@ -294,9 +294,9 @@ struct smi_info {
24123 }; 23684 };
24124 23685
24125 #define smi_inc_stat(smi, stat) \ 23686 #define smi_inc_stat(smi, stat) \
@@ -24131,19 +23692,19 @@ diff -urNp linux-2.6.32.24/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.32.24/driv
24131 23692
24132 #define SI_MAX_PARMS 4 23693 #define SI_MAX_PARMS 4
24133 23694
24134@@ -2931,7 +2931,7 @@ static int try_smi_init(struct smi_info 23695@@ -3143,7 +3143,7 @@ static int try_smi_init(struct smi_info
24135 atomic_set(&new_smi->req_events, 0); 23696 atomic_set(&new_smi->req_events, 0);
24136 new_smi->run_to_completion = 0; 23697 new_smi->run_to_completion = 0;
24137 for (i = 0; i < SI_NUM_STATS; i++) 23698 for (i = 0; i < SI_NUM_STATS; i++)
24138- atomic_set(&new_smi->stats[i], 0); 23699- atomic_set(&new_smi->stats[i], 0);
24139+ atomic_set_unchecked(&new_smi->stats[i], 0); 23700+ atomic_set_unchecked(&new_smi->stats[i], 0);
24140 23701
24141 new_smi->interrupt_disabled = 0; 23702 new_smi->interrupt_disabled = 1;
24142 atomic_set(&new_smi->stop_operation, 0); 23703 atomic_set(&new_smi->stop_operation, 0);
24143diff -urNp linux-2.6.32.24/drivers/char/keyboard.c linux-2.6.32.24/drivers/char/keyboard.c 23704diff -urNp linux-2.6.35.7/drivers/char/keyboard.c linux-2.6.35.7/drivers/char/keyboard.c
24144--- linux-2.6.32.24/drivers/char/keyboard.c 2010-08-13 16:24:37.000000000 -0400 23705--- linux-2.6.35.7/drivers/char/keyboard.c 2010-08-26 19:47:12.000000000 -0400
24145+++ linux-2.6.32.24/drivers/char/keyboard.c 2010-10-23 19:59:19.000000000 -0400 23706+++ linux-2.6.35.7/drivers/char/keyboard.c 2010-09-17 20:12:37.000000000 -0400
24146@@ -635,6 +635,16 @@ static void k_spec(struct vc_data *vc, u 23707@@ -640,6 +640,16 @@ static void k_spec(struct vc_data *vc, u
24147 kbd->kbdmode == VC_MEDIUMRAW) && 23708 kbd->kbdmode == VC_MEDIUMRAW) &&
24148 value != KVAL(K_SAK)) 23709 value != KVAL(K_SAK))
24149 return; /* SAK is allowed even in raw mode */ 23710 return; /* SAK is allowed even in raw mode */
@@ -24160,7 +23721,7 @@ diff -urNp linux-2.6.32.24/drivers/char/keyboard.c linux-2.6.32.24/drivers/char/
24160 fn_handler[value](vc); 23721 fn_handler[value](vc);
24161 } 23722 }
24162 23723
24163@@ -1386,7 +1396,7 @@ static const struct input_device_id kbd_ 23724@@ -1392,7 +1402,7 @@ static const struct input_device_id kbd_
24164 .evbit = { BIT_MASK(EV_SND) }, 23725 .evbit = { BIT_MASK(EV_SND) },
24165 }, 23726 },
24166 23727
@@ -24169,9 +23730,9 @@ diff -urNp linux-2.6.32.24/drivers/char/keyboard.c linux-2.6.32.24/drivers/char/
24169 }; 23730 };
24170 23731
24171 MODULE_DEVICE_TABLE(input, kbd_ids); 23732 MODULE_DEVICE_TABLE(input, kbd_ids);
24172diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c 23733diff -urNp linux-2.6.35.7/drivers/char/mem.c linux-2.6.35.7/drivers/char/mem.c
24173--- linux-2.6.32.24/drivers/char/mem.c 2010-09-26 17:26:05.000000000 -0400 23734--- linux-2.6.35.7/drivers/char/mem.c 2010-09-26 17:32:11.000000000 -0400
24174+++ linux-2.6.32.24/drivers/char/mem.c 2010-10-23 19:59:19.000000000 -0400 23735+++ linux-2.6.35.7/drivers/char/mem.c 2010-09-26 17:32:46.000000000 -0400
24175@@ -18,6 +18,7 @@ 23736@@ -18,6 +18,7 @@
24176 #include <linux/raw.h> 23737 #include <linux/raw.h>
24177 #include <linux/tty.h> 23738 #include <linux/tty.h>
@@ -24180,7 +23741,7 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24180 #include <linux/ptrace.h> 23741 #include <linux/ptrace.h>
24181 #include <linux/device.h> 23742 #include <linux/device.h>
24182 #include <linux/highmem.h> 23743 #include <linux/highmem.h>
24183@@ -35,6 +36,10 @@ 23744@@ -34,6 +35,10 @@
24184 # include <linux/efi.h> 23745 # include <linux/efi.h>
24185 #endif 23746 #endif
24186 23747
@@ -24191,20 +23752,19 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24191 static inline unsigned long size_inside_page(unsigned long start, 23752 static inline unsigned long size_inside_page(unsigned long start,
24192 unsigned long size) 23753 unsigned long size)
24193 { 23754 {
24194@@ -155,6 +160,8 @@ static ssize_t read_mem(struct file * fi 23755@@ -120,6 +125,7 @@ static ssize_t read_mem(struct file *fil
24195 #endif
24196 23756
24197 while (count > 0) { 23757 while (count > 0) {
23758 unsigned long remaining;
24198+ char *temp; 23759+ char *temp;
24199+ 23760
24200 /* 23761 sz = size_inside_page(p, count);
24201 * Handle first page in case it's not aligned 23762
24202 */ 23763@@ -135,7 +141,23 @@ static ssize_t read_mem(struct file *fil
24203@@ -177,11 +184,31 @@ static ssize_t read_mem(struct file * fi
24204 if (!ptr) 23764 if (!ptr)
24205 return -EFAULT; 23765 return -EFAULT;
24206 23766
24207- if (copy_to_user(buf, ptr, sz)) { 23767- remaining = copy_to_user(buf, ptr, sz);
24208+#ifdef CONFIG_PAX_USERCOPY 23768+#ifdef CONFIG_PAX_USERCOPY
24209+ temp = kmalloc(sz, GFP_KERNEL); 23769+ temp = kmalloc(sz, GFP_KERNEL);
24210+ if (!temp) { 23770+ if (!temp) {
@@ -24216,24 +23776,16 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24216+ temp = ptr; 23776+ temp = ptr;
24217+#endif 23777+#endif
24218+ 23778+
24219+ if (copy_to_user(buf, temp, sz)) { 23779+ remaining = copy_to_user(buf, temp, sz);
24220+
24221+#ifdef CONFIG_PAX_USERCOPY
24222+ kfree(temp);
24223+#endif
24224+ 23780+
24225 unxlate_dev_mem_ptr(p, ptr);
24226 return -EFAULT;
24227 }
24228
24229+#ifdef CONFIG_PAX_USERCOPY 23781+#ifdef CONFIG_PAX_USERCOPY
24230+ kfree(temp); 23782+ kfree(temp);
24231+#endif 23783+#endif
24232+ 23784+
24233 unxlate_dev_mem_ptr(p, ptr); 23785 unxlate_dev_mem_ptr(p, ptr);
24234 23786 if (remaining)
24235 buf += sz; 23787 return -EFAULT;
24236@@ -205,6 +232,11 @@ static ssize_t write_mem(struct file * f 23788@@ -161,6 +183,11 @@ static ssize_t write_mem(struct file *fi
24237 if (!valid_phys_addr_range(p, count)) 23789 if (!valid_phys_addr_range(p, count))
24238 return -EFAULT; 23790 return -EFAULT;
24239 23791
@@ -24245,7 +23797,7 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24245 written = 0; 23797 written = 0;
24246 23798
24247 #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED 23799 #ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
24248@@ -337,6 +369,11 @@ static int mmap_mem(struct file * file, 23800@@ -316,6 +343,11 @@ static int mmap_mem(struct file *file, s
24249 &vma->vm_page_prot)) 23801 &vma->vm_page_prot))
24250 return -EINVAL; 23802 return -EINVAL;
24251 23803
@@ -24257,7 +23809,7 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24257 vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff, 23809 vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
24258 size, 23810 size,
24259 vma->vm_page_prot); 23811 vma->vm_page_prot);
24260@@ -419,9 +456,8 @@ static ssize_t read_kmem(struct file *fi 23812@@ -398,9 +430,8 @@ static ssize_t read_kmem(struct file *fi
24261 size_t count, loff_t *ppos) 23813 size_t count, loff_t *ppos)
24262 { 23814 {
24263 unsigned long p = *ppos; 23815 unsigned long p = *ppos;
@@ -24268,7 +23820,7 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24268 23820
24269 read = 0; 23821 read = 0;
24270 if (p < (unsigned long) high_memory) { 23822 if (p < (unsigned long) high_memory) {
24271@@ -444,6 +480,8 @@ static ssize_t read_kmem(struct file *fi 23823@@ -422,6 +453,8 @@ static ssize_t read_kmem(struct file *fi
24272 } 23824 }
24273 #endif 23825 #endif
24274 while (low_count > 0) { 23826 while (low_count > 0) {
@@ -24277,7 +23829,7 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24277 sz = size_inside_page(p, low_count); 23829 sz = size_inside_page(p, low_count);
24278 23830
24279 /* 23831 /*
24280@@ -453,7 +491,22 @@ static ssize_t read_kmem(struct file *fi 23832@@ -431,7 +464,22 @@ static ssize_t read_kmem(struct file *fi
24281 */ 23833 */
24282 kbuf = xlate_dev_kmem_ptr((char *)p); 23834 kbuf = xlate_dev_kmem_ptr((char *)p);
24283 23835
@@ -24301,7 +23853,7 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24301 return -EFAULT; 23853 return -EFAULT;
24302 buf += sz; 23854 buf += sz;
24303 p += sz; 23855 p += sz;
24304@@ -560,6 +613,11 @@ static ssize_t write_kmem(struct file * 23856@@ -530,6 +578,11 @@ static ssize_t write_kmem(struct file *f
24305 char * kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */ 23857 char * kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */
24306 int err = 0; 23858 int err = 0;
24307 23859
@@ -24311,9 +23863,9 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24311+#endif 23863+#endif
24312+ 23864+
24313 if (p < (unsigned long) high_memory) { 23865 if (p < (unsigned long) high_memory) {
24314 23866 unsigned long to_write = min_t(unsigned long, count,
24315 wrote = count; 23867 (unsigned long)high_memory - p);
24316@@ -765,6 +823,16 @@ static loff_t memory_lseek(struct file * 23868@@ -731,6 +784,16 @@ static loff_t memory_lseek(struct file *
24317 23869
24318 static int open_port(struct inode * inode, struct file * filp) 23870 static int open_port(struct inode * inode, struct file * filp)
24319 { 23871 {
@@ -24330,7 +23882,7 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24330 return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; 23882 return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
24331 } 23883 }
24332 23884
24333@@ -772,7 +840,6 @@ static int open_port(struct inode * inod 23885@@ -738,7 +801,6 @@ static int open_port(struct inode * inod
24334 #define full_lseek null_lseek 23886 #define full_lseek null_lseek
24335 #define write_zero write_null 23887 #define write_zero write_null
24336 #define read_full read_zero 23888 #define read_full read_zero
@@ -24338,7 +23890,7 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24338 #define open_kmem open_mem 23890 #define open_kmem open_mem
24339 #define open_oldmem open_mem 23891 #define open_oldmem open_mem
24340 23892
24341@@ -889,6 +956,9 @@ static const struct memdev { 23893@@ -855,6 +917,9 @@ static const struct memdev {
24342 #ifdef CONFIG_CRASH_DUMP 23894 #ifdef CONFIG_CRASH_DUMP
24343 [12] = { "oldmem", 0, &oldmem_fops, NULL }, 23895 [12] = { "oldmem", 0, &oldmem_fops, NULL },
24344 #endif 23896 #endif
@@ -24348,10 +23900,31 @@ diff -urNp linux-2.6.32.24/drivers/char/mem.c linux-2.6.32.24/drivers/char/mem.c
24348 }; 23900 };
24349 23901
24350 static int memory_open(struct inode *inode, struct file *filp) 23902 static int memory_open(struct inode *inode, struct file *filp)
24351diff -urNp linux-2.6.32.24/drivers/char/nvram.c linux-2.6.32.24/drivers/char/nvram.c 23903diff -urNp linux-2.6.35.7/drivers/char/n_tty.c linux-2.6.35.7/drivers/char/n_tty.c
24352--- linux-2.6.32.24/drivers/char/nvram.c 2010-08-13 16:24:37.000000000 -0400 23904--- linux-2.6.35.7/drivers/char/n_tty.c 2010-08-26 19:47:12.000000000 -0400
24353+++ linux-2.6.32.24/drivers/char/nvram.c 2010-10-23 19:59:19.000000000 -0400 23905+++ linux-2.6.35.7/drivers/char/n_tty.c 2010-09-17 20:12:09.000000000 -0400
24354@@ -435,7 +435,10 @@ static const struct file_operations nvra 23906@@ -2105,6 +2105,7 @@ void n_tty_inherit_ops(struct tty_ldisc_
23907 {
23908 *ops = tty_ldisc_N_TTY;
23909 ops->owner = NULL;
23910- ops->refcount = ops->flags = 0;
23911+ atomic_set(&ops->refcount, 0);
23912+ ops->flags = 0;
23913 }
23914 EXPORT_SYMBOL_GPL(n_tty_inherit_ops);
23915diff -urNp linux-2.6.35.7/drivers/char/nvram.c linux-2.6.35.7/drivers/char/nvram.c
23916--- linux-2.6.35.7/drivers/char/nvram.c 2010-08-26 19:47:12.000000000 -0400
23917+++ linux-2.6.35.7/drivers/char/nvram.c 2010-09-17 20:12:09.000000000 -0400
23918@@ -245,7 +245,7 @@ static ssize_t nvram_read(struct file *f
23919
23920 spin_unlock_irq(&rtc_lock);
23921
23922- if (copy_to_user(buf, contents, tmp - contents))
23923+ if (tmp - contents > sizeof(contents) || copy_to_user(buf, contents, tmp - contents))
23924 return -EFAULT;
23925
23926 *ppos = i;
23927@@ -434,7 +434,10 @@ static const struct file_operations nvra
24355 static struct miscdevice nvram_dev = { 23928 static struct miscdevice nvram_dev = {
24356 NVRAM_MINOR, 23929 NVRAM_MINOR,
24357 "nvram", 23930 "nvram",
@@ -24363,9 +23936,9 @@ diff -urNp linux-2.6.32.24/drivers/char/nvram.c linux-2.6.32.24/drivers/char/nvr
24363 }; 23936 };
24364 23937
24365 static int __init nvram_init(void) 23938 static int __init nvram_init(void)
24366diff -urNp linux-2.6.32.24/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.24/drivers/char/pcmcia/ipwireless/tty.c 23939diff -urNp linux-2.6.35.7/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.35.7/drivers/char/pcmcia/ipwireless/tty.c
24367--- linux-2.6.32.24/drivers/char/pcmcia/ipwireless/tty.c 2010-08-13 16:24:37.000000000 -0400 23940--- linux-2.6.35.7/drivers/char/pcmcia/ipwireless/tty.c 2010-08-26 19:47:12.000000000 -0400
24368+++ linux-2.6.32.24/drivers/char/pcmcia/ipwireless/tty.c 2010-10-23 19:59:19.000000000 -0400 23941+++ linux-2.6.35.7/drivers/char/pcmcia/ipwireless/tty.c 2010-09-17 20:12:09.000000000 -0400
24369@@ -51,7 +51,7 @@ struct ipw_tty { 23942@@ -51,7 +51,7 @@ struct ipw_tty {
24370 int tty_type; 23943 int tty_type;
24371 struct ipw_network *network; 23944 struct ipw_network *network;
@@ -24471,7 +24044,7 @@ diff -urNp linux-2.6.32.24/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.24/
24471 return -EINVAL; 24044 return -EINVAL;
24472 24045
24473 /* FIXME: Exactly how is the tty object locked here .. */ 24046 /* FIXME: Exactly how is the tty object locked here .. */
24474@@ -591,7 +589,7 @@ void ipwireless_tty_free(struct ipw_tty 24047@@ -582,7 +580,7 @@ void ipwireless_tty_free(struct ipw_tty
24475 against a parallel ioctl etc */ 24048 against a parallel ioctl etc */
24476 mutex_lock(&ttyj->ipw_tty_mutex); 24049 mutex_lock(&ttyj->ipw_tty_mutex);
24477 } 24050 }
@@ -24480,10 +24053,10 @@ diff -urNp linux-2.6.32.24/drivers/char/pcmcia/ipwireless/tty.c linux-2.6.32.24/
24480 do_ipw_close(ttyj); 24053 do_ipw_close(ttyj);
24481 ipwireless_disassociate_network_ttys(network, 24054 ipwireless_disassociate_network_ttys(network,
24482 ttyj->channel_idx); 24055 ttyj->channel_idx);
24483diff -urNp linux-2.6.32.24/drivers/char/pty.c linux-2.6.32.24/drivers/char/pty.c 24056diff -urNp linux-2.6.35.7/drivers/char/pty.c linux-2.6.35.7/drivers/char/pty.c
24484--- linux-2.6.32.24/drivers/char/pty.c 2010-08-13 16:24:37.000000000 -0400 24057--- linux-2.6.35.7/drivers/char/pty.c 2010-08-26 19:47:12.000000000 -0400
24485+++ linux-2.6.32.24/drivers/char/pty.c 2010-10-23 19:59:19.000000000 -0400 24058+++ linux-2.6.35.7/drivers/char/pty.c 2010-09-17 20:12:09.000000000 -0400
24486@@ -682,7 +682,18 @@ static int ptmx_open(struct inode *inode 24059@@ -677,7 +677,18 @@ static int ptmx_open(struct inode *inode
24487 return ret; 24060 return ret;
24488 } 24061 }
24489 24062
@@ -24503,7 +24076,7 @@ diff -urNp linux-2.6.32.24/drivers/char/pty.c linux-2.6.32.24/drivers/char/pty.c
24503 24076
24504 static void __init unix98_pty_init(void) 24077 static void __init unix98_pty_init(void)
24505 { 24078 {
24506@@ -736,9 +747,6 @@ static void __init unix98_pty_init(void) 24079@@ -731,9 +742,6 @@ static void __init unix98_pty_init(void)
24507 register_sysctl_table(pty_root_table); 24080 register_sysctl_table(pty_root_table);
24508 24081
24509 /* Now create the /dev/ptmx special device */ 24082 /* Now create the /dev/ptmx special device */
@@ -24513,9 +24086,9 @@ diff -urNp linux-2.6.32.24/drivers/char/pty.c linux-2.6.32.24/drivers/char/pty.c
24513 cdev_init(&ptmx_cdev, &ptmx_fops); 24086 cdev_init(&ptmx_cdev, &ptmx_fops);
24514 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || 24087 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
24515 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) 24088 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
24516diff -urNp linux-2.6.32.24/drivers/char/random.c linux-2.6.32.24/drivers/char/random.c 24089diff -urNp linux-2.6.35.7/drivers/char/random.c linux-2.6.35.7/drivers/char/random.c
24517--- linux-2.6.32.24/drivers/char/random.c 2010-08-13 16:24:37.000000000 -0400 24090--- linux-2.6.35.7/drivers/char/random.c 2010-08-26 19:47:12.000000000 -0400
24518+++ linux-2.6.32.24/drivers/char/random.c 2010-10-23 19:59:19.000000000 -0400 24091+++ linux-2.6.35.7/drivers/char/random.c 2010-09-17 20:24:41.000000000 -0400
24519@@ -254,8 +254,13 @@ 24092@@ -254,8 +254,13 @@
24520 /* 24093 /*
24521 * Configuration information 24094 * Configuration information
@@ -24528,9 +24101,9 @@ diff -urNp linux-2.6.32.24/drivers/char/random.c linux-2.6.32.24/drivers/char/ra
24528 #define OUTPUT_POOL_WORDS 32 24101 #define OUTPUT_POOL_WORDS 32
24529+#endif 24102+#endif
24530 #define SEC_XFER_SIZE 512 24103 #define SEC_XFER_SIZE 512
24104 #define EXTRACT_SIZE 10
24531 24105
24532 /* 24106@@ -293,10 +298,17 @@ static struct poolinfo {
24533@@ -292,10 +297,17 @@ static struct poolinfo {
24534 int poolwords; 24107 int poolwords;
24535 int tap1, tap2, tap3, tap4, tap5; 24108 int tap1, tap2, tap3, tap4, tap5;
24536 } poolinfo_table[] = { 24109 } poolinfo_table[] = {
@@ -24548,7 +24121,16 @@ diff -urNp linux-2.6.32.24/drivers/char/random.c linux-2.6.32.24/drivers/char/ra
24548 #if 0 24121 #if 0
24549 /* x^2048 + x^1638 + x^1231 + x^819 + x^411 + x + 1 -- 115 */ 24122 /* x^2048 + x^1638 + x^1231 + x^819 + x^411 + x + 1 -- 115 */
24550 { 2048, 1638, 1231, 819, 411, 1 }, 24123 { 2048, 1638, 1231, 819, 411, 1 },
24551@@ -1209,7 +1221,7 @@ EXPORT_SYMBOL(generate_random_uuid); 24124@@ -902,7 +914,7 @@ static ssize_t extract_entropy_user(stru
24125
24126 extract_buf(r, tmp);
24127 i = min_t(int, nbytes, EXTRACT_SIZE);
24128- if (copy_to_user(buf, tmp, i)) {
24129+ if (i > sizeof(tmp) || copy_to_user(buf, tmp, i)) {
24130 ret = -EFAULT;
24131 break;
24132 }
24133@@ -1205,7 +1217,7 @@ EXPORT_SYMBOL(generate_random_uuid);
24552 #include <linux/sysctl.h> 24134 #include <linux/sysctl.h>
24553 24135
24554 static int min_read_thresh = 8, min_write_thresh; 24136 static int min_read_thresh = 8, min_write_thresh;
@@ -24557,9 +24139,9 @@ diff -urNp linux-2.6.32.24/drivers/char/random.c linux-2.6.32.24/drivers/char/ra
24557 static int max_write_thresh = INPUT_POOL_WORDS * 32; 24139 static int max_write_thresh = INPUT_POOL_WORDS * 32;
24558 static char sysctl_bootid[16]; 24140 static char sysctl_bootid[16];
24559 24141
24560diff -urNp linux-2.6.32.24/drivers/char/sonypi.c linux-2.6.32.24/drivers/char/sonypi.c 24142diff -urNp linux-2.6.35.7/drivers/char/sonypi.c linux-2.6.35.7/drivers/char/sonypi.c
24561--- linux-2.6.32.24/drivers/char/sonypi.c 2010-08-13 16:24:37.000000000 -0400 24143--- linux-2.6.35.7/drivers/char/sonypi.c 2010-08-26 19:47:12.000000000 -0400
24562+++ linux-2.6.32.24/drivers/char/sonypi.c 2010-10-23 19:59:19.000000000 -0400 24144+++ linux-2.6.35.7/drivers/char/sonypi.c 2010-09-17 20:12:09.000000000 -0400
24563@@ -491,7 +491,7 @@ static struct sonypi_device { 24145@@ -491,7 +491,7 @@ static struct sonypi_device {
24564 spinlock_t fifo_lock; 24146 spinlock_t fifo_lock;
24565 wait_queue_head_t fifo_proc_list; 24147 wait_queue_head_t fifo_proc_list;
@@ -24569,7 +24151,7 @@ diff -urNp linux-2.6.32.24/drivers/char/sonypi.c linux-2.6.32.24/drivers/char/so
24569 int model; 24151 int model;
24570 struct input_dev *input_jog_dev; 24152 struct input_dev *input_jog_dev;
24571 struct input_dev *input_key_dev; 24153 struct input_dev *input_key_dev;
24572@@ -895,7 +895,7 @@ static int sonypi_misc_fasync(int fd, st 24154@@ -898,7 +898,7 @@ static int sonypi_misc_fasync(int fd, st
24573 static int sonypi_misc_release(struct inode *inode, struct file *file) 24155 static int sonypi_misc_release(struct inode *inode, struct file *file)
24574 { 24156 {
24575 mutex_lock(&sonypi_device.lock); 24157 mutex_lock(&sonypi_device.lock);
@@ -24578,22 +24160,22 @@ diff -urNp linux-2.6.32.24/drivers/char/sonypi.c linux-2.6.32.24/drivers/char/so
24578 mutex_unlock(&sonypi_device.lock); 24160 mutex_unlock(&sonypi_device.lock);
24579 return 0; 24161 return 0;
24580 } 24162 }
24581@@ -905,9 +905,9 @@ static int sonypi_misc_open(struct inode 24163@@ -907,9 +907,9 @@ static int sonypi_misc_open(struct inode
24582 lock_kernel(); 24164 {
24583 mutex_lock(&sonypi_device.lock); 24165 mutex_lock(&sonypi_device.lock);
24584 /* Flush input queue on first open */ 24166 /* Flush input queue on first open */
24585- if (!sonypi_device.open_count) 24167- if (!sonypi_device.open_count)
24586+ if (!atomic_read(&sonypi_device.open_count)) 24168+ if (!atomic_read(&sonypi_device.open_count))
24587 kfifo_reset(sonypi_device.fifo); 24169 kfifo_reset(&sonypi_device.fifo);
24588- sonypi_device.open_count++; 24170- sonypi_device.open_count++;
24589+ atomic_inc(&sonypi_device.open_count); 24171+ atomic_inc(&sonypi_device.open_count);
24590 mutex_unlock(&sonypi_device.lock); 24172 mutex_unlock(&sonypi_device.lock);
24591 unlock_kernel(); 24173
24592 return 0; 24174 return 0;
24593diff -urNp linux-2.6.32.24/drivers/char/tpm/tpm_bios.c linux-2.6.32.24/drivers/char/tpm/tpm_bios.c 24175diff -urNp linux-2.6.35.7/drivers/char/tpm/tpm_bios.c linux-2.6.35.7/drivers/char/tpm/tpm_bios.c
24594--- linux-2.6.32.24/drivers/char/tpm/tpm_bios.c 2010-08-13 16:24:37.000000000 -0400 24176--- linux-2.6.35.7/drivers/char/tpm/tpm_bios.c 2010-08-26 19:47:12.000000000 -0400
24595+++ linux-2.6.32.24/drivers/char/tpm/tpm_bios.c 2010-10-23 19:59:19.000000000 -0400 24177+++ linux-2.6.35.7/drivers/char/tpm/tpm_bios.c 2010-09-17 20:12:09.000000000 -0400
24596@@ -172,7 +172,7 @@ static void *tpm_bios_measurements_start 24178@@ -173,7 +173,7 @@ static void *tpm_bios_measurements_start
24597 event = addr; 24179 event = addr;
24598 24180
24599 if ((event->event_type == 0 && event->event_size == 0) || 24181 if ((event->event_type == 0 && event->event_size == 0) ||
@@ -24602,7 +24184,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tpm/tpm_bios.c linux-2.6.32.24/drivers/c
24602 return NULL; 24184 return NULL;
24603 24185
24604 return addr; 24186 return addr;
24605@@ -197,7 +197,7 @@ static void *tpm_bios_measurements_next( 24187@@ -198,7 +198,7 @@ static void *tpm_bios_measurements_next(
24606 return NULL; 24188 return NULL;
24607 24189
24608 if ((event->event_type == 0 && event->event_size == 0) || 24190 if ((event->event_type == 0 && event->event_size == 0) ||
@@ -24611,7 +24193,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tpm/tpm_bios.c linux-2.6.32.24/drivers/c
24611 return NULL; 24193 return NULL;
24612 24194
24613 (*pos)++; 24195 (*pos)++;
24614@@ -290,7 +290,8 @@ static int tpm_binary_bios_measurements_ 24196@@ -291,7 +291,8 @@ static int tpm_binary_bios_measurements_
24615 int i; 24197 int i;
24616 24198
24617 for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++) 24199 for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++)
@@ -24621,7 +24203,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tpm/tpm_bios.c linux-2.6.32.24/drivers/c
24621 24203
24622 return 0; 24204 return 0;
24623 } 24205 }
24624@@ -409,6 +410,11 @@ static int read_log(struct tpm_bios_log 24206@@ -410,6 +411,11 @@ static int read_log(struct tpm_bios_log
24625 log->bios_event_log_end = log->bios_event_log + len; 24207 log->bios_event_log_end = log->bios_event_log + len;
24626 24208
24627 virt = acpi_os_map_memory(start, len); 24209 virt = acpi_os_map_memory(start, len);
@@ -24633,10 +24215,10 @@ diff -urNp linux-2.6.32.24/drivers/char/tpm/tpm_bios.c linux-2.6.32.24/drivers/c
24633 24215
24634 memcpy(log->bios_event_log, virt, len); 24216 memcpy(log->bios_event_log, virt, len);
24635 24217
24636diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tty_io.c 24218diff -urNp linux-2.6.35.7/drivers/char/tty_io.c linux-2.6.35.7/drivers/char/tty_io.c
24637--- linux-2.6.32.24/drivers/char/tty_io.c 2010-08-13 16:24:37.000000000 -0400 24219--- linux-2.6.35.7/drivers/char/tty_io.c 2010-08-26 19:47:12.000000000 -0400
24638+++ linux-2.6.32.24/drivers/char/tty_io.c 2010-10-23 19:59:19.000000000 -0400 24220+++ linux-2.6.35.7/drivers/char/tty_io.c 2010-09-17 20:12:09.000000000 -0400
24639@@ -136,21 +136,10 @@ LIST_HEAD(tty_drivers); /* linked list 24221@@ -136,20 +136,10 @@ LIST_HEAD(tty_drivers); /* linked list
24640 DEFINE_MUTEX(tty_mutex); 24222 DEFINE_MUTEX(tty_mutex);
24641 EXPORT_SYMBOL(tty_mutex); 24223 EXPORT_SYMBOL(tty_mutex);
24642 24224
@@ -24646,7 +24228,6 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24646 size_t, loff_t *); 24228 size_t, loff_t *);
24647-static unsigned int tty_poll(struct file *, poll_table *); 24229-static unsigned int tty_poll(struct file *, poll_table *);
24648 static int tty_open(struct inode *, struct file *); 24230 static int tty_open(struct inode *, struct file *);
24649-static int tty_release(struct inode *, struct file *);
24650 long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 24231 long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
24651-#ifdef CONFIG_COMPAT 24232-#ifdef CONFIG_COMPAT
24652-static long tty_compat_ioctl(struct file *file, unsigned int cmd, 24233-static long tty_compat_ioctl(struct file *file, unsigned int cmd,
@@ -24658,7 +24239,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24658 static void release_tty(struct tty_struct *tty, int idx); 24239 static void release_tty(struct tty_struct *tty, int idx);
24659 static void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); 24240 static void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty);
24660 static void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); 24241 static void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty);
24661@@ -870,7 +859,7 @@ EXPORT_SYMBOL(start_tty); 24242@@ -871,7 +861,7 @@ EXPORT_SYMBOL(start_tty);
24662 * read calls may be outstanding in parallel. 24243 * read calls may be outstanding in parallel.
24663 */ 24244 */
24664 24245
@@ -24667,7 +24248,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24667 loff_t *ppos) 24248 loff_t *ppos)
24668 { 24249 {
24669 int i; 24250 int i;
24670@@ -898,6 +887,8 @@ static ssize_t tty_read(struct file *fil 24251@@ -899,6 +889,8 @@ static ssize_t tty_read(struct file *fil
24671 return i; 24252 return i;
24672 } 24253 }
24673 24254
@@ -24676,7 +24257,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24676 void tty_write_unlock(struct tty_struct *tty) 24257 void tty_write_unlock(struct tty_struct *tty)
24677 { 24258 {
24678 mutex_unlock(&tty->atomic_write_lock); 24259 mutex_unlock(&tty->atomic_write_lock);
24679@@ -1045,7 +1036,7 @@ void tty_write_message(struct tty_struct 24260@@ -1048,7 +1040,7 @@ void tty_write_message(struct tty_struct
24680 * write method will not be invoked in parallel for each device. 24261 * write method will not be invoked in parallel for each device.
24681 */ 24262 */
24682 24263
@@ -24685,7 +24266,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24685 size_t count, loff_t *ppos) 24266 size_t count, loff_t *ppos)
24686 { 24267 {
24687 struct tty_struct *tty; 24268 struct tty_struct *tty;
24688@@ -1072,6 +1063,8 @@ static ssize_t tty_write(struct file *fi 24269@@ -1075,6 +1067,8 @@ static ssize_t tty_write(struct file *fi
24689 return ret; 24270 return ret;
24690 } 24271 }
24691 24272
@@ -24694,25 +24275,16 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24694 ssize_t redirected_tty_write(struct file *file, const char __user *buf, 24275 ssize_t redirected_tty_write(struct file *file, const char __user *buf,
24695 size_t count, loff_t *ppos) 24276 size_t count, loff_t *ppos)
24696 { 24277 {
24697@@ -1867,7 +1860,7 @@ static int tty_open(struct inode *inode, 24278@@ -1897,6 +1891,8 @@ got_driver:
24698 * Takes bkl. See tty_release_dev 24279
24699 */
24700 24280
24701-static int tty_release(struct inode *inode, struct file *filp)
24702+int tty_release(struct inode *inode, struct file *filp)
24703 {
24704 lock_kernel();
24705 tty_release_dev(filp);
24706@@ -1875,6 +1868,8 @@ static int tty_release(struct inode *ino
24707 return 0;
24708 }
24709 24281
24710+EXPORT_SYMBOL(tty_release); 24282+EXPORT_SYMBOL(tty_release);
24711+ 24283+
24712 /** 24284 /**
24713 * tty_poll - check tty status 24285 * tty_poll - check tty status
24714 * @filp: file being polled 24286 * @filp: file being polled
24715@@ -1887,7 +1882,7 @@ static int tty_release(struct inode *ino 24287@@ -1909,7 +1905,7 @@ got_driver:
24716 * may be re-entered freely by other callers. 24288 * may be re-entered freely by other callers.
24717 */ 24289 */
24718 24290
@@ -24721,7 +24293,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24721 { 24293 {
24722 struct tty_struct *tty; 24294 struct tty_struct *tty;
24723 struct tty_ldisc *ld; 24295 struct tty_ldisc *ld;
24724@@ -1904,7 +1899,9 @@ static unsigned int tty_poll(struct file 24296@@ -1926,7 +1922,9 @@ static unsigned int tty_poll(struct file
24725 return ret; 24297 return ret;
24726 } 24298 }
24727 24299
@@ -24732,7 +24304,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24732 { 24304 {
24733 struct tty_struct *tty; 24305 struct tty_struct *tty;
24734 unsigned long flags; 24306 unsigned long flags;
24735@@ -1948,6 +1945,8 @@ out: 24307@@ -1970,6 +1968,8 @@ out:
24736 return retval; 24308 return retval;
24737 } 24309 }
24738 24310
@@ -24741,7 +24313,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24741 /** 24313 /**
24742 * tiocsti - fake input character 24314 * tiocsti - fake input character
24743 * @tty: tty to fake input into 24315 * @tty: tty to fake input into
24744@@ -2582,8 +2581,10 @@ long tty_ioctl(struct file *file, unsign 24316@@ -2602,8 +2602,10 @@ long tty_ioctl(struct file *file, unsign
24745 return retval; 24317 return retval;
24746 } 24318 }
24747 24319
@@ -24753,16 +24325,17 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24753 unsigned long arg) 24325 unsigned long arg)
24754 { 24326 {
24755 struct inode *inode = file->f_dentry->d_inode; 24327 struct inode *inode = file->f_dentry->d_inode;
24756@@ -2607,6 +2608,8 @@ static long tty_compat_ioctl(struct file 24328@@ -2627,6 +2629,9 @@ static long tty_compat_ioctl(struct file
24757 24329
24758 return retval; 24330 return retval;
24759 } 24331 }
24760+ 24332+
24761+EXPORT_SYMBOL(tty_compat_ioctl); 24333+EXPORT_SYMBOL(tty_compat_ioctl);
24334+
24762 #endif 24335 #endif
24763 24336
24764 /* 24337 /*
24765@@ -3050,11 +3053,6 @@ struct tty_struct *get_current_tty(void) 24338@@ -3070,11 +3075,6 @@ struct tty_struct *get_current_tty(void)
24766 } 24339 }
24767 EXPORT_SYMBOL_GPL(get_current_tty); 24340 EXPORT_SYMBOL_GPL(get_current_tty);
24768 24341
@@ -24774,10 +24347,10 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_io.c linux-2.6.32.24/drivers/char/tt
24774 /* 24347 /*
24775 * Initialize the console device. This is called *early*, so 24348 * Initialize the console device. This is called *early*, so
24776 * we can't necessarily depend on lots of kernel help here. 24349 * we can't necessarily depend on lots of kernel help here.
24777diff -urNp linux-2.6.32.24/drivers/char/tty_ldisc.c linux-2.6.32.24/drivers/char/tty_ldisc.c 24350diff -urNp linux-2.6.35.7/drivers/char/tty_ldisc.c linux-2.6.35.7/drivers/char/tty_ldisc.c
24778--- linux-2.6.32.24/drivers/char/tty_ldisc.c 2010-08-13 16:24:37.000000000 -0400 24351--- linux-2.6.35.7/drivers/char/tty_ldisc.c 2010-08-26 19:47:12.000000000 -0400
24779+++ linux-2.6.32.24/drivers/char/tty_ldisc.c 2010-10-23 19:59:19.000000000 -0400 24352+++ linux-2.6.35.7/drivers/char/tty_ldisc.c 2010-09-17 20:12:09.000000000 -0400
24780@@ -73,7 +73,7 @@ static void put_ldisc(struct tty_ldisc * 24353@@ -75,7 +75,7 @@ static void put_ldisc(struct tty_ldisc *
24781 if (atomic_dec_and_lock(&ld->users, &tty_ldisc_lock)) { 24354 if (atomic_dec_and_lock(&ld->users, &tty_ldisc_lock)) {
24782 struct tty_ldisc_ops *ldo = ld->ops; 24355 struct tty_ldisc_ops *ldo = ld->ops;
24783 24356
@@ -24786,7 +24359,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_ldisc.c linux-2.6.32.24/drivers/char
24786 module_put(ldo->owner); 24359 module_put(ldo->owner);
24787 spin_unlock_irqrestore(&tty_ldisc_lock, flags); 24360 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
24788 24361
24789@@ -107,7 +107,7 @@ int tty_register_ldisc(int disc, struct 24362@@ -109,7 +109,7 @@ int tty_register_ldisc(int disc, struct
24790 spin_lock_irqsave(&tty_ldisc_lock, flags); 24363 spin_lock_irqsave(&tty_ldisc_lock, flags);
24791 tty_ldiscs[disc] = new_ldisc; 24364 tty_ldiscs[disc] = new_ldisc;
24792 new_ldisc->num = disc; 24365 new_ldisc->num = disc;
@@ -24795,7 +24368,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_ldisc.c linux-2.6.32.24/drivers/char
24795 spin_unlock_irqrestore(&tty_ldisc_lock, flags); 24368 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
24796 24369
24797 return ret; 24370 return ret;
24798@@ -135,7 +135,7 @@ int tty_unregister_ldisc(int disc) 24371@@ -137,7 +137,7 @@ int tty_unregister_ldisc(int disc)
24799 return -EINVAL; 24372 return -EINVAL;
24800 24373
24801 spin_lock_irqsave(&tty_ldisc_lock, flags); 24374 spin_lock_irqsave(&tty_ldisc_lock, flags);
@@ -24804,7 +24377,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_ldisc.c linux-2.6.32.24/drivers/char
24804 ret = -EBUSY; 24377 ret = -EBUSY;
24805 else 24378 else
24806 tty_ldiscs[disc] = NULL; 24379 tty_ldiscs[disc] = NULL;
24807@@ -156,7 +156,7 @@ static struct tty_ldisc_ops *get_ldops(i 24380@@ -158,7 +158,7 @@ static struct tty_ldisc_ops *get_ldops(i
24808 if (ldops) { 24381 if (ldops) {
24809 ret = ERR_PTR(-EAGAIN); 24382 ret = ERR_PTR(-EAGAIN);
24810 if (try_module_get(ldops->owner)) { 24383 if (try_module_get(ldops->owner)) {
@@ -24813,7 +24386,7 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_ldisc.c linux-2.6.32.24/drivers/char
24813 ret = ldops; 24386 ret = ldops;
24814 } 24387 }
24815 } 24388 }
24816@@ -169,7 +169,7 @@ static void put_ldops(struct tty_ldisc_o 24389@@ -171,7 +171,7 @@ static void put_ldops(struct tty_ldisc_o
24817 unsigned long flags; 24390 unsigned long flags;
24818 24391
24819 spin_lock_irqsave(&tty_ldisc_lock, flags); 24392 spin_lock_irqsave(&tty_ldisc_lock, flags);
@@ -24822,20 +24395,9 @@ diff -urNp linux-2.6.32.24/drivers/char/tty_ldisc.c linux-2.6.32.24/drivers/char
24822 module_put(ldops->owner); 24395 module_put(ldops->owner);
24823 spin_unlock_irqrestore(&tty_ldisc_lock, flags); 24396 spin_unlock_irqrestore(&tty_ldisc_lock, flags);
24824 } 24397 }
24825diff -urNp linux-2.6.32.24/drivers/char/virtio_console.c linux-2.6.32.24/drivers/char/virtio_console.c 24398diff -urNp linux-2.6.35.7/drivers/char/vt_ioctl.c linux-2.6.35.7/drivers/char/vt_ioctl.c
24826--- linux-2.6.32.24/drivers/char/virtio_console.c 2010-08-13 16:24:37.000000000 -0400 24399--- linux-2.6.35.7/drivers/char/vt_ioctl.c 2010-08-26 19:47:12.000000000 -0400
24827+++ linux-2.6.32.24/drivers/char/virtio_console.c 2010-10-23 19:59:19.000000000 -0400 24400+++ linux-2.6.35.7/drivers/char/vt_ioctl.c 2010-09-17 20:12:37.000000000 -0400
24828@@ -44,6 +44,7 @@ static unsigned int in_len;
24829 static char *in, *inbuf;
24830
24831 /* The operations for our console. */
24832+/* cannot be const */
24833 static struct hv_ops virtio_cons;
24834
24835 /* The hvc device */
24836diff -urNp linux-2.6.32.24/drivers/char/vt_ioctl.c linux-2.6.32.24/drivers/char/vt_ioctl.c
24837--- linux-2.6.32.24/drivers/char/vt_ioctl.c 2010-08-13 16:24:37.000000000 -0400
24838+++ linux-2.6.32.24/drivers/char/vt_ioctl.c 2010-10-23 19:59:19.000000000 -0400
24839@@ -210,9 +210,6 @@ do_kdsk_ioctl(int cmd, struct kbentry __ 24401@@ -210,9 +210,6 @@ do_kdsk_ioctl(int cmd, struct kbentry __
24840 if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry))) 24402 if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry)))
24841 return -EFAULT; 24403 return -EFAULT;
@@ -24879,40 +24441,10 @@ diff -urNp linux-2.6.32.24/drivers/char/vt_ioctl.c linux-2.6.32.24/drivers/char/
24879 if (!perm) { 24441 if (!perm) {
24880 ret = -EPERM; 24442 ret = -EPERM;
24881 goto reterr; 24443 goto reterr;
24882diff -urNp linux-2.6.32.24/drivers/cpufreq/cpufreq.c linux-2.6.32.24/drivers/cpufreq/cpufreq.c 24444diff -urNp linux-2.6.35.7/drivers/cpuidle/sysfs.c linux-2.6.35.7/drivers/cpuidle/sysfs.c
24883--- linux-2.6.32.24/drivers/cpufreq/cpufreq.c 2010-08-13 16:24:37.000000000 -0400 24445--- linux-2.6.35.7/drivers/cpuidle/sysfs.c 2010-08-26 19:47:12.000000000 -0400
24884+++ linux-2.6.32.24/drivers/cpufreq/cpufreq.c 2010-10-23 19:59:19.000000000 -0400 24446+++ linux-2.6.35.7/drivers/cpuidle/sysfs.c 2010-09-17 20:12:09.000000000 -0400
24885@@ -750,7 +750,7 @@ static void cpufreq_sysfs_release(struct 24447@@ -300,7 +300,7 @@ static struct kobj_type ktype_state_cpui
24886 complete(&policy->kobj_unregister);
24887 }
24888
24889-static struct sysfs_ops sysfs_ops = {
24890+static const struct sysfs_ops sysfs_ops = {
24891 .show = show,
24892 .store = store,
24893 };
24894diff -urNp linux-2.6.32.24/drivers/cpuidle/sysfs.c linux-2.6.32.24/drivers/cpuidle/sysfs.c
24895--- linux-2.6.32.24/drivers/cpuidle/sysfs.c 2010-08-13 16:24:37.000000000 -0400
24896+++ linux-2.6.32.24/drivers/cpuidle/sysfs.c 2010-10-23 19:59:19.000000000 -0400
24897@@ -191,7 +191,7 @@ static ssize_t cpuidle_store(struct kobj
24898 return ret;
24899 }
24900
24901-static struct sysfs_ops cpuidle_sysfs_ops = {
24902+static const struct sysfs_ops cpuidle_sysfs_ops = {
24903 .show = cpuidle_show,
24904 .store = cpuidle_store,
24905 };
24906@@ -277,7 +277,7 @@ static ssize_t cpuidle_state_show(struct
24907 return ret;
24908 }
24909
24910-static struct sysfs_ops cpuidle_state_sysfs_ops = {
24911+static const struct sysfs_ops cpuidle_state_sysfs_ops = {
24912 .show = cpuidle_state_show,
24913 };
24914
24915@@ -294,7 +294,7 @@ static struct kobj_type ktype_state_cpui
24916 .release = cpuidle_state_sysfs_release, 24448 .release = cpuidle_state_sysfs_release,
24917 }; 24449 };
24918 24450
@@ -24921,34 +24453,10 @@ diff -urNp linux-2.6.32.24/drivers/cpuidle/sysfs.c linux-2.6.32.24/drivers/cpuid
24921 { 24453 {
24922 kobject_put(&device->kobjs[i]->kobj); 24454 kobject_put(&device->kobjs[i]->kobj);
24923 wait_for_completion(&device->kobjs[i]->kobj_unregister); 24455 wait_for_completion(&device->kobjs[i]->kobj_unregister);
24924diff -urNp linux-2.6.32.24/drivers/dma/ioat/dma.c linux-2.6.32.24/drivers/dma/ioat/dma.c 24456diff -urNp linux-2.6.35.7/drivers/edac/edac_core.h linux-2.6.35.7/drivers/edac/edac_core.h
24925--- linux-2.6.32.24/drivers/dma/ioat/dma.c 2010-08-13 16:24:37.000000000 -0400 24457--- linux-2.6.35.7/drivers/edac/edac_core.h 2010-08-26 19:47:12.000000000 -0400
24926+++ linux-2.6.32.24/drivers/dma/ioat/dma.c 2010-10-23 19:59:19.000000000 -0400 24458+++ linux-2.6.35.7/drivers/edac/edac_core.h 2010-09-17 20:12:09.000000000 -0400
24927@@ -1146,7 +1146,7 @@ ioat_attr_show(struct kobject *kobj, str 24459@@ -100,11 +100,11 @@ extern const char *edac_mem_types[];
24928 return entry->show(&chan->common, page);
24929 }
24930
24931-struct sysfs_ops ioat_sysfs_ops = {
24932+const struct sysfs_ops ioat_sysfs_ops = {
24933 .show = ioat_attr_show,
24934 };
24935
24936diff -urNp linux-2.6.32.24/drivers/dma/ioat/dma.h linux-2.6.32.24/drivers/dma/ioat/dma.h
24937--- linux-2.6.32.24/drivers/dma/ioat/dma.h 2010-08-13 16:24:37.000000000 -0400
24938+++ linux-2.6.32.24/drivers/dma/ioat/dma.h 2010-10-23 19:59:19.000000000 -0400
24939@@ -347,7 +347,7 @@ bool ioat_cleanup_preamble(struct ioat_c
24940 unsigned long *phys_complete);
24941 void ioat_kobject_add(struct ioatdma_device *device, struct kobj_type *type);
24942 void ioat_kobject_del(struct ioatdma_device *device);
24943-extern struct sysfs_ops ioat_sysfs_ops;
24944+extern const struct sysfs_ops ioat_sysfs_ops;
24945 extern struct ioat_sysfs_entry ioat_version_attr;
24946 extern struct ioat_sysfs_entry ioat_cap_attr;
24947 #endif /* IOATDMA_H */
24948diff -urNp linux-2.6.32.24/drivers/edac/edac_core.h linux-2.6.32.24/drivers/edac/edac_core.h
24949--- linux-2.6.32.24/drivers/edac/edac_core.h 2010-08-13 16:24:37.000000000 -0400
24950+++ linux-2.6.32.24/drivers/edac/edac_core.h 2010-10-23 19:59:19.000000000 -0400
24951@@ -99,11 +99,11 @@ extern int edac_debug_level;
24952 24460
24953 #else /* !CONFIG_EDAC_DEBUG */ 24461 #else /* !CONFIG_EDAC_DEBUG */
24954 24462
@@ -24965,82 +24473,22 @@ diff -urNp linux-2.6.32.24/drivers/edac/edac_core.h linux-2.6.32.24/drivers/edac
24965 24473
24966 #endif /* !CONFIG_EDAC_DEBUG */ 24474 #endif /* !CONFIG_EDAC_DEBUG */
24967 24475
24968diff -urNp linux-2.6.32.24/drivers/edac/edac_device_sysfs.c linux-2.6.32.24/drivers/edac/edac_device_sysfs.c 24476diff -urNp linux-2.6.35.7/drivers/edac/edac_mc_sysfs.c linux-2.6.35.7/drivers/edac/edac_mc_sysfs.c
24969--- linux-2.6.32.24/drivers/edac/edac_device_sysfs.c 2010-08-13 16:24:37.000000000 -0400 24477--- linux-2.6.35.7/drivers/edac/edac_mc_sysfs.c 2010-08-26 19:47:12.000000000 -0400
24970+++ linux-2.6.32.24/drivers/edac/edac_device_sysfs.c 2010-10-23 19:59:19.000000000 -0400 24478+++ linux-2.6.35.7/drivers/edac/edac_mc_sysfs.c 2010-09-17 20:12:09.000000000 -0400
24971@@ -137,7 +137,7 @@ static ssize_t edac_dev_ctl_info_store(s 24479@@ -776,7 +776,7 @@ static void edac_inst_grp_release(struct
24972 }
24973
24974 /* edac_dev file operations for an 'ctl_info' */
24975-static struct sysfs_ops device_ctl_info_ops = {
24976+static const struct sysfs_ops device_ctl_info_ops = {
24977 .show = edac_dev_ctl_info_show,
24978 .store = edac_dev_ctl_info_store
24979 };
24980@@ -373,7 +373,7 @@ static ssize_t edac_dev_instance_store(s
24981 }
24982
24983 /* edac_dev file operations for an 'instance' */
24984-static struct sysfs_ops device_instance_ops = {
24985+static const struct sysfs_ops device_instance_ops = {
24986 .show = edac_dev_instance_show,
24987 .store = edac_dev_instance_store
24988 };
24989@@ -476,7 +476,7 @@ static ssize_t edac_dev_block_store(stru
24990 }
24991
24992 /* edac_dev file operations for a 'block' */
24993-static struct sysfs_ops device_block_ops = {
24994+static const struct sysfs_ops device_block_ops = {
24995 .show = edac_dev_block_show,
24996 .store = edac_dev_block_store
24997 };
24998diff -urNp linux-2.6.32.24/drivers/edac/edac_mc_sysfs.c linux-2.6.32.24/drivers/edac/edac_mc_sysfs.c
24999--- linux-2.6.32.24/drivers/edac/edac_mc_sysfs.c 2010-08-13 16:24:37.000000000 -0400
25000+++ linux-2.6.32.24/drivers/edac/edac_mc_sysfs.c 2010-10-23 19:59:19.000000000 -0400
25001@@ -245,7 +245,7 @@ static ssize_t csrowdev_store(struct kob
25002 return -EIO;
25003 }
25004
25005-static struct sysfs_ops csrowfs_ops = {
25006+static const struct sysfs_ops csrowfs_ops = {
25007 .show = csrowdev_show,
25008 .store = csrowdev_store
25009 };
25010@@ -575,7 +575,7 @@ static ssize_t mcidev_store(struct kobje
25011 } 24480 }
25012 24481
25013 /* Intermediate show/store table */ 24482 /* Intermediate show/store table */
25014-static struct sysfs_ops mci_ops = { 24483-static struct sysfs_ops inst_grp_ops = {
25015+static const struct sysfs_ops mci_ops = { 24484+static const struct sysfs_ops inst_grp_ops = {
25016 .show = mcidev_show, 24485 .show = inst_grp_show,
25017 .store = mcidev_store 24486 .store = inst_grp_store
25018 }; 24487 };
25019diff -urNp linux-2.6.32.24/drivers/edac/edac_pci_sysfs.c linux-2.6.32.24/drivers/edac/edac_pci_sysfs.c 24488diff -urNp linux-2.6.35.7/drivers/firewire/core-cdev.c linux-2.6.35.7/drivers/firewire/core-cdev.c
25020--- linux-2.6.32.24/drivers/edac/edac_pci_sysfs.c 2010-08-13 16:24:37.000000000 -0400 24489--- linux-2.6.35.7/drivers/firewire/core-cdev.c 2010-08-26 19:47:12.000000000 -0400
25021+++ linux-2.6.32.24/drivers/edac/edac_pci_sysfs.c 2010-10-23 19:59:19.000000000 -0400 24490+++ linux-2.6.35.7/drivers/firewire/core-cdev.c 2010-09-17 20:12:09.000000000 -0400
25022@@ -121,7 +121,7 @@ static ssize_t edac_pci_instance_store(s 24491@@ -1195,8 +1195,7 @@ static int init_iso_resource(struct clie
25023 }
25024
25025 /* fs_ops table */
25026-static struct sysfs_ops pci_instance_ops = {
25027+static const struct sysfs_ops pci_instance_ops = {
25028 .show = edac_pci_instance_show,
25029 .store = edac_pci_instance_store
25030 };
25031@@ -261,7 +261,7 @@ static ssize_t edac_pci_dev_store(struct
25032 return -EIO;
25033 }
25034
25035-static struct sysfs_ops edac_pci_sysfs_ops = {
25036+static const struct sysfs_ops edac_pci_sysfs_ops = {
25037 .show = edac_pci_dev_show,
25038 .store = edac_pci_dev_store
25039 };
25040diff -urNp linux-2.6.32.24/drivers/firewire/core-cdev.c linux-2.6.32.24/drivers/firewire/core-cdev.c
25041--- linux-2.6.32.24/drivers/firewire/core-cdev.c 2010-08-13 16:24:37.000000000 -0400
25042+++ linux-2.6.32.24/drivers/firewire/core-cdev.c 2010-10-23 19:59:19.000000000 -0400
25043@@ -1141,8 +1141,7 @@ static int init_iso_resource(struct clie
25044 int ret; 24492 int ret;
25045 24493
25046 if ((request->channels == 0 && request->bandwidth == 0) || 24494 if ((request->channels == 0 && request->bandwidth == 0) ||
@@ -25050,10 +24498,10 @@ diff -urNp linux-2.6.32.24/drivers/firewire/core-cdev.c linux-2.6.32.24/drivers/
25050 return -EINVAL; 24498 return -EINVAL;
25051 24499
25052 r = kmalloc(sizeof(*r), GFP_KERNEL); 24500 r = kmalloc(sizeof(*r), GFP_KERNEL);
25053diff -urNp linux-2.6.32.24/drivers/firmware/dmi_scan.c linux-2.6.32.24/drivers/firmware/dmi_scan.c 24501diff -urNp linux-2.6.35.7/drivers/firmware/dmi_scan.c linux-2.6.35.7/drivers/firmware/dmi_scan.c
25054--- linux-2.6.32.24/drivers/firmware/dmi_scan.c 2010-08-13 16:24:37.000000000 -0400 24502--- linux-2.6.35.7/drivers/firmware/dmi_scan.c 2010-08-26 19:47:12.000000000 -0400
25055+++ linux-2.6.32.24/drivers/firmware/dmi_scan.c 2010-10-23 19:59:19.000000000 -0400 24503+++ linux-2.6.35.7/drivers/firmware/dmi_scan.c 2010-09-17 20:12:09.000000000 -0400
25056@@ -391,11 +391,6 @@ void __init dmi_scan_machine(void) 24504@@ -387,11 +387,6 @@ void __init dmi_scan_machine(void)
25057 } 24505 }
25058 } 24506 }
25059 else { 24507 else {
@@ -25065,58 +24513,10 @@ diff -urNp linux-2.6.32.24/drivers/firmware/dmi_scan.c linux-2.6.32.24/drivers/f
25065 p = dmi_ioremap(0xF0000, 0x10000); 24513 p = dmi_ioremap(0xF0000, 0x10000);
25066 if (p == NULL) 24514 if (p == NULL)
25067 goto error; 24515 goto error;
25068diff -urNp linux-2.6.32.24/drivers/firmware/edd.c linux-2.6.32.24/drivers/firmware/edd.c 24516diff -urNp linux-2.6.35.7/drivers/gpu/drm/drm_crtc_helper.c linux-2.6.35.7/drivers/gpu/drm/drm_crtc_helper.c
25069--- linux-2.6.32.24/drivers/firmware/edd.c 2010-08-13 16:24:37.000000000 -0400 24517--- linux-2.6.35.7/drivers/gpu/drm/drm_crtc_helper.c 2010-09-20 17:33:09.000000000 -0400
25070+++ linux-2.6.32.24/drivers/firmware/edd.c 2010-10-23 19:59:19.000000000 -0400 24518+++ linux-2.6.35.7/drivers/gpu/drm/drm_crtc_helper.c 2010-10-11 22:41:44.000000000 -0400
25071@@ -122,7 +122,7 @@ edd_attr_show(struct kobject * kobj, str 24519@@ -262,7 +262,7 @@ static bool drm_encoder_crtc_ok(struct d
25072 return ret;
25073 }
25074
25075-static struct sysfs_ops edd_attr_ops = {
25076+static const struct sysfs_ops edd_attr_ops = {
25077 .show = edd_attr_show,
25078 };
25079
25080diff -urNp linux-2.6.32.24/drivers/firmware/efivars.c linux-2.6.32.24/drivers/firmware/efivars.c
25081--- linux-2.6.32.24/drivers/firmware/efivars.c 2010-08-13 16:24:37.000000000 -0400
25082+++ linux-2.6.32.24/drivers/firmware/efivars.c 2010-10-23 19:59:19.000000000 -0400
25083@@ -362,7 +362,7 @@ static ssize_t efivar_attr_store(struct
25084 return ret;
25085 }
25086
25087-static struct sysfs_ops efivar_attr_ops = {
25088+static const struct sysfs_ops efivar_attr_ops = {
25089 .show = efivar_attr_show,
25090 .store = efivar_attr_store,
25091 };
25092diff -urNp linux-2.6.32.24/drivers/firmware/iscsi_ibft.c linux-2.6.32.24/drivers/firmware/iscsi_ibft.c
25093--- linux-2.6.32.24/drivers/firmware/iscsi_ibft.c 2010-08-13 16:24:37.000000000 -0400
25094+++ linux-2.6.32.24/drivers/firmware/iscsi_ibft.c 2010-10-23 19:59:19.000000000 -0400
25095@@ -525,7 +525,7 @@ static ssize_t ibft_show_attribute(struc
25096 return ret;
25097 }
25098
25099-static struct sysfs_ops ibft_attr_ops = {
25100+static const struct sysfs_ops ibft_attr_ops = {
25101 .show = ibft_show_attribute,
25102 };
25103
25104diff -urNp linux-2.6.32.24/drivers/firmware/memmap.c linux-2.6.32.24/drivers/firmware/memmap.c
25105--- linux-2.6.32.24/drivers/firmware/memmap.c 2010-08-13 16:24:37.000000000 -0400
25106+++ linux-2.6.32.24/drivers/firmware/memmap.c 2010-10-23 19:59:19.000000000 -0400
25107@@ -74,7 +74,7 @@ static struct attribute *def_attrs[] = {
25108 NULL
25109 };
25110
25111-static struct sysfs_ops memmap_attr_ops = {
25112+static const struct sysfs_ops memmap_attr_ops = {
25113 .show = memmap_attr_show,
25114 };
25115
25116diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_crtc_helper.c linux-2.6.32.24/drivers/gpu/drm/drm_crtc_helper.c
25117--- linux-2.6.32.24/drivers/gpu/drm/drm_crtc_helper.c 2010-09-20 17:26:42.000000000 -0400
25118+++ linux-2.6.32.24/drivers/gpu/drm/drm_crtc_helper.c 2010-10-23 19:59:24.000000000 -0400
25119@@ -573,7 +573,7 @@ static bool drm_encoder_crtc_ok(struct d
25120 struct drm_crtc *tmp; 24520 struct drm_crtc *tmp;
25121 int crtc_mask = 1; 24521 int crtc_mask = 1;
25122 24522
@@ -25125,22 +24525,22 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_crtc_helper.c linux-2.6.32.24/dri
25125 24525
25126 dev = crtc->dev; 24526 dev = crtc->dev;
25127 24527
25128diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_drv.c linux-2.6.32.24/drivers/gpu/drm/drm_drv.c 24528diff -urNp linux-2.6.35.7/drivers/gpu/drm/drm_drv.c linux-2.6.35.7/drivers/gpu/drm/drm_drv.c
25129--- linux-2.6.32.24/drivers/gpu/drm/drm_drv.c 2010-08-29 21:08:20.000000000 -0400 24529--- linux-2.6.35.7/drivers/gpu/drm/drm_drv.c 2010-08-26 19:47:12.000000000 -0400
25130+++ linux-2.6.32.24/drivers/gpu/drm/drm_drv.c 2010-10-23 19:59:19.000000000 -0400 24530+++ linux-2.6.35.7/drivers/gpu/drm/drm_drv.c 2010-09-17 20:12:09.000000000 -0400
25131@@ -417,7 +417,7 @@ int drm_ioctl(struct inode *inode, struc 24531@@ -449,7 +449,7 @@ long drm_ioctl(struct file *filp,
25132 char *kdata = NULL;
25133 24532
24533 dev = file_priv->minor->dev;
25134 atomic_inc(&dev->ioctl_count); 24534 atomic_inc(&dev->ioctl_count);
25135- atomic_inc(&dev->counts[_DRM_STAT_IOCTLS]); 24535- atomic_inc(&dev->counts[_DRM_STAT_IOCTLS]);
25136+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_IOCTLS]); 24536+ atomic_inc_unchecked(&dev->counts[_DRM_STAT_IOCTLS]);
25137 ++file_priv->ioctl_count; 24537 ++file_priv->ioctl_count;
25138 24538
25139 DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", 24539 DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n",
25140diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_fops.c linux-2.6.32.24/drivers/gpu/drm/drm_fops.c 24540diff -urNp linux-2.6.35.7/drivers/gpu/drm/drm_fops.c linux-2.6.35.7/drivers/gpu/drm/drm_fops.c
25141--- linux-2.6.32.24/drivers/gpu/drm/drm_fops.c 2010-08-13 16:24:37.000000000 -0400 24541--- linux-2.6.35.7/drivers/gpu/drm/drm_fops.c 2010-08-26 19:47:12.000000000 -0400
25142+++ linux-2.6.32.24/drivers/gpu/drm/drm_fops.c 2010-10-23 19:59:19.000000000 -0400 24542+++ linux-2.6.35.7/drivers/gpu/drm/drm_fops.c 2010-09-17 20:12:09.000000000 -0400
25143@@ -66,7 +66,7 @@ static int drm_setup(struct drm_device * 24543@@ -67,7 +67,7 @@ static int drm_setup(struct drm_device *
25144 } 24544 }
25145 24545
25146 for (i = 0; i < ARRAY_SIZE(dev->counts); i++) 24546 for (i = 0; i < ARRAY_SIZE(dev->counts); i++)
@@ -25149,7 +24549,7 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_fops.c linux-2.6.32.24/drivers/gp
25149 24549
25150 dev->sigdata.lock = NULL; 24550 dev->sigdata.lock = NULL;
25151 24551
25152@@ -130,9 +130,9 @@ int drm_open(struct inode *inode, struct 24552@@ -131,9 +131,9 @@ int drm_open(struct inode *inode, struct
25153 24553
25154 retcode = drm_open_helper(inode, filp, dev); 24554 retcode = drm_open_helper(inode, filp, dev);
25155 if (!retcode) { 24555 if (!retcode) {
@@ -25161,7 +24561,7 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_fops.c linux-2.6.32.24/drivers/gp
25161 spin_unlock(&dev->count_lock); 24561 spin_unlock(&dev->count_lock);
25162 retcode = drm_setup(dev); 24562 retcode = drm_setup(dev);
25163 goto out; 24563 goto out;
25164@@ -435,7 +435,7 @@ int drm_release(struct inode *inode, str 24564@@ -474,7 +474,7 @@ int drm_release(struct inode *inode, str
25165 24565
25166 lock_kernel(); 24566 lock_kernel();
25167 24567
@@ -25170,7 +24570,7 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_fops.c linux-2.6.32.24/drivers/gp
25170 24570
25171 if (dev->driver->preclose) 24571 if (dev->driver->preclose)
25172 dev->driver->preclose(dev, file_priv); 24572 dev->driver->preclose(dev, file_priv);
25173@@ -447,7 +447,7 @@ int drm_release(struct inode *inode, str 24573@@ -486,7 +486,7 @@ int drm_release(struct inode *inode, str
25174 DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n", 24574 DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
25175 task_pid_nr(current), 24575 task_pid_nr(current),
25176 (long)old_encode_dev(file_priv->minor->device), 24576 (long)old_encode_dev(file_priv->minor->device),
@@ -25179,7 +24579,7 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_fops.c linux-2.6.32.24/drivers/gp
25179 24579
25180 /* if the master has gone away we can't do anything with the lock */ 24580 /* if the master has gone away we can't do anything with the lock */
25181 if (file_priv->minor->master) 24581 if (file_priv->minor->master)
25182@@ -524,9 +524,9 @@ int drm_release(struct inode *inode, str 24582@@ -567,9 +567,9 @@ int drm_release(struct inode *inode, str
25183 * End inline drm_release 24583 * End inline drm_release
25184 */ 24584 */
25185 24585
@@ -25191,9 +24591,9 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_fops.c linux-2.6.32.24/drivers/gp
25191 if (atomic_read(&dev->ioctl_count)) { 24591 if (atomic_read(&dev->ioctl_count)) {
25192 DRM_ERROR("Device busy: %d\n", 24592 DRM_ERROR("Device busy: %d\n",
25193 atomic_read(&dev->ioctl_count)); 24593 atomic_read(&dev->ioctl_count));
25194diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_info.c linux-2.6.32.24/drivers/gpu/drm/drm_info.c 24594diff -urNp linux-2.6.35.7/drivers/gpu/drm/drm_info.c linux-2.6.35.7/drivers/gpu/drm/drm_info.c
25195--- linux-2.6.32.24/drivers/gpu/drm/drm_info.c 2010-08-13 16:24:37.000000000 -0400 24595--- linux-2.6.35.7/drivers/gpu/drm/drm_info.c 2010-08-26 19:47:12.000000000 -0400
25196+++ linux-2.6.32.24/drivers/gpu/drm/drm_info.c 2010-10-23 19:59:24.000000000 -0400 24596+++ linux-2.6.35.7/drivers/gpu/drm/drm_info.c 2010-10-11 22:41:44.000000000 -0400
25197@@ -75,10 +75,14 @@ int drm_vm_info(struct seq_file *m, void 24597@@ -75,10 +75,14 @@ int drm_vm_info(struct seq_file *m, void
25198 struct drm_local_map *map; 24598 struct drm_local_map *map;
25199 struct drm_map_list *r_list; 24599 struct drm_map_list *r_list;
@@ -25222,9 +24622,9 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_info.c linux-2.6.32.24/drivers/gp
25222 type = "??"; 24622 type = "??";
25223 else 24623 else
25224 type = types[map->type]; 24624 type = types[map->type];
25225diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_ioctl.c linux-2.6.32.24/drivers/gpu/drm/drm_ioctl.c 24625diff -urNp linux-2.6.35.7/drivers/gpu/drm/drm_ioctl.c linux-2.6.35.7/drivers/gpu/drm/drm_ioctl.c
25226--- linux-2.6.32.24/drivers/gpu/drm/drm_ioctl.c 2010-08-13 16:24:37.000000000 -0400 24626--- linux-2.6.35.7/drivers/gpu/drm/drm_ioctl.c 2010-08-26 19:47:12.000000000 -0400
25227+++ linux-2.6.32.24/drivers/gpu/drm/drm_ioctl.c 2010-10-23 19:59:19.000000000 -0400 24627+++ linux-2.6.35.7/drivers/gpu/drm/drm_ioctl.c 2010-09-17 20:12:09.000000000 -0400
25228@@ -283,7 +283,7 @@ int drm_getstats(struct drm_device *dev, 24628@@ -283,7 +283,7 @@ int drm_getstats(struct drm_device *dev,
25229 stats->data[i].value = 24629 stats->data[i].value =
25230 (file_priv->master->lock.hw_lock ? file_priv->master->lock.hw_lock->lock : 0); 24630 (file_priv->master->lock.hw_lock ? file_priv->master->lock.hw_lock->lock : 0);
@@ -25234,9 +24634,9 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_ioctl.c linux-2.6.32.24/drivers/g
25234 stats->data[i].type = dev->types[i]; 24634 stats->data[i].type = dev->types[i];
25235 } 24635 }
25236 24636
25237diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_lock.c linux-2.6.32.24/drivers/gpu/drm/drm_lock.c 24637diff -urNp linux-2.6.35.7/drivers/gpu/drm/drm_lock.c linux-2.6.35.7/drivers/gpu/drm/drm_lock.c
25238--- linux-2.6.32.24/drivers/gpu/drm/drm_lock.c 2010-08-13 16:24:37.000000000 -0400 24638--- linux-2.6.35.7/drivers/gpu/drm/drm_lock.c 2010-08-26 19:47:12.000000000 -0400
25239+++ linux-2.6.32.24/drivers/gpu/drm/drm_lock.c 2010-10-23 19:59:19.000000000 -0400 24639+++ linux-2.6.35.7/drivers/gpu/drm/drm_lock.c 2010-09-17 20:12:09.000000000 -0400
25240@@ -87,7 +87,7 @@ int drm_lock(struct drm_device *dev, voi 24640@@ -87,7 +87,7 @@ int drm_lock(struct drm_device *dev, voi
25241 if (drm_lock_take(&master->lock, lock->context)) { 24641 if (drm_lock_take(&master->lock, lock->context)) {
25242 master->lock.file_priv = file_priv; 24642 master->lock.file_priv = file_priv;
@@ -25255,10 +24655,10 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/drm_lock.c linux-2.6.32.24/drivers/gp
25255 24655
25256 /* kernel_context_switch isn't used by any of the x86 drm 24656 /* kernel_context_switch isn't used by any of the x86 drm
25257 * modules but is required by the Sparc driver. 24657 * modules but is required by the Sparc driver.
25258diff -urNp linux-2.6.32.24/drivers/gpu/drm/i810/i810_dma.c linux-2.6.32.24/drivers/gpu/drm/i810/i810_dma.c 24658diff -urNp linux-2.6.35.7/drivers/gpu/drm/i810/i810_dma.c linux-2.6.35.7/drivers/gpu/drm/i810/i810_dma.c
25259--- linux-2.6.32.24/drivers/gpu/drm/i810/i810_dma.c 2010-08-13 16:24:37.000000000 -0400 24659--- linux-2.6.35.7/drivers/gpu/drm/i810/i810_dma.c 2010-08-26 19:47:12.000000000 -0400
25260+++ linux-2.6.32.24/drivers/gpu/drm/i810/i810_dma.c 2010-10-23 19:59:19.000000000 -0400 24660+++ linux-2.6.35.7/drivers/gpu/drm/i810/i810_dma.c 2010-09-17 20:12:09.000000000 -0400
25261@@ -952,8 +952,8 @@ static int i810_dma_vertex(struct drm_de 24661@@ -953,8 +953,8 @@ static int i810_dma_vertex(struct drm_de
25262 dma->buflist[vertex->idx], 24662 dma->buflist[vertex->idx],
25263 vertex->discard, vertex->used); 24663 vertex->discard, vertex->used);
25264 24664
@@ -25269,7 +24669,7 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/i810/i810_dma.c linux-2.6.32.24/drive
25269 sarea_priv->last_enqueue = dev_priv->counter - 1; 24669 sarea_priv->last_enqueue = dev_priv->counter - 1;
25270 sarea_priv->last_dispatch = (int)hw_status[5]; 24670 sarea_priv->last_dispatch = (int)hw_status[5];
25271 24671
25272@@ -1115,8 +1115,8 @@ static int i810_dma_mc(struct drm_device 24672@@ -1116,8 +1116,8 @@ static int i810_dma_mc(struct drm_device
25273 i810_dma_dispatch_mc(dev, dma->buflist[mc->idx], mc->used, 24673 i810_dma_dispatch_mc(dev, dma->buflist[mc->idx], mc->used,
25274 mc->last_render); 24674 mc->last_render);
25275 24675
@@ -25280,10 +24680,10 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/i810/i810_dma.c linux-2.6.32.24/drive
25280 sarea_priv->last_enqueue = dev_priv->counter - 1; 24680 sarea_priv->last_enqueue = dev_priv->counter - 1;
25281 sarea_priv->last_dispatch = (int)hw_status[5]; 24681 sarea_priv->last_dispatch = (int)hw_status[5];
25282 24682
25283diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7017.c linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7017.c 24683diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ch7017.c linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ch7017.c
25284--- linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7017.c 2010-08-13 16:24:37.000000000 -0400 24684--- linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ch7017.c 2010-08-26 19:47:12.000000000 -0400
25285+++ linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7017.c 2010-10-23 19:59:19.000000000 -0400 24685+++ linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ch7017.c 2010-09-17 20:12:09.000000000 -0400
25286@@ -443,7 +443,7 @@ static void ch7017_destroy(struct intel_ 24686@@ -402,7 +402,7 @@ static void ch7017_destroy(struct intel_
25287 } 24687 }
25288 } 24688 }
25289 24689
@@ -25292,10 +24692,10 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7017.c linux-2.6.32.24/dri
25292 .init = ch7017_init, 24692 .init = ch7017_init,
25293 .detect = ch7017_detect, 24693 .detect = ch7017_detect,
25294 .mode_valid = ch7017_mode_valid, 24694 .mode_valid = ch7017_mode_valid,
25295diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7xxx.c linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7xxx.c 24695diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ch7xxx.c linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ch7xxx.c
25296--- linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7xxx.c 2010-08-13 16:24:37.000000000 -0400 24696--- linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ch7xxx.c 2010-08-26 19:47:12.000000000 -0400
25297+++ linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7xxx.c 2010-10-23 19:59:19.000000000 -0400 24697+++ linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ch7xxx.c 2010-09-17 20:12:09.000000000 -0400
25298@@ -356,7 +356,7 @@ static void ch7xxx_destroy(struct intel_ 24698@@ -322,7 +322,7 @@ static void ch7xxx_destroy(struct intel_
25299 } 24699 }
25300 } 24700 }
25301 24701
@@ -25304,10 +24704,10 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ch7xxx.c linux-2.6.32.24/dri
25304 .init = ch7xxx_init, 24704 .init = ch7xxx_init,
25305 .detect = ch7xxx_detect, 24705 .detect = ch7xxx_detect,
25306 .mode_valid = ch7xxx_mode_valid, 24706 .mode_valid = ch7xxx_mode_valid,
25307diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo.h linux-2.6.32.24/drivers/gpu/drm/i915/dvo.h 24707diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/dvo.h linux-2.6.35.7/drivers/gpu/drm/i915/dvo.h
25308--- linux-2.6.32.24/drivers/gpu/drm/i915/dvo.h 2010-08-13 16:24:37.000000000 -0400 24708--- linux-2.6.35.7/drivers/gpu/drm/i915/dvo.h 2010-08-26 19:47:12.000000000 -0400
25309+++ linux-2.6.32.24/drivers/gpu/drm/i915/dvo.h 2010-10-23 19:59:19.000000000 -0400 24709+++ linux-2.6.35.7/drivers/gpu/drm/i915/dvo.h 2010-09-17 20:12:09.000000000 -0400
25310@@ -135,23 +135,23 @@ struct intel_dvo_dev_ops { 24710@@ -125,23 +125,23 @@ struct intel_dvo_dev_ops {
25311 * 24711 *
25312 * \return singly-linked list of modes or NULL if no modes found. 24712 * \return singly-linked list of modes or NULL if no modes found.
25313 */ 24713 */
@@ -25339,10 +24739,10 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo.h linux-2.6.32.24/drivers/gp
25339+extern const struct intel_dvo_dev_ops ch7017_ops; 24739+extern const struct intel_dvo_dev_ops ch7017_ops;
25340 24740
25341 #endif /* _INTEL_DVO_H */ 24741 #endif /* _INTEL_DVO_H */
25342diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ivch.c linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ivch.c 24742diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ivch.c linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ivch.c
25343--- linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ivch.c 2010-08-13 16:24:37.000000000 -0400 24743--- linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ivch.c 2010-08-26 19:47:12.000000000 -0400
25344+++ linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ivch.c 2010-10-23 19:59:19.000000000 -0400 24744+++ linux-2.6.35.7/drivers/gpu/drm/i915/dvo_ivch.c 2010-09-17 20:12:09.000000000 -0400
25345@@ -430,7 +430,7 @@ static void ivch_destroy(struct intel_dv 24745@@ -412,7 +412,7 @@ static void ivch_destroy(struct intel_dv
25346 } 24746 }
25347 } 24747 }
25348 24748
@@ -25350,11 +24750,11 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_ivch.c linux-2.6.32.24/drive
25350+const struct intel_dvo_dev_ops ivch_ops= { 24750+const struct intel_dvo_dev_ops ivch_ops= {
25351 .init = ivch_init, 24751 .init = ivch_init,
25352 .dpms = ivch_dpms, 24752 .dpms = ivch_dpms,
25353 .save = ivch_save, 24753 .mode_valid = ivch_mode_valid,
25354diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_sil164.c linux-2.6.32.24/drivers/gpu/drm/i915/dvo_sil164.c 24754diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/dvo_sil164.c linux-2.6.35.7/drivers/gpu/drm/i915/dvo_sil164.c
25355--- linux-2.6.32.24/drivers/gpu/drm/i915/dvo_sil164.c 2010-08-13 16:24:37.000000000 -0400 24755--- linux-2.6.35.7/drivers/gpu/drm/i915/dvo_sil164.c 2010-08-26 19:47:12.000000000 -0400
25356+++ linux-2.6.32.24/drivers/gpu/drm/i915/dvo_sil164.c 2010-10-23 19:59:19.000000000 -0400 24756+++ linux-2.6.35.7/drivers/gpu/drm/i915/dvo_sil164.c 2010-09-17 20:12:09.000000000 -0400
25357@@ -290,7 +290,7 @@ static void sil164_destroy(struct intel_ 24757@@ -254,7 +254,7 @@ static void sil164_destroy(struct intel_
25358 } 24758 }
25359 } 24759 }
25360 24760
@@ -25363,10 +24763,10 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_sil164.c linux-2.6.32.24/dri
25363 .init = sil164_init, 24763 .init = sil164_init,
25364 .detect = sil164_detect, 24764 .detect = sil164_detect,
25365 .mode_valid = sil164_mode_valid, 24765 .mode_valid = sil164_mode_valid,
25366diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_tfp410.c linux-2.6.32.24/drivers/gpu/drm/i915/dvo_tfp410.c 24766diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/dvo_tfp410.c linux-2.6.35.7/drivers/gpu/drm/i915/dvo_tfp410.c
25367--- linux-2.6.32.24/drivers/gpu/drm/i915/dvo_tfp410.c 2010-08-13 16:24:37.000000000 -0400 24767--- linux-2.6.35.7/drivers/gpu/drm/i915/dvo_tfp410.c 2010-08-26 19:47:12.000000000 -0400
25368+++ linux-2.6.32.24/drivers/gpu/drm/i915/dvo_tfp410.c 2010-10-23 19:59:19.000000000 -0400 24768+++ linux-2.6.35.7/drivers/gpu/drm/i915/dvo_tfp410.c 2010-09-17 20:12:09.000000000 -0400
25369@@ -323,7 +323,7 @@ static void tfp410_destroy(struct intel_ 24769@@ -295,7 +295,7 @@ static void tfp410_destroy(struct intel_
25370 } 24770 }
25371 } 24771 }
25372 24772
@@ -25375,48 +24775,93 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/dvo_tfp410.c linux-2.6.32.24/dri
25375 .init = tfp410_init, 24775 .init = tfp410_init,
25376 .detect = tfp410_detect, 24776 .detect = tfp410_detect,
25377 .mode_valid = tfp410_mode_valid, 24777 .mode_valid = tfp410_mode_valid,
25378diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/i915_drv.c linux-2.6.32.24/drivers/gpu/drm/i915/i915_drv.c 24778diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/i915_dma.c linux-2.6.35.7/drivers/gpu/drm/i915/i915_dma.c
25379--- linux-2.6.32.24/drivers/gpu/drm/i915/i915_drv.c 2010-08-13 16:24:37.000000000 -0400 24779--- linux-2.6.35.7/drivers/gpu/drm/i915/i915_dma.c 2010-09-20 17:33:09.000000000 -0400
25380+++ linux-2.6.32.24/drivers/gpu/drm/i915/i915_drv.c 2010-10-23 19:59:19.000000000 -0400 24780+++ linux-2.6.35.7/drivers/gpu/drm/i915/i915_dma.c 2010-09-20 17:33:32.000000000 -0400
25381@@ -285,7 +285,7 @@ i915_pci_resume(struct pci_dev *pdev) 24781@@ -1348,7 +1348,7 @@ static bool i915_switcheroo_can_switch(s
25382 return i915_resume(dev); 24782 bool can_switch;
24783
24784 spin_lock(&dev->count_lock);
24785- can_switch = (dev->open_count == 0);
24786+ can_switch = (atomic_read(&dev->open_count) == 0);
24787 spin_unlock(&dev->count_lock);
24788 return can_switch;
25383 } 24789 }
24790diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/i915_drv.c linux-2.6.35.7/drivers/gpu/drm/i915/i915_drv.c
24791--- linux-2.6.35.7/drivers/gpu/drm/i915/i915_drv.c 2010-09-26 17:32:11.000000000 -0400
24792+++ linux-2.6.35.7/drivers/gpu/drm/i915/i915_drv.c 2010-09-26 17:32:46.000000000 -0400
24793@@ -497,7 +497,7 @@ const struct dev_pm_ops i915_pm_ops = {
24794 .restore = i915_pm_resume,
24795 };
25384 24796
25385-static struct vm_operations_struct i915_gem_vm_ops = { 24797-static struct vm_operations_struct i915_gem_vm_ops = {
25386+static const struct vm_operations_struct i915_gem_vm_ops = { 24798+static const struct vm_operations_struct i915_gem_vm_ops = {
25387 .fault = i915_gem_fault, 24799 .fault = i915_gem_fault,
25388 .open = drm_gem_vm_open, 24800 .open = drm_gem_vm_open,
25389 .close = drm_gem_vm_close, 24801 .close = drm_gem_vm_close,
25390diff -urNp linux-2.6.32.24/drivers/gpu/drm/i915/i915_gem.c linux-2.6.32.24/drivers/gpu/drm/i915/i915_gem.c 24802diff -urNp linux-2.6.35.7/drivers/gpu/drm/i915/i915_gem.c linux-2.6.35.7/drivers/gpu/drm/i915/i915_gem.c
25391--- linux-2.6.32.24/drivers/gpu/drm/i915/i915_gem.c 2010-09-20 17:26:42.000000000 -0400 24803--- linux-2.6.35.7/drivers/gpu/drm/i915/i915_gem.c 2010-09-20 17:33:09.000000000 -0400
25392+++ linux-2.6.32.24/drivers/gpu/drm/i915/i915_gem.c 2010-10-23 19:59:19.000000000 -0400 24804+++ linux-2.6.35.7/drivers/gpu/drm/i915/i915_gem.c 2010-09-28 18:50:18.000000000 -0400
25393@@ -492,6 +492,11 @@ i915_gem_pread_ioctl(struct drm_device * 24805@@ -469,6 +469,11 @@ i915_gem_pread_ioctl(struct drm_device *
25394 return -EINVAL; 24806 return -EINVAL;
25395 } 24807 }
25396 24808
25397+ if (!access_ok(VERIFY_WRITE, (char __user *) (uintptr_t)args->data_ptr, args->size)) { 24809+ if (!access_ok(VERIFY_WRITE, (char __user *) (uintptr_t)args->data_ptr, args->size)) {
25398+ drm_gem_object_unreference(obj); 24810+ drm_gem_object_unreference_unlocked(obj);
25399+ return -EFAULT; 24811+ return -EFAULT;
25400+ } 24812+ }
25401+ 24813+
25402 if (i915_gem_object_needs_bit17_swizzle(obj)) { 24814 if (i915_gem_object_needs_bit17_swizzle(obj)) {
25403 ret = i915_gem_shmem_pread_slow(dev, obj, args, file_priv); 24815 ret = i915_gem_shmem_pread_slow(dev, obj, args, file_priv);
25404 } else { 24816 } else {
25405@@ -965,6 +970,11 @@ i915_gem_pwrite_ioctl(struct drm_device 24817@@ -932,6 +937,11 @@ i915_gem_pwrite_ioctl(struct drm_device
25406 return -EINVAL; 24818 return -EINVAL;
25407 } 24819 }
25408 24820
25409+ if (!access_ok(VERIFY_READ, (char __user *) (uintptr_t)args->data_ptr, args->size)) { 24821+ if (!access_ok(VERIFY_READ, (char __user *) (uintptr_t)args->data_ptr, args->size)) {
25410+ drm_gem_object_unreference(obj); 24822+ drm_gem_object_unreference_unlocked(obj);
25411+ return -EFAULT; 24823+ return -EFAULT;
25412+ } 24824+ }
25413+ 24825+
25414 /* We can only do the GTT pwrite on untiled buffers, as otherwise 24826 /* We can only do the GTT pwrite on untiled buffers, as otherwise
25415 * it would end up going through the fenced access, and we'll get 24827 * it would end up going through the fenced access, and we'll get
25416 * different detiling behavior between reading and writing. 24828 * different detiling behavior between reading and writing.
25417diff -urNp linux-2.6.32.24/drivers/gpu/drm/radeon/mkregtable.c linux-2.6.32.24/drivers/gpu/drm/radeon/mkregtable.c 24829diff -urNp linux-2.6.35.7/drivers/gpu/drm/nouveau/nouveau_backlight.c linux-2.6.35.7/drivers/gpu/drm/nouveau/nouveau_backlight.c
25418--- linux-2.6.32.24/drivers/gpu/drm/radeon/mkregtable.c 2010-08-13 16:24:37.000000000 -0400 24830--- linux-2.6.35.7/drivers/gpu/drm/nouveau/nouveau_backlight.c 2010-08-26 19:47:12.000000000 -0400
25419+++ linux-2.6.32.24/drivers/gpu/drm/radeon/mkregtable.c 2010-10-23 19:59:19.000000000 -0400 24831+++ linux-2.6.35.7/drivers/gpu/drm/nouveau/nouveau_backlight.c 2010-09-17 20:12:09.000000000 -0400
24832@@ -58,7 +58,7 @@ static int nv40_set_intensity(struct bac
24833 return 0;
24834 }
24835
24836-static struct backlight_ops nv40_bl_ops = {
24837+static const struct backlight_ops nv40_bl_ops = {
24838 .options = BL_CORE_SUSPENDRESUME,
24839 .get_brightness = nv40_get_intensity,
24840 .update_status = nv40_set_intensity,
24841@@ -81,7 +81,7 @@ static int nv50_set_intensity(struct bac
24842 return 0;
24843 }
24844
24845-static struct backlight_ops nv50_bl_ops = {
24846+static const struct backlight_ops nv50_bl_ops = {
24847 .options = BL_CORE_SUSPENDRESUME,
24848 .get_brightness = nv50_get_intensity,
24849 .update_status = nv50_set_intensity,
24850diff -urNp linux-2.6.35.7/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.35.7/drivers/gpu/drm/nouveau/nouveau_state.c
24851--- linux-2.6.35.7/drivers/gpu/drm/nouveau/nouveau_state.c 2010-08-26 19:47:12.000000000 -0400
24852+++ linux-2.6.35.7/drivers/gpu/drm/nouveau/nouveau_state.c 2010-09-17 20:12:09.000000000 -0400
24853@@ -395,7 +395,7 @@ static bool nouveau_switcheroo_can_switc
24854 bool can_switch;
24855
24856 spin_lock(&dev->count_lock);
24857- can_switch = (dev->open_count == 0);
24858+ can_switch = (atomic_read(&dev->open_count) == 0);
24859 spin_unlock(&dev->count_lock);
24860 return can_switch;
24861 }
24862diff -urNp linux-2.6.35.7/drivers/gpu/drm/radeon/mkregtable.c linux-2.6.35.7/drivers/gpu/drm/radeon/mkregtable.c
24863--- linux-2.6.35.7/drivers/gpu/drm/radeon/mkregtable.c 2010-08-26 19:47:12.000000000 -0400
24864+++ linux-2.6.35.7/drivers/gpu/drm/radeon/mkregtable.c 2010-09-17 20:12:09.000000000 -0400
25420@@ -637,14 +637,14 @@ static int parser_auth(struct table *t, 24865@@ -637,14 +637,14 @@ static int parser_auth(struct table *t,
25421 regex_t mask_rex; 24866 regex_t mask_rex;
25422 regmatch_t match[4]; 24867 regmatch_t match[4];
@@ -25434,49 +24879,43 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/radeon/mkregtable.c linux-2.6.32.24/d
25434 24879
25435 if (regcomp 24880 if (regcomp
25436 (&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) { 24881 (&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
25437diff -urNp linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_atombios.c linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_atombios.c 24882diff -urNp linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_device.c linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_device.c
25438--- linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_atombios.c 2010-08-13 16:24:37.000000000 -0400 24883--- linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_device.c 2010-08-26 19:47:12.000000000 -0400
25439+++ linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_atombios.c 2010-10-23 19:59:19.000000000 -0400 24884+++ linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_device.c 2010-09-17 20:12:09.000000000 -0400
25440@@ -513,13 +513,13 @@ static uint16_t atombios_get_connector_o 24885@@ -562,7 +562,7 @@ static bool radeon_switcheroo_can_switch
25441 } 24886 bool can_switch;
25442 } 24887
25443 24888 spin_lock(&dev->count_lock);
25444-struct bios_connector { 24889- can_switch = (dev->open_count == 0);
25445+static struct bios_connector { 24890+ can_switch = (atomic_read(&dev->open_count) == 0);
25446 bool valid; 24891 spin_unlock(&dev->count_lock);
25447 uint16_t line_mux; 24892 return can_switch;
25448 uint16_t devices; 24893 }
25449 int connector_type; 24894diff -urNp linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_display.c linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_display.c
25450 struct radeon_i2c_bus_rec ddc_bus; 24895--- linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_display.c 2010-08-26 19:47:12.000000000 -0400
25451-}; 24896+++ linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_display.c 2010-09-17 20:12:09.000000000 -0400
25452+} bios_connectors[ATOM_MAX_SUPPORTED_DEVICE]; 24897@@ -559,7 +559,7 @@ static void radeon_compute_pll_legacy(st
25453 24898
25454 bool radeon_get_atom_connector_info_from_supported_devices_table(struct 24899 if (pll->flags & RADEON_PLL_PREFER_CLOSEST_LOWER) {
25455 drm_device
25456@@ -535,7 +535,6 @@ bool radeon_get_atom_connector_info_from
25457 uint8_t dac;
25458 union atom_supported_devices *supported_devices;
25459 int i, j;
25460- struct bios_connector bios_connectors[ATOM_MAX_SUPPORTED_DEVICE];
25461
25462 atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset);
25463
25464diff -urNp linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_display.c linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_display.c
25465--- linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_display.c 2010-08-13 16:24:37.000000000 -0400
25466+++ linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_display.c 2010-10-23 19:59:19.000000000 -0400
25467@@ -482,7 +482,7 @@ void radeon_compute_pll(struct radeon_pl
25468
25469 if (flags & RADEON_PLL_PREFER_CLOSEST_LOWER) {
25470 error = freq - current_freq; 24900 error = freq - current_freq;
25471- error = error < 0 ? 0xffffffff : error; 24901- error = error < 0 ? 0xffffffff : error;
25472+ error = (int32_t)error < 0 ? 0xffffffff : error; 24902+ error = (int32_t)error < 0 ? 0xffffffff : error;
25473 } else 24903 } else
25474 error = abs(current_freq - freq); 24904 error = abs(current_freq - freq);
25475 vco_diff = abs(vco - best_vco); 24905 vco_diff = abs(vco - best_vco);
25476diff -urNp linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_state.c linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_state.c 24906diff -urNp linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_state.c linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_state.c
25477--- linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_state.c 2010-08-13 16:24:37.000000000 -0400 24907--- linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_state.c 2010-08-26 19:47:12.000000000 -0400
25478+++ linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_state.c 2010-10-23 19:59:19.000000000 -0400 24908+++ linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_state.c 2010-09-17 20:12:09.000000000 -0400
25479@@ -3021,7 +3021,7 @@ static int radeon_cp_getparam(struct drm 24909@@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_de
24910 if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS)
24911 sarea_priv->nbox = RADEON_NR_SAREA_CLIPRECTS;
24912
24913- if (DRM_COPY_FROM_USER(&depth_boxes, clear->depth_boxes,
24914+ if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS || DRM_COPY_FROM_USER(&depth_boxes, clear->depth_boxes,
24915 sarea_priv->nbox * sizeof(depth_boxes[0])))
24916 return -EFAULT;
24917
24918@@ -3031,7 +3031,7 @@ static int radeon_cp_getparam(struct drm
25480 { 24919 {
25481 drm_radeon_private_t *dev_priv = dev->dev_private; 24920 drm_radeon_private_t *dev_priv = dev->dev_private;
25482 drm_radeon_getparam_t *param = data; 24921 drm_radeon_getparam_t *param = data;
@@ -25485,38 +24924,49 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_state.c linux-2.6.32.24
25485 24924
25486 DRM_DEBUG("pid=%d\n", DRM_CURRENTPID); 24925 DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
25487 24926
25488diff -urNp linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_ttm.c 24927diff -urNp linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_ttm.c
25489--- linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_ttm.c 2010-08-13 16:24:37.000000000 -0400 24928--- linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_ttm.c 2010-08-26 19:47:12.000000000 -0400
25490+++ linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_ttm.c 2010-10-23 19:59:19.000000000 -0400 24929+++ linux-2.6.35.7/drivers/gpu/drm/radeon/radeon_ttm.c 2010-09-17 20:12:09.000000000 -0400
25491@@ -535,27 +535,10 @@ void radeon_ttm_fini(struct radeon_devic 24930@@ -601,8 +601,9 @@ void radeon_ttm_fini(struct radeon_devic
25492 DRM_INFO("radeon: ttm finalized\n"); 24931 DRM_INFO("radeon: ttm finalized\n");
25493 } 24932 }
25494 24933
25495-static struct vm_operations_struct radeon_ttm_vm_ops; 24934-static struct vm_operations_struct radeon_ttm_vm_ops;
25496-static const struct vm_operations_struct *ttm_vm_ops = NULL; 24935-static const struct vm_operations_struct *ttm_vm_ops = NULL;
25497- 24936+extern int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
25498-static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) 24937+extern void ttm_bo_vm_open(struct vm_area_struct *vma);
25499-{ 24938+extern void ttm_bo_vm_close(struct vm_area_struct *vma);
25500- struct ttm_buffer_object *bo; 24939
25501- int r; 24940 static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
25502- 24941 {
25503- bo = (struct ttm_buffer_object *)vma->vm_private_data; 24942@@ -610,17 +611,22 @@ static int radeon_ttm_fault(struct vm_ar
24943 struct radeon_device *rdev;
24944 int r;
24945
24946- bo = (struct ttm_buffer_object *)vma->vm_private_data;
25504- if (bo == NULL) { 24947- if (bo == NULL) {
25505- return VM_FAULT_NOPAGE; 24948+ bo = (struct ttm_buffer_object *)vma->vm_private_data;
24949+ if (!bo)
24950 return VM_FAULT_NOPAGE;
25506- } 24951- }
24952 rdev = radeon_get_rdev(bo->bdev);
24953 mutex_lock(&rdev->vram_mutex);
25507- r = ttm_vm_ops->fault(vma, vmf); 24954- r = ttm_vm_ops->fault(vma, vmf);
25508- return r; 24955+ r = ttm_bo_vm_fault(vma, vmf);
25509-} 24956 mutex_unlock(&rdev->vram_mutex);
25510- 24957 return r;
24958 }
24959
24960+static const struct vm_operations_struct radeon_ttm_vm_ops = {
24961+ .fault = radeon_ttm_fault,
24962+ .open = ttm_bo_vm_open,
24963+ .close = ttm_bo_vm_close
24964+};
24965+
25511 int radeon_mmap(struct file *filp, struct vm_area_struct *vma) 24966 int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
25512 { 24967 {
25513 struct drm_file *file_priv; 24968 struct drm_file *file_priv;
25514 struct radeon_device *rdev; 24969@@ -633,18 +639,11 @@ int radeon_mmap(struct file *filp, struc
25515- int r;
25516
25517 if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) {
25518 return drm_mmap(filp, vma);
25519@@ -563,20 +546,9 @@ int radeon_mmap(struct file *filp, struc
25520 24970
25521 file_priv = (struct drm_file *)filp->private_data; 24971 file_priv = (struct drm_file *)filp->private_data;
25522 rdev = file_priv->minor->dev->dev_private; 24972 rdev = file_priv->minor->dev->dev_private;
@@ -25524,25 +24974,23 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.32.24/d
25524+ if (!rdev) 24974+ if (!rdev)
25525 return -EINVAL; 24975 return -EINVAL;
25526- } 24976- }
25527- r = ttm_bo_mmap(filp, vma, &rdev->mman.bdev); 24977 r = ttm_bo_mmap(filp, vma, &rdev->mman.bdev);
25528- if (unlikely(r != 0)) { 24978- if (unlikely(r != 0)) {
25529- return r; 24979+ if (r)
24980 return r;
25530- } 24981- }
25531- if (unlikely(ttm_vm_ops == NULL)) { 24982- if (unlikely(ttm_vm_ops == NULL)) {
25532- ttm_vm_ops = vma->vm_ops; 24983- ttm_vm_ops = vma->vm_ops;
25533- radeon_ttm_vm_ops = *ttm_vm_ops; 24984- radeon_ttm_vm_ops = *ttm_vm_ops;
25534- radeon_ttm_vm_ops.fault = &radeon_ttm_fault; 24985- radeon_ttm_vm_ops.fault = &radeon_ttm_fault;
25535- } 24986- }
25536- vma->vm_ops = &radeon_ttm_vm_ops; 24987 vma->vm_ops = &radeon_ttm_vm_ops;
25537- return 0; 24988 return 0;
25538+ return ttm_bo_mmap(filp, vma, &rdev->mman.bdev);
25539 } 24989 }
25540 24990diff -urNp linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_bo.c
25541 24991--- linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_bo.c 2010-08-26 19:47:12.000000000 -0400
25542diff -urNp linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo.c 24992+++ linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_bo.c 2010-09-17 20:12:09.000000000 -0400
25543--- linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo.c 2010-08-13 16:24:37.000000000 -0400 24993@@ -47,7 +47,7 @@
25544+++ linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-23 19:59:19.000000000 -0400
25545@@ -39,7 +39,7 @@
25546 #include <linux/module.h> 24994 #include <linux/module.h>
25547 24995
25548 #define TTM_ASSERT_LOCKED(param) 24996 #define TTM_ASSERT_LOCKED(param)
@@ -25551,28 +24999,24 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.32.24/drivers/
25551 #define TTM_BO_HASH_ORDER 13 24999 #define TTM_BO_HASH_ORDER 13
25552 25000
25553 static int ttm_bo_setup_vm(struct ttm_buffer_object *bo); 25001 static int ttm_bo_setup_vm(struct ttm_buffer_object *bo);
25554@@ -67,7 +67,7 @@ static struct attribute *ttm_bo_global_a 25002diff -urNp linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_bo_vm.c
25555 NULL 25003--- linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_bo_vm.c 2010-08-26 19:47:12.000000000 -0400
25556 }; 25004+++ linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_bo_vm.c 2010-09-20 17:14:49.000000000 -0400
25557 25005@@ -69,11 +69,11 @@ static struct ttm_buffer_object *ttm_bo_
25558-static struct sysfs_ops ttm_bo_global_ops = { 25006 return best_bo;
25559+static const struct sysfs_ops ttm_bo_global_ops = { 25007 }
25560 .show = &ttm_bo_global_show
25561 };
25562 25008
25563diff -urNp linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo_vm.c 25009-static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
25564--- linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo_vm.c 2010-08-13 16:24:37.000000000 -0400 25010+int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
25565+++ linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo_vm.c 2010-10-23 19:59:19.000000000 -0400
25566@@ -73,7 +73,7 @@ static int ttm_bo_vm_fault(struct vm_are
25567 { 25011 {
25568 struct ttm_buffer_object *bo = (struct ttm_buffer_object *) 25012 struct ttm_buffer_object *bo = (struct ttm_buffer_object *)
25569 vma->vm_private_data; 25013 vma->vm_private_data;
25570- struct ttm_bo_device *bdev = bo->bdev; 25014- struct ttm_bo_device *bdev = bo->bdev;
25571+ struct ttm_bo_device *bdev; 25015+ struct ttm_bo_device *bdev;
25572 unsigned long bus_base; 25016 unsigned long page_offset;
25573 unsigned long bus_offset; 25017 unsigned long page_last;
25574 unsigned long bus_size; 25018 unsigned long pfn;
25575@@ -88,6 +88,10 @@ static int ttm_bo_vm_fault(struct vm_are 25019@@ -84,6 +84,10 @@ static int ttm_bo_vm_fault(struct vm_are
25576 unsigned long address = (unsigned long)vmf->virtual_address; 25020 unsigned long address = (unsigned long)vmf->virtual_address;
25577 int retval = VM_FAULT_NOPAGE; 25021 int retval = VM_FAULT_NOPAGE;
25578 25022
@@ -25583,9 +25027,37 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_bo_vm.c linux-2.6.32.24/drive
25583 /* 25027 /*
25584 * Work around locking order reversal in fault / nopfn 25028 * Work around locking order reversal in fault / nopfn
25585 * between mmap_sem and bo_reserve: Perform a trylock operation 25029 * between mmap_sem and bo_reserve: Perform a trylock operation
25586diff -urNp linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_global.c 25030@@ -212,22 +216,25 @@ out_unlock:
25587--- linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_global.c 2010-08-13 16:24:37.000000000 -0400 25031 ttm_bo_unreserve(bo);
25588+++ linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_global.c 2010-10-23 19:59:19.000000000 -0400 25032 return retval;
25033 }
25034+EXPORT_SYMBOL(ttm_bo_vm_fault);
25035
25036-static void ttm_bo_vm_open(struct vm_area_struct *vma)
25037+void ttm_bo_vm_open(struct vm_area_struct *vma)
25038 {
25039 struct ttm_buffer_object *bo =
25040 (struct ttm_buffer_object *)vma->vm_private_data;
25041
25042 (void)ttm_bo_reference(bo);
25043 }
25044+EXPORT_SYMBOL(ttm_bo_vm_open);
25045
25046-static void ttm_bo_vm_close(struct vm_area_struct *vma)
25047+void ttm_bo_vm_close(struct vm_area_struct *vma)
25048 {
25049 struct ttm_buffer_object *bo = (struct ttm_buffer_object *)vma->vm_private_data;
25050
25051 ttm_bo_unref(&bo);
25052 vma->vm_private_data = NULL;
25053 }
25054+EXPORT_SYMBOL(ttm_bo_vm_close);
25055
25056 static const struct vm_operations_struct ttm_bo_vm_ops = {
25057 .fault = ttm_bo_vm_fault,
25058diff -urNp linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_global.c
25059--- linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_global.c 2010-08-26 19:47:12.000000000 -0400
25060+++ linux-2.6.35.7/drivers/gpu/drm/ttm/ttm_global.c 2010-09-17 20:12:09.000000000 -0400
25589@@ -36,7 +36,7 @@ 25061@@ -36,7 +36,7 @@
25590 struct ttm_global_item { 25062 struct ttm_global_item {
25591 struct mutex mutex; 25063 struct mutex mutex;
@@ -25643,52 +25115,32 @@ diff -urNp linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_global.c linux-2.6.32.24/driv
25643 ref->release(ref); 25115 ref->release(ref);
25644 item->object = NULL; 25116 item->object = NULL;
25645 } 25117 }
25646diff -urNp linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_memory.c linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_memory.c 25118diff -urNp linux-2.6.35.7/drivers/hid/hidraw.c linux-2.6.35.7/drivers/hid/hidraw.c
25647--- linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_memory.c 2010-08-13 16:24:37.000000000 -0400 25119--- linux-2.6.35.7/drivers/hid/hidraw.c 2010-08-26 19:47:12.000000000 -0400
25648+++ linux-2.6.32.24/drivers/gpu/drm/ttm/ttm_memory.c 2010-10-23 19:59:19.000000000 -0400 25120+++ linux-2.6.35.7/drivers/hid/hidraw.c 2010-09-28 18:52:39.000000000 -0400
25649@@ -152,7 +152,7 @@ static struct attribute *ttm_mem_zone_at 25121@@ -246,6 +246,10 @@ static long hidraw_ioctl(struct file *fi
25650 NULL
25651 };
25652
25653-static struct sysfs_ops ttm_mem_zone_ops = {
25654+static const struct sysfs_ops ttm_mem_zone_ops = {
25655 .show = &ttm_mem_zone_show,
25656 .store = &ttm_mem_zone_store
25657 };
25658diff -urNp linux-2.6.32.24/drivers/hid/hidraw.c linux-2.6.32.24/drivers/hid/hidraw.c
25659--- linux-2.6.32.24/drivers/hid/hidraw.c 2010-08-13 16:24:37.000000000 -0400
25660+++ linux-2.6.32.24/drivers/hid/hidraw.c 2010-10-23 19:59:19.000000000 -0400
25661@@ -237,11 +237,16 @@ static long hidraw_ioctl(struct file *fi
25662 struct inode *inode = file->f_path.dentry->d_inode;
25663 unsigned int minor = iminor(inode);
25664 long ret = 0;
25665- /* FIXME: What stops hidraw_table going NULL */
25666- struct hidraw *dev = hidraw_table[minor];
25667+ struct hidraw *dev;
25668 void __user *user_arg = (void __user*) arg;
25669 25122
25670 lock_kernel(); 25123 mutex_lock(&minors_lock);
25671+ dev = hidraw_table[minor]; 25124 dev = hidraw_table[minor];
25672+ if (dev == NULL) { 25125+ if (dev == NULL) {
25673+ ret = -ENODEV; 25126+ ret = -ENODEV;
25674+ goto out; 25127+ goto out;
25675+ } 25128+ }
25676+ 25129
25677 switch (cmd) { 25130 switch (cmd) {
25678 case HIDIOCGRDESCSIZE: 25131 case HIDIOCGRDESCSIZE:
25679 if (put_user(dev->hid->rsize, (int __user *)arg)) 25132@@ -319,6 +323,7 @@ static long hidraw_ioctl(struct file *fi
25680@@ -314,6 +319,7 @@ static long hidraw_ioctl(struct file *fi
25681 25133
25682 ret = -ENOTTY; 25134 ret = -ENOTTY;
25683 } 25135 }
25684+out: 25136+out:
25685 unlock_kernel(); 25137 mutex_unlock(&minors_lock);
25686 return ret; 25138 return ret;
25687 } 25139 }
25688diff -urNp linux-2.6.32.24/drivers/hid/usbhid/hiddev.c linux-2.6.32.24/drivers/hid/usbhid/hiddev.c 25140diff -urNp linux-2.6.35.7/drivers/hid/usbhid/hiddev.c linux-2.6.35.7/drivers/hid/usbhid/hiddev.c
25689--- linux-2.6.32.24/drivers/hid/usbhid/hiddev.c 2010-08-13 16:24:37.000000000 -0400 25141--- linux-2.6.35.7/drivers/hid/usbhid/hiddev.c 2010-08-26 19:47:12.000000000 -0400
25690+++ linux-2.6.32.24/drivers/hid/usbhid/hiddev.c 2010-10-23 19:59:19.000000000 -0400 25142+++ linux-2.6.35.7/drivers/hid/usbhid/hiddev.c 2010-09-17 20:12:09.000000000 -0400
25691@@ -617,7 +617,7 @@ static long hiddev_ioctl(struct file *fi 25143@@ -616,7 +616,7 @@ static long hiddev_ioctl(struct file *fi
25692 return put_user(HID_VERSION, (int __user *)arg); 25144 return put_user(HID_VERSION, (int __user *)arg);
25693 25145
25694 case HIDIOCAPPLICATION: 25146 case HIDIOCAPPLICATION:
@@ -25697,58 +25149,58 @@ diff -urNp linux-2.6.32.24/drivers/hid/usbhid/hiddev.c linux-2.6.32.24/drivers/h
25697 return -EINVAL; 25149 return -EINVAL;
25698 25150
25699 for (i = 0; i < hid->maxcollection; i++) 25151 for (i = 0; i < hid->maxcollection; i++)
25700diff -urNp linux-2.6.32.24/drivers/hwmon/k8temp.c linux-2.6.32.24/drivers/hwmon/k8temp.c 25152diff -urNp linux-2.6.35.7/drivers/hwmon/k8temp.c linux-2.6.35.7/drivers/hwmon/k8temp.c
25701--- linux-2.6.32.24/drivers/hwmon/k8temp.c 2010-09-20 17:26:42.000000000 -0400 25153--- linux-2.6.35.7/drivers/hwmon/k8temp.c 2010-09-20 17:33:09.000000000 -0400
25702+++ linux-2.6.32.24/drivers/hwmon/k8temp.c 2010-10-23 19:59:19.000000000 -0400 25154+++ linux-2.6.35.7/drivers/hwmon/k8temp.c 2010-09-20 17:33:32.000000000 -0400
25703@@ -138,7 +138,7 @@ static DEVICE_ATTR(name, S_IRUGO, show_n 25155@@ -138,7 +138,7 @@ static DEVICE_ATTR(name, S_IRUGO, show_n
25704 25156
25705 static struct pci_device_id k8temp_ids[] = { 25157 static const struct pci_device_id k8temp_ids[] = {
25706 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) }, 25158 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) },
25707- { 0 }, 25159- { 0 },
25708+ { 0, 0, 0, 0, 0, 0, 0 }, 25160+ { 0, 0, 0, 0, 0, 0, 0 },
25709 }; 25161 };
25710 25162
25711 MODULE_DEVICE_TABLE(pci, k8temp_ids); 25163 MODULE_DEVICE_TABLE(pci, k8temp_ids);
25712diff -urNp linux-2.6.32.24/drivers/hwmon/sis5595.c linux-2.6.32.24/drivers/hwmon/sis5595.c 25164diff -urNp linux-2.6.35.7/drivers/hwmon/sis5595.c linux-2.6.35.7/drivers/hwmon/sis5595.c
25713--- linux-2.6.32.24/drivers/hwmon/sis5595.c 2010-08-13 16:24:37.000000000 -0400 25165--- linux-2.6.35.7/drivers/hwmon/sis5595.c 2010-08-26 19:47:12.000000000 -0400
25714+++ linux-2.6.32.24/drivers/hwmon/sis5595.c 2010-10-23 19:59:19.000000000 -0400 25166+++ linux-2.6.35.7/drivers/hwmon/sis5595.c 2010-09-17 20:12:09.000000000 -0400
25715@@ -699,7 +699,7 @@ static struct sis5595_data *sis5595_upda 25167@@ -699,7 +699,7 @@ static struct sis5595_data *sis5595_upda
25716 25168
25717 static struct pci_device_id sis5595_pci_ids[] = { 25169 static const struct pci_device_id sis5595_pci_ids[] = {
25718 { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) }, 25170 { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
25719- { 0, } 25171- { 0, }
25720+ { 0, 0, 0, 0, 0, 0, 0 } 25172+ { 0, 0, 0, 0, 0, 0, 0 }
25721 }; 25173 };
25722 25174
25723 MODULE_DEVICE_TABLE(pci, sis5595_pci_ids); 25175 MODULE_DEVICE_TABLE(pci, sis5595_pci_ids);
25724diff -urNp linux-2.6.32.24/drivers/hwmon/via686a.c linux-2.6.32.24/drivers/hwmon/via686a.c 25176diff -urNp linux-2.6.35.7/drivers/hwmon/via686a.c linux-2.6.35.7/drivers/hwmon/via686a.c
25725--- linux-2.6.32.24/drivers/hwmon/via686a.c 2010-08-13 16:24:37.000000000 -0400 25177--- linux-2.6.35.7/drivers/hwmon/via686a.c 2010-08-26 19:47:12.000000000 -0400
25726+++ linux-2.6.32.24/drivers/hwmon/via686a.c 2010-10-23 19:59:19.000000000 -0400 25178+++ linux-2.6.35.7/drivers/hwmon/via686a.c 2010-09-17 20:12:09.000000000 -0400
25727@@ -769,7 +769,7 @@ static struct via686a_data *via686a_upda 25179@@ -769,7 +769,7 @@ static struct via686a_data *via686a_upda
25728 25180
25729 static struct pci_device_id via686a_pci_ids[] = { 25181 static const struct pci_device_id via686a_pci_ids[] = {
25730 { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4) }, 25182 { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4) },
25731- { 0, } 25183- { 0, }
25732+ { 0, 0, 0, 0, 0, 0, 0 } 25184+ { 0, 0, 0, 0, 0, 0, 0 }
25733 }; 25185 };
25734 25186
25735 MODULE_DEVICE_TABLE(pci, via686a_pci_ids); 25187 MODULE_DEVICE_TABLE(pci, via686a_pci_ids);
25736diff -urNp linux-2.6.32.24/drivers/hwmon/vt8231.c linux-2.6.32.24/drivers/hwmon/vt8231.c 25188diff -urNp linux-2.6.35.7/drivers/hwmon/vt8231.c linux-2.6.35.7/drivers/hwmon/vt8231.c
25737--- linux-2.6.32.24/drivers/hwmon/vt8231.c 2010-08-13 16:24:37.000000000 -0400 25189--- linux-2.6.35.7/drivers/hwmon/vt8231.c 2010-08-26 19:47:12.000000000 -0400
25738+++ linux-2.6.32.24/drivers/hwmon/vt8231.c 2010-10-23 19:59:19.000000000 -0400 25190+++ linux-2.6.35.7/drivers/hwmon/vt8231.c 2010-09-17 20:12:09.000000000 -0400
25739@@ -699,7 +699,7 @@ static struct platform_driver vt8231_dri 25191@@ -699,7 +699,7 @@ static struct platform_driver vt8231_dri
25740 25192
25741 static struct pci_device_id vt8231_pci_ids[] = { 25193 static const struct pci_device_id vt8231_pci_ids[] = {
25742 { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231_4) }, 25194 { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231_4) },
25743- { 0, } 25195- { 0, }
25744+ { 0, 0, 0, 0, 0, 0, 0 } 25196+ { 0, 0, 0, 0, 0, 0, 0 }
25745 }; 25197 };
25746 25198
25747 MODULE_DEVICE_TABLE(pci, vt8231_pci_ids); 25199 MODULE_DEVICE_TABLE(pci, vt8231_pci_ids);
25748diff -urNp linux-2.6.32.24/drivers/hwmon/w83791d.c linux-2.6.32.24/drivers/hwmon/w83791d.c 25200diff -urNp linux-2.6.35.7/drivers/hwmon/w83791d.c linux-2.6.35.7/drivers/hwmon/w83791d.c
25749--- linux-2.6.32.24/drivers/hwmon/w83791d.c 2010-08-13 16:24:37.000000000 -0400 25201--- linux-2.6.35.7/drivers/hwmon/w83791d.c 2010-08-26 19:47:12.000000000 -0400
25750+++ linux-2.6.32.24/drivers/hwmon/w83791d.c 2010-10-23 19:59:19.000000000 -0400 25202+++ linux-2.6.35.7/drivers/hwmon/w83791d.c 2010-09-17 20:12:09.000000000 -0400
25751@@ -330,8 +330,8 @@ static int w83791d_detect(struct i2c_cli 25203@@ -329,8 +329,8 @@ static int w83791d_detect(struct i2c_cli
25752 struct i2c_board_info *info); 25204 struct i2c_board_info *info);
25753 static int w83791d_remove(struct i2c_client *client); 25205 static int w83791d_remove(struct i2c_client *client);
25754 25206
@@ -25759,10 +25211,10 @@ diff -urNp linux-2.6.32.24/drivers/hwmon/w83791d.c linux-2.6.32.24/drivers/hwmon
25759 static struct w83791d_data *w83791d_update_device(struct device *dev); 25211 static struct w83791d_data *w83791d_update_device(struct device *dev);
25760 25212
25761 #ifdef DEBUG 25213 #ifdef DEBUG
25762diff -urNp linux-2.6.32.24/drivers/i2c/busses/i2c-i801.c linux-2.6.32.24/drivers/i2c/busses/i2c-i801.c 25214diff -urNp linux-2.6.35.7/drivers/i2c/busses/i2c-i801.c linux-2.6.35.7/drivers/i2c/busses/i2c-i801.c
25763--- linux-2.6.32.24/drivers/i2c/busses/i2c-i801.c 2010-08-13 16:24:37.000000000 -0400 25215--- linux-2.6.35.7/drivers/i2c/busses/i2c-i801.c 2010-08-26 19:47:12.000000000 -0400
25764+++ linux-2.6.32.24/drivers/i2c/busses/i2c-i801.c 2010-10-23 19:59:19.000000000 -0400 25216+++ linux-2.6.35.7/drivers/i2c/busses/i2c-i801.c 2010-09-17 20:12:09.000000000 -0400
25765@@ -582,7 +582,7 @@ static struct pci_device_id i801_ids[] = 25217@@ -592,7 +592,7 @@ static const struct pci_device_id i801_i
25766 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_5) }, 25218 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_5) },
25767 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PCH_SMBUS) }, 25219 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PCH_SMBUS) },
25768 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CPT_SMBUS) }, 25220 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CPT_SMBUS) },
@@ -25770,10 +25222,10 @@ diff -urNp linux-2.6.32.24/drivers/i2c/busses/i2c-i801.c linux-2.6.32.24/drivers
25770+ { 0, 0, 0, 0, 0, 0, 0 } 25222+ { 0, 0, 0, 0, 0, 0, 0 }
25771 }; 25223 };
25772 25224
25773 MODULE_DEVICE_TABLE (pci, i801_ids); 25225 MODULE_DEVICE_TABLE(pci, i801_ids);
25774diff -urNp linux-2.6.32.24/drivers/i2c/busses/i2c-piix4.c linux-2.6.32.24/drivers/i2c/busses/i2c-piix4.c 25226diff -urNp linux-2.6.35.7/drivers/i2c/busses/i2c-piix4.c linux-2.6.35.7/drivers/i2c/busses/i2c-piix4.c
25775--- linux-2.6.32.24/drivers/i2c/busses/i2c-piix4.c 2010-08-13 16:24:37.000000000 -0400 25227--- linux-2.6.35.7/drivers/i2c/busses/i2c-piix4.c 2010-08-26 19:47:12.000000000 -0400
25776+++ linux-2.6.32.24/drivers/i2c/busses/i2c-piix4.c 2010-10-23 19:59:19.000000000 -0400 25228+++ linux-2.6.35.7/drivers/i2c/busses/i2c-piix4.c 2010-09-17 20:12:09.000000000 -0400
25777@@ -124,7 +124,7 @@ static struct dmi_system_id __devinitdat 25229@@ -124,7 +124,7 @@ static struct dmi_system_id __devinitdat
25778 .ident = "IBM", 25230 .ident = "IBM",
25779 .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), }, 25231 .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
@@ -25783,7 +25235,7 @@ diff -urNp linux-2.6.32.24/drivers/i2c/busses/i2c-piix4.c linux-2.6.32.24/driver
25783 }; 25235 };
25784 25236
25785 static int __devinit piix4_setup(struct pci_dev *PIIX4_dev, 25237 static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
25786@@ -491,7 +491,7 @@ static struct pci_device_id piix4_ids[] 25238@@ -491,7 +491,7 @@ static const struct pci_device_id piix4_
25787 PCI_DEVICE_ID_SERVERWORKS_HT1000SB) }, 25239 PCI_DEVICE_ID_SERVERWORKS_HT1000SB) },
25788 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, 25240 { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
25789 PCI_DEVICE_ID_SERVERWORKS_HT1100LD) }, 25241 PCI_DEVICE_ID_SERVERWORKS_HT1100LD) },
@@ -25792,11 +25244,11 @@ diff -urNp linux-2.6.32.24/drivers/i2c/busses/i2c-piix4.c linux-2.6.32.24/driver
25792 }; 25244 };
25793 25245
25794 MODULE_DEVICE_TABLE (pci, piix4_ids); 25246 MODULE_DEVICE_TABLE (pci, piix4_ids);
25795diff -urNp linux-2.6.32.24/drivers/i2c/busses/i2c-sis630.c linux-2.6.32.24/drivers/i2c/busses/i2c-sis630.c 25247diff -urNp linux-2.6.35.7/drivers/i2c/busses/i2c-sis630.c linux-2.6.35.7/drivers/i2c/busses/i2c-sis630.c
25796--- linux-2.6.32.24/drivers/i2c/busses/i2c-sis630.c 2010-08-13 16:24:37.000000000 -0400 25248--- linux-2.6.35.7/drivers/i2c/busses/i2c-sis630.c 2010-08-26 19:47:12.000000000 -0400
25797+++ linux-2.6.32.24/drivers/i2c/busses/i2c-sis630.c 2010-10-23 19:59:19.000000000 -0400 25249+++ linux-2.6.35.7/drivers/i2c/busses/i2c-sis630.c 2010-09-17 20:12:09.000000000 -0400
25798@@ -471,7 +471,7 @@ static struct i2c_adapter sis630_adapter 25250@@ -471,7 +471,7 @@ static struct i2c_adapter sis630_adapter
25799 static struct pci_device_id sis630_ids[] __devinitdata = { 25251 static const struct pci_device_id sis630_ids[] __devinitconst = {
25800 { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) }, 25252 { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
25801 { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC) }, 25253 { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC) },
25802- { 0, } 25254- { 0, }
@@ -25804,21 +25256,21 @@ diff -urNp linux-2.6.32.24/drivers/i2c/busses/i2c-sis630.c linux-2.6.32.24/drive
25804 }; 25256 };
25805 25257
25806 MODULE_DEVICE_TABLE (pci, sis630_ids); 25258 MODULE_DEVICE_TABLE (pci, sis630_ids);
25807diff -urNp linux-2.6.32.24/drivers/i2c/busses/i2c-sis96x.c linux-2.6.32.24/drivers/i2c/busses/i2c-sis96x.c 25259diff -urNp linux-2.6.35.7/drivers/i2c/busses/i2c-sis96x.c linux-2.6.35.7/drivers/i2c/busses/i2c-sis96x.c
25808--- linux-2.6.32.24/drivers/i2c/busses/i2c-sis96x.c 2010-08-13 16:24:37.000000000 -0400 25260--- linux-2.6.35.7/drivers/i2c/busses/i2c-sis96x.c 2010-08-26 19:47:12.000000000 -0400
25809+++ linux-2.6.32.24/drivers/i2c/busses/i2c-sis96x.c 2010-10-23 19:59:19.000000000 -0400 25261+++ linux-2.6.35.7/drivers/i2c/busses/i2c-sis96x.c 2010-09-17 20:12:09.000000000 -0400
25810@@ -247,7 +247,7 @@ static struct i2c_adapter sis96x_adapter 25262@@ -247,7 +247,7 @@ static struct i2c_adapter sis96x_adapter
25811 25263
25812 static struct pci_device_id sis96x_ids[] = { 25264 static const struct pci_device_id sis96x_ids[] = {
25813 { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_SMBUS) }, 25265 { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_SMBUS) },
25814- { 0, } 25266- { 0, }
25815+ { 0, 0, 0, 0, 0, 0, 0 } 25267+ { 0, 0, 0, 0, 0, 0, 0 }
25816 }; 25268 };
25817 25269
25818 MODULE_DEVICE_TABLE (pci, sis96x_ids); 25270 MODULE_DEVICE_TABLE (pci, sis96x_ids);
25819diff -urNp linux-2.6.32.24/drivers/ide/ide-cd.c linux-2.6.32.24/drivers/ide/ide-cd.c 25271diff -urNp linux-2.6.35.7/drivers/ide/ide-cd.c linux-2.6.35.7/drivers/ide/ide-cd.c
25820--- linux-2.6.32.24/drivers/ide/ide-cd.c 2010-08-13 16:24:37.000000000 -0400 25272--- linux-2.6.35.7/drivers/ide/ide-cd.c 2010-08-26 19:47:12.000000000 -0400
25821+++ linux-2.6.32.24/drivers/ide/ide-cd.c 2010-10-23 19:59:19.000000000 -0400 25273+++ linux-2.6.35.7/drivers/ide/ide-cd.c 2010-09-17 20:12:09.000000000 -0400
25822@@ -774,7 +774,7 @@ static void cdrom_do_block_pc(ide_drive_ 25274@@ -774,7 +774,7 @@ static void cdrom_do_block_pc(ide_drive_
25823 alignment = queue_dma_alignment(q) | q->dma_pad_mask; 25275 alignment = queue_dma_alignment(q) | q->dma_pad_mask;
25824 if ((unsigned long)buf & alignment 25276 if ((unsigned long)buf & alignment
@@ -25828,9 +25280,9 @@ diff -urNp linux-2.6.32.24/drivers/ide/ide-cd.c linux-2.6.32.24/drivers/ide/ide-
25828 drive->dma = 0; 25280 drive->dma = 0;
25829 } 25281 }
25830 } 25282 }
25831diff -urNp linux-2.6.32.24/drivers/ieee1394/dv1394.c linux-2.6.32.24/drivers/ieee1394/dv1394.c 25283diff -urNp linux-2.6.35.7/drivers/ieee1394/dv1394.c linux-2.6.35.7/drivers/ieee1394/dv1394.c
25832--- linux-2.6.32.24/drivers/ieee1394/dv1394.c 2010-08-13 16:24:37.000000000 -0400 25284--- linux-2.6.35.7/drivers/ieee1394/dv1394.c 2010-08-26 19:47:12.000000000 -0400
25833+++ linux-2.6.32.24/drivers/ieee1394/dv1394.c 2010-10-23 19:59:19.000000000 -0400 25285+++ linux-2.6.35.7/drivers/ieee1394/dv1394.c 2010-09-17 20:12:09.000000000 -0400
25834@@ -739,7 +739,7 @@ static void frame_prepare(struct video_c 25286@@ -739,7 +739,7 @@ static void frame_prepare(struct video_c
25835 based upon DIF section and sequence 25287 based upon DIF section and sequence
25836 */ 25288 */
@@ -25840,7 +25292,7 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/dv1394.c linux-2.6.32.24/drivers/iee
25840 frame_put_packet (struct frame *f, struct packet *p) 25292 frame_put_packet (struct frame *f, struct packet *p)
25841 { 25293 {
25842 int section_type = p->data[0] >> 5; /* section type is in bits 5 - 7 */ 25294 int section_type = p->data[0] >> 5; /* section type is in bits 5 - 7 */
25843@@ -2178,7 +2178,7 @@ static const struct ieee1394_device_id d 25295@@ -2179,7 +2179,7 @@ static const struct ieee1394_device_id d
25844 .specifier_id = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff, 25296 .specifier_id = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff,
25845 .version = AVC_SW_VERSION_ENTRY & 0xffffff 25297 .version = AVC_SW_VERSION_ENTRY & 0xffffff
25846 }, 25298 },
@@ -25849,9 +25301,9 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/dv1394.c linux-2.6.32.24/drivers/iee
25849 }; 25301 };
25850 25302
25851 MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table); 25303 MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table);
25852diff -urNp linux-2.6.32.24/drivers/ieee1394/eth1394.c linux-2.6.32.24/drivers/ieee1394/eth1394.c 25304diff -urNp linux-2.6.35.7/drivers/ieee1394/eth1394.c linux-2.6.35.7/drivers/ieee1394/eth1394.c
25853--- linux-2.6.32.24/drivers/ieee1394/eth1394.c 2010-08-13 16:24:37.000000000 -0400 25305--- linux-2.6.35.7/drivers/ieee1394/eth1394.c 2010-08-26 19:47:12.000000000 -0400
25854+++ linux-2.6.32.24/drivers/ieee1394/eth1394.c 2010-10-23 19:59:19.000000000 -0400 25306+++ linux-2.6.35.7/drivers/ieee1394/eth1394.c 2010-09-17 20:12:09.000000000 -0400
25855@@ -446,7 +446,7 @@ static const struct ieee1394_device_id e 25307@@ -446,7 +446,7 @@ static const struct ieee1394_device_id e
25856 .specifier_id = ETHER1394_GASP_SPECIFIER_ID, 25308 .specifier_id = ETHER1394_GASP_SPECIFIER_ID,
25857 .version = ETHER1394_GASP_VERSION, 25309 .version = ETHER1394_GASP_VERSION,
@@ -25861,9 +25313,9 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/eth1394.c linux-2.6.32.24/drivers/ie
25861 }; 25313 };
25862 25314
25863 MODULE_DEVICE_TABLE(ieee1394, eth1394_id_table); 25315 MODULE_DEVICE_TABLE(ieee1394, eth1394_id_table);
25864diff -urNp linux-2.6.32.24/drivers/ieee1394/hosts.c linux-2.6.32.24/drivers/ieee1394/hosts.c 25316diff -urNp linux-2.6.35.7/drivers/ieee1394/hosts.c linux-2.6.35.7/drivers/ieee1394/hosts.c
25865--- linux-2.6.32.24/drivers/ieee1394/hosts.c 2010-08-13 16:24:37.000000000 -0400 25317--- linux-2.6.35.7/drivers/ieee1394/hosts.c 2010-08-26 19:47:12.000000000 -0400
25866+++ linux-2.6.32.24/drivers/ieee1394/hosts.c 2010-10-23 19:59:19.000000000 -0400 25318+++ linux-2.6.35.7/drivers/ieee1394/hosts.c 2010-09-17 20:12:09.000000000 -0400
25867@@ -78,6 +78,7 @@ static int dummy_isoctl(struct hpsb_iso 25319@@ -78,6 +78,7 @@ static int dummy_isoctl(struct hpsb_iso
25868 } 25320 }
25869 25321
@@ -25872,10 +25324,10 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/hosts.c linux-2.6.32.24/drivers/ieee
25872 .transmit_packet = dummy_transmit_packet, 25324 .transmit_packet = dummy_transmit_packet,
25873 .devctl = dummy_devctl, 25325 .devctl = dummy_devctl,
25874 .isoctl = dummy_isoctl 25326 .isoctl = dummy_isoctl
25875diff -urNp linux-2.6.32.24/drivers/ieee1394/ohci1394.c linux-2.6.32.24/drivers/ieee1394/ohci1394.c 25327diff -urNp linux-2.6.35.7/drivers/ieee1394/ohci1394.c linux-2.6.35.7/drivers/ieee1394/ohci1394.c
25876--- linux-2.6.32.24/drivers/ieee1394/ohci1394.c 2010-08-13 16:24:37.000000000 -0400 25328--- linux-2.6.35.7/drivers/ieee1394/ohci1394.c 2010-08-26 19:47:12.000000000 -0400
25877+++ linux-2.6.32.24/drivers/ieee1394/ohci1394.c 2010-10-23 19:59:19.000000000 -0400 25329+++ linux-2.6.35.7/drivers/ieee1394/ohci1394.c 2010-09-17 20:12:09.000000000 -0400
25878@@ -147,9 +147,9 @@ printk(level "%s: " fmt "\n" , OHCI1394_ 25330@@ -148,9 +148,9 @@ printk(level "%s: " fmt "\n" , OHCI1394_
25879 printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args) 25331 printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args)
25880 25332
25881 /* Module Parameters */ 25333 /* Module Parameters */
@@ -25887,7 +25339,7 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/ohci1394.c linux-2.6.32.24/drivers/i
25887 25339
25888 static void dma_trm_tasklet(unsigned long data); 25340 static void dma_trm_tasklet(unsigned long data);
25889 static void dma_trm_reset(struct dma_trm_ctx *d); 25341 static void dma_trm_reset(struct dma_trm_ctx *d);
25890@@ -3449,7 +3449,7 @@ static struct pci_device_id ohci1394_pci 25342@@ -3445,7 +3445,7 @@ static struct pci_device_id ohci1394_pci
25891 .subvendor = PCI_ANY_ID, 25343 .subvendor = PCI_ANY_ID,
25892 .subdevice = PCI_ANY_ID, 25344 .subdevice = PCI_ANY_ID,
25893 }, 25345 },
@@ -25896,9 +25348,9 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/ohci1394.c linux-2.6.32.24/drivers/i
25896 }; 25348 };
25897 25349
25898 MODULE_DEVICE_TABLE(pci, ohci1394_pci_tbl); 25350 MODULE_DEVICE_TABLE(pci, ohci1394_pci_tbl);
25899diff -urNp linux-2.6.32.24/drivers/ieee1394/raw1394.c linux-2.6.32.24/drivers/ieee1394/raw1394.c 25351diff -urNp linux-2.6.35.7/drivers/ieee1394/raw1394.c linux-2.6.35.7/drivers/ieee1394/raw1394.c
25900--- linux-2.6.32.24/drivers/ieee1394/raw1394.c 2010-08-13 16:24:37.000000000 -0400 25352--- linux-2.6.35.7/drivers/ieee1394/raw1394.c 2010-08-26 19:47:12.000000000 -0400
25901+++ linux-2.6.32.24/drivers/ieee1394/raw1394.c 2010-10-23 19:59:19.000000000 -0400 25353+++ linux-2.6.35.7/drivers/ieee1394/raw1394.c 2010-09-17 20:12:09.000000000 -0400
25902@@ -3002,7 +3002,7 @@ static const struct ieee1394_device_id r 25354@@ -3002,7 +3002,7 @@ static const struct ieee1394_device_id r
25903 .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, 25355 .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION,
25904 .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, 25356 .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff,
@@ -25908,10 +25360,10 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/raw1394.c linux-2.6.32.24/drivers/ie
25908 }; 25360 };
25909 25361
25910 MODULE_DEVICE_TABLE(ieee1394, raw1394_id_table); 25362 MODULE_DEVICE_TABLE(ieee1394, raw1394_id_table);
25911diff -urNp linux-2.6.32.24/drivers/ieee1394/sbp2.c linux-2.6.32.24/drivers/ieee1394/sbp2.c 25363diff -urNp linux-2.6.35.7/drivers/ieee1394/sbp2.c linux-2.6.35.7/drivers/ieee1394/sbp2.c
25912--- linux-2.6.32.24/drivers/ieee1394/sbp2.c 2010-08-13 16:24:37.000000000 -0400 25364--- linux-2.6.35.7/drivers/ieee1394/sbp2.c 2010-08-26 19:47:12.000000000 -0400
25913+++ linux-2.6.32.24/drivers/ieee1394/sbp2.c 2010-10-23 19:59:19.000000000 -0400 25365+++ linux-2.6.35.7/drivers/ieee1394/sbp2.c 2010-09-17 20:12:09.000000000 -0400
25914@@ -290,7 +290,7 @@ static const struct ieee1394_device_id s 25366@@ -289,7 +289,7 @@ static const struct ieee1394_device_id s
25915 .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, 25367 .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION,
25916 .specifier_id = SBP2_UNIT_SPEC_ID_ENTRY & 0xffffff, 25368 .specifier_id = SBP2_UNIT_SPEC_ID_ENTRY & 0xffffff,
25917 .version = SBP2_SW_VERSION_ENTRY & 0xffffff}, 25369 .version = SBP2_SW_VERSION_ENTRY & 0xffffff},
@@ -25920,7 +25372,7 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/sbp2.c linux-2.6.32.24/drivers/ieee1
25920 }; 25372 };
25921 MODULE_DEVICE_TABLE(ieee1394, sbp2_id_table); 25373 MODULE_DEVICE_TABLE(ieee1394, sbp2_id_table);
25922 25374
25923@@ -2111,7 +2111,7 @@ MODULE_DESCRIPTION("IEEE-1394 SBP-2 prot 25375@@ -2110,7 +2110,7 @@ MODULE_DESCRIPTION("IEEE-1394 SBP-2 prot
25924 MODULE_SUPPORTED_DEVICE(SBP2_DEVICE_NAME); 25376 MODULE_SUPPORTED_DEVICE(SBP2_DEVICE_NAME);
25925 MODULE_LICENSE("GPL"); 25377 MODULE_LICENSE("GPL");
25926 25378
@@ -25929,10 +25381,10 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/sbp2.c linux-2.6.32.24/drivers/ieee1
25929 { 25381 {
25930 int ret; 25382 int ret;
25931 25383
25932diff -urNp linux-2.6.32.24/drivers/ieee1394/video1394.c linux-2.6.32.24/drivers/ieee1394/video1394.c 25384diff -urNp linux-2.6.35.7/drivers/ieee1394/video1394.c linux-2.6.35.7/drivers/ieee1394/video1394.c
25933--- linux-2.6.32.24/drivers/ieee1394/video1394.c 2010-08-13 16:24:37.000000000 -0400 25385--- linux-2.6.35.7/drivers/ieee1394/video1394.c 2010-08-26 19:47:12.000000000 -0400
25934+++ linux-2.6.32.24/drivers/ieee1394/video1394.c 2010-10-23 19:59:19.000000000 -0400 25386+++ linux-2.6.35.7/drivers/ieee1394/video1394.c 2010-09-17 20:12:09.000000000 -0400
25935@@ -1311,7 +1311,7 @@ static const struct ieee1394_device_id v 25387@@ -1312,7 +1312,7 @@ static const struct ieee1394_device_id v
25936 .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, 25388 .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff,
25937 .version = (CAMERA_SW_VERSION_ENTRY + 2) & 0xffffff 25389 .version = (CAMERA_SW_VERSION_ENTRY + 2) & 0xffffff
25938 }, 25390 },
@@ -25941,10 +25393,10 @@ diff -urNp linux-2.6.32.24/drivers/ieee1394/video1394.c linux-2.6.32.24/drivers/
25941 }; 25393 };
25942 25394
25943 MODULE_DEVICE_TABLE(ieee1394, video1394_id_table); 25395 MODULE_DEVICE_TABLE(ieee1394, video1394_id_table);
25944diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/infiniband/core/cm.c 25396diff -urNp linux-2.6.35.7/drivers/infiniband/core/cm.c linux-2.6.35.7/drivers/infiniband/core/cm.c
25945--- linux-2.6.32.24/drivers/infiniband/core/cm.c 2010-08-13 16:24:37.000000000 -0400 25397--- linux-2.6.35.7/drivers/infiniband/core/cm.c 2010-08-26 19:47:12.000000000 -0400
25946+++ linux-2.6.32.24/drivers/infiniband/core/cm.c 2010-10-23 19:59:20.000000000 -0400 25398+++ linux-2.6.35.7/drivers/infiniband/core/cm.c 2010-09-17 20:12:09.000000000 -0400
25947@@ -112,7 +112,7 @@ static char const counter_group_names[CM 25399@@ -113,7 +113,7 @@ static char const counter_group_names[CM
25948 25400
25949 struct cm_counter_group { 25401 struct cm_counter_group {
25950 struct kobject obj; 25402 struct kobject obj;
@@ -25953,7 +25405,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
25953 }; 25405 };
25954 25406
25955 struct cm_counter_attribute { 25407 struct cm_counter_attribute {
25956@@ -1386,7 +1386,7 @@ static void cm_dup_req_handler(struct cm 25408@@ -1387,7 +1387,7 @@ static void cm_dup_req_handler(struct cm
25957 struct ib_mad_send_buf *msg = NULL; 25409 struct ib_mad_send_buf *msg = NULL;
25958 int ret; 25410 int ret;
25959 25411
@@ -25962,7 +25414,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
25962 counter[CM_REQ_COUNTER]); 25414 counter[CM_REQ_COUNTER]);
25963 25415
25964 /* Quick state check to discard duplicate REQs. */ 25416 /* Quick state check to discard duplicate REQs. */
25965@@ -1764,7 +1764,7 @@ static void cm_dup_rep_handler(struct cm 25417@@ -1765,7 +1765,7 @@ static void cm_dup_rep_handler(struct cm
25966 if (!cm_id_priv) 25418 if (!cm_id_priv)
25967 return; 25419 return;
25968 25420
@@ -25971,7 +25423,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
25971 counter[CM_REP_COUNTER]); 25423 counter[CM_REP_COUNTER]);
25972 ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg); 25424 ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg);
25973 if (ret) 25425 if (ret)
25974@@ -1931,7 +1931,7 @@ static int cm_rtu_handler(struct cm_work 25426@@ -1932,7 +1932,7 @@ static int cm_rtu_handler(struct cm_work
25975 if (cm_id_priv->id.state != IB_CM_REP_SENT && 25427 if (cm_id_priv->id.state != IB_CM_REP_SENT &&
25976 cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) { 25428 cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) {
25977 spin_unlock_irq(&cm_id_priv->lock); 25429 spin_unlock_irq(&cm_id_priv->lock);
@@ -25980,7 +25432,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
25980 counter[CM_RTU_COUNTER]); 25432 counter[CM_RTU_COUNTER]);
25981 goto out; 25433 goto out;
25982 } 25434 }
25983@@ -2110,7 +2110,7 @@ static int cm_dreq_handler(struct cm_wor 25435@@ -2111,7 +2111,7 @@ static int cm_dreq_handler(struct cm_wor
25984 cm_id_priv = cm_acquire_id(dreq_msg->remote_comm_id, 25436 cm_id_priv = cm_acquire_id(dreq_msg->remote_comm_id,
25985 dreq_msg->local_comm_id); 25437 dreq_msg->local_comm_id);
25986 if (!cm_id_priv) { 25438 if (!cm_id_priv) {
@@ -25989,7 +25441,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
25989 counter[CM_DREQ_COUNTER]); 25441 counter[CM_DREQ_COUNTER]);
25990 cm_issue_drep(work->port, work->mad_recv_wc); 25442 cm_issue_drep(work->port, work->mad_recv_wc);
25991 return -EINVAL; 25443 return -EINVAL;
25992@@ -2131,7 +2131,7 @@ static int cm_dreq_handler(struct cm_wor 25444@@ -2132,7 +2132,7 @@ static int cm_dreq_handler(struct cm_wor
25993 case IB_CM_MRA_REP_RCVD: 25445 case IB_CM_MRA_REP_RCVD:
25994 break; 25446 break;
25995 case IB_CM_TIMEWAIT: 25447 case IB_CM_TIMEWAIT:
@@ -25998,7 +25450,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
25998 counter[CM_DREQ_COUNTER]); 25450 counter[CM_DREQ_COUNTER]);
25999 if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) 25451 if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
26000 goto unlock; 25452 goto unlock;
26001@@ -2145,7 +2145,7 @@ static int cm_dreq_handler(struct cm_wor 25453@@ -2146,7 +2146,7 @@ static int cm_dreq_handler(struct cm_wor
26002 cm_free_msg(msg); 25454 cm_free_msg(msg);
26003 goto deref; 25455 goto deref;
26004 case IB_CM_DREQ_RCVD: 25456 case IB_CM_DREQ_RCVD:
@@ -26007,7 +25459,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26007 counter[CM_DREQ_COUNTER]); 25459 counter[CM_DREQ_COUNTER]);
26008 goto unlock; 25460 goto unlock;
26009 default: 25461 default:
26010@@ -2501,7 +2501,7 @@ static int cm_mra_handler(struct cm_work 25462@@ -2502,7 +2502,7 @@ static int cm_mra_handler(struct cm_work
26011 ib_modify_mad(cm_id_priv->av.port->mad_agent, 25463 ib_modify_mad(cm_id_priv->av.port->mad_agent,
26012 cm_id_priv->msg, timeout)) { 25464 cm_id_priv->msg, timeout)) {
26013 if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD) 25465 if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
@@ -26016,7 +25468,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26016 counter_group[CM_RECV_DUPLICATES]. 25468 counter_group[CM_RECV_DUPLICATES].
26017 counter[CM_MRA_COUNTER]); 25469 counter[CM_MRA_COUNTER]);
26018 goto out; 25470 goto out;
26019@@ -2510,7 +2510,7 @@ static int cm_mra_handler(struct cm_work 25471@@ -2511,7 +2511,7 @@ static int cm_mra_handler(struct cm_work
26020 break; 25472 break;
26021 case IB_CM_MRA_REQ_RCVD: 25473 case IB_CM_MRA_REQ_RCVD:
26022 case IB_CM_MRA_REP_RCVD: 25474 case IB_CM_MRA_REP_RCVD:
@@ -26025,7 +25477,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26025 counter[CM_MRA_COUNTER]); 25477 counter[CM_MRA_COUNTER]);
26026 /* fall through */ 25478 /* fall through */
26027 default: 25479 default:
26028@@ -2672,7 +2672,7 @@ static int cm_lap_handler(struct cm_work 25480@@ -2673,7 +2673,7 @@ static int cm_lap_handler(struct cm_work
26029 case IB_CM_LAP_IDLE: 25481 case IB_CM_LAP_IDLE:
26030 break; 25482 break;
26031 case IB_CM_MRA_LAP_SENT: 25483 case IB_CM_MRA_LAP_SENT:
@@ -26034,7 +25486,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26034 counter[CM_LAP_COUNTER]); 25486 counter[CM_LAP_COUNTER]);
26035 if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg)) 25487 if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
26036 goto unlock; 25488 goto unlock;
26037@@ -2688,7 +2688,7 @@ static int cm_lap_handler(struct cm_work 25489@@ -2689,7 +2689,7 @@ static int cm_lap_handler(struct cm_work
26038 cm_free_msg(msg); 25490 cm_free_msg(msg);
26039 goto deref; 25491 goto deref;
26040 case IB_CM_LAP_RCVD: 25492 case IB_CM_LAP_RCVD:
@@ -26043,7 +25495,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26043 counter[CM_LAP_COUNTER]); 25495 counter[CM_LAP_COUNTER]);
26044 goto unlock; 25496 goto unlock;
26045 default: 25497 default:
26046@@ -2972,7 +2972,7 @@ static int cm_sidr_req_handler(struct cm 25498@@ -2973,7 +2973,7 @@ static int cm_sidr_req_handler(struct cm
26047 cur_cm_id_priv = cm_insert_remote_sidr(cm_id_priv); 25499 cur_cm_id_priv = cm_insert_remote_sidr(cm_id_priv);
26048 if (cur_cm_id_priv) { 25500 if (cur_cm_id_priv) {
26049 spin_unlock_irq(&cm.lock); 25501 spin_unlock_irq(&cm.lock);
@@ -26052,7 +25504,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26052 counter[CM_SIDR_REQ_COUNTER]); 25504 counter[CM_SIDR_REQ_COUNTER]);
26053 goto out; /* Duplicate message. */ 25505 goto out; /* Duplicate message. */
26054 } 25506 }
26055@@ -3183,10 +3183,10 @@ static void cm_send_handler(struct ib_ma 25507@@ -3184,10 +3184,10 @@ static void cm_send_handler(struct ib_ma
26056 if (!msg->context[0] && (attr_index != CM_REJ_COUNTER)) 25508 if (!msg->context[0] && (attr_index != CM_REJ_COUNTER))
26057 msg->retries = 1; 25509 msg->retries = 1;
26058 25510
@@ -26065,7 +25517,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26065 &port->counter_group[CM_XMIT_RETRIES]. 25517 &port->counter_group[CM_XMIT_RETRIES].
26066 counter[attr_index]); 25518 counter[attr_index]);
26067 25519
26068@@ -3396,7 +3396,7 @@ static void cm_recv_handler(struct ib_ma 25520@@ -3397,7 +3397,7 @@ static void cm_recv_handler(struct ib_ma
26069 } 25521 }
26070 25522
26071 attr_id = be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id); 25523 attr_id = be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id);
@@ -26074,7 +25526,7 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26074 counter[attr_id - CM_ATTR_ID_OFFSET]); 25526 counter[attr_id - CM_ATTR_ID_OFFSET]);
26075 25527
26076 work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths, 25528 work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths,
26077@@ -3594,10 +3594,10 @@ static ssize_t cm_show_counter(struct ko 25529@@ -3595,7 +3595,7 @@ static ssize_t cm_show_counter(struct ko
26078 cm_attr = container_of(attr, struct cm_counter_attribute, attr); 25530 cm_attr = container_of(attr, struct cm_counter_attribute, attr);
26079 25531
26080 return sprintf(buf, "%ld\n", 25532 return sprintf(buf, "%ld\n",
@@ -26082,27 +25534,22 @@ diff -urNp linux-2.6.32.24/drivers/infiniband/core/cm.c linux-2.6.32.24/drivers/
26082+ atomic_long_read_unchecked(&group->counter[cm_attr->index])); 25534+ atomic_long_read_unchecked(&group->counter[cm_attr->index]));
26083 } 25535 }
26084 25536
26085-static struct sysfs_ops cm_counter_ops = { 25537 static const struct sysfs_ops cm_counter_ops = {
26086+static const struct sysfs_ops cm_counter_ops = { 25538diff -urNp linux-2.6.35.7/drivers/infiniband/hw/qib/qib.h linux-2.6.35.7/drivers/infiniband/hw/qib/qib.h
26087 .show = cm_show_counter 25539--- linux-2.6.35.7/drivers/infiniband/hw/qib/qib.h 2010-08-26 19:47:12.000000000 -0400
26088 }; 25540+++ linux-2.6.35.7/drivers/infiniband/hw/qib/qib.h 2010-09-17 20:12:09.000000000 -0400
26089 25541@@ -50,6 +50,7 @@
26090diff -urNp linux-2.6.32.24/drivers/infiniband/core/sysfs.c linux-2.6.32.24/drivers/infiniband/core/sysfs.c 25542 #include <linux/completion.h>
26091--- linux-2.6.32.24/drivers/infiniband/core/sysfs.c 2010-08-13 16:24:37.000000000 -0400 25543 #include <linux/kref.h>
26092+++ linux-2.6.32.24/drivers/infiniband/core/sysfs.c 2010-10-23 19:59:20.000000000 -0400 25544 #include <linux/sched.h>
26093@@ -79,7 +79,7 @@ static ssize_t port_attr_show(struct kob 25545+#include <linux/slab.h>
26094 return port_attr->show(p, port_attr, buf);
26095 }
26096
26097-static struct sysfs_ops port_sysfs_ops = {
26098+static const struct sysfs_ops port_sysfs_ops = {
26099 .show = port_attr_show
26100 };
26101 25546
26102diff -urNp linux-2.6.32.24/drivers/input/keyboard/atkbd.c linux-2.6.32.24/drivers/input/keyboard/atkbd.c 25547 #include "qib_common.h"
26103--- linux-2.6.32.24/drivers/input/keyboard/atkbd.c 2010-08-13 16:24:37.000000000 -0400 25548 #include "qib_verbs.h"
26104+++ linux-2.6.32.24/drivers/input/keyboard/atkbd.c 2010-10-23 19:59:20.000000000 -0400 25549diff -urNp linux-2.6.35.7/drivers/input/keyboard/atkbd.c linux-2.6.35.7/drivers/input/keyboard/atkbd.c
26105@@ -1212,7 +1212,7 @@ static struct serio_device_id atkbd_seri 25550--- linux-2.6.35.7/drivers/input/keyboard/atkbd.c 2010-08-26 19:47:12.000000000 -0400
25551+++ linux-2.6.35.7/drivers/input/keyboard/atkbd.c 2010-09-17 20:12:09.000000000 -0400
25552@@ -1240,7 +1240,7 @@ static struct serio_device_id atkbd_seri
26106 .id = SERIO_ANY, 25553 .id = SERIO_ANY,
26107 .extra = SERIO_ANY, 25554 .extra = SERIO_ANY,
26108 }, 25555 },
@@ -26111,10 +25558,10 @@ diff -urNp linux-2.6.32.24/drivers/input/keyboard/atkbd.c linux-2.6.32.24/driver
26111 }; 25558 };
26112 25559
26113 MODULE_DEVICE_TABLE(serio, atkbd_serio_ids); 25560 MODULE_DEVICE_TABLE(serio, atkbd_serio_ids);
26114diff -urNp linux-2.6.32.24/drivers/input/mouse/lifebook.c linux-2.6.32.24/drivers/input/mouse/lifebook.c 25561diff -urNp linux-2.6.35.7/drivers/input/mouse/lifebook.c linux-2.6.35.7/drivers/input/mouse/lifebook.c
26115--- linux-2.6.32.24/drivers/input/mouse/lifebook.c 2010-08-13 16:24:37.000000000 -0400 25562--- linux-2.6.35.7/drivers/input/mouse/lifebook.c 2010-08-26 19:47:12.000000000 -0400
26116+++ linux-2.6.32.24/drivers/input/mouse/lifebook.c 2010-10-23 19:59:20.000000000 -0400 25563+++ linux-2.6.35.7/drivers/input/mouse/lifebook.c 2010-09-17 20:12:09.000000000 -0400
26117@@ -115,7 +115,7 @@ static const struct dmi_system_id lifebo 25564@@ -123,7 +123,7 @@ static const struct dmi_system_id __init
26118 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), 25565 DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"),
26119 }, 25566 },
26120 }, 25567 },
@@ -26122,11 +25569,11 @@ diff -urNp linux-2.6.32.24/drivers/input/mouse/lifebook.c linux-2.6.32.24/driver
26122+ { NULL, NULL, {DMI_MATCH(DMI_NONE, {0})}, NULL} 25569+ { NULL, NULL, {DMI_MATCH(DMI_NONE, {0})}, NULL}
26123 }; 25570 };
26124 25571
26125 static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse) 25572 void __init lifebook_module_init(void)
26126diff -urNp linux-2.6.32.24/drivers/input/mouse/psmouse-base.c linux-2.6.32.24/drivers/input/mouse/psmouse-base.c 25573diff -urNp linux-2.6.35.7/drivers/input/mouse/psmouse-base.c linux-2.6.35.7/drivers/input/mouse/psmouse-base.c
26127--- linux-2.6.32.24/drivers/input/mouse/psmouse-base.c 2010-08-13 16:24:37.000000000 -0400 25574--- linux-2.6.35.7/drivers/input/mouse/psmouse-base.c 2010-08-26 19:47:12.000000000 -0400
26128+++ linux-2.6.32.24/drivers/input/mouse/psmouse-base.c 2010-10-23 19:59:20.000000000 -0400 25575+++ linux-2.6.35.7/drivers/input/mouse/psmouse-base.c 2010-09-17 20:12:09.000000000 -0400
26129@@ -1415,7 +1415,7 @@ static struct serio_device_id psmouse_se 25576@@ -1460,7 +1460,7 @@ static struct serio_device_id psmouse_se
26130 .id = SERIO_ANY, 25577 .id = SERIO_ANY,
26131 .extra = SERIO_ANY, 25578 .extra = SERIO_ANY,
26132 }, 25579 },
@@ -26135,10 +25582,10 @@ diff -urNp linux-2.6.32.24/drivers/input/mouse/psmouse-base.c linux-2.6.32.24/dr
26135 }; 25582 };
26136 25583
26137 MODULE_DEVICE_TABLE(serio, psmouse_serio_ids); 25584 MODULE_DEVICE_TABLE(serio, psmouse_serio_ids);
26138diff -urNp linux-2.6.32.24/drivers/input/mouse/synaptics.c linux-2.6.32.24/drivers/input/mouse/synaptics.c 25585diff -urNp linux-2.6.35.7/drivers/input/mouse/synaptics.c linux-2.6.35.7/drivers/input/mouse/synaptics.c
26139--- linux-2.6.32.24/drivers/input/mouse/synaptics.c 2010-08-13 16:24:37.000000000 -0400 25586--- linux-2.6.35.7/drivers/input/mouse/synaptics.c 2010-08-26 19:47:12.000000000 -0400
26140+++ linux-2.6.32.24/drivers/input/mouse/synaptics.c 2010-10-23 19:59:20.000000000 -0400 25587+++ linux-2.6.35.7/drivers/input/mouse/synaptics.c 2010-09-17 20:12:09.000000000 -0400
26141@@ -437,7 +437,7 @@ static void synaptics_process_packet(str 25588@@ -476,7 +476,7 @@ static void synaptics_process_packet(str
26142 break; 25589 break;
26143 case 2: 25590 case 2:
26144 if (SYN_MODEL_PEN(priv->model_id)) 25591 if (SYN_MODEL_PEN(priv->model_id))
@@ -26147,15 +25594,15 @@ diff -urNp linux-2.6.32.24/drivers/input/mouse/synaptics.c linux-2.6.32.24/drive
26147 break; 25594 break;
26148 case 4 ... 15: 25595 case 4 ... 15:
26149 if (SYN_CAP_PALMDETECT(priv->capabilities)) 25596 if (SYN_CAP_PALMDETECT(priv->capabilities))
26150@@ -652,7 +652,6 @@ static const struct dmi_system_id toshib 25597@@ -701,7 +701,6 @@ static const struct dmi_system_id __init
26151 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 25598 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
26152 DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"), 25599 DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"),
26153 }, 25600 },
26154- 25601-
26155 }, 25602 },
26156 { 25603 {
26157 .ident = "Toshiba Portege M300", 25604 /* Toshiba Portege M300 */
26158@@ -661,9 +660,8 @@ static const struct dmi_system_id toshib 25605@@ -710,9 +709,8 @@ static const struct dmi_system_id __init
26159 DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"), 25606 DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"),
26160 DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"), 25607 DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"),
26161 }, 25608 },
@@ -26163,13 +25610,22 @@ diff -urNp linux-2.6.32.24/drivers/input/mouse/synaptics.c linux-2.6.32.24/drive
26163 }, 25610 },
26164- { } 25611- { }
26165+ { NULL, NULL, {DMI_MATCH(DMI_NONE, {0})}, NULL } 25612+ { NULL, NULL, {DMI_MATCH(DMI_NONE, {0})}, NULL }
26166 };
26167 #endif 25613 #endif
25614 };
26168 25615
26169diff -urNp linux-2.6.32.24/drivers/input/mousedev.c linux-2.6.32.24/drivers/input/mousedev.c 25616diff -urNp linux-2.6.35.7/drivers/input/mousedev.c linux-2.6.35.7/drivers/input/mousedev.c
26170--- linux-2.6.32.24/drivers/input/mousedev.c 2010-08-13 16:24:37.000000000 -0400 25617--- linux-2.6.35.7/drivers/input/mousedev.c 2010-08-26 19:47:12.000000000 -0400
26171+++ linux-2.6.32.24/drivers/input/mousedev.c 2010-10-23 19:59:20.000000000 -0400 25618+++ linux-2.6.35.7/drivers/input/mousedev.c 2010-09-17 20:12:09.000000000 -0400
26172@@ -1057,7 +1057,7 @@ static struct input_handler mousedev_han 25619@@ -754,7 +754,7 @@ static ssize_t mousedev_read(struct file
25620
25621 spin_unlock_irq(&client->packet_lock);
25622
25623- if (copy_to_user(buffer, data, count))
25624+ if (count > sizeof(data) || copy_to_user(buffer, data, count))
25625 return -EFAULT;
25626
25627 return count;
25628@@ -1051,7 +1051,7 @@ static struct input_handler mousedev_han
26173 25629
26174 #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX 25630 #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
26175 static struct miscdevice psaux_mouse = { 25631 static struct miscdevice psaux_mouse = {
@@ -26178,10 +25634,10 @@ diff -urNp linux-2.6.32.24/drivers/input/mousedev.c linux-2.6.32.24/drivers/inpu
26178 }; 25634 };
26179 static int psaux_registered; 25635 static int psaux_registered;
26180 #endif 25636 #endif
26181diff -urNp linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h 25637diff -urNp linux-2.6.35.7/drivers/input/serio/i8042-x86ia64io.h linux-2.6.35.7/drivers/input/serio/i8042-x86ia64io.h
26182--- linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h 2010-08-13 16:24:37.000000000 -0400 25638--- linux-2.6.35.7/drivers/input/serio/i8042-x86ia64io.h 2010-08-26 19:47:12.000000000 -0400
26183+++ linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h 2010-10-23 19:59:20.000000000 -0400 25639+++ linux-2.6.35.7/drivers/input/serio/i8042-x86ia64io.h 2010-09-17 20:12:09.000000000 -0400
26184@@ -179,7 +179,7 @@ static const struct dmi_system_id __init 25640@@ -183,7 +183,7 @@ static const struct dmi_system_id __init
26185 DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"), 25641 DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"),
26186 }, 25642 },
26187 }, 25643 },
@@ -26190,7 +25646,7 @@ diff -urNp linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h linux-2.6.32.24
26190 }; 25646 };
26191 25647
26192 /* 25648 /*
26193@@ -409,7 +409,7 @@ static const struct dmi_system_id __init 25649@@ -413,7 +413,7 @@ static const struct dmi_system_id __init
26194 DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), 25650 DMI_MATCH(DMI_PRODUCT_VERSION, "0100"),
26195 }, 25651 },
26196 }, 25652 },
@@ -26199,7 +25655,7 @@ diff -urNp linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h linux-2.6.32.24
26199 }; 25655 };
26200 25656
26201 static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { 25657 static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = {
26202@@ -483,7 +483,7 @@ static const struct dmi_system_id __init 25658@@ -487,7 +487,7 @@ static const struct dmi_system_id __init
26203 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"), 25659 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"),
26204 }, 25660 },
26205 }, 25661 },
@@ -26208,7 +25664,7 @@ diff -urNp linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h linux-2.6.32.24
26208 }; 25664 };
26209 25665
26210 #ifdef CONFIG_PNP 25666 #ifdef CONFIG_PNP
26211@@ -502,7 +502,7 @@ static const struct dmi_system_id __init 25667@@ -506,7 +506,7 @@ static const struct dmi_system_id __init
26212 DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), 25668 DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
26213 }, 25669 },
26214 }, 25670 },
@@ -26217,7 +25673,7 @@ diff -urNp linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h linux-2.6.32.24
26217 }; 25673 };
26218 25674
26219 static const struct dmi_system_id __initconst i8042_dmi_laptop_table[] = { 25675 static const struct dmi_system_id __initconst i8042_dmi_laptop_table[] = {
26220@@ -526,7 +526,7 @@ static const struct dmi_system_id __init 25676@@ -530,7 +530,7 @@ static const struct dmi_system_id __init
26221 DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */ 25677 DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */
26222 }, 25678 },
26223 }, 25679 },
@@ -26226,7 +25682,7 @@ diff -urNp linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h linux-2.6.32.24
26226 }; 25682 };
26227 #endif 25683 #endif
26228 25684
26229@@ -600,7 +600,7 @@ static const struct dmi_system_id __init 25685@@ -604,7 +604,7 @@ static const struct dmi_system_id __init
26230 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"), 25686 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"),
26231 }, 25687 },
26232 }, 25688 },
@@ -26235,10 +25691,10 @@ diff -urNp linux-2.6.32.24/drivers/input/serio/i8042-x86ia64io.h linux-2.6.32.24
26235 }; 25691 };
26236 25692
26237 #endif /* CONFIG_X86 */ 25693 #endif /* CONFIG_X86 */
26238diff -urNp linux-2.6.32.24/drivers/input/serio/serio_raw.c linux-2.6.32.24/drivers/input/serio/serio_raw.c 25694diff -urNp linux-2.6.35.7/drivers/input/serio/serio_raw.c linux-2.6.35.7/drivers/input/serio/serio_raw.c
26239--- linux-2.6.32.24/drivers/input/serio/serio_raw.c 2010-08-13 16:24:37.000000000 -0400 25695--- linux-2.6.35.7/drivers/input/serio/serio_raw.c 2010-08-26 19:47:12.000000000 -0400
26240+++ linux-2.6.32.24/drivers/input/serio/serio_raw.c 2010-10-23 19:59:20.000000000 -0400 25696+++ linux-2.6.35.7/drivers/input/serio/serio_raw.c 2010-09-17 20:12:09.000000000 -0400
26241@@ -377,7 +377,7 @@ static struct serio_device_id serio_raw_ 25697@@ -376,7 +376,7 @@ static struct serio_device_id serio_raw_
26242 .id = SERIO_ANY, 25698 .id = SERIO_ANY,
26243 .extra = SERIO_ANY, 25699 .extra = SERIO_ANY,
26244 }, 25700 },
@@ -26247,10 +25703,10 @@ diff -urNp linux-2.6.32.24/drivers/input/serio/serio_raw.c linux-2.6.32.24/drive
26247 }; 25703 };
26248 25704
26249 MODULE_DEVICE_TABLE(serio, serio_raw_serio_ids); 25705 MODULE_DEVICE_TABLE(serio, serio_raw_serio_ids);
26250diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/common.c linux-2.6.32.24/drivers/isdn/gigaset/common.c 25706diff -urNp linux-2.6.35.7/drivers/isdn/gigaset/common.c linux-2.6.35.7/drivers/isdn/gigaset/common.c
26251--- linux-2.6.32.24/drivers/isdn/gigaset/common.c 2010-08-13 16:24:37.000000000 -0400 25707--- linux-2.6.35.7/drivers/isdn/gigaset/common.c 2010-08-26 19:47:12.000000000 -0400
26252+++ linux-2.6.32.24/drivers/isdn/gigaset/common.c 2010-10-23 19:59:20.000000000 -0400 25708+++ linux-2.6.35.7/drivers/isdn/gigaset/common.c 2010-09-17 20:12:09.000000000 -0400
26253@@ -712,7 +712,7 @@ struct cardstate *gigaset_initcs(struct 25709@@ -723,7 +723,7 @@ struct cardstate *gigaset_initcs(struct
26254 cs->commands_pending = 0; 25710 cs->commands_pending = 0;
26255 cs->cur_at_seq = 0; 25711 cs->cur_at_seq = 0;
26256 cs->gotfwver = -1; 25712 cs->gotfwver = -1;
@@ -26259,10 +25715,10 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/common.c linux-2.6.32.24/drivers
26259 cs->dev = NULL; 25715 cs->dev = NULL;
26260 cs->tty = NULL; 25716 cs->tty = NULL;
26261 cs->tty_dev = NULL; 25717 cs->tty_dev = NULL;
26262diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/gigaset.h linux-2.6.32.24/drivers/isdn/gigaset/gigaset.h 25718diff -urNp linux-2.6.35.7/drivers/isdn/gigaset/gigaset.h linux-2.6.35.7/drivers/isdn/gigaset/gigaset.h
26263--- linux-2.6.32.24/drivers/isdn/gigaset/gigaset.h 2010-08-13 16:24:37.000000000 -0400 25719--- linux-2.6.35.7/drivers/isdn/gigaset/gigaset.h 2010-08-26 19:47:12.000000000 -0400
26264+++ linux-2.6.32.24/drivers/isdn/gigaset/gigaset.h 2010-10-23 19:59:20.000000000 -0400 25720+++ linux-2.6.35.7/drivers/isdn/gigaset/gigaset.h 2010-09-17 20:12:09.000000000 -0400
26265@@ -446,7 +446,7 @@ struct cardstate { 25721@@ -442,7 +442,7 @@ struct cardstate {
26266 spinlock_t cmdlock; 25722 spinlock_t cmdlock;
26267 unsigned curlen, cmdbytes; 25723 unsigned curlen, cmdbytes;
26268 25724
@@ -26271,11 +25727,11 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/gigaset.h linux-2.6.32.24/driver
26271 struct tty_struct *tty; 25727 struct tty_struct *tty;
26272 struct tasklet_struct if_wake_tasklet; 25728 struct tasklet_struct if_wake_tasklet;
26273 unsigned control_state; 25729 unsigned control_state;
26274diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/interface.c linux-2.6.32.24/drivers/isdn/gigaset/interface.c 25730diff -urNp linux-2.6.35.7/drivers/isdn/gigaset/interface.c linux-2.6.35.7/drivers/isdn/gigaset/interface.c
26275--- linux-2.6.32.24/drivers/isdn/gigaset/interface.c 2010-08-13 16:24:37.000000000 -0400 25731--- linux-2.6.35.7/drivers/isdn/gigaset/interface.c 2010-08-26 19:47:12.000000000 -0400
26276+++ linux-2.6.32.24/drivers/isdn/gigaset/interface.c 2010-10-23 19:59:20.000000000 -0400 25732+++ linux-2.6.35.7/drivers/isdn/gigaset/interface.c 2010-09-17 20:12:09.000000000 -0400
26277@@ -165,9 +165,7 @@ static int if_open(struct tty_struct *tt 25733@@ -160,9 +160,7 @@ static int if_open(struct tty_struct *tt
26278 return -ERESTARTSYS; // FIXME -EINTR? 25734 return -ERESTARTSYS;
26279 tty->driver_data = cs; 25735 tty->driver_data = cs;
26280 25736
26281- ++cs->open_count; 25737- ++cs->open_count;
@@ -26285,7 +25741,7 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/interface.c linux-2.6.32.24/driv
26285 spin_lock_irqsave(&cs->lock, flags); 25741 spin_lock_irqsave(&cs->lock, flags);
26286 cs->tty = tty; 25742 cs->tty = tty;
26287 spin_unlock_irqrestore(&cs->lock, flags); 25743 spin_unlock_irqrestore(&cs->lock, flags);
26288@@ -195,10 +193,10 @@ static void if_close(struct tty_struct * 25744@@ -190,10 +188,10 @@ static void if_close(struct tty_struct *
26289 25745
26290 if (!cs->connected) 25746 if (!cs->connected)
26291 gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */ 25747 gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
@@ -26298,7 +25754,7 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/interface.c linux-2.6.32.24/driv
26298 spin_lock_irqsave(&cs->lock, flags); 25754 spin_lock_irqsave(&cs->lock, flags);
26299 cs->tty = NULL; 25755 cs->tty = NULL;
26300 spin_unlock_irqrestore(&cs->lock, flags); 25756 spin_unlock_irqrestore(&cs->lock, flags);
26301@@ -233,7 +231,7 @@ static int if_ioctl(struct tty_struct *t 25757@@ -228,7 +226,7 @@ static int if_ioctl(struct tty_struct *t
26302 if (!cs->connected) { 25758 if (!cs->connected) {
26303 gig_dbg(DEBUG_IF, "not connected"); 25759 gig_dbg(DEBUG_IF, "not connected");
26304 retval = -ENODEV; 25760 retval = -ENODEV;
@@ -26307,7 +25763,7 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/interface.c linux-2.6.32.24/driv
26307 dev_warn(cs->dev, "%s: device not opened\n", __func__); 25763 dev_warn(cs->dev, "%s: device not opened\n", __func__);
26308 else { 25764 else {
26309 retval = 0; 25765 retval = 0;
26310@@ -361,7 +359,7 @@ static int if_write(struct tty_struct *t 25766@@ -355,7 +353,7 @@ static int if_write(struct tty_struct *t
26311 if (!cs->connected) { 25767 if (!cs->connected) {
26312 gig_dbg(DEBUG_IF, "not connected"); 25768 gig_dbg(DEBUG_IF, "not connected");
26313 retval = -ENODEV; 25769 retval = -ENODEV;
@@ -26316,7 +25772,7 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/interface.c linux-2.6.32.24/driv
26316 dev_warn(cs->dev, "%s: device not opened\n", __func__); 25772 dev_warn(cs->dev, "%s: device not opened\n", __func__);
26317 else if (cs->mstate != MS_LOCKED) { 25773 else if (cs->mstate != MS_LOCKED) {
26318 dev_warn(cs->dev, "can't write to unlocked device\n"); 25774 dev_warn(cs->dev, "can't write to unlocked device\n");
26319@@ -395,7 +393,7 @@ static int if_write_room(struct tty_stru 25775@@ -389,7 +387,7 @@ static int if_write_room(struct tty_stru
26320 if (!cs->connected) { 25776 if (!cs->connected) {
26321 gig_dbg(DEBUG_IF, "not connected"); 25777 gig_dbg(DEBUG_IF, "not connected");
26322 retval = -ENODEV; 25778 retval = -ENODEV;
@@ -26325,7 +25781,7 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/interface.c linux-2.6.32.24/driv
26325 dev_warn(cs->dev, "%s: device not opened\n", __func__); 25781 dev_warn(cs->dev, "%s: device not opened\n", __func__);
26326 else if (cs->mstate != MS_LOCKED) { 25782 else if (cs->mstate != MS_LOCKED) {
26327 dev_warn(cs->dev, "can't write to unlocked device\n"); 25783 dev_warn(cs->dev, "can't write to unlocked device\n");
26328@@ -425,7 +423,7 @@ static int if_chars_in_buffer(struct tty 25784@@ -419,7 +417,7 @@ static int if_chars_in_buffer(struct tty
26329 25785
26330 if (!cs->connected) 25786 if (!cs->connected)
26331 gig_dbg(DEBUG_IF, "not connected"); 25787 gig_dbg(DEBUG_IF, "not connected");
@@ -26334,25 +25790,25 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/interface.c linux-2.6.32.24/driv
26334 dev_warn(cs->dev, "%s: device not opened\n", __func__); 25790 dev_warn(cs->dev, "%s: device not opened\n", __func__);
26335 else if (cs->mstate != MS_LOCKED) 25791 else if (cs->mstate != MS_LOCKED)
26336 dev_warn(cs->dev, "can't write to unlocked device\n"); 25792 dev_warn(cs->dev, "can't write to unlocked device\n");
26337@@ -453,7 +451,7 @@ static void if_throttle(struct tty_struc 25793@@ -447,7 +445,7 @@ static void if_throttle(struct tty_struc
26338 25794
26339 if (!cs->connected) 25795 if (!cs->connected)
26340 gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */ 25796 gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
26341- else if (!cs->open_count) 25797- else if (!cs->open_count)
26342+ else if (!atomic_read(&cs->open_count)) 25798+ else if (!atomic_read(&cs->open_count))
26343 dev_warn(cs->dev, "%s: device not opened\n", __func__); 25799 dev_warn(cs->dev, "%s: device not opened\n", __func__);
26344 else { 25800 else
26345 //FIXME 25801 gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__);
26346@@ -478,7 +476,7 @@ static void if_unthrottle(struct tty_str 25802@@ -471,7 +469,7 @@ static void if_unthrottle(struct tty_str
26347 25803
26348 if (!cs->connected) 25804 if (!cs->connected)
26349 gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */ 25805 gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
26350- else if (!cs->open_count) 25806- else if (!cs->open_count)
26351+ else if (!atomic_read(&cs->open_count)) 25807+ else if (!atomic_read(&cs->open_count))
26352 dev_warn(cs->dev, "%s: device not opened\n", __func__); 25808 dev_warn(cs->dev, "%s: device not opened\n", __func__);
26353 else { 25809 else
26354 //FIXME 25810 gig_dbg(DEBUG_IF, "%s: not implemented\n", __func__);
26355@@ -510,7 +508,7 @@ static void if_set_termios(struct tty_st 25811@@ -502,7 +500,7 @@ static void if_set_termios(struct tty_st
26356 goto out; 25812 goto out;
26357 } 25813 }
26358 25814
@@ -26361,42 +25817,42 @@ diff -urNp linux-2.6.32.24/drivers/isdn/gigaset/interface.c linux-2.6.32.24/driv
26361 dev_warn(cs->dev, "%s: device not opened\n", __func__); 25817 dev_warn(cs->dev, "%s: device not opened\n", __func__);
26362 goto out; 25818 goto out;
26363 } 25819 }
26364diff -urNp linux-2.6.32.24/drivers/isdn/hardware/avm/b1.c linux-2.6.32.24/drivers/isdn/hardware/avm/b1.c 25820diff -urNp linux-2.6.35.7/drivers/isdn/hardware/avm/b1.c linux-2.6.35.7/drivers/isdn/hardware/avm/b1.c
26365--- linux-2.6.32.24/drivers/isdn/hardware/avm/b1.c 2010-08-13 16:24:37.000000000 -0400 25821--- linux-2.6.35.7/drivers/isdn/hardware/avm/b1.c 2010-08-26 19:47:12.000000000 -0400
26366+++ linux-2.6.32.24/drivers/isdn/hardware/avm/b1.c 2010-10-23 19:59:20.000000000 -0400 25822+++ linux-2.6.35.7/drivers/isdn/hardware/avm/b1.c 2010-09-17 20:12:37.000000000 -0400
26367@@ -173,7 +173,7 @@ int b1_load_t4file(avmcard *card, capilo 25823@@ -176,7 +176,7 @@ int b1_load_t4file(avmcard *card, capilo
26368 } 25824 }
26369 if (left) { 25825 if (left) {
26370 if (t4file->user) { 25826 if (t4file->user) {
26371- if (copy_from_user(buf, dp, left)) 25827- if (copy_from_user(buf, dp, left))
26372+ if (left > sizeof buf || copy_from_user(buf, dp, left)) 25828+ if (left > sizeof(buf) || copy_from_user(buf, dp, left))
26373 return -EFAULT; 25829 return -EFAULT;
26374 } else { 25830 } else {
26375 memcpy(buf, dp, left); 25831 memcpy(buf, dp, left);
26376@@ -221,7 +221,7 @@ int b1_load_config(avmcard *card, capilo 25832@@ -224,7 +224,7 @@ int b1_load_config(avmcard *card, capilo
26377 } 25833 }
26378 if (left) { 25834 if (left) {
26379 if (config->user) { 25835 if (config->user) {
26380- if (copy_from_user(buf, dp, left)) 25836- if (copy_from_user(buf, dp, left))
26381+ if (left > sizeof buf || copy_from_user(buf, dp, left)) 25837+ if (left > sizeof(buf) || copy_from_user(buf, dp, left))
26382 return -EFAULT; 25838 return -EFAULT;
26383 } else { 25839 } else {
26384 memcpy(buf, dp, left); 25840 memcpy(buf, dp, left);
26385diff -urNp linux-2.6.32.24/drivers/isdn/icn/icn.c linux-2.6.32.24/drivers/isdn/icn/icn.c 25841diff -urNp linux-2.6.35.7/drivers/isdn/icn/icn.c linux-2.6.35.7/drivers/isdn/icn/icn.c
26386--- linux-2.6.32.24/drivers/isdn/icn/icn.c 2010-08-13 16:24:37.000000000 -0400 25842--- linux-2.6.35.7/drivers/isdn/icn/icn.c 2010-08-26 19:47:12.000000000 -0400
26387+++ linux-2.6.32.24/drivers/isdn/icn/icn.c 2010-10-23 19:59:20.000000000 -0400 25843+++ linux-2.6.35.7/drivers/isdn/icn/icn.c 2010-09-17 20:12:37.000000000 -0400
26388@@ -1044,7 +1044,7 @@ icn_writecmd(const u_char * buf, int len 25844@@ -1045,7 +1045,7 @@ icn_writecmd(const u_char * buf, int len
26389 if (count > len) 25845 if (count > len)
26390 count = len; 25846 count = len;
26391 if (user) { 25847 if (user) {
26392- if (copy_from_user(msg, buf, count)) 25848- if (copy_from_user(msg, buf, count))
26393+ if (count > sizeof msg || copy_from_user(msg, buf, count)) 25849+ if (count > sizeof(msg) || copy_from_user(msg, buf, count))
26394 return -EFAULT; 25850 return -EFAULT;
26395 } else 25851 } else
26396 memcpy(msg, buf, count); 25852 memcpy(msg, buf, count);
26397diff -urNp linux-2.6.32.24/drivers/isdn/sc/interrupt.c linux-2.6.32.24/drivers/isdn/sc/interrupt.c 25853diff -urNp linux-2.6.35.7/drivers/isdn/sc/interrupt.c linux-2.6.35.7/drivers/isdn/sc/interrupt.c
26398--- linux-2.6.32.24/drivers/isdn/sc/interrupt.c 2010-08-13 16:24:37.000000000 -0400 25854--- linux-2.6.35.7/drivers/isdn/sc/interrupt.c 2010-08-26 19:47:12.000000000 -0400
26399+++ linux-2.6.32.24/drivers/isdn/sc/interrupt.c 2010-10-23 19:59:20.000000000 -0400 25855+++ linux-2.6.35.7/drivers/isdn/sc/interrupt.c 2010-10-10 15:58:05.000000000 -0400
26400@@ -112,11 +112,19 @@ irqreturn_t interrupt_handler(int dummy, 25856@@ -112,11 +112,19 @@ irqreturn_t interrupt_handler(int dummy,
26401 } 25857 }
26402 else if(callid>=0x0000 && callid<=0x7FFF) 25858 else if(callid>=0x0000 && callid<=0x7FFF)
@@ -26431,10 +25887,10 @@ diff -urNp linux-2.6.32.24/drivers/isdn/sc/interrupt.c linux-2.6.32.24/drivers/i
26431 continue; 25887 continue;
26432 } 25888 }
26433 25889
26434diff -urNp linux-2.6.32.24/drivers/lguest/core.c linux-2.6.32.24/drivers/lguest/core.c 25890diff -urNp linux-2.6.35.7/drivers/lguest/core.c linux-2.6.35.7/drivers/lguest/core.c
26435--- linux-2.6.32.24/drivers/lguest/core.c 2010-08-13 16:24:37.000000000 -0400 25891--- linux-2.6.35.7/drivers/lguest/core.c 2010-08-26 19:47:12.000000000 -0400
26436+++ linux-2.6.32.24/drivers/lguest/core.c 2010-10-23 19:59:20.000000000 -0400 25892+++ linux-2.6.35.7/drivers/lguest/core.c 2010-09-17 20:12:09.000000000 -0400
26437@@ -91,9 +91,17 @@ static __init int map_switcher(void) 25893@@ -92,9 +92,17 @@ static __init int map_switcher(void)
26438 * it's worked so far. The end address needs +1 because __get_vm_area 25894 * it's worked so far. The end address needs +1 because __get_vm_area
26439 * allocates an extra guard page, so we need space for that. 25895 * allocates an extra guard page, so we need space for that.
26440 */ 25896 */
@@ -26452,9 +25908,9 @@ diff -urNp linux-2.6.32.24/drivers/lguest/core.c linux-2.6.32.24/drivers/lguest/
26452 if (!switcher_vma) { 25908 if (!switcher_vma) {
26453 err = -ENOMEM; 25909 err = -ENOMEM;
26454 printk("lguest: could not map switcher pages high\n"); 25910 printk("lguest: could not map switcher pages high\n");
26455diff -urNp linux-2.6.32.24/drivers/macintosh/via-pmu-backlight.c linux-2.6.32.24/drivers/macintosh/via-pmu-backlight.c 25911diff -urNp linux-2.6.35.7/drivers/macintosh/via-pmu-backlight.c linux-2.6.35.7/drivers/macintosh/via-pmu-backlight.c
26456--- linux-2.6.32.24/drivers/macintosh/via-pmu-backlight.c 2010-08-13 16:24:37.000000000 -0400 25912--- linux-2.6.35.7/drivers/macintosh/via-pmu-backlight.c 2010-08-26 19:47:12.000000000 -0400
26457+++ linux-2.6.32.24/drivers/macintosh/via-pmu-backlight.c 2010-10-23 19:59:20.000000000 -0400 25913+++ linux-2.6.35.7/drivers/macintosh/via-pmu-backlight.c 2010-09-17 20:12:09.000000000 -0400
26458@@ -15,7 +15,7 @@ 25914@@ -15,7 +15,7 @@
26459 25915
26460 #define MAX_PMU_LEVEL 0xFF 25916 #define MAX_PMU_LEVEL 0xFF
@@ -26473,10 +25929,10 @@ diff -urNp linux-2.6.32.24/drivers/macintosh/via-pmu-backlight.c linux-2.6.32.24
26473 .get_brightness = pmu_backlight_get_brightness, 25929 .get_brightness = pmu_backlight_get_brightness,
26474 .update_status = pmu_backlight_update_status, 25930 .update_status = pmu_backlight_update_status,
26475 25931
26476diff -urNp linux-2.6.32.24/drivers/macintosh/via-pmu.c linux-2.6.32.24/drivers/macintosh/via-pmu.c 25932diff -urNp linux-2.6.35.7/drivers/macintosh/via-pmu.c linux-2.6.35.7/drivers/macintosh/via-pmu.c
26477--- linux-2.6.32.24/drivers/macintosh/via-pmu.c 2010-08-13 16:24:37.000000000 -0400 25933--- linux-2.6.35.7/drivers/macintosh/via-pmu.c 2010-08-26 19:47:12.000000000 -0400
26478+++ linux-2.6.32.24/drivers/macintosh/via-pmu.c 2010-10-23 19:59:20.000000000 -0400 25934+++ linux-2.6.35.7/drivers/macintosh/via-pmu.c 2010-09-17 20:12:09.000000000 -0400
26479@@ -2232,7 +2232,7 @@ static int pmu_sleep_valid(suspend_state 25935@@ -2254,7 +2254,7 @@ static int pmu_sleep_valid(suspend_state
26480 && (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0); 25936 && (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0);
26481 } 25937 }
26482 25938
@@ -26485,9 +25941,9 @@ diff -urNp linux-2.6.32.24/drivers/macintosh/via-pmu.c linux-2.6.32.24/drivers/m
26485 .enter = powerbook_sleep, 25941 .enter = powerbook_sleep,
26486 .valid = pmu_sleep_valid, 25942 .valid = pmu_sleep_valid,
26487 }; 25943 };
26488diff -urNp linux-2.6.32.24/drivers/md/bitmap.c linux-2.6.32.24/drivers/md/bitmap.c 25944diff -urNp linux-2.6.35.7/drivers/md/bitmap.c linux-2.6.35.7/drivers/md/bitmap.c
26489--- linux-2.6.32.24/drivers/md/bitmap.c 2010-08-13 16:24:37.000000000 -0400 25945--- linux-2.6.35.7/drivers/md/bitmap.c 2010-08-26 19:47:12.000000000 -0400
26490+++ linux-2.6.32.24/drivers/md/bitmap.c 2010-10-23 19:59:20.000000000 -0400 25946+++ linux-2.6.35.7/drivers/md/bitmap.c 2010-09-17 20:12:09.000000000 -0400
26491@@ -58,7 +58,7 @@ 25947@@ -58,7 +58,7 @@
26492 # if DEBUG > 0 25948 # if DEBUG > 0
26493 # define PRINTK(x...) printk(KERN_DEBUG x) 25949 # define PRINTK(x...) printk(KERN_DEBUG x)
@@ -26497,22 +25953,10 @@ diff -urNp linux-2.6.32.24/drivers/md/bitmap.c linux-2.6.32.24/drivers/md/bitmap
26497 # endif 25953 # endif
26498 #endif 25954 #endif
26499 25955
26500diff -urNp linux-2.6.32.24/drivers/md/dm-sysfs.c linux-2.6.32.24/drivers/md/dm-sysfs.c 25956diff -urNp linux-2.6.35.7/drivers/md/dm-table.c linux-2.6.35.7/drivers/md/dm-table.c
26501--- linux-2.6.32.24/drivers/md/dm-sysfs.c 2010-08-13 16:24:37.000000000 -0400 25957--- linux-2.6.35.7/drivers/md/dm-table.c 2010-08-26 19:47:12.000000000 -0400
26502+++ linux-2.6.32.24/drivers/md/dm-sysfs.c 2010-10-23 19:59:20.000000000 -0400 25958+++ linux-2.6.35.7/drivers/md/dm-table.c 2010-09-17 20:12:09.000000000 -0400
26503@@ -75,7 +75,7 @@ static struct attribute *dm_attrs[] = { 25959@@ -363,7 +363,7 @@ static int device_area_is_invalid(struct
26504 NULL,
26505 };
26506
26507-static struct sysfs_ops dm_sysfs_ops = {
26508+static const struct sysfs_ops dm_sysfs_ops = {
26509 .show = dm_attr_show,
26510 };
26511
26512diff -urNp linux-2.6.32.24/drivers/md/dm-table.c linux-2.6.32.24/drivers/md/dm-table.c
26513--- linux-2.6.32.24/drivers/md/dm-table.c 2010-08-13 16:24:37.000000000 -0400
26514+++ linux-2.6.32.24/drivers/md/dm-table.c 2010-10-23 19:59:20.000000000 -0400
26515@@ -359,7 +359,7 @@ static int device_area_is_invalid(struct
26516 if (!dev_size) 25960 if (!dev_size)
26517 return 0; 25961 return 0;
26518 25962
@@ -26521,28 +25965,10 @@ diff -urNp linux-2.6.32.24/drivers/md/dm-table.c linux-2.6.32.24/drivers/md/dm-t
26521 DMWARN("%s: %s too small for target: " 25965 DMWARN("%s: %s too small for target: "
26522 "start=%llu, len=%llu, dev_size=%llu", 25966 "start=%llu, len=%llu, dev_size=%llu",
26523 dm_device_name(ti->table->md), bdevname(bdev, b), 25967 dm_device_name(ti->table->md), bdevname(bdev, b),
26524diff -urNp linux-2.6.32.24/drivers/md/md.c linux-2.6.32.24/drivers/md/md.c 25968diff -urNp linux-2.6.35.7/drivers/md/md.c linux-2.6.35.7/drivers/md/md.c
26525--- linux-2.6.32.24/drivers/md/md.c 2010-08-13 16:24:37.000000000 -0400 25969--- linux-2.6.35.7/drivers/md/md.c 2010-08-26 19:47:12.000000000 -0400
26526+++ linux-2.6.32.24/drivers/md/md.c 2010-10-23 19:59:20.000000000 -0400 25970+++ linux-2.6.35.7/drivers/md/md.c 2010-09-17 20:12:09.000000000 -0400
26527@@ -2514,7 +2514,7 @@ static void rdev_free(struct kobject *ko 25971@@ -6352,7 +6352,7 @@ static int md_seq_show(struct seq_file *
26528 mdk_rdev_t *rdev = container_of(ko, mdk_rdev_t, kobj);
26529 kfree(rdev);
26530 }
26531-static struct sysfs_ops rdev_sysfs_ops = {
26532+static const struct sysfs_ops rdev_sysfs_ops = {
26533 .show = rdev_attr_show,
26534 .store = rdev_attr_store,
26535 };
26536@@ -3884,7 +3884,7 @@ static void md_free(struct kobject *ko)
26537 kfree(mddev);
26538 }
26539
26540-static struct sysfs_ops md_sysfs_ops = {
26541+static const struct sysfs_ops md_sysfs_ops = {
26542 .show = md_attr_show,
26543 .store = md_attr_store,
26544 };
26545@@ -6039,7 +6039,7 @@ static int md_seq_show(struct seq_file *
26546 chunk_kb ? "KB" : "B"); 25972 chunk_kb ? "KB" : "B");
26547 if (bitmap->file) { 25973 if (bitmap->file) {
26548 seq_printf(seq, ", file: "); 25974 seq_printf(seq, ", file: ");
@@ -26551,7 +25977,7 @@ diff -urNp linux-2.6.32.24/drivers/md/md.c linux-2.6.32.24/drivers/md/md.c
26551 } 25977 }
26552 25978
26553 seq_printf(seq, "\n"); 25979 seq_printf(seq, "\n");
26554@@ -6133,7 +6133,7 @@ static int is_mddev_idle(mddev_t *mddev, 25980@@ -6446,7 +6446,7 @@ static int is_mddev_idle(mddev_t *mddev,
26555 struct gendisk *disk = rdev->bdev->bd_contains->bd_disk; 25981 struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
26556 curr_events = (int)part_stat_read(&disk->part0, sectors[0]) + 25982 curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
26557 (int)part_stat_read(&disk->part0, sectors[1]) - 25983 (int)part_stat_read(&disk->part0, sectors[1]) -
@@ -26560,10 +25986,10 @@ diff -urNp linux-2.6.32.24/drivers/md/md.c linux-2.6.32.24/drivers/md/md.c
26560 /* sync IO will cause sync_io to increase before the disk_stats 25986 /* sync IO will cause sync_io to increase before the disk_stats
26561 * as sync_io is counted when a request starts, and 25987 * as sync_io is counted when a request starts, and
26562 * disk_stats is counted when it completes. 25988 * disk_stats is counted when it completes.
26563diff -urNp linux-2.6.32.24/drivers/md/md.h linux-2.6.32.24/drivers/md/md.h 25989diff -urNp linux-2.6.35.7/drivers/md/md.h linux-2.6.35.7/drivers/md/md.h
26564--- linux-2.6.32.24/drivers/md/md.h 2010-08-13 16:24:37.000000000 -0400 25990--- linux-2.6.35.7/drivers/md/md.h 2010-08-26 19:47:12.000000000 -0400
26565+++ linux-2.6.32.24/drivers/md/md.h 2010-10-23 19:59:20.000000000 -0400 25991+++ linux-2.6.35.7/drivers/md/md.h 2010-09-17 20:12:09.000000000 -0400
26566@@ -304,7 +304,7 @@ static inline void rdev_dec_pending(mdk_ 25992@@ -334,7 +334,7 @@ static inline void rdev_dec_pending(mdk_
26567 25993
26568 static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors) 25994 static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
26569 { 25995 {
@@ -26572,56 +25998,32 @@ diff -urNp linux-2.6.32.24/drivers/md/md.h linux-2.6.32.24/drivers/md/md.h
26572 } 25998 }
26573 25999
26574 struct mdk_personality 26000 struct mdk_personality
26575diff -urNp linux-2.6.32.24/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.32.24/drivers/media/dvb/dvb-core/dvbdev.c 26001diff -urNp linux-2.6.35.7/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.35.7/drivers/media/dvb/dvb-core/dvbdev.c
26576--- linux-2.6.32.24/drivers/media/dvb/dvb-core/dvbdev.c 2010-08-13 16:24:37.000000000 -0400 26002--- linux-2.6.35.7/drivers/media/dvb/dvb-core/dvbdev.c 2010-08-26 19:47:12.000000000 -0400
26577+++ linux-2.6.32.24/drivers/media/dvb/dvb-core/dvbdev.c 2010-10-23 19:59:20.000000000 -0400 26003+++ linux-2.6.35.7/drivers/media/dvb/dvb-core/dvbdev.c 2010-09-17 20:12:09.000000000 -0400
26578@@ -191,6 +191,7 @@ int dvb_register_device(struct dvb_adapt 26004@@ -196,6 +196,7 @@ int dvb_register_device(struct dvb_adapt
26579 const struct dvb_device *template, void *priv, int type) 26005 const struct dvb_device *template, void *priv, int type)
26580 { 26006 {
26581 struct dvb_device *dvbdev; 26007 struct dvb_device *dvbdev;
26582+ /* cannot be const */ 26008+ /* cannot be const, see this function */
26583 struct file_operations *dvbdevfops; 26009 struct file_operations *dvbdevfops;
26584 struct device *clsdev; 26010 struct device *clsdev;
26585 int minor; 26011 int minor;
26586diff -urNp linux-2.6.32.24/drivers/media/radio/radio-cadet.c linux-2.6.32.24/drivers/media/radio/radio-cadet.c 26012diff -urNp linux-2.6.35.7/drivers/media/radio/radio-cadet.c linux-2.6.35.7/drivers/media/radio/radio-cadet.c
26587--- linux-2.6.32.24/drivers/media/radio/radio-cadet.c 2010-08-13 16:24:37.000000000 -0400 26013--- linux-2.6.35.7/drivers/media/radio/radio-cadet.c 2010-08-26 19:47:12.000000000 -0400
26588+++ linux-2.6.32.24/drivers/media/radio/radio-cadet.c 2010-10-23 19:59:20.000000000 -0400 26014+++ linux-2.6.35.7/drivers/media/radio/radio-cadet.c 2010-09-17 20:12:37.000000000 -0400
26589@@ -347,7 +347,7 @@ static ssize_t cadet_read(struct file *f 26015@@ -347,7 +347,7 @@ static ssize_t cadet_read(struct file *f
26590 while (i < count && dev->rdsin != dev->rdsout) 26016 while (i < count && dev->rdsin != dev->rdsout)
26591 readbuf[i++] = dev->rdsbuf[dev->rdsout++]; 26017 readbuf[i++] = dev->rdsbuf[dev->rdsout++];
26592 26018
26593- if (copy_to_user(data, readbuf, i)) 26019- if (copy_to_user(data, readbuf, i))
26594+ if (i > sizeof readbuf || copy_to_user(data, readbuf, i)) 26020+ if (i > sizeof(readbuf) || copy_to_user(data, readbuf, i))
26595 return -EFAULT; 26021 return -EFAULT;
26596 return i; 26022 return i;
26597 } 26023 }
26598diff -urNp linux-2.6.32.24/drivers/media/video/usbvideo/konicawc.c linux-2.6.32.24/drivers/media/video/usbvideo/konicawc.c 26024diff -urNp linux-2.6.35.7/drivers/media/video/v4l2-compat-ioctl32.c linux-2.6.35.7/drivers/media/video/v4l2-compat-ioctl32.c
26599--- linux-2.6.32.24/drivers/media/video/usbvideo/konicawc.c 2010-08-13 16:24:37.000000000 -0400 26025--- linux-2.6.35.7/drivers/media/video/v4l2-compat-ioctl32.c 2010-08-26 19:47:12.000000000 -0400
26600+++ linux-2.6.32.24/drivers/media/video/usbvideo/konicawc.c 2010-10-23 19:59:20.000000000 -0400 26026+++ linux-2.6.35.7/drivers/media/video/v4l2-compat-ioctl32.c 2010-10-19 18:15:40.000000000 -0400
26601@@ -225,7 +225,7 @@ static void konicawc_register_input(stru
26602 int error;
26603
26604 usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));
26605- strncat(cam->input_physname, "/input0", sizeof(cam->input_physname));
26606+ strlcat(cam->input_physname, "/input0", sizeof(cam->input_physname));
26607
26608 cam->input = input_dev = input_allocate_device();
26609 if (!input_dev) {
26610diff -urNp linux-2.6.32.24/drivers/media/video/usbvideo/quickcam_messenger.c linux-2.6.32.24/drivers/media/video/usbvideo/quickcam_messenger.c
26611--- linux-2.6.32.24/drivers/media/video/usbvideo/quickcam_messenger.c 2010-08-13 16:24:37.000000000 -0400
26612+++ linux-2.6.32.24/drivers/media/video/usbvideo/quickcam_messenger.c 2010-10-23 19:59:20.000000000 -0400
26613@@ -89,7 +89,7 @@ static void qcm_register_input(struct qc
26614 int error;
26615
26616 usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname));
26617- strncat(cam->input_physname, "/input0", sizeof(cam->input_physname));
26618+ strlcat(cam->input_physname, "/input0", sizeof(cam->input_physname));
26619
26620 cam->input = input_dev = input_allocate_device();
26621 if (!input_dev) {
26622diff -urNp linux-2.6.32.24/drivers/media/video/v4l2-compat-ioctl32.c linux-2.6.32.24/drivers/media/video/v4l2-compat-ioctl32.c
26623--- linux-2.6.32.24/drivers/media/video/v4l2-compat-ioctl32.c 2010-08-13 16:24:37.000000000 -0400
26624+++ linux-2.6.32.24/drivers/media/video/v4l2-compat-ioctl32.c 2010-10-23 19:59:20.000000000 -0400
26625@@ -193,17 +193,24 @@ static int put_video_window32(struct vid 26027@@ -193,17 +193,24 @@ static int put_video_window32(struct vid
26626 struct video_code32 { 26028 struct video_code32 {
26627 char loadwhat[16]; /* name or tag of file being passed */ 26029 char loadwhat[16]; /* name or tag of file being passed */
@@ -26655,7 +26057,7 @@ diff -urNp linux-2.6.32.24/drivers/media/video/v4l2-compat-ioctl32.c linux-2.6.3
26655 } 26057 }
26656 26058
26657 #define VIDIOCGTUNER32 _IOWR('v', 4, struct video_tuner32) 26059 #define VIDIOCGTUNER32 _IOWR('v', 4, struct video_tuner32)
26658@@ -741,7 +748,7 @@ static long do_video_ioctl(struct file * 26060@@ -744,7 +751,7 @@ static long do_video_ioctl(struct file *
26659 struct video_tuner vt; 26061 struct video_tuner vt;
26660 struct video_buffer vb; 26062 struct video_buffer vb;
26661 struct video_window vw; 26063 struct video_window vw;
@@ -26664,7 +26066,7 @@ diff -urNp linux-2.6.32.24/drivers/media/video/v4l2-compat-ioctl32.c linux-2.6.3
26664 struct video_audio va; 26066 struct video_audio va;
26665 #endif 26067 #endif
26666 struct v4l2_format v2f; 26068 struct v4l2_format v2f;
26667@@ -820,8 +827,11 @@ static long do_video_ioctl(struct file * 26069@@ -823,8 +830,11 @@ static long do_video_ioctl(struct file *
26668 break; 26070 break;
26669 26071
26670 case VIDIOCSMICROCODE: 26072 case VIDIOCSMICROCODE:
@@ -26678,10 +26080,10 @@ diff -urNp linux-2.6.32.24/drivers/media/video/v4l2-compat-ioctl32.c linux-2.6.3
26678 break; 26080 break;
26679 26081
26680 case VIDIOCSFREQ: 26082 case VIDIOCSFREQ:
26681diff -urNp linux-2.6.32.24/drivers/message/fusion/mptbase.c linux-2.6.32.24/drivers/message/fusion/mptbase.c 26083diff -urNp linux-2.6.35.7/drivers/message/fusion/mptbase.c linux-2.6.35.7/drivers/message/fusion/mptbase.c
26682--- linux-2.6.32.24/drivers/message/fusion/mptbase.c 2010-08-13 16:24:37.000000000 -0400 26084--- linux-2.6.35.7/drivers/message/fusion/mptbase.c 2010-08-26 19:47:12.000000000 -0400
26683+++ linux-2.6.32.24/drivers/message/fusion/mptbase.c 2010-10-23 19:59:20.000000000 -0400 26085+++ linux-2.6.35.7/drivers/message/fusion/mptbase.c 2010-09-17 20:12:37.000000000 -0400
26684@@ -6709,8 +6709,14 @@ procmpt_iocinfo_read(char *buf, char **s 26086@@ -6715,8 +6715,14 @@ procmpt_iocinfo_read(char *buf, char **s
26685 len += sprintf(buf+len, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth); 26087 len += sprintf(buf+len, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
26686 len += sprintf(buf+len, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize); 26088 len += sprintf(buf+len, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
26687 26089
@@ -26696,9 +26098,9 @@ diff -urNp linux-2.6.32.24/drivers/message/fusion/mptbase.c linux-2.6.32.24/driv
26696 /* 26098 /*
26697 * Rounding UP to nearest 4-kB boundary here... 26099 * Rounding UP to nearest 4-kB boundary here...
26698 */ 26100 */
26699diff -urNp linux-2.6.32.24/drivers/message/fusion/mptdebug.h linux-2.6.32.24/drivers/message/fusion/mptdebug.h 26101diff -urNp linux-2.6.35.7/drivers/message/fusion/mptdebug.h linux-2.6.35.7/drivers/message/fusion/mptdebug.h
26700--- linux-2.6.32.24/drivers/message/fusion/mptdebug.h 2010-08-13 16:24:37.000000000 -0400 26102--- linux-2.6.35.7/drivers/message/fusion/mptdebug.h 2010-08-26 19:47:12.000000000 -0400
26701+++ linux-2.6.32.24/drivers/message/fusion/mptdebug.h 2010-10-23 19:59:20.000000000 -0400 26103+++ linux-2.6.35.7/drivers/message/fusion/mptdebug.h 2010-09-17 20:12:09.000000000 -0400
26702@@ -71,7 +71,7 @@ 26104@@ -71,7 +71,7 @@
26703 CMD; \ 26105 CMD; \
26704 } 26106 }
@@ -26708,10 +26110,10 @@ diff -urNp linux-2.6.32.24/drivers/message/fusion/mptdebug.h linux-2.6.32.24/dri
26708 #endif 26110 #endif
26709 26111
26710 26112
26711diff -urNp linux-2.6.32.24/drivers/message/fusion/mptsas.c linux-2.6.32.24/drivers/message/fusion/mptsas.c 26113diff -urNp linux-2.6.35.7/drivers/message/fusion/mptsas.c linux-2.6.35.7/drivers/message/fusion/mptsas.c
26712--- linux-2.6.32.24/drivers/message/fusion/mptsas.c 2010-08-13 16:24:37.000000000 -0400 26114--- linux-2.6.35.7/drivers/message/fusion/mptsas.c 2010-08-26 19:47:12.000000000 -0400
26713+++ linux-2.6.32.24/drivers/message/fusion/mptsas.c 2010-10-23 19:59:20.000000000 -0400 26115+++ linux-2.6.35.7/drivers/message/fusion/mptsas.c 2010-09-17 20:12:09.000000000 -0400
26714@@ -436,6 +436,23 @@ mptsas_is_end_device(struct mptsas_devin 26116@@ -437,6 +437,23 @@ mptsas_is_end_device(struct mptsas_devin
26715 return 0; 26117 return 0;
26716 } 26118 }
26717 26119
@@ -26735,7 +26137,7 @@ diff -urNp linux-2.6.32.24/drivers/message/fusion/mptsas.c linux-2.6.32.24/drive
26735 /* no mutex */ 26137 /* no mutex */
26736 static void 26138 static void
26737 mptsas_port_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo_details * port_details) 26139 mptsas_port_delete(MPT_ADAPTER *ioc, struct mptsas_portinfo_details * port_details)
26738@@ -474,23 +491,6 @@ mptsas_get_rphy(struct mptsas_phyinfo *p 26140@@ -475,23 +492,6 @@ mptsas_get_rphy(struct mptsas_phyinfo *p
26739 return NULL; 26141 return NULL;
26740 } 26142 }
26741 26143
@@ -26759,10 +26161,10 @@ diff -urNp linux-2.6.32.24/drivers/message/fusion/mptsas.c linux-2.6.32.24/drive
26759 static inline struct sas_port * 26161 static inline struct sas_port *
26760 mptsas_get_port(struct mptsas_phyinfo *phy_info) 26162 mptsas_get_port(struct mptsas_phyinfo *phy_info)
26761 { 26163 {
26762diff -urNp linux-2.6.32.24/drivers/message/fusion/mptscsih.c linux-2.6.32.24/drivers/message/fusion/mptscsih.c 26164diff -urNp linux-2.6.35.7/drivers/message/fusion/mptscsih.c linux-2.6.35.7/drivers/message/fusion/mptscsih.c
26763--- linux-2.6.32.24/drivers/message/fusion/mptscsih.c 2010-09-26 17:26:05.000000000 -0400 26165--- linux-2.6.35.7/drivers/message/fusion/mptscsih.c 2010-09-26 17:32:11.000000000 -0400
26764+++ linux-2.6.32.24/drivers/message/fusion/mptscsih.c 2010-10-23 19:59:24.000000000 -0400 26166+++ linux-2.6.35.7/drivers/message/fusion/mptscsih.c 2010-10-11 22:41:44.000000000 -0400
26765@@ -1248,15 +1248,16 @@ mptscsih_info(struct Scsi_Host *SChost) 26167@@ -1244,15 +1244,16 @@ mptscsih_info(struct Scsi_Host *SChost)
26766 26168
26767 h = shost_priv(SChost); 26169 h = shost_priv(SChost);
26768 26170
@@ -26787,10 +26189,10 @@ diff -urNp linux-2.6.32.24/drivers/message/fusion/mptscsih.c linux-2.6.32.24/dri
26787 26189
26788 return h->info_kbuf; 26190 return h->info_kbuf;
26789 } 26191 }
26790diff -urNp linux-2.6.32.24/drivers/message/i2o/i2o_proc.c linux-2.6.32.24/drivers/message/i2o/i2o_proc.c 26192diff -urNp linux-2.6.35.7/drivers/message/i2o/i2o_proc.c linux-2.6.35.7/drivers/message/i2o/i2o_proc.c
26791--- linux-2.6.32.24/drivers/message/i2o/i2o_proc.c 2010-08-13 16:24:37.000000000 -0400 26193--- linux-2.6.35.7/drivers/message/i2o/i2o_proc.c 2010-08-26 19:47:12.000000000 -0400
26792+++ linux-2.6.32.24/drivers/message/i2o/i2o_proc.c 2010-10-23 19:59:20.000000000 -0400 26194+++ linux-2.6.35.7/drivers/message/i2o/i2o_proc.c 2010-09-17 20:12:09.000000000 -0400
26793@@ -259,13 +259,6 @@ static char *scsi_devices[] = { 26195@@ -255,13 +255,6 @@ static char *scsi_devices[] = {
26794 "Array Controller Device" 26196 "Array Controller Device"
26795 }; 26197 };
26796 26198
@@ -26804,7 +26206,7 @@ diff -urNp linux-2.6.32.24/drivers/message/i2o/i2o_proc.c linux-2.6.32.24/driver
26804 static int i2o_report_query_status(struct seq_file *seq, int block_status, 26206 static int i2o_report_query_status(struct seq_file *seq, int block_status,
26805 char *group) 26207 char *group)
26806 { 26208 {
26807@@ -842,8 +835,7 @@ static int i2o_seq_show_ddm_table(struct 26209@@ -838,8 +831,7 @@ static int i2o_seq_show_ddm_table(struct
26808 26210
26809 seq_printf(seq, "%-#7x", ddm_table.i2o_vendor_id); 26211 seq_printf(seq, "%-#7x", ddm_table.i2o_vendor_id);
26810 seq_printf(seq, "%-#8x", ddm_table.module_id); 26212 seq_printf(seq, "%-#8x", ddm_table.module_id);
@@ -26814,7 +26216,7 @@ diff -urNp linux-2.6.32.24/drivers/message/i2o/i2o_proc.c linux-2.6.32.24/driver
26814 seq_printf(seq, "%9d ", ddm_table.data_size); 26216 seq_printf(seq, "%9d ", ddm_table.data_size);
26815 seq_printf(seq, "%8d", ddm_table.code_size); 26217 seq_printf(seq, "%8d", ddm_table.code_size);
26816 26218
26817@@ -944,8 +936,8 @@ static int i2o_seq_show_drivers_stored(s 26219@@ -940,8 +932,8 @@ static int i2o_seq_show_drivers_stored(s
26818 26220
26819 seq_printf(seq, "%-#7x", dst->i2o_vendor_id); 26221 seq_printf(seq, "%-#7x", dst->i2o_vendor_id);
26820 seq_printf(seq, "%-#8x", dst->module_id); 26222 seq_printf(seq, "%-#8x", dst->module_id);
@@ -26825,7 +26227,7 @@ diff -urNp linux-2.6.32.24/drivers/message/i2o/i2o_proc.c linux-2.6.32.24/driver
26825 seq_printf(seq, "%8d ", dst->module_size); 26227 seq_printf(seq, "%8d ", dst->module_size);
26826 seq_printf(seq, "%8d ", dst->mpb_size); 26228 seq_printf(seq, "%8d ", dst->mpb_size);
26827 seq_printf(seq, "0x%04x", dst->module_flags); 26229 seq_printf(seq, "0x%04x", dst->module_flags);
26828@@ -1276,14 +1268,10 @@ static int i2o_seq_show_dev_identity(str 26230@@ -1272,14 +1264,10 @@ static int i2o_seq_show_dev_identity(str
26829 seq_printf(seq, "Device Class : %s\n", i2o_get_class_name(work16[0])); 26231 seq_printf(seq, "Device Class : %s\n", i2o_get_class_name(work16[0]));
26830 seq_printf(seq, "Owner TID : %0#5x\n", work16[2]); 26232 seq_printf(seq, "Owner TID : %0#5x\n", work16[2]);
26831 seq_printf(seq, "Parent TID : %0#5x\n", work16[3]); 26233 seq_printf(seq, "Parent TID : %0#5x\n", work16[3]);
@@ -26844,7 +26246,7 @@ diff -urNp linux-2.6.32.24/drivers/message/i2o/i2o_proc.c linux-2.6.32.24/driver
26844 26246
26845 seq_printf(seq, "Serial number : "); 26247 seq_printf(seq, "Serial number : ");
26846 print_serial_number(seq, (u8 *) (work32 + 16), 26248 print_serial_number(seq, (u8 *) (work32 + 16),
26847@@ -1328,10 +1316,8 @@ static int i2o_seq_show_ddm_identity(str 26249@@ -1324,10 +1312,8 @@ static int i2o_seq_show_ddm_identity(str
26848 } 26250 }
26849 26251
26850 seq_printf(seq, "Registering DDM TID : 0x%03x\n", result.ddm_tid); 26252 seq_printf(seq, "Registering DDM TID : 0x%03x\n", result.ddm_tid);
@@ -26857,7 +26259,7 @@ diff -urNp linux-2.6.32.24/drivers/message/i2o/i2o_proc.c linux-2.6.32.24/driver
26857 26259
26858 seq_printf(seq, "Serial number : "); 26260 seq_printf(seq, "Serial number : ");
26859 print_serial_number(seq, result.serial_number, sizeof(result) - 36); 26261 print_serial_number(seq, result.serial_number, sizeof(result) - 36);
26860@@ -1362,14 +1348,10 @@ static int i2o_seq_show_uinfo(struct seq 26262@@ -1358,14 +1344,10 @@ static int i2o_seq_show_uinfo(struct seq
26861 return 0; 26263 return 0;
26862 } 26264 }
26863 26265
@@ -26876,9 +26278,20 @@ diff -urNp linux-2.6.32.24/drivers/message/i2o/i2o_proc.c linux-2.6.32.24/driver
26876 26278
26877 return 0; 26279 return 0;
26878 } 26280 }
26879diff -urNp linux-2.6.32.24/drivers/misc/kgdbts.c linux-2.6.32.24/drivers/misc/kgdbts.c 26281diff -urNp linux-2.6.35.7/drivers/mfd/janz-cmodio.c linux-2.6.35.7/drivers/mfd/janz-cmodio.c
26880--- linux-2.6.32.24/drivers/misc/kgdbts.c 2010-08-13 16:24:37.000000000 -0400 26282--- linux-2.6.35.7/drivers/mfd/janz-cmodio.c 2010-08-26 19:47:12.000000000 -0400
26881+++ linux-2.6.32.24/drivers/misc/kgdbts.c 2010-10-23 19:59:20.000000000 -0400 26283+++ linux-2.6.35.7/drivers/mfd/janz-cmodio.c 2010-09-17 20:12:09.000000000 -0400
26284@@ -13,6 +13,7 @@
26285
26286 #include <linux/kernel.h>
26287 #include <linux/module.h>
26288+#include <linux/slab.h>
26289 #include <linux/init.h>
26290 #include <linux/pci.h>
26291 #include <linux/interrupt.h>
26292diff -urNp linux-2.6.35.7/drivers/misc/kgdbts.c linux-2.6.35.7/drivers/misc/kgdbts.c
26293--- linux-2.6.35.7/drivers/misc/kgdbts.c 2010-08-26 19:47:12.000000000 -0400
26294+++ linux-2.6.35.7/drivers/misc/kgdbts.c 2010-09-17 20:12:09.000000000 -0400
26882@@ -118,7 +118,7 @@ 26295@@ -118,7 +118,7 @@
26883 } while (0) 26296 } while (0)
26884 #define MAX_CONFIG_LEN 40 26297 #define MAX_CONFIG_LEN 40
@@ -26888,7 +26301,7 @@ diff -urNp linux-2.6.32.24/drivers/misc/kgdbts.c linux-2.6.32.24/drivers/misc/kg
26888 static char get_buf[BUFMAX]; 26301 static char get_buf[BUFMAX];
26889 static int get_buf_cnt; 26302 static int get_buf_cnt;
26890 static char put_buf[BUFMAX]; 26303 static char put_buf[BUFMAX];
26891@@ -1102,7 +1102,7 @@ static void kgdbts_post_exp_handler(void 26304@@ -1114,7 +1114,7 @@ static void kgdbts_post_exp_handler(void
26892 module_put(THIS_MODULE); 26305 module_put(THIS_MODULE);
26893 } 26306 }
26894 26307
@@ -26897,23 +26310,23 @@ diff -urNp linux-2.6.32.24/drivers/misc/kgdbts.c linux-2.6.32.24/drivers/misc/kg
26897 .name = "kgdbts", 26310 .name = "kgdbts",
26898 .read_char = kgdbts_get_char, 26311 .read_char = kgdbts_get_char,
26899 .write_char = kgdbts_put_char, 26312 .write_char = kgdbts_put_char,
26900diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/gruhandles.c linux-2.6.32.24/drivers/misc/sgi-gru/gruhandles.c 26313diff -urNp linux-2.6.35.7/drivers/misc/sgi-gru/gruhandles.c linux-2.6.35.7/drivers/misc/sgi-gru/gruhandles.c
26901--- linux-2.6.32.24/drivers/misc/sgi-gru/gruhandles.c 2010-08-13 16:24:37.000000000 -0400 26314--- linux-2.6.35.7/drivers/misc/sgi-gru/gruhandles.c 2010-08-26 19:47:12.000000000 -0400
26902+++ linux-2.6.32.24/drivers/misc/sgi-gru/gruhandles.c 2010-10-23 19:59:20.000000000 -0400 26315+++ linux-2.6.35.7/drivers/misc/sgi-gru/gruhandles.c 2010-09-17 20:12:09.000000000 -0400
26903@@ -39,8 +39,8 @@ struct mcs_op_statistic mcs_op_statistic 26316@@ -44,8 +44,8 @@ static void update_mcs_stats(enum mcs_op
26317 unsigned long nsec;
26904 26318
26905 static void update_mcs_stats(enum mcs_op op, unsigned long clks) 26319 nsec = CLKS2NSEC(clks);
26906 {
26907- atomic_long_inc(&mcs_op_statistics[op].count); 26320- atomic_long_inc(&mcs_op_statistics[op].count);
26908- atomic_long_add(clks, &mcs_op_statistics[op].total); 26321- atomic_long_add(nsec, &mcs_op_statistics[op].total);
26909+ atomic_long_inc_unchecked(&mcs_op_statistics[op].count); 26322+ atomic_long_inc_unchecked(&mcs_op_statistics[op].count);
26910+ atomic_long_add_unchecked(clks, &mcs_op_statistics[op].total); 26323+ atomic_long_add_unchecked(nsec, &mcs_op_statistics[op].total);
26911 if (mcs_op_statistics[op].max < clks) 26324 if (mcs_op_statistics[op].max < nsec)
26912 mcs_op_statistics[op].max = clks; 26325 mcs_op_statistics[op].max = nsec;
26913 } 26326 }
26914diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.32.24/drivers/misc/sgi-gru/gruprocfs.c 26327diff -urNp linux-2.6.35.7/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.35.7/drivers/misc/sgi-gru/gruprocfs.c
26915--- linux-2.6.32.24/drivers/misc/sgi-gru/gruprocfs.c 2010-08-13 16:24:37.000000000 -0400 26328--- linux-2.6.35.7/drivers/misc/sgi-gru/gruprocfs.c 2010-08-26 19:47:12.000000000 -0400
26916+++ linux-2.6.32.24/drivers/misc/sgi-gru/gruprocfs.c 2010-10-23 19:59:20.000000000 -0400 26329+++ linux-2.6.35.7/drivers/misc/sgi-gru/gruprocfs.c 2010-09-17 20:12:09.000000000 -0400
26917@@ -32,9 +32,9 @@ 26330@@ -32,9 +32,9 @@
26918 26331
26919 #define printstat(s, f) printstat_val(s, &gru_stats.f, #f) 26332 #define printstat(s, f) printstat_val(s, &gru_stats.f, #f)
@@ -26924,11 +26337,11 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.32.24/driv
26924- unsigned long val = atomic_long_read(v); 26337- unsigned long val = atomic_long_read(v);
26925+ unsigned long val = atomic_long_read_unchecked(v); 26338+ unsigned long val = atomic_long_read_unchecked(v);
26926 26339
26927 if (val) 26340 seq_printf(s, "%16lu %s\n", val, id);
26928 seq_printf(s, "%16lu %s\n", val, id); 26341 }
26929@@ -136,8 +136,8 @@ static int mcs_statistics_show(struct se 26342@@ -134,8 +134,8 @@ static int mcs_statistics_show(struct se
26930 "cch_interrupt_sync", "cch_deallocate", "tgh_invalidate"};
26931 26343
26344 seq_printf(s, "%-20s%12s%12s%12s\n", "#id", "count", "aver-clks", "max-clks");
26932 for (op = 0; op < mcsop_last; op++) { 26345 for (op = 0; op < mcsop_last; op++) {
26933- count = atomic_long_read(&mcs_op_statistics[op].count); 26346- count = atomic_long_read(&mcs_op_statistics[op].count);
26934- total = atomic_long_read(&mcs_op_statistics[op].total); 26347- total = atomic_long_read(&mcs_op_statistics[op].total);
@@ -26937,10 +26350,10 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/gruprocfs.c linux-2.6.32.24/driv
26937 max = mcs_op_statistics[op].max; 26350 max = mcs_op_statistics[op].max;
26938 seq_printf(s, "%-20s%12ld%12ld%12ld\n", id[op], count, 26351 seq_printf(s, "%-20s%12ld%12ld%12ld\n", id[op], count,
26939 count ? total / count : 0, max); 26352 count ? total / count : 0, max);
26940diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h 26353diff -urNp linux-2.6.35.7/drivers/misc/sgi-gru/grutables.h linux-2.6.35.7/drivers/misc/sgi-gru/grutables.h
26941--- linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h 2010-08-13 16:24:37.000000000 -0400 26354--- linux-2.6.35.7/drivers/misc/sgi-gru/grutables.h 2010-08-26 19:47:12.000000000 -0400
26942+++ linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h 2010-10-23 19:59:20.000000000 -0400 26355+++ linux-2.6.35.7/drivers/misc/sgi-gru/grutables.h 2010-09-17 20:12:09.000000000 -0400
26943@@ -167,84 +167,84 @@ extern unsigned int gru_max_gids; 26356@@ -167,82 +167,82 @@ extern unsigned int gru_max_gids;
26944 * GRU statistics. 26357 * GRU statistics.
26945 */ 26358 */
26946 struct gru_stats_s { 26359 struct gru_stats_s {
@@ -26948,7 +26361,8 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
26948- atomic_long_t vdata_free; 26361- atomic_long_t vdata_free;
26949- atomic_long_t gts_alloc; 26362- atomic_long_t gts_alloc;
26950- atomic_long_t gts_free; 26363- atomic_long_t gts_free;
26951- atomic_long_t vdata_double_alloc; 26364- atomic_long_t gms_alloc;
26365- atomic_long_t gms_free;
26952- atomic_long_t gts_double_allocate; 26366- atomic_long_t gts_double_allocate;
26953- atomic_long_t assign_context; 26367- atomic_long_t assign_context;
26954- atomic_long_t assign_context_failed; 26368- atomic_long_t assign_context_failed;
@@ -26961,28 +26375,25 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
26961- atomic_long_t steal_kernel_context; 26375- atomic_long_t steal_kernel_context;
26962- atomic_long_t steal_context_failed; 26376- atomic_long_t steal_context_failed;
26963- atomic_long_t nopfn; 26377- atomic_long_t nopfn;
26964- atomic_long_t break_cow;
26965- atomic_long_t asid_new; 26378- atomic_long_t asid_new;
26966- atomic_long_t asid_next; 26379- atomic_long_t asid_next;
26967- atomic_long_t asid_wrap; 26380- atomic_long_t asid_wrap;
26968- atomic_long_t asid_reuse; 26381- atomic_long_t asid_reuse;
26969- atomic_long_t intr; 26382- atomic_long_t intr;
26383- atomic_long_t intr_cbr;
26384- atomic_long_t intr_tfh;
26385- atomic_long_t intr_spurious;
26970- atomic_long_t intr_mm_lock_failed; 26386- atomic_long_t intr_mm_lock_failed;
26971- atomic_long_t call_os; 26387- atomic_long_t call_os;
26972- atomic_long_t call_os_offnode_reference;
26973- atomic_long_t call_os_check_for_bug;
26974- atomic_long_t call_os_wait_queue; 26388- atomic_long_t call_os_wait_queue;
26975- atomic_long_t user_flush_tlb; 26389- atomic_long_t user_flush_tlb;
26976- atomic_long_t user_unload_context; 26390- atomic_long_t user_unload_context;
26977- atomic_long_t user_exception; 26391- atomic_long_t user_exception;
26978- atomic_long_t set_context_option; 26392- atomic_long_t set_context_option;
26979- atomic_long_t migrate_check; 26393- atomic_long_t check_context_retarget_intr;
26980- atomic_long_t migrated_retarget; 26394- atomic_long_t check_context_unload;
26981- atomic_long_t migrated_unload;
26982- atomic_long_t migrated_unload_delay;
26983- atomic_long_t migrated_nopfn_retarget;
26984- atomic_long_t migrated_nopfn_unload;
26985- atomic_long_t tlb_dropin; 26395- atomic_long_t tlb_dropin;
26396- atomic_long_t tlb_preload_page;
26986- atomic_long_t tlb_dropin_fail_no_asid; 26397- atomic_long_t tlb_dropin_fail_no_asid;
26987- atomic_long_t tlb_dropin_fail_upm; 26398- atomic_long_t tlb_dropin_fail_upm;
26988- atomic_long_t tlb_dropin_fail_invalid; 26399- atomic_long_t tlb_dropin_fail_invalid;
@@ -26990,17 +26401,16 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
26990- atomic_long_t tlb_dropin_fail_idle; 26401- atomic_long_t tlb_dropin_fail_idle;
26991- atomic_long_t tlb_dropin_fail_fmm; 26402- atomic_long_t tlb_dropin_fail_fmm;
26992- atomic_long_t tlb_dropin_fail_no_exception; 26403- atomic_long_t tlb_dropin_fail_no_exception;
26993- atomic_long_t tlb_dropin_fail_no_exception_war;
26994- atomic_long_t tfh_stale_on_fault; 26404- atomic_long_t tfh_stale_on_fault;
26995- atomic_long_t mmu_invalidate_range; 26405- atomic_long_t mmu_invalidate_range;
26996- atomic_long_t mmu_invalidate_page; 26406- atomic_long_t mmu_invalidate_page;
26997- atomic_long_t mmu_clear_flush_young;
26998- atomic_long_t flush_tlb; 26407- atomic_long_t flush_tlb;
26999- atomic_long_t flush_tlb_gru; 26408- atomic_long_t flush_tlb_gru;
27000- atomic_long_t flush_tlb_gru_tgh; 26409- atomic_long_t flush_tlb_gru_tgh;
27001- atomic_long_t flush_tlb_gru_zero_asid; 26410- atomic_long_t flush_tlb_gru_zero_asid;
27002- 26411-
27003- atomic_long_t copy_gpa; 26412- atomic_long_t copy_gpa;
26413- atomic_long_t read_gpa;
27004- 26414-
27005- atomic_long_t mesq_receive; 26415- atomic_long_t mesq_receive;
27006- atomic_long_t mesq_receive_none; 26416- atomic_long_t mesq_receive_none;
@@ -27012,7 +26422,7 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
27012- atomic_long_t mesq_send_qlimit_reached; 26422- atomic_long_t mesq_send_qlimit_reached;
27013- atomic_long_t mesq_send_amo_nacked; 26423- atomic_long_t mesq_send_amo_nacked;
27014- atomic_long_t mesq_send_put_nacked; 26424- atomic_long_t mesq_send_put_nacked;
27015- atomic_long_t mesq_qf_not_full; 26425- atomic_long_t mesq_page_overflow;
27016- atomic_long_t mesq_qf_locked; 26426- atomic_long_t mesq_qf_locked;
27017- atomic_long_t mesq_qf_noop_not_full; 26427- atomic_long_t mesq_qf_noop_not_full;
27018- atomic_long_t mesq_qf_switch_head_failed; 26428- atomic_long_t mesq_qf_switch_head_failed;
@@ -27022,11 +26432,13 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
27022- atomic_long_t mesq_noop_qlimit_reached; 26432- atomic_long_t mesq_noop_qlimit_reached;
27023- atomic_long_t mesq_noop_amo_nacked; 26433- atomic_long_t mesq_noop_amo_nacked;
27024- atomic_long_t mesq_noop_put_nacked; 26434- atomic_long_t mesq_noop_put_nacked;
26435- atomic_long_t mesq_noop_page_overflow;
27025+ atomic_long_unchecked_t vdata_alloc; 26436+ atomic_long_unchecked_t vdata_alloc;
27026+ atomic_long_unchecked_t vdata_free; 26437+ atomic_long_unchecked_t vdata_free;
27027+ atomic_long_unchecked_t gts_alloc; 26438+ atomic_long_unchecked_t gts_alloc;
27028+ atomic_long_unchecked_t gts_free; 26439+ atomic_long_unchecked_t gts_free;
27029+ atomic_long_unchecked_t vdata_double_alloc; 26440+ atomic_long_unchecked_t gms_alloc;
26441+ atomic_long_unchecked_t gms_free;
27030+ atomic_long_unchecked_t gts_double_allocate; 26442+ atomic_long_unchecked_t gts_double_allocate;
27031+ atomic_long_unchecked_t assign_context; 26443+ atomic_long_unchecked_t assign_context;
27032+ atomic_long_unchecked_t assign_context_failed; 26444+ atomic_long_unchecked_t assign_context_failed;
@@ -27039,28 +26451,25 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
27039+ atomic_long_unchecked_t steal_kernel_context; 26451+ atomic_long_unchecked_t steal_kernel_context;
27040+ atomic_long_unchecked_t steal_context_failed; 26452+ atomic_long_unchecked_t steal_context_failed;
27041+ atomic_long_unchecked_t nopfn; 26453+ atomic_long_unchecked_t nopfn;
27042+ atomic_long_unchecked_t break_cow;
27043+ atomic_long_unchecked_t asid_new; 26454+ atomic_long_unchecked_t asid_new;
27044+ atomic_long_unchecked_t asid_next; 26455+ atomic_long_unchecked_t asid_next;
27045+ atomic_long_unchecked_t asid_wrap; 26456+ atomic_long_unchecked_t asid_wrap;
27046+ atomic_long_unchecked_t asid_reuse; 26457+ atomic_long_unchecked_t asid_reuse;
27047+ atomic_long_unchecked_t intr; 26458+ atomic_long_unchecked_t intr;
26459+ atomic_long_unchecked_t intr_cbr;
26460+ atomic_long_unchecked_t intr_tfh;
26461+ atomic_long_unchecked_t intr_spurious;
27048+ atomic_long_unchecked_t intr_mm_lock_failed; 26462+ atomic_long_unchecked_t intr_mm_lock_failed;
27049+ atomic_long_unchecked_t call_os; 26463+ atomic_long_unchecked_t call_os;
27050+ atomic_long_unchecked_t call_os_offnode_reference;
27051+ atomic_long_unchecked_t call_os_check_for_bug;
27052+ atomic_long_unchecked_t call_os_wait_queue; 26464+ atomic_long_unchecked_t call_os_wait_queue;
27053+ atomic_long_unchecked_t user_flush_tlb; 26465+ atomic_long_unchecked_t user_flush_tlb;
27054+ atomic_long_unchecked_t user_unload_context; 26466+ atomic_long_unchecked_t user_unload_context;
27055+ atomic_long_unchecked_t user_exception; 26467+ atomic_long_unchecked_t user_exception;
27056+ atomic_long_unchecked_t set_context_option; 26468+ atomic_long_unchecked_t set_context_option;
27057+ atomic_long_unchecked_t migrate_check; 26469+ atomic_long_unchecked_t check_context_retarget_intr;
27058+ atomic_long_unchecked_t migrated_retarget; 26470+ atomic_long_unchecked_t check_context_unload;
27059+ atomic_long_unchecked_t migrated_unload;
27060+ atomic_long_unchecked_t migrated_unload_delay;
27061+ atomic_long_unchecked_t migrated_nopfn_retarget;
27062+ atomic_long_unchecked_t migrated_nopfn_unload;
27063+ atomic_long_unchecked_t tlb_dropin; 26471+ atomic_long_unchecked_t tlb_dropin;
26472+ atomic_long_unchecked_t tlb_preload_page;
27064+ atomic_long_unchecked_t tlb_dropin_fail_no_asid; 26473+ atomic_long_unchecked_t tlb_dropin_fail_no_asid;
27065+ atomic_long_unchecked_t tlb_dropin_fail_upm; 26474+ atomic_long_unchecked_t tlb_dropin_fail_upm;
27066+ atomic_long_unchecked_t tlb_dropin_fail_invalid; 26475+ atomic_long_unchecked_t tlb_dropin_fail_invalid;
@@ -27068,17 +26477,16 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
27068+ atomic_long_unchecked_t tlb_dropin_fail_idle; 26477+ atomic_long_unchecked_t tlb_dropin_fail_idle;
27069+ atomic_long_unchecked_t tlb_dropin_fail_fmm; 26478+ atomic_long_unchecked_t tlb_dropin_fail_fmm;
27070+ atomic_long_unchecked_t tlb_dropin_fail_no_exception; 26479+ atomic_long_unchecked_t tlb_dropin_fail_no_exception;
27071+ atomic_long_unchecked_t tlb_dropin_fail_no_exception_war;
27072+ atomic_long_unchecked_t tfh_stale_on_fault; 26480+ atomic_long_unchecked_t tfh_stale_on_fault;
27073+ atomic_long_unchecked_t mmu_invalidate_range; 26481+ atomic_long_unchecked_t mmu_invalidate_range;
27074+ atomic_long_unchecked_t mmu_invalidate_page; 26482+ atomic_long_unchecked_t mmu_invalidate_page;
27075+ atomic_long_unchecked_t mmu_clear_flush_young;
27076+ atomic_long_unchecked_t flush_tlb; 26483+ atomic_long_unchecked_t flush_tlb;
27077+ atomic_long_unchecked_t flush_tlb_gru; 26484+ atomic_long_unchecked_t flush_tlb_gru;
27078+ atomic_long_unchecked_t flush_tlb_gru_tgh; 26485+ atomic_long_unchecked_t flush_tlb_gru_tgh;
27079+ atomic_long_unchecked_t flush_tlb_gru_zero_asid; 26486+ atomic_long_unchecked_t flush_tlb_gru_zero_asid;
27080+ 26487+
27081+ atomic_long_unchecked_t copy_gpa; 26488+ atomic_long_unchecked_t copy_gpa;
26489+ atomic_long_unchecked_t read_gpa;
27082+ 26490+
27083+ atomic_long_unchecked_t mesq_receive; 26491+ atomic_long_unchecked_t mesq_receive;
27084+ atomic_long_unchecked_t mesq_receive_none; 26492+ atomic_long_unchecked_t mesq_receive_none;
@@ -27090,7 +26498,7 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
27090+ atomic_long_unchecked_t mesq_send_qlimit_reached; 26498+ atomic_long_unchecked_t mesq_send_qlimit_reached;
27091+ atomic_long_unchecked_t mesq_send_amo_nacked; 26499+ atomic_long_unchecked_t mesq_send_amo_nacked;
27092+ atomic_long_unchecked_t mesq_send_put_nacked; 26500+ atomic_long_unchecked_t mesq_send_put_nacked;
27093+ atomic_long_unchecked_t mesq_qf_not_full; 26501+ atomic_long_unchecked_t mesq_page_overflow;
27094+ atomic_long_unchecked_t mesq_qf_locked; 26502+ atomic_long_unchecked_t mesq_qf_locked;
27095+ atomic_long_unchecked_t mesq_qf_noop_not_full; 26503+ atomic_long_unchecked_t mesq_qf_noop_not_full;
27096+ atomic_long_unchecked_t mesq_qf_switch_head_failed; 26504+ atomic_long_unchecked_t mesq_qf_switch_head_failed;
@@ -27100,11 +26508,12 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
27100+ atomic_long_unchecked_t mesq_noop_qlimit_reached; 26508+ atomic_long_unchecked_t mesq_noop_qlimit_reached;
27101+ atomic_long_unchecked_t mesq_noop_amo_nacked; 26509+ atomic_long_unchecked_t mesq_noop_amo_nacked;
27102+ atomic_long_unchecked_t mesq_noop_put_nacked; 26510+ atomic_long_unchecked_t mesq_noop_put_nacked;
26511+ atomic_long_unchecked_t mesq_noop_page_overflow;
27103 26512
27104 }; 26513 };
27105 26514
27106@@ -252,8 +252,8 @@ enum mcs_op {cchop_allocate, cchop_start 26515@@ -251,8 +251,8 @@ enum mcs_op {cchop_allocate, cchop_start
27107 cchop_deallocate, tghop_invalidate, mcsop_last}; 26516 tghop_invalidate, mcsop_last};
27108 26517
27109 struct mcs_op_statistic { 26518 struct mcs_op_statistic {
27110- atomic_long_t count; 26519- atomic_long_t count;
@@ -27114,7 +26523,7 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
27114 unsigned long max; 26523 unsigned long max;
27115 }; 26524 };
27116 26525
27117@@ -276,7 +276,7 @@ extern struct mcs_op_statistic mcs_op_st 26526@@ -275,7 +275,7 @@ extern struct mcs_op_statistic mcs_op_st
27118 26527
27119 #define STAT(id) do { \ 26528 #define STAT(id) do { \
27120 if (gru_options & OPT_STATS) \ 26529 if (gru_options & OPT_STATS) \
@@ -27123,9 +26532,9 @@ diff -urNp linux-2.6.32.24/drivers/misc/sgi-gru/grutables.h linux-2.6.32.24/driv
27123 } while (0) 26532 } while (0)
27124 26533
27125 #ifdef CONFIG_SGI_GRU_DEBUG 26534 #ifdef CONFIG_SGI_GRU_DEBUG
27126diff -urNp linux-2.6.32.24/drivers/mtd/devices/doc2000.c linux-2.6.32.24/drivers/mtd/devices/doc2000.c 26535diff -urNp linux-2.6.35.7/drivers/mtd/devices/doc2000.c linux-2.6.35.7/drivers/mtd/devices/doc2000.c
27127--- linux-2.6.32.24/drivers/mtd/devices/doc2000.c 2010-08-13 16:24:37.000000000 -0400 26536--- linux-2.6.35.7/drivers/mtd/devices/doc2000.c 2010-08-26 19:47:12.000000000 -0400
27128+++ linux-2.6.32.24/drivers/mtd/devices/doc2000.c 2010-10-23 19:59:20.000000000 -0400 26537+++ linux-2.6.35.7/drivers/mtd/devices/doc2000.c 2010-09-17 20:12:09.000000000 -0400
27129@@ -776,7 +776,7 @@ static int doc_write(struct mtd_info *mt 26538@@ -776,7 +776,7 @@ static int doc_write(struct mtd_info *mt
27130 26539
27131 /* The ECC will not be calculated correctly if less than 512 is written */ 26540 /* The ECC will not be calculated correctly if less than 512 is written */
@@ -27135,9 +26544,9 @@ diff -urNp linux-2.6.32.24/drivers/mtd/devices/doc2000.c linux-2.6.32.24/drivers
27135 printk(KERN_WARNING 26544 printk(KERN_WARNING
27136 "ECC needs a full sector write (adr: %lx size %lx)\n", 26545 "ECC needs a full sector write (adr: %lx size %lx)\n",
27137 (long) to, (long) len); 26546 (long) to, (long) len);
27138diff -urNp linux-2.6.32.24/drivers/mtd/devices/doc2001.c linux-2.6.32.24/drivers/mtd/devices/doc2001.c 26547diff -urNp linux-2.6.35.7/drivers/mtd/devices/doc2001.c linux-2.6.35.7/drivers/mtd/devices/doc2001.c
27139--- linux-2.6.32.24/drivers/mtd/devices/doc2001.c 2010-08-13 16:24:37.000000000 -0400 26548--- linux-2.6.35.7/drivers/mtd/devices/doc2001.c 2010-08-26 19:47:12.000000000 -0400
27140+++ linux-2.6.32.24/drivers/mtd/devices/doc2001.c 2010-10-23 19:59:20.000000000 -0400 26549+++ linux-2.6.35.7/drivers/mtd/devices/doc2001.c 2010-09-17 20:12:09.000000000 -0400
27141@@ -393,7 +393,7 @@ static int doc_read (struct mtd_info *mt 26550@@ -393,7 +393,7 @@ static int doc_read (struct mtd_info *mt
27142 struct Nand *mychip = &this->chips[from >> (this->chipshift)]; 26551 struct Nand *mychip = &this->chips[from >> (this->chipshift)];
27143 26552
@@ -27147,10 +26556,21 @@ diff -urNp linux-2.6.32.24/drivers/mtd/devices/doc2001.c linux-2.6.32.24/drivers
27147 return -EINVAL; 26556 return -EINVAL;
27148 26557
27149 /* Don't allow a single read to cross a 512-byte block boundary */ 26558 /* Don't allow a single read to cross a 512-byte block boundary */
27150diff -urNp linux-2.6.32.24/drivers/mtd/ubi/build.c linux-2.6.32.24/drivers/mtd/ubi/build.c 26559diff -urNp linux-2.6.35.7/drivers/mtd/nand/denali.c linux-2.6.35.7/drivers/mtd/nand/denali.c
27151--- linux-2.6.32.24/drivers/mtd/ubi/build.c 2010-08-13 16:24:37.000000000 -0400 26560--- linux-2.6.35.7/drivers/mtd/nand/denali.c 2010-08-26 19:47:12.000000000 -0400
27152+++ linux-2.6.32.24/drivers/mtd/ubi/build.c 2010-10-23 19:59:20.000000000 -0400 26561+++ linux-2.6.35.7/drivers/mtd/nand/denali.c 2010-09-17 20:12:09.000000000 -0400
27153@@ -1255,7 +1255,7 @@ module_exit(ubi_exit); 26562@@ -24,6 +24,7 @@
26563 #include <linux/pci.h>
26564 #include <linux/mtd/mtd.h>
26565 #include <linux/module.h>
26566+#include <linux/slab.h>
26567
26568 #include "denali.h"
26569
26570diff -urNp linux-2.6.35.7/drivers/mtd/ubi/build.c linux-2.6.35.7/drivers/mtd/ubi/build.c
26571--- linux-2.6.35.7/drivers/mtd/ubi/build.c 2010-08-26 19:47:12.000000000 -0400
26572+++ linux-2.6.35.7/drivers/mtd/ubi/build.c 2010-09-17 20:12:09.000000000 -0400
26573@@ -1282,7 +1282,7 @@ module_exit(ubi_exit);
27154 static int __init bytes_str_to_int(const char *str) 26574 static int __init bytes_str_to_int(const char *str)
27155 { 26575 {
27156 char *endp; 26576 char *endp;
@@ -27159,7 +26579,7 @@ diff -urNp linux-2.6.32.24/drivers/mtd/ubi/build.c linux-2.6.32.24/drivers/mtd/u
27159 26579
27160 result = simple_strtoul(str, &endp, 0); 26580 result = simple_strtoul(str, &endp, 0);
27161 if (str == endp || result >= INT_MAX) { 26581 if (str == endp || result >= INT_MAX) {
27162@@ -1266,11 +1266,11 @@ static int __init bytes_str_to_int(const 26582@@ -1293,11 +1293,11 @@ static int __init bytes_str_to_int(const
27163 26583
27164 switch (*endp) { 26584 switch (*endp) {
27165 case 'G': 26585 case 'G':
@@ -27174,7 +26594,7 @@ diff -urNp linux-2.6.32.24/drivers/mtd/ubi/build.c linux-2.6.32.24/drivers/mtd/u
27174 if (endp[1] == 'i' && endp[2] == 'B') 26594 if (endp[1] == 'i' && endp[2] == 'B')
27175 endp += 2; 26595 endp += 2;
27176 case '\0': 26596 case '\0':
27177@@ -1281,7 +1281,13 @@ static int __init bytes_str_to_int(const 26597@@ -1308,7 +1308,13 @@ static int __init bytes_str_to_int(const
27178 return -EINVAL; 26598 return -EINVAL;
27179 } 26599 }
27180 26600
@@ -27189,10 +26609,10 @@ diff -urNp linux-2.6.32.24/drivers/mtd/ubi/build.c linux-2.6.32.24/drivers/mtd/u
27189 } 26609 }
27190 26610
27191 /** 26611 /**
27192diff -urNp linux-2.6.32.24/drivers/net/cxgb3/cxgb3_main.c linux-2.6.32.24/drivers/net/cxgb3/cxgb3_main.c 26612diff -urNp linux-2.6.35.7/drivers/net/cxgb3/cxgb3_main.c linux-2.6.35.7/drivers/net/cxgb3/cxgb3_main.c
27193--- linux-2.6.32.24/drivers/net/cxgb3/cxgb3_main.c 2010-09-26 17:26:05.000000000 -0400 26613--- linux-2.6.35.7/drivers/net/cxgb3/cxgb3_main.c 2010-09-26 17:32:11.000000000 -0400
27194+++ linux-2.6.32.24/drivers/net/cxgb3/cxgb3_main.c 2010-10-23 19:59:20.000000000 -0400 26614+++ linux-2.6.35.7/drivers/net/cxgb3/cxgb3_main.c 2010-09-26 17:32:46.000000000 -0400
27195@@ -2275,7 +2275,7 @@ static int cxgb_extension_ioctl(struct n 26615@@ -2296,7 +2296,7 @@ static int cxgb_extension_ioctl(struct n
27196 case CHELSIO_GET_QSET_NUM:{ 26616 case CHELSIO_GET_QSET_NUM:{
27197 struct ch_reg edata; 26617 struct ch_reg edata;
27198 26618
@@ -27201,10 +26621,10 @@ diff -urNp linux-2.6.32.24/drivers/net/cxgb3/cxgb3_main.c linux-2.6.32.24/driver
27201 26621
27202 edata.cmd = CHELSIO_GET_QSET_NUM; 26622 edata.cmd = CHELSIO_GET_QSET_NUM;
27203 edata.val = pi->nqsets; 26623 edata.val = pi->nqsets;
27204diff -urNp linux-2.6.32.24/drivers/net/e1000e/82571.c linux-2.6.32.24/drivers/net/e1000e/82571.c 26624diff -urNp linux-2.6.35.7/drivers/net/e1000e/82571.c linux-2.6.35.7/drivers/net/e1000e/82571.c
27205--- linux-2.6.32.24/drivers/net/e1000e/82571.c 2010-08-13 16:24:37.000000000 -0400 26625--- linux-2.6.35.7/drivers/net/e1000e/82571.c 2010-08-26 19:47:12.000000000 -0400
27206+++ linux-2.6.32.24/drivers/net/e1000e/82571.c 2010-10-23 19:59:20.000000000 -0400 26626+++ linux-2.6.35.7/drivers/net/e1000e/82571.c 2010-09-17 20:12:09.000000000 -0400
27207@@ -212,6 +212,7 @@ static s32 e1000_init_mac_params_82571(s 26627@@ -207,6 +207,7 @@ static s32 e1000_init_mac_params_82571(s
27208 { 26628 {
27209 struct e1000_hw *hw = &adapter->hw; 26629 struct e1000_hw *hw = &adapter->hw;
27210 struct e1000_mac_info *mac = &hw->mac; 26630 struct e1000_mac_info *mac = &hw->mac;
@@ -27212,8 +26632,8 @@ diff -urNp linux-2.6.32.24/drivers/net/e1000e/82571.c linux-2.6.32.24/drivers/ne
27212 struct e1000_mac_operations *func = &mac->ops; 26632 struct e1000_mac_operations *func = &mac->ops;
27213 u32 swsm = 0; 26633 u32 swsm = 0;
27214 u32 swsm2 = 0; 26634 u32 swsm2 = 0;
27215@@ -1656,7 +1657,7 @@ static void e1000_clear_hw_cntrs_82571(s 26635@@ -1703,7 +1704,7 @@ static void e1000_clear_hw_cntrs_82571(s
27216 temp = er32(ICRXDMTC); 26636 er32(ICRXDMTC);
27217 } 26637 }
27218 26638
27219-static struct e1000_mac_operations e82571_mac_ops = { 26639-static struct e1000_mac_operations e82571_mac_ops = {
@@ -27221,46 +26641,46 @@ diff -urNp linux-2.6.32.24/drivers/net/e1000e/82571.c linux-2.6.32.24/drivers/ne
27221 /* .check_mng_mode: mac type dependent */ 26641 /* .check_mng_mode: mac type dependent */
27222 /* .check_for_link: media type dependent */ 26642 /* .check_for_link: media type dependent */
27223 .id_led_init = e1000e_id_led_init, 26643 .id_led_init = e1000e_id_led_init,
27224@@ -1674,7 +1675,7 @@ static struct e1000_mac_operations e8257 26644@@ -1725,7 +1726,7 @@ static struct e1000_mac_operations e8257
27225 .setup_led = e1000e_setup_led_generic, 26645 .read_mac_addr = e1000_read_mac_addr_82571,
27226 }; 26646 };
27227 26647
27228-static struct e1000_phy_operations e82_phy_ops_igp = { 26648-static struct e1000_phy_operations e82_phy_ops_igp = {
27229+static const struct e1000_phy_operations e82_phy_ops_igp = { 26649+static const struct e1000_phy_operations e82_phy_ops_igp = {
27230 .acquire_phy = e1000_get_hw_semaphore_82571, 26650 .acquire = e1000_get_hw_semaphore_82571,
26651 .check_polarity = e1000_check_polarity_igp,
27231 .check_reset_block = e1000e_check_reset_block_generic, 26652 .check_reset_block = e1000e_check_reset_block_generic,
27232 .commit_phy = NULL, 26653@@ -1743,7 +1744,7 @@ static struct e1000_phy_operations e82_p
27233@@ -1691,7 +1692,7 @@ static struct e1000_phy_operations e82_p
27234 .cfg_on_link_up = NULL, 26654 .cfg_on_link_up = NULL,
27235 }; 26655 };
27236 26656
27237-static struct e1000_phy_operations e82_phy_ops_m88 = { 26657-static struct e1000_phy_operations e82_phy_ops_m88 = {
27238+static const struct e1000_phy_operations e82_phy_ops_m88 = { 26658+static const struct e1000_phy_operations e82_phy_ops_m88 = {
27239 .acquire_phy = e1000_get_hw_semaphore_82571, 26659 .acquire = e1000_get_hw_semaphore_82571,
26660 .check_polarity = e1000_check_polarity_m88,
27240 .check_reset_block = e1000e_check_reset_block_generic, 26661 .check_reset_block = e1000e_check_reset_block_generic,
27241 .commit_phy = e1000e_phy_sw_reset, 26662@@ -1761,7 +1762,7 @@ static struct e1000_phy_operations e82_p
27242@@ -1708,7 +1709,7 @@ static struct e1000_phy_operations e82_p
27243 .cfg_on_link_up = NULL, 26663 .cfg_on_link_up = NULL,
27244 }; 26664 };
27245 26665
27246-static struct e1000_phy_operations e82_phy_ops_bm = { 26666-static struct e1000_phy_operations e82_phy_ops_bm = {
27247+static const struct e1000_phy_operations e82_phy_ops_bm = { 26667+static const struct e1000_phy_operations e82_phy_ops_bm = {
27248 .acquire_phy = e1000_get_hw_semaphore_82571, 26668 .acquire = e1000_get_hw_semaphore_82571,
26669 .check_polarity = e1000_check_polarity_m88,
27249 .check_reset_block = e1000e_check_reset_block_generic, 26670 .check_reset_block = e1000e_check_reset_block_generic,
27250 .commit_phy = e1000e_phy_sw_reset, 26671@@ -1779,7 +1780,7 @@ static struct e1000_phy_operations e82_p
27251@@ -1725,7 +1726,7 @@ static struct e1000_phy_operations e82_p
27252 .cfg_on_link_up = NULL, 26672 .cfg_on_link_up = NULL,
27253 }; 26673 };
27254 26674
27255-static struct e1000_nvm_operations e82571_nvm_ops = { 26675-static struct e1000_nvm_operations e82571_nvm_ops = {
27256+static const struct e1000_nvm_operations e82571_nvm_ops = { 26676+static const struct e1000_nvm_operations e82571_nvm_ops = {
27257 .acquire_nvm = e1000_acquire_nvm_82571, 26677 .acquire = e1000_acquire_nvm_82571,
27258 .read_nvm = e1000e_read_nvm_eerd, 26678 .read = e1000e_read_nvm_eerd,
27259 .release_nvm = e1000_release_nvm_82571, 26679 .release = e1000_release_nvm_82571,
27260diff -urNp linux-2.6.32.24/drivers/net/e1000e/e1000.h linux-2.6.32.24/drivers/net/e1000e/e1000.h 26680diff -urNp linux-2.6.35.7/drivers/net/e1000e/e1000.h linux-2.6.35.7/drivers/net/e1000e/e1000.h
27261--- linux-2.6.32.24/drivers/net/e1000e/e1000.h 2010-08-13 16:24:37.000000000 -0400 26681--- linux-2.6.35.7/drivers/net/e1000e/e1000.h 2010-08-26 19:47:12.000000000 -0400
27262+++ linux-2.6.32.24/drivers/net/e1000e/e1000.h 2010-10-23 19:59:20.000000000 -0400 26682+++ linux-2.6.35.7/drivers/net/e1000e/e1000.h 2010-09-17 20:12:09.000000000 -0400
27263@@ -375,9 +375,9 @@ struct e1000_info { 26683@@ -377,9 +377,9 @@ struct e1000_info {
27264 u32 pba; 26684 u32 pba;
27265 u32 max_hw_frame_size; 26685 u32 max_hw_frame_size;
27266 s32 (*get_variants)(struct e1000_adapter *); 26686 s32 (*get_variants)(struct e1000_adapter *);
@@ -27273,10 +26693,10 @@ diff -urNp linux-2.6.32.24/drivers/net/e1000e/e1000.h linux-2.6.32.24/drivers/ne
27273 }; 26693 };
27274 26694
27275 /* hardware capability, feature, and workaround flags */ 26695 /* hardware capability, feature, and workaround flags */
27276diff -urNp linux-2.6.32.24/drivers/net/e1000e/es2lan.c linux-2.6.32.24/drivers/net/e1000e/es2lan.c 26696diff -urNp linux-2.6.35.7/drivers/net/e1000e/es2lan.c linux-2.6.35.7/drivers/net/e1000e/es2lan.c
27277--- linux-2.6.32.24/drivers/net/e1000e/es2lan.c 2010-08-13 16:24:37.000000000 -0400 26697--- linux-2.6.35.7/drivers/net/e1000e/es2lan.c 2010-08-26 19:47:12.000000000 -0400
27278+++ linux-2.6.32.24/drivers/net/e1000e/es2lan.c 2010-10-23 19:59:20.000000000 -0400 26698+++ linux-2.6.35.7/drivers/net/e1000e/es2lan.c 2010-09-17 20:12:09.000000000 -0400
27279@@ -207,6 +207,7 @@ static s32 e1000_init_mac_params_80003es 26699@@ -205,6 +205,7 @@ static s32 e1000_init_mac_params_80003es
27280 { 26700 {
27281 struct e1000_hw *hw = &adapter->hw; 26701 struct e1000_hw *hw = &adapter->hw;
27282 struct e1000_mac_info *mac = &hw->mac; 26702 struct e1000_mac_info *mac = &hw->mac;
@@ -27284,99 +26704,69 @@ diff -urNp linux-2.6.32.24/drivers/net/e1000e/es2lan.c linux-2.6.32.24/drivers/n
27284 struct e1000_mac_operations *func = &mac->ops; 26704 struct e1000_mac_operations *func = &mac->ops;
27285 26705
27286 /* Set media type */ 26706 /* Set media type */
27287@@ -1365,7 +1366,7 @@ static void e1000_clear_hw_cntrs_80003es 26707@@ -1431,7 +1432,7 @@ static void e1000_clear_hw_cntrs_80003es
27288 temp = er32(ICRXDMTC); 26708 er32(ICRXDMTC);
27289 } 26709 }
27290 26710
27291-static struct e1000_mac_operations es2_mac_ops = { 26711-static struct e1000_mac_operations es2_mac_ops = {
27292+static const struct e1000_mac_operations es2_mac_ops = { 26712+static const struct e1000_mac_operations es2_mac_ops = {
26713 .read_mac_addr = e1000_read_mac_addr_80003es2lan,
27293 .id_led_init = e1000e_id_led_init, 26714 .id_led_init = e1000e_id_led_init,
27294 .check_mng_mode = e1000e_check_mng_mode_generic, 26715 .check_mng_mode = e1000e_check_mng_mode_generic,
27295 /* check_for_link dependent on media type */ 26716@@ -1453,7 +1454,7 @@ static struct e1000_mac_operations es2_m
27296@@ -1383,7 +1384,7 @@ static struct e1000_mac_operations es2_m
27297 .setup_led = e1000e_setup_led_generic, 26717 .setup_led = e1000e_setup_led_generic,
27298 }; 26718 };
27299 26719
27300-static struct e1000_phy_operations es2_phy_ops = { 26720-static struct e1000_phy_operations es2_phy_ops = {
27301+static const struct e1000_phy_operations es2_phy_ops = { 26721+static const struct e1000_phy_operations es2_phy_ops = {
27302 .acquire_phy = e1000_acquire_phy_80003es2lan, 26722 .acquire = e1000_acquire_phy_80003es2lan,
26723 .check_polarity = e1000_check_polarity_m88,
27303 .check_reset_block = e1000e_check_reset_block_generic, 26724 .check_reset_block = e1000e_check_reset_block_generic,
27304 .commit_phy = e1000e_phy_sw_reset, 26725@@ -1471,7 +1472,7 @@ static struct e1000_phy_operations es2_p
27305@@ -1400,7 +1401,7 @@ static struct e1000_phy_operations es2_p
27306 .cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan, 26726 .cfg_on_link_up = e1000_cfg_on_link_up_80003es2lan,
27307 }; 26727 };
27308 26728
27309-static struct e1000_nvm_operations es2_nvm_ops = { 26729-static struct e1000_nvm_operations es2_nvm_ops = {
27310+static const struct e1000_nvm_operations es2_nvm_ops = { 26730+static const struct e1000_nvm_operations es2_nvm_ops = {
27311 .acquire_nvm = e1000_acquire_nvm_80003es2lan, 26731 .acquire = e1000_acquire_nvm_80003es2lan,
27312 .read_nvm = e1000e_read_nvm_eerd, 26732 .read = e1000e_read_nvm_eerd,
27313 .release_nvm = e1000_release_nvm_80003es2lan, 26733 .release = e1000_release_nvm_80003es2lan,
27314diff -urNp linux-2.6.32.24/drivers/net/e1000e/hw.h linux-2.6.32.24/drivers/net/e1000e/hw.h 26734diff -urNp linux-2.6.35.7/drivers/net/e1000e/hw.h linux-2.6.35.7/drivers/net/e1000e/hw.h
27315--- linux-2.6.32.24/drivers/net/e1000e/hw.h 2010-08-13 16:24:37.000000000 -0400 26735--- linux-2.6.35.7/drivers/net/e1000e/hw.h 2010-08-26 19:47:12.000000000 -0400
27316+++ linux-2.6.32.24/drivers/net/e1000e/hw.h 2010-10-23 19:59:20.000000000 -0400 26736+++ linux-2.6.35.7/drivers/net/e1000e/hw.h 2010-09-17 20:12:09.000000000 -0400
27317@@ -756,34 +756,34 @@ struct e1000_mac_operations { 26737@@ -791,13 +791,13 @@ struct e1000_phy_operations {
27318
27319 /* Function pointers for the PHY. */
27320 struct e1000_phy_operations {
27321- s32 (*acquire_phy)(struct e1000_hw *);
27322- s32 (*check_polarity)(struct e1000_hw *);
27323- s32 (*check_reset_block)(struct e1000_hw *);
27324- s32 (*commit_phy)(struct e1000_hw *);
27325- s32 (*force_speed_duplex)(struct e1000_hw *);
27326- s32 (*get_cfg_done)(struct e1000_hw *hw);
27327- s32 (*get_cable_length)(struct e1000_hw *);
27328- s32 (*get_phy_info)(struct e1000_hw *);
27329- s32 (*read_phy_reg)(struct e1000_hw *, u32, u16 *);
27330- s32 (*read_phy_reg_locked)(struct e1000_hw *, u32, u16 *);
27331- void (*release_phy)(struct e1000_hw *);
27332- s32 (*reset_phy)(struct e1000_hw *);
27333- s32 (*set_d0_lplu_state)(struct e1000_hw *, bool);
27334- s32 (*set_d3_lplu_state)(struct e1000_hw *, bool);
27335- s32 (*write_phy_reg)(struct e1000_hw *, u32, u16);
27336- s32 (*write_phy_reg_locked)(struct e1000_hw *, u32, u16);
27337- s32 (*cfg_on_link_up)(struct e1000_hw *);
27338+ s32 (* acquire_phy)(struct e1000_hw *);
27339+ s32 (* check_polarity)(struct e1000_hw *);
27340+ s32 (* check_reset_block)(struct e1000_hw *);
27341+ s32 (* commit_phy)(struct e1000_hw *);
27342+ s32 (* force_speed_duplex)(struct e1000_hw *);
27343+ s32 (* get_cfg_done)(struct e1000_hw *hw);
27344+ s32 (* get_cable_length)(struct e1000_hw *);
27345+ s32 (* get_phy_info)(struct e1000_hw *);
27346+ s32 (* read_phy_reg)(struct e1000_hw *, u32, u16 *);
27347+ s32 (* read_phy_reg_locked)(struct e1000_hw *, u32, u16 *);
27348+ void (* release_phy)(struct e1000_hw *);
27349+ s32 (* reset_phy)(struct e1000_hw *);
27350+ s32 (* set_d0_lplu_state)(struct e1000_hw *, bool);
27351+ s32 (* set_d3_lplu_state)(struct e1000_hw *, bool);
27352+ s32 (* write_phy_reg)(struct e1000_hw *, u32, u16);
27353+ s32 (* write_phy_reg_locked)(struct e1000_hw *, u32, u16);
27354+ s32 (* cfg_on_link_up)(struct e1000_hw *);
27355 };
27356 26738
27357 /* Function pointers for the NVM. */ 26739 /* Function pointers for the NVM. */
27358 struct e1000_nvm_operations { 26740 struct e1000_nvm_operations {
27359- s32 (*acquire_nvm)(struct e1000_hw *); 26741- s32 (*acquire)(struct e1000_hw *);
27360- s32 (*read_nvm)(struct e1000_hw *, u16, u16, u16 *); 26742- s32 (*read)(struct e1000_hw *, u16, u16, u16 *);
27361- void (*release_nvm)(struct e1000_hw *); 26743- void (*release)(struct e1000_hw *);
27362- s32 (*update_nvm)(struct e1000_hw *); 26744- s32 (*update)(struct e1000_hw *);
27363- s32 (*valid_led_default)(struct e1000_hw *, u16 *); 26745- s32 (*valid_led_default)(struct e1000_hw *, u16 *);
27364- s32 (*validate_nvm)(struct e1000_hw *); 26746- s32 (*validate)(struct e1000_hw *);
27365- s32 (*write_nvm)(struct e1000_hw *, u16, u16, u16 *); 26747- s32 (*write)(struct e1000_hw *, u16, u16, u16 *);
27366+ s32 (* const acquire_nvm)(struct e1000_hw *); 26748+ s32 (* const acquire)(struct e1000_hw *);
27367+ s32 (* const read_nvm)(struct e1000_hw *, u16, u16, u16 *); 26749+ s32 (* const read)(struct e1000_hw *, u16, u16, u16 *);
27368+ void (* const release_nvm)(struct e1000_hw *); 26750+ void (* const release)(struct e1000_hw *);
27369+ s32 (* const update_nvm)(struct e1000_hw *); 26751+ s32 (* const update)(struct e1000_hw *);
27370+ s32 (* const valid_led_default)(struct e1000_hw *, u16 *); 26752+ s32 (* const valid_led_default)(struct e1000_hw *, u16 *);
27371+ s32 (* const validate_nvm)(struct e1000_hw *); 26753+ s32 (* const validate)(struct e1000_hw *);
27372+ s32 (* const write_nvm)(struct e1000_hw *, u16, u16, u16 *); 26754+ s32 (* const write)(struct e1000_hw *, u16, u16, u16 *);
27373 }; 26755 };
27374 26756
27375 struct e1000_mac_info { 26757 struct e1000_mac_info {
27376diff -urNp linux-2.6.32.24/drivers/net/e1000e/ich8lan.c linux-2.6.32.24/drivers/net/e1000e/ich8lan.c 26758@@ -877,6 +877,7 @@ struct e1000_phy_info {
27377--- linux-2.6.32.24/drivers/net/e1000e/ich8lan.c 2010-08-13 16:24:37.000000000 -0400 26759 };
27378+++ linux-2.6.32.24/drivers/net/e1000e/ich8lan.c 2010-10-23 19:59:20.000000000 -0400 26760
27379@@ -3452,7 +3452,7 @@ static void e1000_clear_hw_cntrs_ich8lan 26761 struct e1000_nvm_info {
26762+ /* cannot be const */
26763 struct e1000_nvm_operations ops;
26764
26765 enum e1000_nvm_type type;
26766diff -urNp linux-2.6.35.7/drivers/net/e1000e/ich8lan.c linux-2.6.35.7/drivers/net/e1000e/ich8lan.c
26767--- linux-2.6.35.7/drivers/net/e1000e/ich8lan.c 2010-08-26 19:47:12.000000000 -0400
26768+++ linux-2.6.35.7/drivers/net/e1000e/ich8lan.c 2010-09-17 20:12:09.000000000 -0400
26769@@ -3388,7 +3388,7 @@ static void e1000_clear_hw_cntrs_ich8lan
27380 } 26770 }
27381 } 26771 }
27382 26772
@@ -27385,28 +26775,28 @@ diff -urNp linux-2.6.32.24/drivers/net/e1000e/ich8lan.c linux-2.6.32.24/drivers/
27385 .id_led_init = e1000e_id_led_init, 26775 .id_led_init = e1000e_id_led_init,
27386 .check_mng_mode = e1000_check_mng_mode_ich8lan, 26776 .check_mng_mode = e1000_check_mng_mode_ich8lan,
27387 .check_for_link = e1000_check_for_copper_link_ich8lan, 26777 .check_for_link = e1000_check_for_copper_link_ich8lan,
27388@@ -3470,7 +3470,7 @@ static struct e1000_mac_operations ich8_ 26778@@ -3407,7 +3407,7 @@ static struct e1000_mac_operations ich8_
27389 /* id_led_init dependent on mac type */ 26779 /* id_led_init dependent on mac type */
27390 }; 26780 };
27391 26781
27392-static struct e1000_phy_operations ich8_phy_ops = { 26782-static struct e1000_phy_operations ich8_phy_ops = {
27393+static const struct e1000_phy_operations ich8_phy_ops = { 26783+static const struct e1000_phy_operations ich8_phy_ops = {
27394 .acquire_phy = e1000_acquire_swflag_ich8lan, 26784 .acquire = e1000_acquire_swflag_ich8lan,
27395 .check_reset_block = e1000_check_reset_block_ich8lan, 26785 .check_reset_block = e1000_check_reset_block_ich8lan,
27396 .commit_phy = NULL, 26786 .commit = NULL,
27397@@ -3486,7 +3486,7 @@ static struct e1000_phy_operations ich8_ 26787@@ -3421,7 +3421,7 @@ static struct e1000_phy_operations ich8_
27398 .write_phy_reg = e1000e_write_phy_reg_igp, 26788 .write_reg = e1000e_write_phy_reg_igp,
27399 }; 26789 };
27400 26790
27401-static struct e1000_nvm_operations ich8_nvm_ops = { 26791-static struct e1000_nvm_operations ich8_nvm_ops = {
27402+static const struct e1000_nvm_operations ich8_nvm_ops = { 26792+static const struct e1000_nvm_operations ich8_nvm_ops = {
27403 .acquire_nvm = e1000_acquire_nvm_ich8lan, 26793 .acquire = e1000_acquire_nvm_ich8lan,
27404 .read_nvm = e1000_read_nvm_ich8lan, 26794 .read = e1000_read_nvm_ich8lan,
27405 .release_nvm = e1000_release_nvm_ich8lan, 26795 .release = e1000_release_nvm_ich8lan,
27406diff -urNp linux-2.6.32.24/drivers/net/eql.c linux-2.6.32.24/drivers/net/eql.c 26796diff -urNp linux-2.6.35.7/drivers/net/eql.c linux-2.6.35.7/drivers/net/eql.c
27407--- linux-2.6.32.24/drivers/net/eql.c 2010-09-26 17:26:05.000000000 -0400 26797--- linux-2.6.35.7/drivers/net/eql.c 2010-09-26 17:32:11.000000000 -0400
27408+++ linux-2.6.32.24/drivers/net/eql.c 2010-10-23 19:59:20.000000000 -0400 26798+++ linux-2.6.35.7/drivers/net/eql.c 2010-09-26 17:32:46.000000000 -0400
27409@@ -554,7 +554,7 @@ static int eql_g_master_cfg(struct net_d 26799@@ -555,7 +555,7 @@ static int eql_g_master_cfg(struct net_d
27410 equalizer_t *eql; 26800 equalizer_t *eql;
27411 master_config_t mc; 26801 master_config_t mc;
27412 26802
@@ -27415,31 +26805,19 @@ diff -urNp linux-2.6.32.24/drivers/net/eql.c linux-2.6.32.24/drivers/net/eql.c
27415 26805
27416 if (eql_is_master(dev)) { 26806 if (eql_is_master(dev)) {
27417 eql = netdev_priv(dev); 26807 eql = netdev_priv(dev);
27418diff -urNp linux-2.6.32.24/drivers/net/ibmveth.c linux-2.6.32.24/drivers/net/ibmveth.c 26808diff -urNp linux-2.6.35.7/drivers/net/igb/e1000_82575.c linux-2.6.35.7/drivers/net/igb/e1000_82575.c
27419--- linux-2.6.32.24/drivers/net/ibmveth.c 2010-08-13 16:24:37.000000000 -0400 26809--- linux-2.6.35.7/drivers/net/igb/e1000_82575.c 2010-08-26 19:47:12.000000000 -0400
27420+++ linux-2.6.32.24/drivers/net/ibmveth.c 2010-10-23 19:59:20.000000000 -0400 26810+++ linux-2.6.35.7/drivers/net/igb/e1000_82575.c 2010-09-17 20:12:09.000000000 -0400
27421@@ -1577,7 +1577,7 @@ static struct attribute * veth_pool_attr 26811@@ -1597,7 +1597,7 @@ u16 igb_rxpbs_adjust_82580(u32 data)
27422 NULL, 26812 return ret_val;
27423 };
27424
27425-static struct sysfs_ops veth_pool_ops = {
27426+static const struct sysfs_ops veth_pool_ops = {
27427 .show = veth_pool_show,
27428 .store = veth_pool_store,
27429 };
27430diff -urNp linux-2.6.32.24/drivers/net/igb/e1000_82575.c linux-2.6.32.24/drivers/net/igb/e1000_82575.c
27431--- linux-2.6.32.24/drivers/net/igb/e1000_82575.c 2010-08-13 16:24:37.000000000 -0400
27432+++ linux-2.6.32.24/drivers/net/igb/e1000_82575.c 2010-10-23 19:59:20.000000000 -0400
27433@@ -1410,7 +1410,7 @@ void igb_vmdq_set_replication_pf(struct
27434 wr32(E1000_VT_CTL, vt_ctl);
27435 } 26813 }
27436 26814
27437-static struct e1000_mac_operations e1000_mac_ops_82575 = { 26815-static struct e1000_mac_operations e1000_mac_ops_82575 = {
27438+static const struct e1000_mac_operations e1000_mac_ops_82575 = { 26816+static const struct e1000_mac_operations e1000_mac_ops_82575 = {
27439 .reset_hw = igb_reset_hw_82575,
27440 .init_hw = igb_init_hw_82575, 26817 .init_hw = igb_init_hw_82575,
27441 .check_for_link = igb_check_for_link_82575, 26818 .check_for_link = igb_check_for_link_82575,
27442@@ -1419,13 +1419,13 @@ static struct e1000_mac_operations e1000 26819 .rar_set = igb_rar_set,
26820@@ -1605,13 +1605,13 @@ static struct e1000_mac_operations e1000
27443 .get_speed_and_duplex = igb_get_speed_and_duplex_copper, 26821 .get_speed_and_duplex = igb_get_speed_and_duplex_copper,
27444 }; 26822 };
27445 26823
@@ -27455,10 +26833,10 @@ diff -urNp linux-2.6.32.24/drivers/net/igb/e1000_82575.c linux-2.6.32.24/drivers
27455 .acquire = igb_acquire_nvm_82575, 26833 .acquire = igb_acquire_nvm_82575,
27456 .read = igb_read_nvm_eerd, 26834 .read = igb_read_nvm_eerd,
27457 .release = igb_release_nvm_82575, 26835 .release = igb_release_nvm_82575,
27458diff -urNp linux-2.6.32.24/drivers/net/igb/e1000_hw.h linux-2.6.32.24/drivers/net/igb/e1000_hw.h 26836diff -urNp linux-2.6.35.7/drivers/net/igb/e1000_hw.h linux-2.6.35.7/drivers/net/igb/e1000_hw.h
27459--- linux-2.6.32.24/drivers/net/igb/e1000_hw.h 2010-08-13 16:24:37.000000000 -0400 26837--- linux-2.6.35.7/drivers/net/igb/e1000_hw.h 2010-08-26 19:47:12.000000000 -0400
27460+++ linux-2.6.32.24/drivers/net/igb/e1000_hw.h 2010-10-23 19:59:20.000000000 -0400 26838+++ linux-2.6.35.7/drivers/net/igb/e1000_hw.h 2010-09-17 20:12:09.000000000 -0400
27461@@ -305,17 +305,17 @@ struct e1000_phy_operations { 26839@@ -323,17 +323,17 @@ struct e1000_phy_operations {
27462 }; 26840 };
27463 26841
27464 struct e1000_nvm_operations { 26842 struct e1000_nvm_operations {
@@ -27483,9 +26861,17 @@ diff -urNp linux-2.6.32.24/drivers/net/igb/e1000_hw.h linux-2.6.32.24/drivers/ne
27483 }; 26861 };
27484 26862
27485 extern const struct e1000_info e1000_82575_info; 26863 extern const struct e1000_info e1000_82575_info;
27486diff -urNp linux-2.6.32.24/drivers/net/irda/vlsi_ir.c linux-2.6.32.24/drivers/net/irda/vlsi_ir.c 26864@@ -412,6 +412,7 @@ struct e1000_phy_info {
27487--- linux-2.6.32.24/drivers/net/irda/vlsi_ir.c 2010-08-13 16:24:37.000000000 -0400 26865 };
27488+++ linux-2.6.32.24/drivers/net/irda/vlsi_ir.c 2010-10-23 19:59:20.000000000 -0400 26866
26867 struct e1000_nvm_info {
26868+ /* cannot be const */
26869 struct e1000_nvm_operations ops;
26870
26871 enum e1000_nvm_type type;
26872diff -urNp linux-2.6.35.7/drivers/net/irda/vlsi_ir.c linux-2.6.35.7/drivers/net/irda/vlsi_ir.c
26873--- linux-2.6.35.7/drivers/net/irda/vlsi_ir.c 2010-08-26 19:47:12.000000000 -0400
26874+++ linux-2.6.35.7/drivers/net/irda/vlsi_ir.c 2010-09-17 20:12:09.000000000 -0400
27489@@ -907,13 +907,12 @@ static netdev_tx_t vlsi_hard_start_xmit( 26875@@ -907,13 +907,12 @@ static netdev_tx_t vlsi_hard_start_xmit(
27490 /* no race - tx-ring already empty */ 26876 /* no race - tx-ring already empty */
27491 vlsi_set_baud(idev, iobase); 26877 vlsi_set_baud(idev, iobase);
@@ -27502,31 +26888,10 @@ diff -urNp linux-2.6.32.24/drivers/net/irda/vlsi_ir.c linux-2.6.32.24/drivers/ne
27502 spin_unlock_irqrestore(&idev->lock, flags); 26888 spin_unlock_irqrestore(&idev->lock, flags);
27503 dev_kfree_skb_any(skb); 26889 dev_kfree_skb_any(skb);
27504 return NETDEV_TX_OK; 26890 return NETDEV_TX_OK;
27505diff -urNp linux-2.6.32.24/drivers/net/iseries_veth.c linux-2.6.32.24/drivers/net/iseries_veth.c 26891diff -urNp linux-2.6.35.7/drivers/net/pcnet32.c linux-2.6.35.7/drivers/net/pcnet32.c
27506--- linux-2.6.32.24/drivers/net/iseries_veth.c 2010-08-13 16:24:37.000000000 -0400 26892--- linux-2.6.35.7/drivers/net/pcnet32.c 2010-08-26 19:47:12.000000000 -0400
27507+++ linux-2.6.32.24/drivers/net/iseries_veth.c 2010-10-23 19:59:20.000000000 -0400 26893+++ linux-2.6.35.7/drivers/net/pcnet32.c 2010-09-17 20:12:09.000000000 -0400
27508@@ -384,7 +384,7 @@ static struct attribute *veth_cnx_defaul 26894@@ -82,7 +82,7 @@ static int cards_found;
27509 NULL
27510 };
27511
27512-static struct sysfs_ops veth_cnx_sysfs_ops = {
27513+static const struct sysfs_ops veth_cnx_sysfs_ops = {
27514 .show = veth_cnx_attribute_show
27515 };
27516
27517@@ -441,7 +441,7 @@ static struct attribute *veth_port_defau
27518 NULL
27519 };
27520
27521-static struct sysfs_ops veth_port_sysfs_ops = {
27522+static const struct sysfs_ops veth_port_sysfs_ops = {
27523 .show = veth_port_attribute_show
27524 };
27525
27526diff -urNp linux-2.6.32.24/drivers/net/pcnet32.c linux-2.6.32.24/drivers/net/pcnet32.c
27527--- linux-2.6.32.24/drivers/net/pcnet32.c 2010-08-13 16:24:37.000000000 -0400
27528+++ linux-2.6.32.24/drivers/net/pcnet32.c 2010-10-23 19:59:20.000000000 -0400
27529@@ -79,7 +79,7 @@ static int cards_found;
27530 /* 26895 /*
27531 * VLB I/O addresses 26896 * VLB I/O addresses
27532 */ 26897 */
@@ -27534,11 +26899,44 @@ diff -urNp linux-2.6.32.24/drivers/net/pcnet32.c linux-2.6.32.24/drivers/net/pcn
27534+static unsigned int pcnet32_portlist[] __devinitdata = 26899+static unsigned int pcnet32_portlist[] __devinitdata =
27535 { 0x300, 0x320, 0x340, 0x360, 0 }; 26900 { 0x300, 0x320, 0x340, 0x360, 0 };
27536 26901
27537 static int pcnet32_debug = 0; 26902 static int pcnet32_debug;
27538diff -urNp linux-2.6.32.24/drivers/net/tg3.h linux-2.6.32.24/drivers/net/tg3.h 26903diff -urNp linux-2.6.35.7/drivers/net/ppp_generic.c linux-2.6.35.7/drivers/net/ppp_generic.c
27539--- linux-2.6.32.24/drivers/net/tg3.h 2010-08-13 16:24:37.000000000 -0400 26904--- linux-2.6.35.7/drivers/net/ppp_generic.c 2010-08-26 19:47:12.000000000 -0400
27540+++ linux-2.6.32.24/drivers/net/tg3.h 2010-10-23 19:59:20.000000000 -0400 26905+++ linux-2.6.35.7/drivers/net/ppp_generic.c 2010-09-17 20:12:09.000000000 -0400
27541@@ -95,6 +95,7 @@ 26906@@ -992,7 +992,6 @@ ppp_net_ioctl(struct net_device *dev, st
26907 void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data;
26908 struct ppp_stats stats;
26909 struct ppp_comp_stats cstats;
26910- char *vers;
26911
26912 switch (cmd) {
26913 case SIOCGPPPSTATS:
26914@@ -1014,8 +1013,7 @@ ppp_net_ioctl(struct net_device *dev, st
26915 break;
26916
26917 case SIOCGPPPVER:
26918- vers = PPP_VERSION;
26919- if (copy_to_user(addr, vers, strlen(vers) + 1))
26920+ if (copy_to_user(addr, PPP_VERSION, sizeof(PPP_VERSION)))
26921 break;
26922 err = 0;
26923 break;
26924diff -urNp linux-2.6.35.7/drivers/net/tg3.c linux-2.6.35.7/drivers/net/tg3.c
26925--- linux-2.6.35.7/drivers/net/tg3.c 2010-08-26 19:47:12.000000000 -0400
26926+++ linux-2.6.35.7/drivers/net/tg3.c 2010-09-17 20:12:09.000000000 -0400
26927@@ -12410,7 +12410,7 @@ static void __devinit tg3_read_vpd(struc
26928 cnt = pci_read_vpd(tp->pdev, pos,
26929 TG3_NVM_VPD_LEN - pos,
26930 &vpd_data[pos]);
26931- if (cnt == -ETIMEDOUT || -EINTR)
26932+ if (cnt == -ETIMEDOUT || cnt == -EINTR)
26933 cnt = 0;
26934 else if (cnt < 0)
26935 goto out_not_found;
26936diff -urNp linux-2.6.35.7/drivers/net/tg3.h linux-2.6.35.7/drivers/net/tg3.h
26937--- linux-2.6.35.7/drivers/net/tg3.h 2010-08-26 19:47:12.000000000 -0400
26938+++ linux-2.6.35.7/drivers/net/tg3.h 2010-09-17 20:12:09.000000000 -0400
26939@@ -130,6 +130,7 @@
27542 #define CHIPREV_ID_5750_A0 0x4000 26940 #define CHIPREV_ID_5750_A0 0x4000
27543 #define CHIPREV_ID_5750_A1 0x4001 26941 #define CHIPREV_ID_5750_A1 0x4001
27544 #define CHIPREV_ID_5750_A3 0x4003 26942 #define CHIPREV_ID_5750_A3 0x4003
@@ -27546,28 +26944,28 @@ diff -urNp linux-2.6.32.24/drivers/net/tg3.h linux-2.6.32.24/drivers/net/tg3.h
27546 #define CHIPREV_ID_5750_C2 0x4202 26944 #define CHIPREV_ID_5750_C2 0x4202
27547 #define CHIPREV_ID_5752_A0_HW 0x5000 26945 #define CHIPREV_ID_5752_A0_HW 0x5000
27548 #define CHIPREV_ID_5752_A0 0x6000 26946 #define CHIPREV_ID_5752_A0 0x6000
27549diff -urNp linux-2.6.32.24/drivers/net/tulip/de4x5.c linux-2.6.32.24/drivers/net/tulip/de4x5.c 26947diff -urNp linux-2.6.35.7/drivers/net/tulip/de4x5.c linux-2.6.35.7/drivers/net/tulip/de4x5.c
27550--- linux-2.6.32.24/drivers/net/tulip/de4x5.c 2010-08-13 16:24:37.000000000 -0400 26948--- linux-2.6.35.7/drivers/net/tulip/de4x5.c 2010-08-26 19:47:12.000000000 -0400
27551+++ linux-2.6.32.24/drivers/net/tulip/de4x5.c 2010-10-23 19:59:20.000000000 -0400 26949+++ linux-2.6.35.7/drivers/net/tulip/de4x5.c 2010-09-17 20:12:37.000000000 -0400
27552@@ -5472,7 +5472,7 @@ de4x5_ioctl(struct net_device *dev, stru 26950@@ -5401,7 +5401,7 @@ de4x5_ioctl(struct net_device *dev, stru
27553 for (i=0; i<ETH_ALEN; i++) { 26951 for (i=0; i<ETH_ALEN; i++) {
27554 tmp.addr[i] = dev->dev_addr[i]; 26952 tmp.addr[i] = dev->dev_addr[i];
27555 } 26953 }
27556- if (copy_to_user(ioc->data, tmp.addr, ioc->len)) return -EFAULT; 26954- if (copy_to_user(ioc->data, tmp.addr, ioc->len)) return -EFAULT;
27557+ if (ioc->len > sizeof tmp.addr || copy_to_user(ioc->data, tmp.addr, ioc->len)) return -EFAULT; 26955+ if (ioc->len > sizeof(tmp.addr) || copy_to_user(ioc->data, tmp.addr, ioc->len)) return -EFAULT;
27558 break; 26956 break;
27559 26957
27560 case DE4X5_SET_HWADDR: /* Set the hardware address */ 26958 case DE4X5_SET_HWADDR: /* Set the hardware address */
27561@@ -5512,7 +5512,7 @@ de4x5_ioctl(struct net_device *dev, stru 26959@@ -5441,7 +5441,7 @@ de4x5_ioctl(struct net_device *dev, stru
27562 spin_lock_irqsave(&lp->lock, flags); 26960 spin_lock_irqsave(&lp->lock, flags);
27563 memcpy(&statbuf, &lp->pktStats, ioc->len); 26961 memcpy(&statbuf, &lp->pktStats, ioc->len);
27564 spin_unlock_irqrestore(&lp->lock, flags); 26962 spin_unlock_irqrestore(&lp->lock, flags);
27565- if (copy_to_user(ioc->data, &statbuf, ioc->len)) 26963- if (copy_to_user(ioc->data, &statbuf, ioc->len))
27566+ if (ioc->len > sizeof statbuf || copy_to_user(ioc->data, &statbuf, ioc->len)) 26964+ if (ioc->len > sizeof(statbuf) || copy_to_user(ioc->data, &statbuf, ioc->len))
27567 return -EFAULT; 26965 return -EFAULT;
27568 break; 26966 break;
27569 } 26967 }
27570@@ -5545,7 +5545,7 @@ de4x5_ioctl(struct net_device *dev, stru 26968@@ -5474,7 +5474,7 @@ de4x5_ioctl(struct net_device *dev, stru
27571 tmp.lval[6] = inl(DE4X5_STRR); j+=4; 26969 tmp.lval[6] = inl(DE4X5_STRR); j+=4;
27572 tmp.lval[7] = inl(DE4X5_SIGR); j+=4; 26970 tmp.lval[7] = inl(DE4X5_SIGR); j+=4;
27573 ioc->len = j; 26971 ioc->len = j;
@@ -27576,9 +26974,9 @@ diff -urNp linux-2.6.32.24/drivers/net/tulip/de4x5.c linux-2.6.32.24/drivers/net
27576 break; 26974 break;
27577 26975
27578 #define DE4X5_DUMP 0x0f /* Dump the DE4X5 Status */ 26976 #define DE4X5_DUMP 0x0f /* Dump the DE4X5 Status */
27579diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb/hso.c 26977diff -urNp linux-2.6.35.7/drivers/net/usb/hso.c linux-2.6.35.7/drivers/net/usb/hso.c
27580--- linux-2.6.32.24/drivers/net/usb/hso.c 2010-09-26 17:26:05.000000000 -0400 26978--- linux-2.6.35.7/drivers/net/usb/hso.c 2010-09-26 17:32:11.000000000 -0400
27581+++ linux-2.6.32.24/drivers/net/usb/hso.c 2010-10-23 19:59:20.000000000 -0400 26979+++ linux-2.6.35.7/drivers/net/usb/hso.c 2010-09-26 17:32:46.000000000 -0400
27582@@ -258,7 +258,7 @@ struct hso_serial { 26980@@ -258,7 +258,7 @@ struct hso_serial {
27583 26981
27584 /* from usb_serial_port */ 26982 /* from usb_serial_port */
@@ -27588,7 +26986,7 @@ diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb
27588 spinlock_t serial_lock; 26986 spinlock_t serial_lock;
27589 26987
27590 int (*write_data) (struct hso_serial *serial); 26988 int (*write_data) (struct hso_serial *serial);
27591@@ -1180,7 +1180,7 @@ static void put_rxbuf_data_and_resubmit_ 26989@@ -1201,7 +1201,7 @@ static void put_rxbuf_data_and_resubmit_
27592 struct urb *urb; 26990 struct urb *urb;
27593 26991
27594 urb = serial->rx_urb[0]; 26992 urb = serial->rx_urb[0];
@@ -27597,7 +26995,7 @@ diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb
27597 count = put_rxbuf_data(urb, serial); 26995 count = put_rxbuf_data(urb, serial);
27598 if (count == -1) 26996 if (count == -1)
27599 return; 26997 return;
27600@@ -1216,7 +1216,7 @@ static void hso_std_serial_read_bulk_cal 26998@@ -1237,7 +1237,7 @@ static void hso_std_serial_read_bulk_cal
27601 DUMP1(urb->transfer_buffer, urb->actual_length); 26999 DUMP1(urb->transfer_buffer, urb->actual_length);
27602 27000
27603 /* Anyone listening? */ 27001 /* Anyone listening? */
@@ -27606,17 +27004,17 @@ diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb
27606 return; 27004 return;
27607 27005
27608 if (status == 0) { 27006 if (status == 0) {
27609@@ -1311,8 +1311,7 @@ static int hso_serial_open(struct tty_st 27007@@ -1332,8 +1332,7 @@ static int hso_serial_open(struct tty_st
27610 spin_unlock_irq(&serial->serial_lock); 27008 spin_unlock_irq(&serial->serial_lock);
27611 27009
27612 /* check for port already opened, if not set the termios */ 27010 /* check for port already opened, if not set the termios */
27613- serial->open_count++; 27011- serial->open_count++;
27614- if (serial->open_count == 1) { 27012- if (serial->open_count == 1) {
27615+ if (atomic_inc_return(&serial->open_count) == 1) { 27013+ if (atomic_inc_return(&serial->open_count) == 1) {
27616 tty->low_latency = 1;
27617 serial->rx_state = RX_IDLE; 27014 serial->rx_state = RX_IDLE;
27618 /* Force default termio settings */ 27015 /* Force default termio settings */
27619@@ -1325,7 +1324,7 @@ static int hso_serial_open(struct tty_st 27016 _hso_serial_set_termios(tty, NULL);
27017@@ -1345,7 +1344,7 @@ static int hso_serial_open(struct tty_st
27620 result = hso_start_serial_device(serial->parent, GFP_KERNEL); 27018 result = hso_start_serial_device(serial->parent, GFP_KERNEL);
27621 if (result) { 27019 if (result) {
27622 hso_stop_serial_device(serial->parent); 27020 hso_stop_serial_device(serial->parent);
@@ -27625,7 +27023,7 @@ diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb
27625 kref_put(&serial->parent->ref, hso_serial_ref_free); 27023 kref_put(&serial->parent->ref, hso_serial_ref_free);
27626 } 27024 }
27627 } else { 27025 } else {
27628@@ -1362,10 +1361,10 @@ static void hso_serial_close(struct tty_ 27026@@ -1382,10 +1381,10 @@ static void hso_serial_close(struct tty_
27629 27027
27630 /* reset the rts and dtr */ 27028 /* reset the rts and dtr */
27631 /* do the actual close */ 27029 /* do the actual close */
@@ -27639,7 +27037,7 @@ diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb
27639 spin_lock_irq(&serial->serial_lock); 27037 spin_lock_irq(&serial->serial_lock);
27640 if (serial->tty == tty) { 27038 if (serial->tty == tty) {
27641 serial->tty->driver_data = NULL; 27039 serial->tty->driver_data = NULL;
27642@@ -1447,7 +1446,7 @@ static void hso_serial_set_termios(struc 27040@@ -1467,7 +1466,7 @@ static void hso_serial_set_termios(struc
27643 27041
27644 /* the actual setup */ 27042 /* the actual setup */
27645 spin_lock_irqsave(&serial->serial_lock, flags); 27043 spin_lock_irqsave(&serial->serial_lock, flags);
@@ -27648,7 +27046,7 @@ diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb
27648 _hso_serial_set_termios(tty, old); 27046 _hso_serial_set_termios(tty, old);
27649 else 27047 else
27650 tty->termios = old; 27048 tty->termios = old;
27651@@ -1634,10 +1633,11 @@ static int hso_get_count(struct hso_seri 27049@@ -1653,10 +1652,11 @@ static int hso_get_count(struct hso_seri
27652 struct uart_icount cnow; 27050 struct uart_icount cnow;
27653 struct hso_tiocmget *tiocmget = serial->tiocmget; 27051 struct hso_tiocmget *tiocmget = serial->tiocmget;
27654 27052
@@ -27662,7 +27060,16 @@ diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb
27662 spin_lock_irq(&serial->serial_lock); 27060 spin_lock_irq(&serial->serial_lock);
27663 memcpy(&cnow, &tiocmget->icount, sizeof(struct uart_icount)); 27061 memcpy(&cnow, &tiocmget->icount, sizeof(struct uart_icount));
27664 spin_unlock_irq(&serial->serial_lock); 27062 spin_unlock_irq(&serial->serial_lock);
27665@@ -3097,7 +3097,7 @@ static int hso_resume(struct usb_interfa 27063@@ -1931,7 +1931,7 @@ static void intr_callback(struct urb *ur
27064 D1("Pending read interrupt on port %d\n", i);
27065 spin_lock(&serial->serial_lock);
27066 if (serial->rx_state == RX_IDLE &&
27067- serial->open_count > 0) {
27068+ atomic_read(&serial->open_count) > 0) {
27069 /* Setup and send a ctrl req read on
27070 * port i */
27071 if (!serial->rx_urb_filled[0]) {
27072@@ -3121,7 +3121,7 @@ static int hso_resume(struct usb_interfa
27666 /* Start all serial ports */ 27073 /* Start all serial ports */
27667 for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) { 27074 for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) {
27668 if (serial_table[i] && (serial_table[i]->interface == iface)) { 27075 if (serial_table[i] && (serial_table[i]->interface == iface)) {
@@ -27671,9 +27078,9 @@ diff -urNp linux-2.6.32.24/drivers/net/usb/hso.c linux-2.6.32.24/drivers/net/usb
27671 result = 27078 result =
27672 hso_start_serial_device(serial_table[i], GFP_NOIO); 27079 hso_start_serial_device(serial_table[i], GFP_NOIO);
27673 hso_kick_transmit(dev2ser(serial_table[i])); 27080 hso_kick_transmit(dev2ser(serial_table[i]));
27674diff -urNp linux-2.6.32.24/drivers/net/wireless/b43/debugfs.c linux-2.6.32.24/drivers/net/wireless/b43/debugfs.c 27081diff -urNp linux-2.6.35.7/drivers/net/wireless/b43/debugfs.c linux-2.6.35.7/drivers/net/wireless/b43/debugfs.c
27675--- linux-2.6.32.24/drivers/net/wireless/b43/debugfs.c 2010-08-13 16:24:37.000000000 -0400 27082--- linux-2.6.35.7/drivers/net/wireless/b43/debugfs.c 2010-08-26 19:47:12.000000000 -0400
27676+++ linux-2.6.32.24/drivers/net/wireless/b43/debugfs.c 2010-10-23 19:59:20.000000000 -0400 27083+++ linux-2.6.35.7/drivers/net/wireless/b43/debugfs.c 2010-09-17 20:12:09.000000000 -0400
27677@@ -43,7 +43,7 @@ static struct dentry *rootdir; 27084@@ -43,7 +43,7 @@ static struct dentry *rootdir;
27678 struct b43_debugfs_fops { 27085 struct b43_debugfs_fops {
27679 ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize); 27086 ssize_t (*read)(struct b43_wldev *dev, char *buf, size_t bufsize);
@@ -27683,9 +27090,9 @@ diff -urNp linux-2.6.32.24/drivers/net/wireless/b43/debugfs.c linux-2.6.32.24/dr
27683 /* Offset of struct b43_dfs_file in struct b43_dfsentry */ 27090 /* Offset of struct b43_dfs_file in struct b43_dfsentry */
27684 size_t file_struct_offset; 27091 size_t file_struct_offset;
27685 }; 27092 };
27686diff -urNp linux-2.6.32.24/drivers/net/wireless/b43legacy/debugfs.c linux-2.6.32.24/drivers/net/wireless/b43legacy/debugfs.c 27093diff -urNp linux-2.6.35.7/drivers/net/wireless/b43legacy/debugfs.c linux-2.6.35.7/drivers/net/wireless/b43legacy/debugfs.c
27687--- linux-2.6.32.24/drivers/net/wireless/b43legacy/debugfs.c 2010-08-13 16:24:37.000000000 -0400 27094--- linux-2.6.35.7/drivers/net/wireless/b43legacy/debugfs.c 2010-08-26 19:47:12.000000000 -0400
27688+++ linux-2.6.32.24/drivers/net/wireless/b43legacy/debugfs.c 2010-10-23 19:59:20.000000000 -0400 27095+++ linux-2.6.35.7/drivers/net/wireless/b43legacy/debugfs.c 2010-09-17 20:12:09.000000000 -0400
27689@@ -44,7 +44,7 @@ static struct dentry *rootdir; 27096@@ -44,7 +44,7 @@ static struct dentry *rootdir;
27690 struct b43legacy_debugfs_fops { 27097 struct b43legacy_debugfs_fops {
27691 ssize_t (*read)(struct b43legacy_wldev *dev, char *buf, size_t bufsize); 27098 ssize_t (*read)(struct b43legacy_wldev *dev, char *buf, size_t bufsize);
@@ -27695,79 +27102,11 @@ diff -urNp linux-2.6.32.24/drivers/net/wireless/b43legacy/debugfs.c linux-2.6.32
27695 /* Offset of struct b43legacy_dfs_file in struct b43legacy_dfsentry */ 27102 /* Offset of struct b43legacy_dfs_file in struct b43legacy_dfsentry */
27696 size_t file_struct_offset; 27103 size_t file_struct_offset;
27697 /* Take wl->irq_lock before calling read/write? */ 27104 /* Take wl->irq_lock before calling read/write? */
27698diff -urNp linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-1000.c linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-1000.c 27105diff -urNp linux-2.6.35.7/drivers/net/wireless/iwlwifi/iwl-debug.h linux-2.6.35.7/drivers/net/wireless/iwlwifi/iwl-debug.h
27699--- linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-1000.c 2010-08-13 16:24:37.000000000 -0400 27106--- linux-2.6.35.7/drivers/net/wireless/iwlwifi/iwl-debug.h 2010-08-26 19:47:12.000000000 -0400
27700+++ linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-1000.c 2010-10-23 19:59:20.000000000 -0400 27107+++ linux-2.6.35.7/drivers/net/wireless/iwlwifi/iwl-debug.h 2010-09-17 20:12:09.000000000 -0400
27701@@ -137,7 +137,7 @@ static struct iwl_lib_ops iwl1000_lib = 27108@@ -68,8 +68,8 @@ do {
27702 }, 27109 } while (0)
27703 };
27704
27705-static struct iwl_ops iwl1000_ops = {
27706+static const struct iwl_ops iwl1000_ops = {
27707 .ucode = &iwl5000_ucode,
27708 .lib = &iwl1000_lib,
27709 .hcmd = &iwl5000_hcmd,
27710diff -urNp linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-3945.c linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-3945.c
27711--- linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-3945.c 2010-08-13 16:24:37.000000000 -0400
27712+++ linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-3945.c 2010-10-23 19:59:20.000000000 -0400
27713@@ -2874,7 +2874,7 @@ static struct iwl_hcmd_utils_ops iwl3945
27714 .build_addsta_hcmd = iwl3945_build_addsta_hcmd,
27715 };
27716
27717-static struct iwl_ops iwl3945_ops = {
27718+static const struct iwl_ops iwl3945_ops = {
27719 .ucode = &iwl3945_ucode,
27720 .lib = &iwl3945_lib,
27721 .hcmd = &iwl3945_hcmd,
27722diff -urNp linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-4965.c linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-4965.c
27723--- linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-4965.c 2010-08-13 16:24:37.000000000 -0400
27724+++ linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-4965.c 2010-10-23 19:59:20.000000000 -0400
27725@@ -2345,7 +2345,7 @@ static struct iwl_lib_ops iwl4965_lib =
27726 },
27727 };
27728
27729-static struct iwl_ops iwl4965_ops = {
27730+static const struct iwl_ops iwl4965_ops = {
27731 .ucode = &iwl4965_ucode,
27732 .lib = &iwl4965_lib,
27733 .hcmd = &iwl4965_hcmd,
27734diff -urNp linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-5000.c linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-5000.c
27735--- linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-5000.c 2010-08-13 16:24:37.000000000 -0400
27736+++ linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-5000.c 2010-10-23 19:59:20.000000000 -0400
27737@@ -1633,14 +1633,14 @@ static struct iwl_lib_ops iwl5150_lib =
27738 },
27739 };
27740
27741-struct iwl_ops iwl5000_ops = {
27742+const struct iwl_ops iwl5000_ops = {
27743 .ucode = &iwl5000_ucode,
27744 .lib = &iwl5000_lib,
27745 .hcmd = &iwl5000_hcmd,
27746 .utils = &iwl5000_hcmd_utils,
27747 };
27748
27749-static struct iwl_ops iwl5150_ops = {
27750+static const struct iwl_ops iwl5150_ops = {
27751 .ucode = &iwl5000_ucode,
27752 .lib = &iwl5150_lib,
27753 .hcmd = &iwl5000_hcmd,
27754diff -urNp linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-6000.c linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-6000.c
27755--- linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-6000.c 2010-08-13 16:24:37.000000000 -0400
27756+++ linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-6000.c 2010-10-23 19:59:20.000000000 -0400
27757@@ -146,7 +146,7 @@ static struct iwl_hcmd_utils_ops iwl6000
27758 .calc_rssi = iwl5000_calc_rssi,
27759 };
27760
27761-static struct iwl_ops iwl6000_ops = {
27762+static const struct iwl_ops iwl6000_ops = {
27763 .ucode = &iwl5000_ucode,
27764 .lib = &iwl6000_lib,
27765 .hcmd = &iwl5000_hcmd,
27766diff -urNp linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-debug.h linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-debug.h
27767--- linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-debug.h 2010-08-13 16:24:37.000000000 -0400
27768+++ linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-debug.h 2010-10-23 19:59:20.000000000 -0400
27769@@ -118,8 +118,8 @@ void iwl_dbgfs_unregister(struct iwl_pri
27770 #endif
27771 27110
27772 #else 27111 #else
27773-#define IWL_DEBUG(__priv, level, fmt, args...) 27112-#define IWL_DEBUG(__priv, level, fmt, args...)
@@ -27777,22 +27116,10 @@ diff -urNp linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-debug.h linux-2.6.32
27777 static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level, 27116 static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
27778 void *p, u32 len) 27117 void *p, u32 len)
27779 {} 27118 {}
27780diff -urNp linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-dev.h linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-dev.h 27119diff -urNp linux-2.6.35.7/drivers/net/wireless/libertas/debugfs.c linux-2.6.35.7/drivers/net/wireless/libertas/debugfs.c
27781--- linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-08-13 16:24:37.000000000 -0400 27120--- linux-2.6.35.7/drivers/net/wireless/libertas/debugfs.c 2010-08-26 19:47:12.000000000 -0400
27782+++ linux-2.6.32.24/drivers/net/wireless/iwlwifi/iwl-dev.h 2010-10-23 19:59:20.000000000 -0400 27121+++ linux-2.6.35.7/drivers/net/wireless/libertas/debugfs.c 2010-09-17 20:12:09.000000000 -0400
27783@@ -68,7 +68,7 @@ struct iwl_tx_queue; 27122@@ -718,7 +718,7 @@ out_unlock:
27784
27785 /* shared structures from iwl-5000.c */
27786 extern struct iwl_mod_params iwl50_mod_params;
27787-extern struct iwl_ops iwl5000_ops;
27788+extern const struct iwl_ops iwl5000_ops;
27789 extern struct iwl_ucode_ops iwl5000_ucode;
27790 extern struct iwl_lib_ops iwl5000_lib;
27791 extern struct iwl_hcmd_ops iwl5000_hcmd;
27792diff -urNp linux-2.6.32.24/drivers/net/wireless/libertas/debugfs.c linux-2.6.32.24/drivers/net/wireless/libertas/debugfs.c
27793--- linux-2.6.32.24/drivers/net/wireless/libertas/debugfs.c 2010-08-13 16:24:37.000000000 -0400
27794+++ linux-2.6.32.24/drivers/net/wireless/libertas/debugfs.c 2010-10-23 19:59:20.000000000 -0400
27795@@ -708,7 +708,7 @@ out_unlock:
27796 struct lbs_debugfs_files { 27123 struct lbs_debugfs_files {
27797 const char *name; 27124 const char *name;
27798 int perm; 27125 int perm;
@@ -27801,22 +27128,22 @@ diff -urNp linux-2.6.32.24/drivers/net/wireless/libertas/debugfs.c linux-2.6.32.
27801 }; 27128 };
27802 27129
27803 static const struct lbs_debugfs_files debugfs_files[] = { 27130 static const struct lbs_debugfs_files debugfs_files[] = {
27804diff -urNp linux-2.6.32.24/drivers/net/wireless/rndis_wlan.c linux-2.6.32.24/drivers/net/wireless/rndis_wlan.c 27131diff -urNp linux-2.6.35.7/drivers/net/wireless/rndis_wlan.c linux-2.6.35.7/drivers/net/wireless/rndis_wlan.c
27805--- linux-2.6.32.24/drivers/net/wireless/rndis_wlan.c 2010-08-13 16:24:37.000000000 -0400 27132--- linux-2.6.35.7/drivers/net/wireless/rndis_wlan.c 2010-08-26 19:47:12.000000000 -0400
27806+++ linux-2.6.32.24/drivers/net/wireless/rndis_wlan.c 2010-10-23 19:59:20.000000000 -0400 27133+++ linux-2.6.35.7/drivers/net/wireless/rndis_wlan.c 2010-09-17 20:12:09.000000000 -0400
27807@@ -1176,7 +1176,7 @@ static int set_rts_threshold(struct usbn 27134@@ -1235,7 +1235,7 @@ static int set_rts_threshold(struct usbn
27808 27135
27809 devdbg(usbdev, "set_rts_threshold %i", rts_threshold); 27136 netdev_dbg(usbdev->net, "%s(): %i\n", __func__, rts_threshold);
27810 27137
27811- if (rts_threshold < 0 || rts_threshold > 2347) 27138- if (rts_threshold < 0 || rts_threshold > 2347)
27812+ if (rts_threshold > 2347) 27139+ if (rts_threshold > 2347)
27813 rts_threshold = 2347; 27140 rts_threshold = 2347;
27814 27141
27815 tmp = cpu_to_le32(rts_threshold); 27142 tmp = cpu_to_le32(rts_threshold);
27816diff -urNp linux-2.6.32.24/drivers/oprofile/buffer_sync.c linux-2.6.32.24/drivers/oprofile/buffer_sync.c 27143diff -urNp linux-2.6.35.7/drivers/oprofile/buffer_sync.c linux-2.6.35.7/drivers/oprofile/buffer_sync.c
27817--- linux-2.6.32.24/drivers/oprofile/buffer_sync.c 2010-09-20 17:26:42.000000000 -0400 27144--- linux-2.6.35.7/drivers/oprofile/buffer_sync.c 2010-09-20 17:33:09.000000000 -0400
27818+++ linux-2.6.32.24/drivers/oprofile/buffer_sync.c 2010-10-23 19:59:20.000000000 -0400 27145+++ linux-2.6.35.7/drivers/oprofile/buffer_sync.c 2010-09-20 17:33:32.000000000 -0400
27819@@ -341,7 +341,7 @@ static void add_data(struct op_entry *en 27146@@ -342,7 +342,7 @@ static void add_data(struct op_entry *en
27820 if (cookie == NO_COOKIE) 27147 if (cookie == NO_COOKIE)
27821 offset = pc; 27148 offset = pc;
27822 if (cookie == INVALID_COOKIE) { 27149 if (cookie == INVALID_COOKIE) {
@@ -27825,7 +27152,7 @@ diff -urNp linux-2.6.32.24/drivers/oprofile/buffer_sync.c linux-2.6.32.24/driver
27825 offset = pc; 27152 offset = pc;
27826 } 27153 }
27827 if (cookie != last_cookie) { 27154 if (cookie != last_cookie) {
27828@@ -385,14 +385,14 @@ add_sample(struct mm_struct *mm, struct 27155@@ -386,14 +386,14 @@ add_sample(struct mm_struct *mm, struct
27829 /* add userspace sample */ 27156 /* add userspace sample */
27830 27157
27831 if (!mm) { 27158 if (!mm) {
@@ -27842,7 +27169,7 @@ diff -urNp linux-2.6.32.24/drivers/oprofile/buffer_sync.c linux-2.6.32.24/driver
27842 return 0; 27169 return 0;
27843 } 27170 }
27844 27171
27845@@ -561,7 +561,7 @@ void sync_buffer(int cpu) 27172@@ -562,7 +562,7 @@ void sync_buffer(int cpu)
27846 /* ignore backtraces if failed to add a sample */ 27173 /* ignore backtraces if failed to add a sample */
27847 if (state == sb_bt_start) { 27174 if (state == sb_bt_start) {
27848 state = sb_bt_ignore; 27175 state = sb_bt_ignore;
@@ -27851,9 +27178,9 @@ diff -urNp linux-2.6.32.24/drivers/oprofile/buffer_sync.c linux-2.6.32.24/driver
27851 } 27178 }
27852 } 27179 }
27853 release_mm(mm); 27180 release_mm(mm);
27854diff -urNp linux-2.6.32.24/drivers/oprofile/event_buffer.c linux-2.6.32.24/drivers/oprofile/event_buffer.c 27181diff -urNp linux-2.6.35.7/drivers/oprofile/event_buffer.c linux-2.6.35.7/drivers/oprofile/event_buffer.c
27855--- linux-2.6.32.24/drivers/oprofile/event_buffer.c 2010-08-13 16:24:37.000000000 -0400 27182--- linux-2.6.35.7/drivers/oprofile/event_buffer.c 2010-08-26 19:47:12.000000000 -0400
27856+++ linux-2.6.32.24/drivers/oprofile/event_buffer.c 2010-10-23 19:59:20.000000000 -0400 27183+++ linux-2.6.35.7/drivers/oprofile/event_buffer.c 2010-09-17 20:12:09.000000000 -0400
27857@@ -53,7 +53,7 @@ void add_event_entry(unsigned long value 27184@@ -53,7 +53,7 @@ void add_event_entry(unsigned long value
27858 } 27185 }
27859 27186
@@ -27863,9 +27190,9 @@ diff -urNp linux-2.6.32.24/drivers/oprofile/event_buffer.c linux-2.6.32.24/drive
27863 return; 27190 return;
27864 } 27191 }
27865 27192
27866diff -urNp linux-2.6.32.24/drivers/oprofile/oprof.c linux-2.6.32.24/drivers/oprofile/oprof.c 27193diff -urNp linux-2.6.35.7/drivers/oprofile/oprof.c linux-2.6.35.7/drivers/oprofile/oprof.c
27867--- linux-2.6.32.24/drivers/oprofile/oprof.c 2010-08-13 16:24:37.000000000 -0400 27194--- linux-2.6.35.7/drivers/oprofile/oprof.c 2010-08-26 19:47:12.000000000 -0400
27868+++ linux-2.6.32.24/drivers/oprofile/oprof.c 2010-10-23 19:59:20.000000000 -0400 27195+++ linux-2.6.35.7/drivers/oprofile/oprof.c 2010-09-17 20:12:09.000000000 -0400
27869@@ -110,7 +110,7 @@ static void switch_worker(struct work_st 27196@@ -110,7 +110,7 @@ static void switch_worker(struct work_st
27870 if (oprofile_ops.switch_events()) 27197 if (oprofile_ops.switch_events())
27871 return; 27198 return;
@@ -27875,9 +27202,9 @@ diff -urNp linux-2.6.32.24/drivers/oprofile/oprof.c linux-2.6.32.24/drivers/opro
27875 start_switch_worker(); 27202 start_switch_worker();
27876 } 27203 }
27877 27204
27878diff -urNp linux-2.6.32.24/drivers/oprofile/oprofilefs.c linux-2.6.32.24/drivers/oprofile/oprofilefs.c 27205diff -urNp linux-2.6.35.7/drivers/oprofile/oprofilefs.c linux-2.6.35.7/drivers/oprofile/oprofilefs.c
27879--- linux-2.6.32.24/drivers/oprofile/oprofilefs.c 2010-08-13 16:24:37.000000000 -0400 27206--- linux-2.6.35.7/drivers/oprofile/oprofilefs.c 2010-08-26 19:47:12.000000000 -0400
27880+++ linux-2.6.32.24/drivers/oprofile/oprofilefs.c 2010-10-23 19:59:20.000000000 -0400 27207+++ linux-2.6.35.7/drivers/oprofile/oprofilefs.c 2010-09-17 20:12:09.000000000 -0400
27881@@ -187,7 +187,7 @@ static const struct file_operations atom 27208@@ -187,7 +187,7 @@ static const struct file_operations atom
27882 27209
27883 27210
@@ -27887,9 +27214,9 @@ diff -urNp linux-2.6.32.24/drivers/oprofile/oprofilefs.c linux-2.6.32.24/drivers
27887 { 27214 {
27888 struct dentry *d = __oprofilefs_create_file(sb, root, name, 27215 struct dentry *d = __oprofilefs_create_file(sb, root, name,
27889 &atomic_ro_fops, 0444); 27216 &atomic_ro_fops, 0444);
27890diff -urNp linux-2.6.32.24/drivers/oprofile/oprofile_stats.c linux-2.6.32.24/drivers/oprofile/oprofile_stats.c 27217diff -urNp linux-2.6.35.7/drivers/oprofile/oprofile_stats.c linux-2.6.35.7/drivers/oprofile/oprofile_stats.c
27891--- linux-2.6.32.24/drivers/oprofile/oprofile_stats.c 2010-08-13 16:24:37.000000000 -0400 27218--- linux-2.6.35.7/drivers/oprofile/oprofile_stats.c 2010-08-26 19:47:12.000000000 -0400
27892+++ linux-2.6.32.24/drivers/oprofile/oprofile_stats.c 2010-10-23 19:59:20.000000000 -0400 27219+++ linux-2.6.35.7/drivers/oprofile/oprofile_stats.c 2010-09-17 20:12:09.000000000 -0400
27893@@ -30,11 +30,11 @@ void oprofile_reset_stats(void) 27220@@ -30,11 +30,11 @@ void oprofile_reset_stats(void)
27894 cpu_buf->sample_invalid_eip = 0; 27221 cpu_buf->sample_invalid_eip = 0;
27895 } 27222 }
@@ -27907,9 +27234,9 @@ diff -urNp linux-2.6.32.24/drivers/oprofile/oprofile_stats.c linux-2.6.32.24/dri
27907 } 27234 }
27908 27235
27909 27236
27910diff -urNp linux-2.6.32.24/drivers/oprofile/oprofile_stats.h linux-2.6.32.24/drivers/oprofile/oprofile_stats.h 27237diff -urNp linux-2.6.35.7/drivers/oprofile/oprofile_stats.h linux-2.6.35.7/drivers/oprofile/oprofile_stats.h
27911--- linux-2.6.32.24/drivers/oprofile/oprofile_stats.h 2010-08-13 16:24:37.000000000 -0400 27238--- linux-2.6.35.7/drivers/oprofile/oprofile_stats.h 2010-08-26 19:47:12.000000000 -0400
27912+++ linux-2.6.32.24/drivers/oprofile/oprofile_stats.h 2010-10-23 19:59:20.000000000 -0400 27239+++ linux-2.6.35.7/drivers/oprofile/oprofile_stats.h 2010-09-17 20:12:09.000000000 -0400
27913@@ -13,11 +13,11 @@ 27240@@ -13,11 +13,11 @@
27914 #include <asm/atomic.h> 27241 #include <asm/atomic.h>
27915 27242
@@ -27927,27 +27254,15 @@ diff -urNp linux-2.6.32.24/drivers/oprofile/oprofile_stats.h linux-2.6.32.24/dri
27927 }; 27254 };
27928 27255
27929 extern struct oprofile_stat_struct oprofile_stats; 27256 extern struct oprofile_stat_struct oprofile_stats;
27930diff -urNp linux-2.6.32.24/drivers/parisc/pdc_stable.c linux-2.6.32.24/drivers/parisc/pdc_stable.c 27257diff -urNp linux-2.6.35.7/drivers/parport/procfs.c linux-2.6.35.7/drivers/parport/procfs.c
27931--- linux-2.6.32.24/drivers/parisc/pdc_stable.c 2010-08-13 16:24:37.000000000 -0400 27258--- linux-2.6.35.7/drivers/parport/procfs.c 2010-08-26 19:47:12.000000000 -0400
27932+++ linux-2.6.32.24/drivers/parisc/pdc_stable.c 2010-10-23 19:59:20.000000000 -0400 27259+++ linux-2.6.35.7/drivers/parport/procfs.c 2010-09-17 20:12:37.000000000 -0400
27933@@ -481,7 +481,7 @@ pdcspath_attr_store(struct kobject *kobj
27934 return ret;
27935 }
27936
27937-static struct sysfs_ops pdcspath_attr_ops = {
27938+static const struct sysfs_ops pdcspath_attr_ops = {
27939 .show = pdcspath_attr_show,
27940 .store = pdcspath_attr_store,
27941 };
27942diff -urNp linux-2.6.32.24/drivers/parport/procfs.c linux-2.6.32.24/drivers/parport/procfs.c
27943--- linux-2.6.32.24/drivers/parport/procfs.c 2010-08-13 16:24:37.000000000 -0400
27944+++ linux-2.6.32.24/drivers/parport/procfs.c 2010-10-23 19:59:20.000000000 -0400
27945@@ -64,7 +64,7 @@ static int do_active_device(ctl_table *t 27260@@ -64,7 +64,7 @@ static int do_active_device(ctl_table *t
27946 27261
27947 *ppos += len; 27262 *ppos += len;
27948 27263
27949- return copy_to_user(result, buffer, len) ? -EFAULT : 0; 27264- return copy_to_user(result, buffer, len) ? -EFAULT : 0;
27950+ return (len > sizeof buffer || copy_to_user(result, buffer, len)) ? -EFAULT : 0; 27265+ return (len > sizeof(buffer) || copy_to_user(result, buffer, len)) ? -EFAULT : 0;
27951 } 27266 }
27952 27267
27953 #ifdef CONFIG_PARPORT_1284 27268 #ifdef CONFIG_PARPORT_1284
@@ -27956,14 +27271,14 @@ diff -urNp linux-2.6.32.24/drivers/parport/procfs.c linux-2.6.32.24/drivers/parp
27956 *ppos += len; 27271 *ppos += len;
27957 27272
27958- return copy_to_user (result, buffer, len) ? -EFAULT : 0; 27273- return copy_to_user (result, buffer, len) ? -EFAULT : 0;
27959+ return (len > sizeof buffer || copy_to_user (result, buffer, len)) ? -EFAULT : 0; 27274+ return (len > sizeof(buffer) || copy_to_user (result, buffer, len)) ? -EFAULT : 0;
27960 } 27275 }
27961 #endif /* IEEE1284.3 support. */ 27276 #endif /* IEEE1284.3 support. */
27962 27277
27963diff -urNp linux-2.6.32.24/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.32.24/drivers/pci/hotplug/acpiphp_glue.c 27278diff -urNp linux-2.6.35.7/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.35.7/drivers/pci/hotplug/acpiphp_glue.c
27964--- linux-2.6.32.24/drivers/pci/hotplug/acpiphp_glue.c 2010-08-13 16:24:37.000000000 -0400 27279--- linux-2.6.35.7/drivers/pci/hotplug/acpiphp_glue.c 2010-08-26 19:47:12.000000000 -0400
27965+++ linux-2.6.32.24/drivers/pci/hotplug/acpiphp_glue.c 2010-10-23 19:59:20.000000000 -0400 27280+++ linux-2.6.35.7/drivers/pci/hotplug/acpiphp_glue.c 2010-09-17 20:12:09.000000000 -0400
27966@@ -111,7 +111,7 @@ static int post_dock_fixups(struct notif 27281@@ -110,7 +110,7 @@ static int post_dock_fixups(struct notif
27967 } 27282 }
27968 27283
27969 27284
@@ -27972,9 +27287,9 @@ diff -urNp linux-2.6.32.24/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.32.24/dr
27972 .handler = handle_hotplug_event_func, 27287 .handler = handle_hotplug_event_func,
27973 }; 27288 };
27974 27289
27975diff -urNp linux-2.6.32.24/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.32.24/drivers/pci/hotplug/cpqphp_nvram.c 27290diff -urNp linux-2.6.35.7/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.35.7/drivers/pci/hotplug/cpqphp_nvram.c
27976--- linux-2.6.32.24/drivers/pci/hotplug/cpqphp_nvram.c 2010-08-13 16:24:37.000000000 -0400 27291--- linux-2.6.35.7/drivers/pci/hotplug/cpqphp_nvram.c 2010-08-26 19:47:12.000000000 -0400
27977+++ linux-2.6.32.24/drivers/pci/hotplug/cpqphp_nvram.c 2010-10-23 19:59:20.000000000 -0400 27292+++ linux-2.6.35.7/drivers/pci/hotplug/cpqphp_nvram.c 2010-09-17 20:12:09.000000000 -0400
27978@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_ 27293@@ -428,9 +428,13 @@ static u32 store_HRT (void __iomem *rom_
27979 27294
27980 void compaq_nvram_init (void __iomem *rom_start) 27295 void compaq_nvram_init (void __iomem *rom_start)
@@ -27989,82 +27304,10 @@ diff -urNp linux-2.6.32.24/drivers/pci/hotplug/cpqphp_nvram.c linux-2.6.32.24/dr
27989 dbg("int15 entry = %p\n", compaq_int15_entry_point); 27304 dbg("int15 entry = %p\n", compaq_int15_entry_point);
27990 27305
27991 /* initialize our int15 lock */ 27306 /* initialize our int15 lock */
27992diff -urNp linux-2.6.32.24/drivers/pci/hotplug/fakephp.c linux-2.6.32.24/drivers/pci/hotplug/fakephp.c 27307diff -urNp linux-2.6.35.7/drivers/pci/intel-iommu.c linux-2.6.35.7/drivers/pci/intel-iommu.c
27993--- linux-2.6.32.24/drivers/pci/hotplug/fakephp.c 2010-08-13 16:24:37.000000000 -0400 27308--- linux-2.6.35.7/drivers/pci/intel-iommu.c 2010-09-26 17:32:11.000000000 -0400
27994+++ linux-2.6.32.24/drivers/pci/hotplug/fakephp.c 2010-10-23 19:59:20.000000000 -0400 27309+++ linux-2.6.35.7/drivers/pci/intel-iommu.c 2010-09-26 17:32:46.000000000 -0400
27995@@ -73,7 +73,7 @@ static void legacy_release(struct kobjec 27310@@ -2934,7 +2934,7 @@ static int intel_mapping_error(struct de
27996 }
27997
27998 static struct kobj_type legacy_ktype = {
27999- .sysfs_ops = &(struct sysfs_ops){
28000+ .sysfs_ops = &(const struct sysfs_ops){
28001 .store = legacy_store, .show = legacy_show
28002 },
28003 .release = &legacy_release,
28004diff -urNp linux-2.6.32.24/drivers/pci/intel-iommu.c linux-2.6.32.24/drivers/pci/intel-iommu.c
28005--- linux-2.6.32.24/drivers/pci/intel-iommu.c 2010-09-26 17:26:05.000000000 -0400
28006+++ linux-2.6.32.24/drivers/pci/intel-iommu.c 2010-10-23 19:59:20.000000000 -0400
28007@@ -2643,7 +2643,7 @@ error:
28008 return 0;
28009 }
28010
28011-static dma_addr_t intel_map_page(struct device *dev, struct page *page,
28012+dma_addr_t intel_map_page(struct device *dev, struct page *page,
28013 unsigned long offset, size_t size,
28014 enum dma_data_direction dir,
28015 struct dma_attrs *attrs)
28016@@ -2719,7 +2719,7 @@ static void add_unmap(struct dmar_domain
28017 spin_unlock_irqrestore(&async_umap_flush_lock, flags);
28018 }
28019
28020-static void intel_unmap_page(struct device *dev, dma_addr_t dev_addr,
28021+void intel_unmap_page(struct device *dev, dma_addr_t dev_addr,
28022 size_t size, enum dma_data_direction dir,
28023 struct dma_attrs *attrs)
28024 {
28025@@ -2768,7 +2768,7 @@ static void intel_unmap_page(struct devi
28026 }
28027 }
28028
28029-static void *intel_alloc_coherent(struct device *hwdev, size_t size,
28030+void *intel_alloc_coherent(struct device *hwdev, size_t size,
28031 dma_addr_t *dma_handle, gfp_t flags)
28032 {
28033 void *vaddr;
28034@@ -2800,7 +2800,7 @@ static void *intel_alloc_coherent(struct
28035 return NULL;
28036 }
28037
28038-static void intel_free_coherent(struct device *hwdev, size_t size, void *vaddr,
28039+void intel_free_coherent(struct device *hwdev, size_t size, void *vaddr,
28040 dma_addr_t dma_handle)
28041 {
28042 int order;
28043@@ -2812,7 +2812,7 @@ static void intel_free_coherent(struct d
28044 free_pages((unsigned long)vaddr, order);
28045 }
28046
28047-static void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist,
28048+void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist,
28049 int nelems, enum dma_data_direction dir,
28050 struct dma_attrs *attrs)
28051 {
28052@@ -2872,7 +2872,7 @@ static int intel_nontranslate_map_sg(str
28053 return nelems;
28054 }
28055
28056-static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int nelems,
28057+int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int nelems,
28058 enum dma_data_direction dir, struct dma_attrs *attrs)
28059 {
28060 int i;
28061@@ -2941,12 +2941,12 @@ static int intel_map_sg(struct device *h
28062 return nelems;
28063 }
28064
28065-static int intel_mapping_error(struct device *dev, dma_addr_t dma_addr)
28066+int intel_mapping_error(struct device *dev, dma_addr_t dma_addr)
28067 {
28068 return !dma_addr; 27311 return !dma_addr;
28069 } 27312 }
28070 27313
@@ -28073,10 +27316,10 @@ diff -urNp linux-2.6.32.24/drivers/pci/intel-iommu.c linux-2.6.32.24/drivers/pci
28073 .alloc_coherent = intel_alloc_coherent, 27316 .alloc_coherent = intel_alloc_coherent,
28074 .free_coherent = intel_free_coherent, 27317 .free_coherent = intel_free_coherent,
28075 .map_sg = intel_map_sg, 27318 .map_sg = intel_map_sg,
28076diff -urNp linux-2.6.32.24/drivers/pci/pcie/portdrv_pci.c linux-2.6.32.24/drivers/pci/pcie/portdrv_pci.c 27319diff -urNp linux-2.6.35.7/drivers/pci/pcie/portdrv_pci.c linux-2.6.35.7/drivers/pci/pcie/portdrv_pci.c
28077--- linux-2.6.32.24/drivers/pci/pcie/portdrv_pci.c 2010-08-13 16:24:37.000000000 -0400 27320--- linux-2.6.35.7/drivers/pci/pcie/portdrv_pci.c 2010-08-26 19:47:12.000000000 -0400
28078+++ linux-2.6.32.24/drivers/pci/pcie/portdrv_pci.c 2010-10-23 19:59:20.000000000 -0400 27321+++ linux-2.6.35.7/drivers/pci/pcie/portdrv_pci.c 2010-09-17 20:12:09.000000000 -0400
28079@@ -249,7 +249,7 @@ static void pcie_portdrv_err_resume(stru 27322@@ -250,7 +250,7 @@ static void pcie_portdrv_err_resume(stru
28080 static const struct pci_device_id port_pci_ids[] = { { 27323 static const struct pci_device_id port_pci_ids[] = { {
28081 /* handle any PCI-Express port */ 27324 /* handle any PCI-Express port */
28082 PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0), 27325 PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0),
@@ -28085,9 +27328,9 @@ diff -urNp linux-2.6.32.24/drivers/pci/pcie/portdrv_pci.c linux-2.6.32.24/driver
28085 }; 27328 };
28086 MODULE_DEVICE_TABLE(pci, port_pci_ids); 27329 MODULE_DEVICE_TABLE(pci, port_pci_ids);
28087 27330
28088diff -urNp linux-2.6.32.24/drivers/pci/probe.c linux-2.6.32.24/drivers/pci/probe.c 27331diff -urNp linux-2.6.35.7/drivers/pci/probe.c linux-2.6.35.7/drivers/pci/probe.c
28089--- linux-2.6.32.24/drivers/pci/probe.c 2010-08-13 16:24:37.000000000 -0400 27332--- linux-2.6.35.7/drivers/pci/probe.c 2010-08-26 19:47:12.000000000 -0400
28090+++ linux-2.6.32.24/drivers/pci/probe.c 2010-10-23 19:59:20.000000000 -0400 27333+++ linux-2.6.35.7/drivers/pci/probe.c 2010-09-17 20:12:09.000000000 -0400
28091@@ -62,14 +62,14 @@ static ssize_t pci_bus_show_cpuaffinity( 27334@@ -62,14 +62,14 @@ static ssize_t pci_bus_show_cpuaffinity(
28092 return ret; 27335 return ret;
28093 } 27336 }
@@ -28105,10 +27348,10 @@ diff -urNp linux-2.6.32.24/drivers/pci/probe.c linux-2.6.32.24/drivers/pci/probe
28105 struct device_attribute *attr, 27348 struct device_attribute *attr,
28106 char *buf) 27349 char *buf)
28107 { 27350 {
28108diff -urNp linux-2.6.32.24/drivers/pci/proc.c linux-2.6.32.24/drivers/pci/proc.c 27351diff -urNp linux-2.6.35.7/drivers/pci/proc.c linux-2.6.35.7/drivers/pci/proc.c
28109--- linux-2.6.32.24/drivers/pci/proc.c 2010-08-13 16:24:37.000000000 -0400 27352--- linux-2.6.35.7/drivers/pci/proc.c 2010-08-26 19:47:12.000000000 -0400
28110+++ linux-2.6.32.24/drivers/pci/proc.c 2010-10-23 19:59:20.000000000 -0400 27353+++ linux-2.6.35.7/drivers/pci/proc.c 2010-09-17 20:12:37.000000000 -0400
28111@@ -480,7 +480,16 @@ static const struct file_operations proc 27354@@ -481,7 +481,16 @@ static const struct file_operations proc
28112 static int __init pci_proc_init(void) 27355 static int __init pci_proc_init(void)
28113 { 27356 {
28114 struct pci_dev *dev = NULL; 27357 struct pci_dev *dev = NULL;
@@ -28125,22 +27368,10 @@ diff -urNp linux-2.6.32.24/drivers/pci/proc.c linux-2.6.32.24/drivers/pci/proc.c
28125 proc_create("devices", 0, proc_bus_pci_dir, 27368 proc_create("devices", 0, proc_bus_pci_dir,
28126 &proc_bus_pci_dev_operations); 27369 &proc_bus_pci_dev_operations);
28127 proc_initialized = 1; 27370 proc_initialized = 1;
28128diff -urNp linux-2.6.32.24/drivers/pci/slot.c linux-2.6.32.24/drivers/pci/slot.c 27371diff -urNp linux-2.6.35.7/drivers/pcmcia/pcmcia_ioctl.c linux-2.6.35.7/drivers/pcmcia/pcmcia_ioctl.c
28129--- linux-2.6.32.24/drivers/pci/slot.c 2010-08-13 16:24:37.000000000 -0400 27372--- linux-2.6.35.7/drivers/pcmcia/pcmcia_ioctl.c 2010-08-26 19:47:12.000000000 -0400
28130+++ linux-2.6.32.24/drivers/pci/slot.c 2010-10-23 19:59:20.000000000 -0400 27373+++ linux-2.6.35.7/drivers/pcmcia/pcmcia_ioctl.c 2010-09-17 20:12:09.000000000 -0400
28131@@ -29,7 +29,7 @@ static ssize_t pci_slot_attr_store(struc 27374@@ -850,7 +850,7 @@ static int ds_ioctl(struct file *file, u
28132 return attribute->store ? attribute->store(slot, buf, len) : -EIO;
28133 }
28134
28135-static struct sysfs_ops pci_slot_sysfs_ops = {
28136+static const struct sysfs_ops pci_slot_sysfs_ops = {
28137 .show = pci_slot_attr_show,
28138 .store = pci_slot_attr_store,
28139 };
28140diff -urNp linux-2.6.32.24/drivers/pcmcia/pcmcia_ioctl.c linux-2.6.32.24/drivers/pcmcia/pcmcia_ioctl.c
28141--- linux-2.6.32.24/drivers/pcmcia/pcmcia_ioctl.c 2010-08-13 16:24:37.000000000 -0400
28142+++ linux-2.6.32.24/drivers/pcmcia/pcmcia_ioctl.c 2010-10-23 19:59:20.000000000 -0400
28143@@ -819,7 +819,7 @@ static int ds_ioctl(struct inode * inode
28144 return -EFAULT; 27375 return -EFAULT;
28145 } 27376 }
28146 } 27377 }
@@ -28149,10 +27380,10 @@ diff -urNp linux-2.6.32.24/drivers/pcmcia/pcmcia_ioctl.c linux-2.6.32.24/drivers
28149 if (!buf) 27380 if (!buf)
28150 return -ENOMEM; 27381 return -ENOMEM;
28151 27382
28152diff -urNp linux-2.6.32.24/drivers/pcmcia/ti113x.h linux-2.6.32.24/drivers/pcmcia/ti113x.h 27383diff -urNp linux-2.6.35.7/drivers/pcmcia/ti113x.h linux-2.6.35.7/drivers/pcmcia/ti113x.h
28153--- linux-2.6.32.24/drivers/pcmcia/ti113x.h 2010-08-13 16:24:37.000000000 -0400 27384--- linux-2.6.35.7/drivers/pcmcia/ti113x.h 2010-08-26 19:47:12.000000000 -0400
28154+++ linux-2.6.32.24/drivers/pcmcia/ti113x.h 2010-10-23 19:59:20.000000000 -0400 27385+++ linux-2.6.35.7/drivers/pcmcia/ti113x.h 2010-09-17 20:12:09.000000000 -0400
28155@@ -903,7 +903,7 @@ static struct pci_device_id ene_tune_tbl 27386@@ -936,7 +936,7 @@ static struct pci_device_id ene_tune_tbl
28156 DEVID(PCI_VENDOR_ID_MOTOROLA, 0x3410, 0xECC0, PCI_ANY_ID, 27387 DEVID(PCI_VENDOR_ID_MOTOROLA, 0x3410, 0xECC0, PCI_ANY_ID,
28157 ENE_TEST_C9_TLTENABLE | ENE_TEST_C9_PFENABLE, ENE_TEST_C9_TLTENABLE), 27388 ENE_TEST_C9_TLTENABLE | ENE_TEST_C9_PFENABLE, ENE_TEST_C9_TLTENABLE),
28158 27389
@@ -28161,10 +27392,10 @@ diff -urNp linux-2.6.32.24/drivers/pcmcia/ti113x.h linux-2.6.32.24/drivers/pcmci
28161 }; 27392 };
28162 27393
28163 static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus) 27394 static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus)
28164diff -urNp linux-2.6.32.24/drivers/pcmcia/yenta_socket.c linux-2.6.32.24/drivers/pcmcia/yenta_socket.c 27395diff -urNp linux-2.6.35.7/drivers/pcmcia/yenta_socket.c linux-2.6.35.7/drivers/pcmcia/yenta_socket.c
28165--- linux-2.6.32.24/drivers/pcmcia/yenta_socket.c 2010-08-13 16:24:37.000000000 -0400 27396--- linux-2.6.35.7/drivers/pcmcia/yenta_socket.c 2010-08-26 19:47:12.000000000 -0400
28166+++ linux-2.6.32.24/drivers/pcmcia/yenta_socket.c 2010-10-23 19:59:20.000000000 -0400 27397+++ linux-2.6.35.7/drivers/pcmcia/yenta_socket.c 2010-09-17 20:12:09.000000000 -0400
28167@@ -1387,7 +1387,7 @@ static struct pci_device_id yenta_table 27398@@ -1428,7 +1428,7 @@ static struct pci_device_id yenta_table[
28168 27399
28169 /* match any cardbus bridge */ 27400 /* match any cardbus bridge */
28170 CB_ID(PCI_ANY_ID, PCI_ANY_ID, DEFAULT), 27401 CB_ID(PCI_ANY_ID, PCI_ANY_ID, DEFAULT),
@@ -28173,10 +27404,10 @@ diff -urNp linux-2.6.32.24/drivers/pcmcia/yenta_socket.c linux-2.6.32.24/drivers
28173 }; 27404 };
28174 MODULE_DEVICE_TABLE(pci, yenta_table); 27405 MODULE_DEVICE_TABLE(pci, yenta_table);
28175 27406
28176diff -urNp linux-2.6.32.24/drivers/platform/x86/acer-wmi.c linux-2.6.32.24/drivers/platform/x86/acer-wmi.c 27407diff -urNp linux-2.6.35.7/drivers/platform/x86/acer-wmi.c linux-2.6.35.7/drivers/platform/x86/acer-wmi.c
28177--- linux-2.6.32.24/drivers/platform/x86/acer-wmi.c 2010-08-13 16:24:37.000000000 -0400 27408--- linux-2.6.35.7/drivers/platform/x86/acer-wmi.c 2010-08-26 19:47:12.000000000 -0400
28178+++ linux-2.6.32.24/drivers/platform/x86/acer-wmi.c 2010-10-23 19:59:20.000000000 -0400 27409+++ linux-2.6.35.7/drivers/platform/x86/acer-wmi.c 2010-09-17 20:12:09.000000000 -0400
28179@@ -918,7 +918,7 @@ static int update_bl_status(struct backl 27410@@ -916,7 +916,7 @@ static int update_bl_status(struct backl
28180 return 0; 27411 return 0;
28181 } 27412 }
28182 27413
@@ -28185,10 +27416,10 @@ diff -urNp linux-2.6.32.24/drivers/platform/x86/acer-wmi.c linux-2.6.32.24/drive
28185 .get_brightness = read_brightness, 27416 .get_brightness = read_brightness,
28186 .update_status = update_bl_status, 27417 .update_status = update_bl_status,
28187 }; 27418 };
28188diff -urNp linux-2.6.32.24/drivers/platform/x86/asus_acpi.c linux-2.6.32.24/drivers/platform/x86/asus_acpi.c 27419diff -urNp linux-2.6.35.7/drivers/platform/x86/asus_acpi.c linux-2.6.35.7/drivers/platform/x86/asus_acpi.c
28189--- linux-2.6.32.24/drivers/platform/x86/asus_acpi.c 2010-08-13 16:24:37.000000000 -0400 27420--- linux-2.6.35.7/drivers/platform/x86/asus_acpi.c 2010-08-26 19:47:12.000000000 -0400
28190+++ linux-2.6.32.24/drivers/platform/x86/asus_acpi.c 2010-10-23 19:59:20.000000000 -0400 27421+++ linux-2.6.35.7/drivers/platform/x86/asus_acpi.c 2010-09-17 20:12:09.000000000 -0400
28191@@ -1402,7 +1402,7 @@ static int asus_hotk_remove(struct acpi_ 27422@@ -1464,7 +1464,7 @@ static int asus_hotk_remove(struct acpi_
28192 return 0; 27423 return 0;
28193 } 27424 }
28194 27425
@@ -28197,22 +27428,30 @@ diff -urNp linux-2.6.32.24/drivers/platform/x86/asus_acpi.c linux-2.6.32.24/driv
28197 .get_brightness = read_brightness, 27428 .get_brightness = read_brightness,
28198 .update_status = set_brightness_status, 27429 .update_status = set_brightness_status,
28199 }; 27430 };
28200diff -urNp linux-2.6.32.24/drivers/platform/x86/asus-laptop.c linux-2.6.32.24/drivers/platform/x86/asus-laptop.c 27431diff -urNp linux-2.6.35.7/drivers/platform/x86/asus-laptop.c linux-2.6.35.7/drivers/platform/x86/asus-laptop.c
28201--- linux-2.6.32.24/drivers/platform/x86/asus-laptop.c 2010-08-13 16:24:37.000000000 -0400 27432--- linux-2.6.35.7/drivers/platform/x86/asus-laptop.c 2010-08-26 19:47:12.000000000 -0400
28202+++ linux-2.6.32.24/drivers/platform/x86/asus-laptop.c 2010-10-23 19:59:20.000000000 -0400 27433+++ linux-2.6.35.7/drivers/platform/x86/asus-laptop.c 2010-09-17 20:12:09.000000000 -0400
28203@@ -250,7 +250,7 @@ static struct backlight_device *asus_bac 27434@@ -224,7 +224,6 @@ struct asus_laptop {
28204 */ 27435 struct asus_led gled;
28205 static int read_brightness(struct backlight_device *bd); 27436 struct asus_led kled;
28206 static int update_bl_status(struct backlight_device *bd); 27437 struct workqueue_struct *led_workqueue;
27438-
27439 int wireless_status;
27440 bool have_rsts;
27441 int lcd_state;
27442@@ -621,7 +620,7 @@ static int update_bl_status(struct backl
27443 return asus_lcd_set(asus, value);
27444 }
27445
28207-static struct backlight_ops asusbl_ops = { 27446-static struct backlight_ops asusbl_ops = {
28208+static const struct backlight_ops asusbl_ops = { 27447+static const struct backlight_ops asusbl_ops = {
28209 .get_brightness = read_brightness, 27448 .get_brightness = asus_read_brightness,
28210 .update_status = update_bl_status, 27449 .update_status = update_bl_status,
28211 }; 27450 };
28212diff -urNp linux-2.6.32.24/drivers/platform/x86/compal-laptop.c linux-2.6.32.24/drivers/platform/x86/compal-laptop.c 27451diff -urNp linux-2.6.35.7/drivers/platform/x86/compal-laptop.c linux-2.6.35.7/drivers/platform/x86/compal-laptop.c
28213--- linux-2.6.32.24/drivers/platform/x86/compal-laptop.c 2010-08-13 16:24:37.000000000 -0400 27452--- linux-2.6.35.7/drivers/platform/x86/compal-laptop.c 2010-08-26 19:47:12.000000000 -0400
28214+++ linux-2.6.32.24/drivers/platform/x86/compal-laptop.c 2010-10-23 19:59:20.000000000 -0400 27453+++ linux-2.6.35.7/drivers/platform/x86/compal-laptop.c 2010-09-17 20:12:09.000000000 -0400
28215@@ -163,7 +163,7 @@ static int bl_update_status(struct backl 27454@@ -168,7 +168,7 @@ static int bl_update_status(struct backl
28216 return set_lcd_level(b->props.brightness); 27455 return set_lcd_level(b->props.brightness);
28217 } 27456 }
28218 27457
@@ -28221,11 +27460,11 @@ diff -urNp linux-2.6.32.24/drivers/platform/x86/compal-laptop.c linux-2.6.32.24/
28221 .get_brightness = bl_get_brightness, 27460 .get_brightness = bl_get_brightness,
28222 .update_status = bl_update_status, 27461 .update_status = bl_update_status,
28223 }; 27462 };
28224diff -urNp linux-2.6.32.24/drivers/platform/x86/dell-laptop.c linux-2.6.32.24/drivers/platform/x86/dell-laptop.c 27463diff -urNp linux-2.6.35.7/drivers/platform/x86/dell-laptop.c linux-2.6.35.7/drivers/platform/x86/dell-laptop.c
28225--- linux-2.6.32.24/drivers/platform/x86/dell-laptop.c 2010-08-13 16:24:37.000000000 -0400 27464--- linux-2.6.35.7/drivers/platform/x86/dell-laptop.c 2010-08-26 19:47:12.000000000 -0400
28226+++ linux-2.6.32.24/drivers/platform/x86/dell-laptop.c 2010-10-23 19:59:20.000000000 -0400 27465+++ linux-2.6.35.7/drivers/platform/x86/dell-laptop.c 2010-09-17 20:12:09.000000000 -0400
28227@@ -305,7 +305,7 @@ static int dell_get_intensity(struct bac 27466@@ -469,7 +469,7 @@ out:
28228 return buffer.output[1]; 27467 return buffer->output[1];
28229 } 27468 }
28230 27469
28231-static struct backlight_ops dell_ops = { 27470-static struct backlight_ops dell_ops = {
@@ -28233,22 +27472,22 @@ diff -urNp linux-2.6.32.24/drivers/platform/x86/dell-laptop.c linux-2.6.32.24/dr
28233 .get_brightness = dell_get_intensity, 27472 .get_brightness = dell_get_intensity,
28234 .update_status = dell_send_intensity, 27473 .update_status = dell_send_intensity,
28235 }; 27474 };
28236diff -urNp linux-2.6.32.24/drivers/platform/x86/eeepc-laptop.c linux-2.6.32.24/drivers/platform/x86/eeepc-laptop.c 27475diff -urNp linux-2.6.35.7/drivers/platform/x86/eeepc-laptop.c linux-2.6.35.7/drivers/platform/x86/eeepc-laptop.c
28237--- linux-2.6.32.24/drivers/platform/x86/eeepc-laptop.c 2010-08-13 16:24:37.000000000 -0400 27476--- linux-2.6.35.7/drivers/platform/x86/eeepc-laptop.c 2010-08-26 19:47:12.000000000 -0400
28238+++ linux-2.6.32.24/drivers/platform/x86/eeepc-laptop.c 2010-10-23 19:59:20.000000000 -0400 27477+++ linux-2.6.35.7/drivers/platform/x86/eeepc-laptop.c 2010-09-17 20:12:09.000000000 -0400
28239@@ -245,7 +245,7 @@ static struct device *eeepc_hwmon_device 27478@@ -1114,7 +1114,7 @@ static int update_bl_status(struct backl
28240 */ 27479 return set_brightness(bd, bd->props.brightness);
28241 static int read_brightness(struct backlight_device *bd); 27480 }
28242 static int update_bl_status(struct backlight_device *bd); 27481
28243-static struct backlight_ops eeepcbl_ops = { 27482-static struct backlight_ops eeepcbl_ops = {
28244+static const struct backlight_ops eeepcbl_ops = { 27483+static const struct backlight_ops eeepcbl_ops = {
28245 .get_brightness = read_brightness, 27484 .get_brightness = read_brightness,
28246 .update_status = update_bl_status, 27485 .update_status = update_bl_status,
28247 }; 27486 };
28248diff -urNp linux-2.6.32.24/drivers/platform/x86/fujitsu-laptop.c linux-2.6.32.24/drivers/platform/x86/fujitsu-laptop.c 27487diff -urNp linux-2.6.35.7/drivers/platform/x86/fujitsu-laptop.c linux-2.6.35.7/drivers/platform/x86/fujitsu-laptop.c
28249--- linux-2.6.32.24/drivers/platform/x86/fujitsu-laptop.c 2010-08-13 16:24:37.000000000 -0400 27488--- linux-2.6.35.7/drivers/platform/x86/fujitsu-laptop.c 2010-08-26 19:47:12.000000000 -0400
28250+++ linux-2.6.32.24/drivers/platform/x86/fujitsu-laptop.c 2010-10-23 19:59:20.000000000 -0400 27489+++ linux-2.6.35.7/drivers/platform/x86/fujitsu-laptop.c 2010-09-17 20:12:09.000000000 -0400
28251@@ -436,7 +436,7 @@ static int bl_update_status(struct backl 27490@@ -437,7 +437,7 @@ static int bl_update_status(struct backl
28252 return ret; 27491 return ret;
28253 } 27492 }
28254 27493
@@ -28257,34 +27496,10 @@ diff -urNp linux-2.6.32.24/drivers/platform/x86/fujitsu-laptop.c linux-2.6.32.24
28257 .get_brightness = bl_get_brightness, 27496 .get_brightness = bl_get_brightness,
28258 .update_status = bl_update_status, 27497 .update_status = bl_update_status,
28259 }; 27498 };
28260diff -urNp linux-2.6.32.24/drivers/platform/x86/msi-laptop.c linux-2.6.32.24/drivers/platform/x86/msi-laptop.c 27499diff -urNp linux-2.6.35.7/drivers/platform/x86/sony-laptop.c linux-2.6.35.7/drivers/platform/x86/sony-laptop.c
28261--- linux-2.6.32.24/drivers/platform/x86/msi-laptop.c 2010-08-13 16:24:37.000000000 -0400 27500--- linux-2.6.35.7/drivers/platform/x86/sony-laptop.c 2010-08-26 19:47:12.000000000 -0400
28262+++ linux-2.6.32.24/drivers/platform/x86/msi-laptop.c 2010-10-23 19:59:20.000000000 -0400 27501+++ linux-2.6.35.7/drivers/platform/x86/sony-laptop.c 2010-09-17 20:12:09.000000000 -0400
28263@@ -161,7 +161,7 @@ static int bl_update_status(struct backl 27502@@ -857,7 +857,7 @@ static int sony_backlight_get_brightness
28264 return set_lcd_level(b->props.brightness);
28265 }
28266
28267-static struct backlight_ops msibl_ops = {
28268+static const struct backlight_ops msibl_ops = {
28269 .get_brightness = bl_get_brightness,
28270 .update_status = bl_update_status,
28271 };
28272diff -urNp linux-2.6.32.24/drivers/platform/x86/panasonic-laptop.c linux-2.6.32.24/drivers/platform/x86/panasonic-laptop.c
28273--- linux-2.6.32.24/drivers/platform/x86/panasonic-laptop.c 2010-08-13 16:24:37.000000000 -0400
28274+++ linux-2.6.32.24/drivers/platform/x86/panasonic-laptop.c 2010-10-23 19:59:20.000000000 -0400
28275@@ -352,7 +352,7 @@ static int bl_set_status(struct backligh
28276 return acpi_pcc_write_sset(pcc, SINF_DC_CUR_BRIGHT, bright);
28277 }
28278
28279-static struct backlight_ops pcc_backlight_ops = {
28280+static const struct backlight_ops pcc_backlight_ops = {
28281 .get_brightness = bl_get,
28282 .update_status = bl_set_status,
28283 };
28284diff -urNp linux-2.6.32.24/drivers/platform/x86/sony-laptop.c linux-2.6.32.24/drivers/platform/x86/sony-laptop.c
28285--- linux-2.6.32.24/drivers/platform/x86/sony-laptop.c 2010-08-13 16:24:37.000000000 -0400
28286+++ linux-2.6.32.24/drivers/platform/x86/sony-laptop.c 2010-10-23 19:59:20.000000000 -0400
28287@@ -850,7 +850,7 @@ static int sony_backlight_get_brightness
28288 } 27503 }
28289 27504
28290 static struct backlight_device *sony_backlight_device; 27505 static struct backlight_device *sony_backlight_device;
@@ -28293,10 +27508,10 @@ diff -urNp linux-2.6.32.24/drivers/platform/x86/sony-laptop.c linux-2.6.32.24/dr
28293 .update_status = sony_backlight_update_status, 27508 .update_status = sony_backlight_update_status,
28294 .get_brightness = sony_backlight_get_brightness, 27509 .get_brightness = sony_backlight_get_brightness,
28295 }; 27510 };
28296diff -urNp linux-2.6.32.24/drivers/platform/x86/thinkpad_acpi.c linux-2.6.32.24/drivers/platform/x86/thinkpad_acpi.c 27511diff -urNp linux-2.6.35.7/drivers/platform/x86/thinkpad_acpi.c linux-2.6.35.7/drivers/platform/x86/thinkpad_acpi.c
28297--- linux-2.6.32.24/drivers/platform/x86/thinkpad_acpi.c 2010-08-13 16:24:37.000000000 -0400 27512--- linux-2.6.35.7/drivers/platform/x86/thinkpad_acpi.c 2010-08-26 19:47:12.000000000 -0400
28298+++ linux-2.6.32.24/drivers/platform/x86/thinkpad_acpi.c 2010-10-23 19:59:20.000000000 -0400 27513+++ linux-2.6.35.7/drivers/platform/x86/thinkpad_acpi.c 2010-09-17 20:12:09.000000000 -0400
28299@@ -6122,7 +6122,7 @@ static void tpacpi_brightness_notify_cha 27514@@ -6142,7 +6142,7 @@ static void tpacpi_brightness_notify_cha
28300 BACKLIGHT_UPDATE_HOTKEY); 27515 BACKLIGHT_UPDATE_HOTKEY);
28301 } 27516 }
28302 27517
@@ -28305,10 +27520,10 @@ diff -urNp linux-2.6.32.24/drivers/platform/x86/thinkpad_acpi.c linux-2.6.32.24/
28305 .get_brightness = brightness_get, 27520 .get_brightness = brightness_get,
28306 .update_status = brightness_update_status, 27521 .update_status = brightness_update_status,
28307 }; 27522 };
28308diff -urNp linux-2.6.32.24/drivers/platform/x86/toshiba_acpi.c linux-2.6.32.24/drivers/platform/x86/toshiba_acpi.c 27523diff -urNp linux-2.6.35.7/drivers/platform/x86/toshiba_acpi.c linux-2.6.35.7/drivers/platform/x86/toshiba_acpi.c
28309--- linux-2.6.32.24/drivers/platform/x86/toshiba_acpi.c 2010-08-13 16:24:37.000000000 -0400 27524--- linux-2.6.35.7/drivers/platform/x86/toshiba_acpi.c 2010-08-26 19:47:12.000000000 -0400
28310+++ linux-2.6.32.24/drivers/platform/x86/toshiba_acpi.c 2010-10-23 19:59:20.000000000 -0400 27525+++ linux-2.6.35.7/drivers/platform/x86/toshiba_acpi.c 2010-09-17 20:12:09.000000000 -0400
28311@@ -671,7 +671,7 @@ static acpi_status remove_device(void) 27526@@ -741,7 +741,7 @@ static acpi_status remove_device(void)
28312 return AE_OK; 27527 return AE_OK;
28313 } 27528 }
28314 27529
@@ -28317,10 +27532,10 @@ diff -urNp linux-2.6.32.24/drivers/platform/x86/toshiba_acpi.c linux-2.6.32.24/d
28317 .get_brightness = get_lcd, 27532 .get_brightness = get_lcd,
28318 .update_status = set_lcd_status, 27533 .update_status = set_lcd_status,
28319 }; 27534 };
28320diff -urNp linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c 27535diff -urNp linux-2.6.35.7/drivers/pnp/pnpbios/bioscalls.c linux-2.6.35.7/drivers/pnp/pnpbios/bioscalls.c
28321--- linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c 2010-08-13 16:24:37.000000000 -0400 27536--- linux-2.6.35.7/drivers/pnp/pnpbios/bioscalls.c 2010-08-26 19:47:12.000000000 -0400
28322+++ linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c 2010-10-23 19:59:20.000000000 -0400 27537+++ linux-2.6.35.7/drivers/pnp/pnpbios/bioscalls.c 2010-09-17 20:12:09.000000000 -0400
28323@@ -60,7 +60,7 @@ do { \ 27538@@ -59,7 +59,7 @@ do { \
28324 set_desc_limit(&gdt[(selname) >> 3], (size) - 1); \ 27539 set_desc_limit(&gdt[(selname) >> 3], (size) - 1); \
28325 } while(0) 27540 } while(0)
28326 27541
@@ -28329,7 +27544,7 @@ diff -urNp linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.24/drive
28329 (unsigned long)__va(0x400UL), PAGE_SIZE - 0x400 - 1); 27544 (unsigned long)__va(0x400UL), PAGE_SIZE - 0x400 - 1);
28330 27545
28331 /* 27546 /*
28332@@ -97,7 +97,10 @@ static inline u16 call_pnp_bios(u16 func 27547@@ -96,7 +96,10 @@ static inline u16 call_pnp_bios(u16 func
28333 27548
28334 cpu = get_cpu(); 27549 cpu = get_cpu();
28335 save_desc_40 = get_cpu_gdt_table(cpu)[0x40 / 8]; 27550 save_desc_40 = get_cpu_gdt_table(cpu)[0x40 / 8];
@@ -28340,7 +27555,7 @@ diff -urNp linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.24/drive
28340 27555
28341 /* On some boxes IRQ's during PnP BIOS calls are deadly. */ 27556 /* On some boxes IRQ's during PnP BIOS calls are deadly. */
28342 spin_lock_irqsave(&pnp_bios_lock, flags); 27557 spin_lock_irqsave(&pnp_bios_lock, flags);
28343@@ -135,7 +138,10 @@ static inline u16 call_pnp_bios(u16 func 27558@@ -134,7 +137,10 @@ static inline u16 call_pnp_bios(u16 func
28344 :"memory"); 27559 :"memory");
28345 spin_unlock_irqrestore(&pnp_bios_lock, flags); 27560 spin_unlock_irqrestore(&pnp_bios_lock, flags);
28346 27561
@@ -28351,7 +27566,7 @@ diff -urNp linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.24/drive
28351 put_cpu(); 27566 put_cpu();
28352 27567
28353 /* If we get here and this is set then the PnP BIOS faulted on us. */ 27568 /* If we get here and this is set then the PnP BIOS faulted on us. */
28354@@ -469,7 +475,7 @@ int pnp_bios_read_escd(char *data, u32 n 27569@@ -468,7 +474,7 @@ int pnp_bios_read_escd(char *data, u32 n
28355 return status; 27570 return status;
28356 } 27571 }
28357 27572
@@ -28360,7 +27575,7 @@ diff -urNp linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.24/drive
28360 { 27575 {
28361 int i; 27576 int i;
28362 27577
28363@@ -477,6 +483,8 @@ void pnpbios_calls_init(union pnp_bios_i 27578@@ -476,6 +482,8 @@ void pnpbios_calls_init(union pnp_bios_i
28364 pnp_bios_callpoint.offset = header->fields.pm16offset; 27579 pnp_bios_callpoint.offset = header->fields.pm16offset;
28365 pnp_bios_callpoint.segment = PNP_CS16; 27580 pnp_bios_callpoint.segment = PNP_CS16;
28366 27581
@@ -28369,17 +27584,17 @@ diff -urNp linux-2.6.32.24/drivers/pnp/pnpbios/bioscalls.c linux-2.6.32.24/drive
28369 for_each_possible_cpu(i) { 27584 for_each_possible_cpu(i) {
28370 struct desc_struct *gdt = get_cpu_gdt_table(i); 27585 struct desc_struct *gdt = get_cpu_gdt_table(i);
28371 if (!gdt) 27586 if (!gdt)
28372@@ -488,4 +496,6 @@ void pnpbios_calls_init(union pnp_bios_i 27587@@ -487,4 +495,6 @@ void pnpbios_calls_init(union pnp_bios_i
28373 set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_DS], 27588 set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_DS],
28374 (unsigned long)__va(header->fields.pm16dseg)); 27589 (unsigned long)__va(header->fields.pm16dseg));
28375 } 27590 }
28376+ 27591+
28377+ pax_close_kernel(); 27592+ pax_close_kernel();
28378 } 27593 }
28379diff -urNp linux-2.6.32.24/drivers/pnp/quirks.c linux-2.6.32.24/drivers/pnp/quirks.c 27594diff -urNp linux-2.6.35.7/drivers/pnp/quirks.c linux-2.6.35.7/drivers/pnp/quirks.c
28380--- linux-2.6.32.24/drivers/pnp/quirks.c 2010-08-13 16:24:37.000000000 -0400 27595--- linux-2.6.35.7/drivers/pnp/quirks.c 2010-08-26 19:47:12.000000000 -0400
28381+++ linux-2.6.32.24/drivers/pnp/quirks.c 2010-10-23 19:59:20.000000000 -0400 27596+++ linux-2.6.35.7/drivers/pnp/quirks.c 2010-09-17 20:12:09.000000000 -0400
28382@@ -327,7 +327,7 @@ static struct pnp_fixup pnp_fixups[] = { 27597@@ -322,7 +322,7 @@ static struct pnp_fixup pnp_fixups[] = {
28383 /* PnP resources that might overlap PCI BARs */ 27598 /* PnP resources that might overlap PCI BARs */
28384 {"PNP0c01", quirk_system_pci_resources}, 27599 {"PNP0c01", quirk_system_pci_resources},
28385 {"PNP0c02", quirk_system_pci_resources}, 27600 {"PNP0c02", quirk_system_pci_resources},
@@ -28388,10 +27603,10 @@ diff -urNp linux-2.6.32.24/drivers/pnp/quirks.c linux-2.6.32.24/drivers/pnp/quir
28388 }; 27603 };
28389 27604
28390 void pnp_fixup_device(struct pnp_dev *dev) 27605 void pnp_fixup_device(struct pnp_dev *dev)
28391diff -urNp linux-2.6.32.24/drivers/pnp/resource.c linux-2.6.32.24/drivers/pnp/resource.c 27606diff -urNp linux-2.6.35.7/drivers/pnp/resource.c linux-2.6.35.7/drivers/pnp/resource.c
28392--- linux-2.6.32.24/drivers/pnp/resource.c 2010-08-13 16:24:37.000000000 -0400 27607--- linux-2.6.35.7/drivers/pnp/resource.c 2010-08-26 19:47:12.000000000 -0400
28393+++ linux-2.6.32.24/drivers/pnp/resource.c 2010-10-23 19:59:20.000000000 -0400 27608+++ linux-2.6.35.7/drivers/pnp/resource.c 2010-09-17 20:12:09.000000000 -0400
28394@@ -355,7 +355,7 @@ int pnp_check_irq(struct pnp_dev *dev, s 27609@@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, s
28395 return 1; 27610 return 1;
28396 27611
28397 /* check if the resource is valid */ 27612 /* check if the resource is valid */
@@ -28400,7 +27615,7 @@ diff -urNp linux-2.6.32.24/drivers/pnp/resource.c linux-2.6.32.24/drivers/pnp/re
28400 return 0; 27615 return 0;
28401 27616
28402 /* check if the resource is reserved */ 27617 /* check if the resource is reserved */
28403@@ -419,7 +419,7 @@ int pnp_check_dma(struct pnp_dev *dev, s 27618@@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, s
28404 return 1; 27619 return 1;
28405 27620
28406 /* check if the resource is valid */ 27621 /* check if the resource is valid */
@@ -28409,163 +27624,22 @@ diff -urNp linux-2.6.32.24/drivers/pnp/resource.c linux-2.6.32.24/drivers/pnp/re
28409 return 0; 27624 return 0;
28410 27625
28411 /* check if the resource is reserved */ 27626 /* check if the resource is reserved */
28412diff -urNp linux-2.6.32.24/drivers/s390/cio/qdio_perf.c linux-2.6.32.24/drivers/s390/cio/qdio_perf.c 27627diff -urNp linux-2.6.35.7/drivers/s390/cio/qdio_debug.c linux-2.6.35.7/drivers/s390/cio/qdio_debug.c
28413--- linux-2.6.32.24/drivers/s390/cio/qdio_perf.c 2010-08-13 16:24:37.000000000 -0400 27628--- linux-2.6.35.7/drivers/s390/cio/qdio_debug.c 2010-08-26 19:47:12.000000000 -0400
28414+++ linux-2.6.32.24/drivers/s390/cio/qdio_perf.c 2010-10-23 19:59:20.000000000 -0400 27629+++ linux-2.6.35.7/drivers/s390/cio/qdio_debug.c 2010-09-17 20:12:09.000000000 -0400
28415@@ -31,51 +31,51 @@ static struct proc_dir_entry *qdio_perf_ 27630@@ -233,7 +233,7 @@ static int qperf_seq_open(struct inode *
28416 static int qdio_perf_proc_show(struct seq_file *m, void *v) 27631 filp->f_path.dentry->d_inode->i_private);
28417 {
28418 seq_printf(m, "Number of qdio interrupts\t\t\t: %li\n",
28419- (long)atomic_long_read(&perf_stats.qdio_int));
28420+ (long)atomic_long_read_unchecked(&perf_stats.qdio_int));
28421 seq_printf(m, "Number of PCI interrupts\t\t\t: %li\n",
28422- (long)atomic_long_read(&perf_stats.pci_int));
28423+ (long)atomic_long_read_unchecked(&perf_stats.pci_int));
28424 seq_printf(m, "Number of adapter interrupts\t\t\t: %li\n",
28425- (long)atomic_long_read(&perf_stats.thin_int));
28426+ (long)atomic_long_read_unchecked(&perf_stats.thin_int));
28427 seq_printf(m, "\n");
28428 seq_printf(m, "Inbound tasklet runs\t\t\t\t: %li\n",
28429- (long)atomic_long_read(&perf_stats.tasklet_inbound));
28430+ (long)atomic_long_read_unchecked(&perf_stats.tasklet_inbound));
28431 seq_printf(m, "Outbound tasklet runs\t\t\t\t: %li\n",
28432- (long)atomic_long_read(&perf_stats.tasklet_outbound));
28433+ (long)atomic_long_read_unchecked(&perf_stats.tasklet_outbound));
28434 seq_printf(m, "Adapter interrupt tasklet runs/loops\t\t: %li/%li\n",
28435- (long)atomic_long_read(&perf_stats.tasklet_thinint),
28436- (long)atomic_long_read(&perf_stats.tasklet_thinint_loop));
28437+ (long)atomic_long_read_unchecked(&perf_stats.tasklet_thinint),
28438+ (long)atomic_long_read_unchecked(&perf_stats.tasklet_thinint_loop));
28439 seq_printf(m, "Adapter interrupt inbound tasklet runs/loops\t: %li/%li\n",
28440- (long)atomic_long_read(&perf_stats.thinint_inbound),
28441- (long)atomic_long_read(&perf_stats.thinint_inbound_loop));
28442+ (long)atomic_long_read_unchecked(&perf_stats.thinint_inbound),
28443+ (long)atomic_long_read_unchecked(&perf_stats.thinint_inbound_loop));
28444 seq_printf(m, "\n");
28445 seq_printf(m, "Number of SIGA In issued\t\t\t: %li\n",
28446- (long)atomic_long_read(&perf_stats.siga_in));
28447+ (long)atomic_long_read_unchecked(&perf_stats.siga_in));
28448 seq_printf(m, "Number of SIGA Out issued\t\t\t: %li\n",
28449- (long)atomic_long_read(&perf_stats.siga_out));
28450+ (long)atomic_long_read_unchecked(&perf_stats.siga_out));
28451 seq_printf(m, "Number of SIGA Sync issued\t\t\t: %li\n",
28452- (long)atomic_long_read(&perf_stats.siga_sync));
28453+ (long)atomic_long_read_unchecked(&perf_stats.siga_sync));
28454 seq_printf(m, "\n");
28455 seq_printf(m, "Number of inbound transfers\t\t\t: %li\n",
28456- (long)atomic_long_read(&perf_stats.inbound_handler));
28457+ (long)atomic_long_read_unchecked(&perf_stats.inbound_handler));
28458 seq_printf(m, "Number of outbound transfers\t\t\t: %li\n",
28459- (long)atomic_long_read(&perf_stats.outbound_handler));
28460+ (long)atomic_long_read_unchecked(&perf_stats.outbound_handler));
28461 seq_printf(m, "\n");
28462 seq_printf(m, "Number of fast requeues (outg. SBAL w/o SIGA)\t: %li\n",
28463- (long)atomic_long_read(&perf_stats.fast_requeue));
28464+ (long)atomic_long_read_unchecked(&perf_stats.fast_requeue));
28465 seq_printf(m, "Number of outbound target full condition\t: %li\n",
28466- (long)atomic_long_read(&perf_stats.outbound_target_full));
28467+ (long)atomic_long_read_unchecked(&perf_stats.outbound_target_full));
28468 seq_printf(m, "Number of outbound tasklet mod_timer calls\t: %li\n",
28469- (long)atomic_long_read(&perf_stats.debug_tl_out_timer));
28470+ (long)atomic_long_read_unchecked(&perf_stats.debug_tl_out_timer));
28471 seq_printf(m, "Number of stop polling calls\t\t\t: %li\n",
28472- (long)atomic_long_read(&perf_stats.debug_stop_polling));
28473+ (long)atomic_long_read_unchecked(&perf_stats.debug_stop_polling));
28474 seq_printf(m, "AI inbound tasklet loops after stop polling\t: %li\n",
28475- (long)atomic_long_read(&perf_stats.thinint_inbound_loop2));
28476+ (long)atomic_long_read_unchecked(&perf_stats.thinint_inbound_loop2));
28477 seq_printf(m, "QEBSM EQBS total/incomplete\t\t\t: %li/%li\n",
28478- (long)atomic_long_read(&perf_stats.debug_eqbs_all),
28479- (long)atomic_long_read(&perf_stats.debug_eqbs_incomplete));
28480+ (long)atomic_long_read_unchecked(&perf_stats.debug_eqbs_all),
28481+ (long)atomic_long_read_unchecked(&perf_stats.debug_eqbs_incomplete));
28482 seq_printf(m, "QEBSM SQBS total/incomplete\t\t\t: %li/%li\n",
28483- (long)atomic_long_read(&perf_stats.debug_sqbs_all),
28484- (long)atomic_long_read(&perf_stats.debug_sqbs_incomplete));
28485+ (long)atomic_long_read_unchecked(&perf_stats.debug_sqbs_all),
28486+ (long)atomic_long_read_unchecked(&perf_stats.debug_sqbs_incomplete));
28487 seq_printf(m, "\n");
28488 return 0;
28489 } 27632 }
28490diff -urNp linux-2.6.32.24/drivers/s390/cio/qdio_perf.h linux-2.6.32.24/drivers/s390/cio/qdio_perf.h 27633
28491--- linux-2.6.32.24/drivers/s390/cio/qdio_perf.h 2010-08-13 16:24:37.000000000 -0400 27634-static struct file_operations debugfs_perf_fops = {
28492+++ linux-2.6.32.24/drivers/s390/cio/qdio_perf.h 2010-10-23 19:59:20.000000000 -0400 27635+static const struct file_operations debugfs_perf_fops = {
28493@@ -13,46 +13,46 @@ 27636 .owner = THIS_MODULE,
28494 27637 .open = qperf_seq_open,
28495 struct qdio_perf_stats { 27638 .read = seq_read,
28496 /* interrupt handler calls */ 27639diff -urNp linux-2.6.35.7/drivers/scsi/ipr.c linux-2.6.35.7/drivers/scsi/ipr.c
28497- atomic_long_t qdio_int; 27640--- linux-2.6.35.7/drivers/scsi/ipr.c 2010-08-26 19:47:12.000000000 -0400
28498- atomic_long_t pci_int; 27641+++ linux-2.6.35.7/drivers/scsi/ipr.c 2010-09-17 20:12:09.000000000 -0400
28499- atomic_long_t thin_int; 27642@@ -6091,7 +6091,7 @@ static bool ipr_qc_fill_rtf(struct ata_q
28500+ atomic_long_unchecked_t qdio_int;
28501+ atomic_long_unchecked_t pci_int;
28502+ atomic_long_unchecked_t thin_int;
28503
28504 /* tasklet runs */
28505- atomic_long_t tasklet_inbound;
28506- atomic_long_t tasklet_outbound;
28507- atomic_long_t tasklet_thinint;
28508- atomic_long_t tasklet_thinint_loop;
28509- atomic_long_t thinint_inbound;
28510- atomic_long_t thinint_inbound_loop;
28511- atomic_long_t thinint_inbound_loop2;
28512+ atomic_long_unchecked_t tasklet_inbound;
28513+ atomic_long_unchecked_t tasklet_outbound;
28514+ atomic_long_unchecked_t tasklet_thinint;
28515+ atomic_long_unchecked_t tasklet_thinint_loop;
28516+ atomic_long_unchecked_t thinint_inbound;
28517+ atomic_long_unchecked_t thinint_inbound_loop;
28518+ atomic_long_unchecked_t thinint_inbound_loop2;
28519
28520 /* signal adapter calls */
28521- atomic_long_t siga_out;
28522- atomic_long_t siga_in;
28523- atomic_long_t siga_sync;
28524+ atomic_long_unchecked_t siga_out;
28525+ atomic_long_unchecked_t siga_in;
28526+ atomic_long_unchecked_t siga_sync;
28527
28528 /* misc */
28529- atomic_long_t inbound_handler;
28530- atomic_long_t outbound_handler;
28531- atomic_long_t fast_requeue;
28532- atomic_long_t outbound_target_full;
28533+ atomic_long_unchecked_t inbound_handler;
28534+ atomic_long_unchecked_t outbound_handler;
28535+ atomic_long_unchecked_t fast_requeue;
28536+ atomic_long_unchecked_t outbound_target_full;
28537
28538 /* for debugging */
28539- atomic_long_t debug_tl_out_timer;
28540- atomic_long_t debug_stop_polling;
28541- atomic_long_t debug_eqbs_all;
28542- atomic_long_t debug_eqbs_incomplete;
28543- atomic_long_t debug_sqbs_all;
28544- atomic_long_t debug_sqbs_incomplete;
28545+ atomic_long_unchecked_t debug_tl_out_timer;
28546+ atomic_long_unchecked_t debug_stop_polling;
28547+ atomic_long_unchecked_t debug_eqbs_all;
28548+ atomic_long_unchecked_t debug_eqbs_incomplete;
28549+ atomic_long_unchecked_t debug_sqbs_all;
28550+ atomic_long_unchecked_t debug_sqbs_incomplete;
28551 };
28552
28553 extern struct qdio_perf_stats perf_stats;
28554 extern int qdio_performance_stats;
28555
28556-static inline void qdio_perf_stat_inc(atomic_long_t *count)
28557+static inline void qdio_perf_stat_inc(atomic_long_unchecked_t *count)
28558 {
28559 if (qdio_performance_stats)
28560- atomic_long_inc(count);
28561+ atomic_long_inc_unchecked(count);
28562 }
28563
28564 int qdio_setup_perf_stats(void);
28565diff -urNp linux-2.6.32.24/drivers/scsi/ipr.c linux-2.6.32.24/drivers/scsi/ipr.c
28566--- linux-2.6.32.24/drivers/scsi/ipr.c 2010-08-13 16:24:37.000000000 -0400
28567+++ linux-2.6.32.24/drivers/scsi/ipr.c 2010-10-23 19:59:20.000000000 -0400
28568@@ -5286,7 +5286,7 @@ static bool ipr_qc_fill_rtf(struct ata_q
28569 return true; 27643 return true;
28570 } 27644 }
28571 27645
@@ -28574,10 +27648,10 @@ diff -urNp linux-2.6.32.24/drivers/scsi/ipr.c linux-2.6.32.24/drivers/scsi/ipr.c
28574 .phy_reset = ipr_ata_phy_reset, 27648 .phy_reset = ipr_ata_phy_reset,
28575 .hardreset = ipr_sata_reset, 27649 .hardreset = ipr_sata_reset,
28576 .post_internal_cmd = ipr_ata_post_internal, 27650 .post_internal_cmd = ipr_ata_post_internal,
28577diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c 27651diff -urNp linux-2.6.35.7/drivers/scsi/libfc/fc_exch.c linux-2.6.35.7/drivers/scsi/libfc/fc_exch.c
28578--- linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c 2010-08-13 16:24:37.000000000 -0400 27652--- linux-2.6.35.7/drivers/scsi/libfc/fc_exch.c 2010-08-26 19:47:12.000000000 -0400
28579+++ linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c 2010-10-23 19:59:20.000000000 -0400 27653+++ linux-2.6.35.7/drivers/scsi/libfc/fc_exch.c 2010-09-17 20:12:09.000000000 -0400
28580@@ -86,12 +86,12 @@ struct fc_exch_mgr { 27654@@ -100,12 +100,12 @@ struct fc_exch_mgr {
28581 * all together if not used XXX 27655 * all together if not used XXX
28582 */ 27656 */
28583 struct { 27657 struct {
@@ -28596,7 +27670,7 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28596 } stats; 27670 } stats;
28597 }; 27671 };
28598 #define fc_seq_exch(sp) container_of(sp, struct fc_exch, seq) 27672 #define fc_seq_exch(sp) container_of(sp, struct fc_exch, seq)
28599@@ -510,7 +510,7 @@ static struct fc_exch *fc_exch_em_alloc( 27673@@ -671,7 +671,7 @@ static struct fc_exch *fc_exch_em_alloc(
28600 /* allocate memory for exchange */ 27674 /* allocate memory for exchange */
28601 ep = mempool_alloc(mp->ep_pool, GFP_ATOMIC); 27675 ep = mempool_alloc(mp->ep_pool, GFP_ATOMIC);
28602 if (!ep) { 27676 if (!ep) {
@@ -28605,7 +27679,7 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28605 goto out; 27679 goto out;
28606 } 27680 }
28607 memset(ep, 0, sizeof(*ep)); 27681 memset(ep, 0, sizeof(*ep));
28608@@ -557,7 +557,7 @@ out: 27682@@ -719,7 +719,7 @@ out:
28609 return ep; 27683 return ep;
28610 err: 27684 err:
28611 spin_unlock_bh(&pool->lock); 27685 spin_unlock_bh(&pool->lock);
@@ -28614,7 +27688,7 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28614 mempool_free(ep, mp->ep_pool); 27688 mempool_free(ep, mp->ep_pool);
28615 return NULL; 27689 return NULL;
28616 } 27690 }
28617@@ -690,7 +690,7 @@ static enum fc_pf_rjt_reason fc_seq_look 27691@@ -864,7 +864,7 @@ static enum fc_pf_rjt_reason fc_seq_look
28618 xid = ntohs(fh->fh_ox_id); /* we originated exch */ 27692 xid = ntohs(fh->fh_ox_id); /* we originated exch */
28619 ep = fc_exch_find(mp, xid); 27693 ep = fc_exch_find(mp, xid);
28620 if (!ep) { 27694 if (!ep) {
@@ -28623,7 +27697,7 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28623 reject = FC_RJT_OX_ID; 27697 reject = FC_RJT_OX_ID;
28624 goto out; 27698 goto out;
28625 } 27699 }
28626@@ -720,7 +720,7 @@ static enum fc_pf_rjt_reason fc_seq_look 27700@@ -894,7 +894,7 @@ static enum fc_pf_rjt_reason fc_seq_look
28627 ep = fc_exch_find(mp, xid); 27701 ep = fc_exch_find(mp, xid);
28628 if ((f_ctl & FC_FC_FIRST_SEQ) && fc_sof_is_init(fr_sof(fp))) { 27702 if ((f_ctl & FC_FC_FIRST_SEQ) && fc_sof_is_init(fr_sof(fp))) {
28629 if (ep) { 27703 if (ep) {
@@ -28632,7 +27706,7 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28632 reject = FC_RJT_RX_ID; 27706 reject = FC_RJT_RX_ID;
28633 goto rel; 27707 goto rel;
28634 } 27708 }
28635@@ -731,7 +731,7 @@ static enum fc_pf_rjt_reason fc_seq_look 27709@@ -905,7 +905,7 @@ static enum fc_pf_rjt_reason fc_seq_look
28636 } 27710 }
28637 xid = ep->xid; /* get our XID */ 27711 xid = ep->xid; /* get our XID */
28638 } else if (!ep) { 27712 } else if (!ep) {
@@ -28641,7 +27715,7 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28641 reject = FC_RJT_RX_ID; /* XID not found */ 27715 reject = FC_RJT_RX_ID; /* XID not found */
28642 goto out; 27716 goto out;
28643 } 27717 }
28644@@ -752,7 +752,7 @@ static enum fc_pf_rjt_reason fc_seq_look 27718@@ -922,7 +922,7 @@ static enum fc_pf_rjt_reason fc_seq_look
28645 } else { 27719 } else {
28646 sp = &ep->seq; 27720 sp = &ep->seq;
28647 if (sp->id != fh->fh_seq_id) { 27721 if (sp->id != fh->fh_seq_id) {
@@ -28650,7 +27724,7 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28650 reject = FC_RJT_SEQ_ID; /* sequence/exch should exist */ 27724 reject = FC_RJT_SEQ_ID; /* sequence/exch should exist */
28651 goto rel; 27725 goto rel;
28652 } 27726 }
28653@@ -1163,22 +1163,22 @@ static void fc_exch_recv_seq_resp(struct 27727@@ -1303,22 +1303,22 @@ static void fc_exch_recv_seq_resp(struct
28654 27728
28655 ep = fc_exch_find(mp, ntohs(fh->fh_ox_id)); 27729 ep = fc_exch_find(mp, ntohs(fh->fh_ox_id));
28656 if (!ep) { 27730 if (!ep) {
@@ -28677,16 +27751,16 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28677 goto rel; 27751 goto rel;
28678 } 27752 }
28679 sof = fr_sof(fp); 27753 sof = fr_sof(fp);
28680@@ -1189,7 +1189,7 @@ static void fc_exch_recv_seq_resp(struct 27754@@ -1327,7 +1327,7 @@ static void fc_exch_recv_seq_resp(struct
28681 } else { 27755 sp->ssb_stat |= SSB_ST_RESP;
28682 sp = &ep->seq; 27756 sp->id = fh->fh_seq_id;
28683 if (sp->id != fh->fh_seq_id) { 27757 } else if (sp->id != fh->fh_seq_id) {
28684- atomic_inc(&mp->stats.seq_not_found); 27758- atomic_inc(&mp->stats.seq_not_found);
28685+ atomic_inc_unchecked(&mp->stats.seq_not_found); 27759+ atomic_inc_unchecked(&mp->stats.seq_not_found);
28686 goto rel; 27760 goto rel;
28687 }
28688 } 27761 }
28689@@ -1249,9 +1249,9 @@ static void fc_exch_recv_resp(struct fc_ 27762
27763@@ -1390,9 +1390,9 @@ static void fc_exch_recv_resp(struct fc_
28690 sp = fc_seq_lookup_orig(mp, fp); /* doesn't hold sequence */ 27764 sp = fc_seq_lookup_orig(mp, fp); /* doesn't hold sequence */
28691 27765
28692 if (!sp) 27766 if (!sp)
@@ -28698,10 +27772,10 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libfc/fc_exch.c linux-2.6.32.24/drivers/
28698 27772
28699 fc_frame_free(fp); 27773 fc_frame_free(fp);
28700 } 27774 }
28701diff -urNp linux-2.6.32.24/drivers/scsi/libsas/sas_ata.c linux-2.6.32.24/drivers/scsi/libsas/sas_ata.c 27775diff -urNp linux-2.6.35.7/drivers/scsi/libsas/sas_ata.c linux-2.6.35.7/drivers/scsi/libsas/sas_ata.c
28702--- linux-2.6.32.24/drivers/scsi/libsas/sas_ata.c 2010-08-13 16:24:37.000000000 -0400 27776--- linux-2.6.35.7/drivers/scsi/libsas/sas_ata.c 2010-08-26 19:47:12.000000000 -0400
28703+++ linux-2.6.32.24/drivers/scsi/libsas/sas_ata.c 2010-10-23 19:59:20.000000000 -0400 27777+++ linux-2.6.35.7/drivers/scsi/libsas/sas_ata.c 2010-09-17 20:12:09.000000000 -0400
28704@@ -343,7 +343,7 @@ static int sas_ata_scr_read(struct ata_l 27778@@ -344,7 +344,7 @@ static int sas_ata_scr_read(struct ata_l
28705 } 27779 }
28706 } 27780 }
28707 27781
@@ -28710,9 +27784,9 @@ diff -urNp linux-2.6.32.24/drivers/scsi/libsas/sas_ata.c linux-2.6.32.24/drivers
28710 .phy_reset = sas_ata_phy_reset, 27784 .phy_reset = sas_ata_phy_reset,
28711 .post_internal_cmd = sas_ata_post_internal, 27785 .post_internal_cmd = sas_ata_post_internal,
28712 .qc_prep = ata_noop_qc_prep, 27786 .qc_prep = ata_noop_qc_prep,
28713diff -urNp linux-2.6.32.24/drivers/scsi/mpt2sas/mpt2sas_debug.h linux-2.6.32.24/drivers/scsi/mpt2sas/mpt2sas_debug.h 27787diff -urNp linux-2.6.35.7/drivers/scsi/mpt2sas/mpt2sas_debug.h linux-2.6.35.7/drivers/scsi/mpt2sas/mpt2sas_debug.h
28714--- linux-2.6.32.24/drivers/scsi/mpt2sas/mpt2sas_debug.h 2010-08-13 16:24:37.000000000 -0400 27788--- linux-2.6.35.7/drivers/scsi/mpt2sas/mpt2sas_debug.h 2010-08-26 19:47:12.000000000 -0400
28715+++ linux-2.6.32.24/drivers/scsi/mpt2sas/mpt2sas_debug.h 2010-10-23 19:59:20.000000000 -0400 27789+++ linux-2.6.35.7/drivers/scsi/mpt2sas/mpt2sas_debug.h 2010-09-17 20:12:09.000000000 -0400
28716@@ -79,7 +79,7 @@ 27790@@ -79,7 +79,7 @@
28717 CMD; \ 27791 CMD; \
28718 } 27792 }
@@ -28722,9 +27796,21 @@ diff -urNp linux-2.6.32.24/drivers/scsi/mpt2sas/mpt2sas_debug.h linux-2.6.32.24/
28722 #endif /* CONFIG_SCSI_MPT2SAS_LOGGING */ 27796 #endif /* CONFIG_SCSI_MPT2SAS_LOGGING */
28723 27797
28724 27798
28725diff -urNp linux-2.6.32.24/drivers/scsi/scsi_logging.h linux-2.6.32.24/drivers/scsi/scsi_logging.h 27799diff -urNp linux-2.6.35.7/drivers/scsi/qla2xxx/qla_os.c linux-2.6.35.7/drivers/scsi/qla2xxx/qla_os.c
28726--- linux-2.6.32.24/drivers/scsi/scsi_logging.h 2010-08-13 16:24:37.000000000 -0400 27800--- linux-2.6.35.7/drivers/scsi/qla2xxx/qla_os.c 2010-08-26 19:47:12.000000000 -0400
28727+++ linux-2.6.32.24/drivers/scsi/scsi_logging.h 2010-10-23 19:59:20.000000000 -0400 27801+++ linux-2.6.35.7/drivers/scsi/qla2xxx/qla_os.c 2010-09-17 20:12:09.000000000 -0400
27802@@ -3899,7 +3899,7 @@ static struct pci_driver qla2xxx_pci_dri
27803 .err_handler = &qla2xxx_err_handler,
27804 };
27805
27806-static struct file_operations apidev_fops = {
27807+static const struct file_operations apidev_fops = {
27808 .owner = THIS_MODULE,
27809 };
27810
27811diff -urNp linux-2.6.35.7/drivers/scsi/scsi_logging.h linux-2.6.35.7/drivers/scsi/scsi_logging.h
27812--- linux-2.6.35.7/drivers/scsi/scsi_logging.h 2010-08-26 19:47:12.000000000 -0400
27813+++ linux-2.6.35.7/drivers/scsi/scsi_logging.h 2010-09-17 20:12:09.000000000 -0400
28728@@ -51,7 +51,7 @@ do { \ 27814@@ -51,7 +51,7 @@ do { \
28729 } while (0); \ 27815 } while (0); \
28730 } while (0) 27816 } while (0)
@@ -28734,10 +27820,10 @@ diff -urNp linux-2.6.32.24/drivers/scsi/scsi_logging.h linux-2.6.32.24/drivers/s
28734 #endif /* CONFIG_SCSI_LOGGING */ 27820 #endif /* CONFIG_SCSI_LOGGING */
28735 27821
28736 /* 27822 /*
28737diff -urNp linux-2.6.32.24/drivers/scsi/sg.c linux-2.6.32.24/drivers/scsi/sg.c 27823diff -urNp linux-2.6.35.7/drivers/scsi/sg.c linux-2.6.35.7/drivers/scsi/sg.c
28738--- linux-2.6.32.24/drivers/scsi/sg.c 2010-08-13 16:24:37.000000000 -0400 27824--- linux-2.6.35.7/drivers/scsi/sg.c 2010-08-26 19:47:12.000000000 -0400
28739+++ linux-2.6.32.24/drivers/scsi/sg.c 2010-10-23 19:59:20.000000000 -0400 27825+++ linux-2.6.35.7/drivers/scsi/sg.c 2010-09-17 20:12:09.000000000 -0400
28740@@ -2292,7 +2292,7 @@ struct sg_proc_leaf { 27826@@ -2302,7 +2302,7 @@ struct sg_proc_leaf {
28741 const struct file_operations * fops; 27827 const struct file_operations * fops;
28742 }; 27828 };
28743 27829
@@ -28746,7 +27832,7 @@ diff -urNp linux-2.6.32.24/drivers/scsi/sg.c linux-2.6.32.24/drivers/scsi/sg.c
28746 {"allow_dio", &adio_fops}, 27832 {"allow_dio", &adio_fops},
28747 {"debug", &debug_fops}, 27833 {"debug", &debug_fops},
28748 {"def_reserved_size", &dressz_fops}, 27834 {"def_reserved_size", &dressz_fops},
28749@@ -2307,7 +2307,7 @@ sg_proc_init(void) 27835@@ -2317,7 +2317,7 @@ sg_proc_init(void)
28750 { 27836 {
28751 int k, mask; 27837 int k, mask;
28752 int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr); 27838 int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr);
@@ -28755,10 +27841,10 @@ diff -urNp linux-2.6.32.24/drivers/scsi/sg.c linux-2.6.32.24/drivers/scsi/sg.c
28755 27841
28756 sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL); 27842 sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL);
28757 if (!sg_proc_sgp) 27843 if (!sg_proc_sgp)
28758diff -urNp linux-2.6.32.24/drivers/serial/8250_pci.c linux-2.6.32.24/drivers/serial/8250_pci.c 27844diff -urNp linux-2.6.35.7/drivers/serial/8250_pci.c linux-2.6.35.7/drivers/serial/8250_pci.c
28759--- linux-2.6.32.24/drivers/serial/8250_pci.c 2010-08-13 16:24:37.000000000 -0400 27845--- linux-2.6.35.7/drivers/serial/8250_pci.c 2010-08-26 19:47:12.000000000 -0400
28760+++ linux-2.6.32.24/drivers/serial/8250_pci.c 2010-10-23 19:59:20.000000000 -0400 27846+++ linux-2.6.35.7/drivers/serial/8250_pci.c 2010-09-17 20:12:09.000000000 -0400
28761@@ -3664,7 +3664,7 @@ static struct pci_device_id serial_pci_t 27847@@ -3777,7 +3777,7 @@ static struct pci_device_id serial_pci_t
28762 PCI_ANY_ID, PCI_ANY_ID, 27848 PCI_ANY_ID, PCI_ANY_ID,
28763 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, 27849 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
28764 0xffff00, pbn_default }, 27850 0xffff00, pbn_default },
@@ -28767,64 +27853,22 @@ diff -urNp linux-2.6.32.24/drivers/serial/8250_pci.c linux-2.6.32.24/drivers/ser
28767 }; 27853 };
28768 27854
28769 static struct pci_driver serial_pci_driver = { 27855 static struct pci_driver serial_pci_driver = {
28770diff -urNp linux-2.6.32.24/drivers/serial/kgdboc.c linux-2.6.32.24/drivers/serial/kgdboc.c 27856diff -urNp linux-2.6.35.7/drivers/serial/kgdboc.c linux-2.6.35.7/drivers/serial/kgdboc.c
28771--- linux-2.6.32.24/drivers/serial/kgdboc.c 2010-08-13 16:24:37.000000000 -0400 27857--- linux-2.6.35.7/drivers/serial/kgdboc.c 2010-08-26 19:47:12.000000000 -0400
28772+++ linux-2.6.32.24/drivers/serial/kgdboc.c 2010-10-23 19:59:20.000000000 -0400 27858+++ linux-2.6.35.7/drivers/serial/kgdboc.c 2010-09-17 20:12:09.000000000 -0400
28773@@ -18,7 +18,7 @@ 27859@@ -20,7 +20,7 @@
28774 27860
28775 #define MAX_CONFIG_LEN 40 27861 #define MAX_CONFIG_LEN 40
28776 27862
28777-static struct kgdb_io kgdboc_io_ops; 27863-static struct kgdb_io kgdboc_io_ops;
28778+static const struct kgdb_io kgdboc_io_ops; 27864+static struct kgdb_io kgdboc_io_ops;
28779 27865
28780 /* -1 = init not run yet, 0 = unconfigured, 1 = configured. */ 27866 /* -1 = init not run yet, 0 = unconfigured, 1 = configured. */
28781 static int configured = -1; 27867 static int configured = -1;
28782@@ -154,7 +154,7 @@ static void kgdboc_post_exp_handler(void 27868diff -urNp linux-2.6.35.7/drivers/staging/comedi/comedi_fops.c linux-2.6.35.7/drivers/staging/comedi/comedi_fops.c
28783 module_put(THIS_MODULE); 27869--- linux-2.6.35.7/drivers/staging/comedi/comedi_fops.c 2010-08-26 19:47:12.000000000 -0400
28784 } 27870+++ linux-2.6.35.7/drivers/staging/comedi/comedi_fops.c 2010-09-17 20:12:09.000000000 -0400
28785 27871@@ -1425,7 +1425,7 @@ static void comedi_unmap(struct vm_area_
28786-static struct kgdb_io kgdboc_io_ops = {
28787+static const struct kgdb_io kgdboc_io_ops = {
28788 .name = "kgdboc",
28789 .read_char = kgdboc_get_char,
28790 .write_char = kgdboc_put_char,
28791diff -urNp linux-2.6.32.24/drivers/staging/android/binder.c linux-2.6.32.24/drivers/staging/android/binder.c
28792--- linux-2.6.32.24/drivers/staging/android/binder.c 2010-08-13 16:24:37.000000000 -0400
28793+++ linux-2.6.32.24/drivers/staging/android/binder.c 2010-10-23 19:59:20.000000000 -0400
28794@@ -2756,7 +2756,7 @@ static void binder_vma_close(struct vm_a
28795 binder_defer_work(proc, BINDER_DEFERRED_PUT_FILES);
28796 }
28797
28798-static struct vm_operations_struct binder_vm_ops = {
28799+static const struct vm_operations_struct binder_vm_ops = {
28800 .open = binder_vma_open,
28801 .close = binder_vma_close,
28802 };
28803diff -urNp linux-2.6.32.24/drivers/staging/b3dfg/b3dfg.c linux-2.6.32.24/drivers/staging/b3dfg/b3dfg.c
28804--- linux-2.6.32.24/drivers/staging/b3dfg/b3dfg.c 2010-08-13 16:24:37.000000000 -0400
28805+++ linux-2.6.32.24/drivers/staging/b3dfg/b3dfg.c 2010-10-23 19:59:20.000000000 -0400
28806@@ -455,7 +455,7 @@ static int b3dfg_vma_fault(struct vm_are
28807 return VM_FAULT_NOPAGE;
28808 }
28809
28810-static struct vm_operations_struct b3dfg_vm_ops = {
28811+static const struct vm_operations_struct b3dfg_vm_ops = {
28812 .fault = b3dfg_vma_fault,
28813 };
28814
28815@@ -848,7 +848,7 @@ static int b3dfg_mmap(struct file *filp,
28816 return r;
28817 }
28818
28819-static struct file_operations b3dfg_fops = {
28820+static const struct file_operations b3dfg_fops = {
28821 .owner = THIS_MODULE,
28822 .open = b3dfg_open,
28823 .release = b3dfg_release,
28824diff -urNp linux-2.6.32.24/drivers/staging/comedi/comedi_fops.c linux-2.6.32.24/drivers/staging/comedi/comedi_fops.c
28825--- linux-2.6.32.24/drivers/staging/comedi/comedi_fops.c 2010-08-13 16:24:37.000000000 -0400
28826+++ linux-2.6.32.24/drivers/staging/comedi/comedi_fops.c 2010-10-23 19:59:20.000000000 -0400
28827@@ -1389,7 +1389,7 @@ void comedi_unmap(struct vm_area_struct
28828 mutex_unlock(&dev->mutex); 27872 mutex_unlock(&dev->mutex);
28829 } 27873 }
28830 27874
@@ -28833,10 +27877,31 @@ diff -urNp linux-2.6.32.24/drivers/staging/comedi/comedi_fops.c linux-2.6.32.24/
28833 .close = comedi_unmap, 27877 .close = comedi_unmap,
28834 }; 27878 };
28835 27879
28836diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/adsp_driver.c linux-2.6.32.24/drivers/staging/dream/qdsp5/adsp_driver.c 27880diff -urNp linux-2.6.35.7/drivers/staging/dream/pmem.c linux-2.6.35.7/drivers/staging/dream/pmem.c
28837--- linux-2.6.32.24/drivers/staging/dream/qdsp5/adsp_driver.c 2010-08-13 16:24:37.000000000 -0400 27881--- linux-2.6.35.7/drivers/staging/dream/pmem.c 2010-08-26 19:47:12.000000000 -0400
28838+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/adsp_driver.c 2010-10-23 19:59:20.000000000 -0400 27882+++ linux-2.6.35.7/drivers/staging/dream/pmem.c 2010-09-17 20:12:09.000000000 -0400
28839@@ -576,7 +576,7 @@ static struct adsp_device *inode_to_devi 27883@@ -175,7 +175,7 @@ static int pmem_mmap(struct file *, stru
27884 static int pmem_open(struct inode *, struct file *);
27885 static long pmem_ioctl(struct file *, unsigned int, unsigned long);
27886
27887-struct file_operations pmem_fops = {
27888+const struct file_operations pmem_fops = {
27889 .release = pmem_release,
27890 .mmap = pmem_mmap,
27891 .open = pmem_open,
27892@@ -1201,7 +1201,7 @@ static ssize_t debug_read(struct file *f
27893 return simple_read_from_buffer(buf, count, ppos, buffer, n);
27894 }
27895
27896-static struct file_operations debug_fops = {
27897+static const struct file_operations debug_fops = {
27898 .read = debug_read,
27899 .open = debug_open,
27900 };
27901diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/adsp_driver.c linux-2.6.35.7/drivers/staging/dream/qdsp5/adsp_driver.c
27902--- linux-2.6.35.7/drivers/staging/dream/qdsp5/adsp_driver.c 2010-08-26 19:47:12.000000000 -0400
27903+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/adsp_driver.c 2010-09-17 20:12:09.000000000 -0400
27904@@ -577,7 +577,7 @@ static struct adsp_device *inode_to_devi
28840 static dev_t adsp_devno; 27905 static dev_t adsp_devno;
28841 static struct class *adsp_class; 27906 static struct class *adsp_class;
28842 27907
@@ -28845,10 +27910,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/adsp_driver.c linux-2.6.3
28845 .owner = THIS_MODULE, 27910 .owner = THIS_MODULE,
28846 .open = adsp_open, 27911 .open = adsp_open,
28847 .unlocked_ioctl = adsp_ioctl, 27912 .unlocked_ioctl = adsp_ioctl,
28848diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_aac.c linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_aac.c 27913diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_aac.c linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_aac.c
28849--- linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_aac.c 2010-08-13 16:24:37.000000000 -0400 27914--- linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_aac.c 2010-08-26 19:47:12.000000000 -0400
28850+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_aac.c 2010-10-23 19:59:20.000000000 -0400 27915+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_aac.c 2010-09-17 20:12:09.000000000 -0400
28851@@ -1022,7 +1022,7 @@ done: 27916@@ -1023,7 +1023,7 @@ done:
28852 return rc; 27917 return rc;
28853 } 27918 }
28854 27919
@@ -28857,10 +27922,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_aac.c linux-2.6.32.
28857 .owner = THIS_MODULE, 27922 .owner = THIS_MODULE,
28858 .open = audio_open, 27923 .open = audio_open,
28859 .release = audio_release, 27924 .release = audio_release,
28860diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_amrnb.c linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_amrnb.c 27925diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_amrnb.c linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_amrnb.c
28861--- linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_amrnb.c 2010-08-13 16:24:37.000000000 -0400 27926--- linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_amrnb.c 2010-08-26 19:47:12.000000000 -0400
28862+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_amrnb.c 2010-10-23 19:59:20.000000000 -0400 27927+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_amrnb.c 2010-09-17 20:12:09.000000000 -0400
28863@@ -833,7 +833,7 @@ done: 27928@@ -834,7 +834,7 @@ done:
28864 return rc; 27929 return rc;
28865 } 27930 }
28866 27931
@@ -28869,10 +27934,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_amrnb.c linux-2.6.3
28869 .owner = THIS_MODULE, 27934 .owner = THIS_MODULE,
28870 .open = audamrnb_open, 27935 .open = audamrnb_open,
28871 .release = audamrnb_release, 27936 .release = audamrnb_release,
28872diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_evrc.c linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_evrc.c 27937diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_evrc.c linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_evrc.c
28873--- linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_evrc.c 2010-08-13 16:24:37.000000000 -0400 27938--- linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_evrc.c 2010-08-26 19:47:12.000000000 -0400
28874+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_evrc.c 2010-10-23 19:59:20.000000000 -0400 27939+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_evrc.c 2010-09-17 20:12:09.000000000 -0400
28875@@ -805,7 +805,7 @@ dma_fail: 27940@@ -806,7 +806,7 @@ dma_fail:
28876 return rc; 27941 return rc;
28877 } 27942 }
28878 27943
@@ -28881,10 +27946,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_evrc.c linux-2.6.32
28881 .owner = THIS_MODULE, 27946 .owner = THIS_MODULE,
28882 .open = audevrc_open, 27947 .open = audevrc_open,
28883 .release = audevrc_release, 27948 .release = audevrc_release,
28884diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_in.c linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_in.c 27949diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_in.c linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_in.c
28885--- linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_in.c 2010-08-13 16:24:37.000000000 -0400 27950--- linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_in.c 2010-08-26 19:47:12.000000000 -0400
28886+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_in.c 2010-10-23 19:59:20.000000000 -0400 27951+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_in.c 2010-09-17 20:12:09.000000000 -0400
28887@@ -913,7 +913,7 @@ static int audpre_open(struct inode *ino 27952@@ -914,7 +914,7 @@ static int audpre_open(struct inode *ino
28888 return 0; 27953 return 0;
28889 } 27954 }
28890 27955
@@ -28893,7 +27958,7 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_in.c linux-2.6.32.2
28893 .owner = THIS_MODULE, 27958 .owner = THIS_MODULE,
28894 .open = audio_in_open, 27959 .open = audio_in_open,
28895 .release = audio_in_release, 27960 .release = audio_in_release,
28896@@ -922,7 +922,7 @@ static struct file_operations audio_fops 27961@@ -923,7 +923,7 @@ static struct file_operations audio_fops
28897 .unlocked_ioctl = audio_in_ioctl, 27962 .unlocked_ioctl = audio_in_ioctl,
28898 }; 27963 };
28899 27964
@@ -28902,9 +27967,9 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_in.c linux-2.6.32.2
28902 .owner = THIS_MODULE, 27967 .owner = THIS_MODULE,
28903 .open = audpre_open, 27968 .open = audpre_open,
28904 .unlocked_ioctl = audpre_ioctl, 27969 .unlocked_ioctl = audpre_ioctl,
28905diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_mp3.c linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_mp3.c 27970diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_mp3.c linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_mp3.c
28906--- linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_mp3.c 2010-08-13 16:24:37.000000000 -0400 27971--- linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_mp3.c 2010-08-26 19:47:12.000000000 -0400
28907+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_mp3.c 2010-10-23 19:59:20.000000000 -0400 27972+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_mp3.c 2010-09-17 20:12:09.000000000 -0400
28908@@ -941,7 +941,7 @@ done: 27973@@ -941,7 +941,7 @@ done:
28909 return rc; 27974 return rc;
28910 } 27975 }
@@ -28914,10 +27979,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_mp3.c linux-2.6.32.
28914 .owner = THIS_MODULE, 27979 .owner = THIS_MODULE,
28915 .open = audio_open, 27980 .open = audio_open,
28916 .release = audio_release, 27981 .release = audio_release,
28917diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_out.c linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_out.c 27982diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_out.c linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_out.c
28918--- linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_out.c 2010-08-13 16:24:37.000000000 -0400 27983--- linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_out.c 2010-08-26 19:47:12.000000000 -0400
28919+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_out.c 2010-10-23 19:59:20.000000000 -0400 27984+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_out.c 2010-09-17 20:12:09.000000000 -0400
28920@@ -810,7 +810,7 @@ static int audpp_open(struct inode *inod 27985@@ -800,7 +800,7 @@ static int audpp_open(struct inode *inod
28921 return 0; 27986 return 0;
28922 } 27987 }
28923 27988
@@ -28926,7 +27991,7 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_out.c linux-2.6.32.
28926 .owner = THIS_MODULE, 27991 .owner = THIS_MODULE,
28927 .open = audio_open, 27992 .open = audio_open,
28928 .release = audio_release, 27993 .release = audio_release,
28929@@ -819,7 +819,7 @@ static struct file_operations audio_fops 27994@@ -809,7 +809,7 @@ static struct file_operations audio_fops
28930 .unlocked_ioctl = audio_ioctl, 27995 .unlocked_ioctl = audio_ioctl,
28931 }; 27996 };
28932 27997
@@ -28935,10 +28000,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_out.c linux-2.6.32.
28935 .owner = THIS_MODULE, 28000 .owner = THIS_MODULE,
28936 .open = audpp_open, 28001 .open = audpp_open,
28937 .unlocked_ioctl = audpp_ioctl, 28002 .unlocked_ioctl = audpp_ioctl,
28938diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_qcelp.c linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_qcelp.c 28003diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_qcelp.c linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_qcelp.c
28939--- linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_qcelp.c 2010-08-13 16:24:37.000000000 -0400 28004--- linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_qcelp.c 2010-08-26 19:47:12.000000000 -0400
28940+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_qcelp.c 2010-10-23 19:59:20.000000000 -0400 28005+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/audio_qcelp.c 2010-09-17 20:12:09.000000000 -0400
28941@@ -816,7 +816,7 @@ err: 28006@@ -817,7 +817,7 @@ err:
28942 return rc; 28007 return rc;
28943 } 28008 }
28944 28009
@@ -28947,9 +28012,9 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/audio_qcelp.c linux-2.6.3
28947 .owner = THIS_MODULE, 28012 .owner = THIS_MODULE,
28948 .open = audqcelp_open, 28013 .open = audqcelp_open,
28949 .release = audqcelp_release, 28014 .release = audqcelp_release,
28950diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/snd.c linux-2.6.32.24/drivers/staging/dream/qdsp5/snd.c 28015diff -urNp linux-2.6.35.7/drivers/staging/dream/qdsp5/snd.c linux-2.6.35.7/drivers/staging/dream/qdsp5/snd.c
28951--- linux-2.6.32.24/drivers/staging/dream/qdsp5/snd.c 2010-08-13 16:24:37.000000000 -0400 28016--- linux-2.6.35.7/drivers/staging/dream/qdsp5/snd.c 2010-08-26 19:47:12.000000000 -0400
28952+++ linux-2.6.32.24/drivers/staging/dream/qdsp5/snd.c 2010-10-23 19:59:20.000000000 -0400 28017+++ linux-2.6.35.7/drivers/staging/dream/qdsp5/snd.c 2010-09-17 20:12:09.000000000 -0400
28953@@ -242,7 +242,7 @@ err: 28018@@ -242,7 +242,7 @@ err:
28954 return rc; 28019 return rc;
28955 } 28020 }
@@ -28959,76 +28024,22 @@ diff -urNp linux-2.6.32.24/drivers/staging/dream/qdsp5/snd.c linux-2.6.32.24/dri
28959 .owner = THIS_MODULE, 28024 .owner = THIS_MODULE,
28960 .open = snd_open, 28025 .open = snd_open,
28961 .release = snd_release, 28026 .release = snd_release,
28962diff -urNp linux-2.6.32.24/drivers/staging/dream/smd/smd_qmi.c linux-2.6.32.24/drivers/staging/dream/smd/smd_qmi.c 28027diff -urNp linux-2.6.35.7/drivers/staging/dt3155/dt3155_drv.c linux-2.6.35.7/drivers/staging/dt3155/dt3155_drv.c
28963--- linux-2.6.32.24/drivers/staging/dream/smd/smd_qmi.c 2010-08-13 16:24:37.000000000 -0400 28028--- linux-2.6.35.7/drivers/staging/dt3155/dt3155_drv.c 2010-08-26 19:47:12.000000000 -0400
28964+++ linux-2.6.32.24/drivers/staging/dream/smd/smd_qmi.c 2010-10-23 19:59:20.000000000 -0400 28029+++ linux-2.6.35.7/drivers/staging/dt3155/dt3155_drv.c 2010-09-17 20:12:09.000000000 -0400
28965@@ -793,7 +793,7 @@ static int qmi_release(struct inode *ip, 28030@@ -853,7 +853,7 @@ dt3155_unlocked_ioctl(struct file *file,
28966 return 0; 28031 * needed by init_module
28967 } 28032 * register_chrdev
28968 28033 *****************************************************/
28969-static struct file_operations qmi_fops = { 28034-static struct file_operations dt3155_fops = {
28970+static const struct file_operations qmi_fops = { 28035+static const struct file_operations dt3155_fops = {
28971 .owner = THIS_MODULE, 28036 .read = dt3155_read,
28972 .read = qmi_read, 28037 .unlocked_ioctl = dt3155_unlocked_ioctl,
28973 .write = qmi_write, 28038 .mmap = dt3155_mmap,
28974diff -urNp linux-2.6.32.24/drivers/staging/dream/smd/smd_rpcrouter_device.c linux-2.6.32.24/drivers/staging/dream/smd/smd_rpcrouter_device.c 28039diff -urNp linux-2.6.35.7/drivers/staging/go7007/go7007-v4l2.c linux-2.6.35.7/drivers/staging/go7007/go7007-v4l2.c
28975--- linux-2.6.32.24/drivers/staging/dream/smd/smd_rpcrouter_device.c 2010-08-13 16:24:37.000000000 -0400 28040--- linux-2.6.35.7/drivers/staging/go7007/go7007-v4l2.c 2010-08-26 19:47:12.000000000 -0400
28976+++ linux-2.6.32.24/drivers/staging/dream/smd/smd_rpcrouter_device.c 2010-10-23 19:59:20.000000000 -0400 28041+++ linux-2.6.35.7/drivers/staging/go7007/go7007-v4l2.c 2010-09-17 20:12:09.000000000 -0400
28977@@ -214,7 +214,7 @@ static long rpcrouter_ioctl(struct file 28042@@ -1673,7 +1673,7 @@ static int go7007_vm_fault(struct vm_are
28978 return rc;
28979 }
28980
28981-static struct file_operations rpcrouter_server_fops = {
28982+static const struct file_operations rpcrouter_server_fops = {
28983 .owner = THIS_MODULE,
28984 .open = rpcrouter_open,
28985 .release = rpcrouter_release,
28986@@ -224,7 +224,7 @@ static struct file_operations rpcrouter_
28987 .unlocked_ioctl = rpcrouter_ioctl,
28988 };
28989
28990-static struct file_operations rpcrouter_router_fops = {
28991+static const struct file_operations rpcrouter_router_fops = {
28992 .owner = THIS_MODULE,
28993 .open = rpcrouter_open,
28994 .release = rpcrouter_release,
28995diff -urNp linux-2.6.32.24/drivers/staging/dst/dcore.c linux-2.6.32.24/drivers/staging/dst/dcore.c
28996--- linux-2.6.32.24/drivers/staging/dst/dcore.c 2010-08-13 16:24:37.000000000 -0400
28997+++ linux-2.6.32.24/drivers/staging/dst/dcore.c 2010-10-23 19:59:20.000000000 -0400
28998@@ -149,7 +149,7 @@ static int dst_bdev_release(struct gendi
28999 return 0;
29000 }
29001
29002-static struct block_device_operations dst_blk_ops = {
29003+static const struct block_device_operations dst_blk_ops = {
29004 .open = dst_bdev_open,
29005 .release = dst_bdev_release,
29006 .owner = THIS_MODULE,
29007@@ -588,7 +588,7 @@ static struct dst_node *dst_alloc_node(s
29008 n->size = ctl->size;
29009
29010 atomic_set(&n->refcnt, 1);
29011- atomic_long_set(&n->gen, 0);
29012+ atomic_long_set_unchecked(&n->gen, 0);
29013 snprintf(n->name, sizeof(n->name), "%s", ctl->name);
29014
29015 err = dst_node_sysfs_init(n);
29016diff -urNp linux-2.6.32.24/drivers/staging/dst/trans.c linux-2.6.32.24/drivers/staging/dst/trans.c
29017--- linux-2.6.32.24/drivers/staging/dst/trans.c 2010-08-13 16:24:37.000000000 -0400
29018+++ linux-2.6.32.24/drivers/staging/dst/trans.c 2010-10-23 19:59:20.000000000 -0400
29019@@ -169,7 +169,7 @@ int dst_process_bio(struct dst_node *n,
29020 t->error = 0;
29021 t->retries = 0;
29022 atomic_set(&t->refcnt, 1);
29023- t->gen = atomic_long_inc_return(&n->gen);
29024+ t->gen = atomic_long_inc_return_unchecked(&n->gen);
29025
29026 t->enc = bio_data_dir(bio);
29027 dst_bio_to_cmd(bio, &t->cmd, DST_IO, t->gen);
29028diff -urNp linux-2.6.32.24/drivers/staging/go7007/go7007-v4l2.c linux-2.6.32.24/drivers/staging/go7007/go7007-v4l2.c
29029--- linux-2.6.32.24/drivers/staging/go7007/go7007-v4l2.c 2010-08-13 16:24:37.000000000 -0400
29030+++ linux-2.6.32.24/drivers/staging/go7007/go7007-v4l2.c 2010-10-23 19:59:20.000000000 -0400
29031@@ -1700,7 +1700,7 @@ static int go7007_vm_fault(struct vm_are
29032 return 0; 28043 return 0;
29033 } 28044 }
29034 28045
@@ -29037,22 +28048,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/go7007/go7007-v4l2.c linux-2.6.32.24/
29037 .open = go7007_vm_open, 28048 .open = go7007_vm_open,
29038 .close = go7007_vm_close, 28049 .close = go7007_vm_close,
29039 .fault = go7007_vm_fault, 28050 .fault = go7007_vm_fault,
29040diff -urNp linux-2.6.32.24/drivers/staging/hv/blkvsc_drv.c linux-2.6.32.24/drivers/staging/hv/blkvsc_drv.c 28051diff -urNp linux-2.6.35.7/drivers/staging/hv/hv.c linux-2.6.35.7/drivers/staging/hv/hv.c
29041--- linux-2.6.32.24/drivers/staging/hv/blkvsc_drv.c 2010-08-13 16:24:37.000000000 -0400 28052--- linux-2.6.35.7/drivers/staging/hv/hv.c 2010-08-26 19:47:12.000000000 -0400
29042+++ linux-2.6.32.24/drivers/staging/hv/blkvsc_drv.c 2010-10-23 19:59:20.000000000 -0400 28053+++ linux-2.6.35.7/drivers/staging/hv/hv.c 2010-09-17 20:12:09.000000000 -0400
29043@@ -153,7 +153,7 @@ static int blkvsc_ringbuffer_size = BLKV 28054@@ -162,7 +162,7 @@ static u64 HvDoHypercall(u64 Control, vo
29044 /* The one and only one */
29045 static struct blkvsc_driver_context g_blkvsc_drv;
29046
29047-static struct block_device_operations block_ops = {
29048+static const struct block_device_operations block_ops = {
29049 .owner = THIS_MODULE,
29050 .open = blkvsc_open,
29051 .release = blkvsc_release,
29052diff -urNp linux-2.6.32.24/drivers/staging/hv/Hv.c linux-2.6.32.24/drivers/staging/hv/Hv.c
29053--- linux-2.6.32.24/drivers/staging/hv/Hv.c 2010-08-13 16:24:37.000000000 -0400
29054+++ linux-2.6.32.24/drivers/staging/hv/Hv.c 2010-10-23 19:59:20.000000000 -0400
29055@@ -161,7 +161,7 @@ static u64 HvDoHypercall(u64 Control, vo
29056 u64 outputAddress = (Output) ? virt_to_phys(Output) : 0; 28055 u64 outputAddress = (Output) ? virt_to_phys(Output) : 0;
29057 u32 outputAddressHi = outputAddress >> 32; 28056 u32 outputAddressHi = outputAddress >> 32;
29058 u32 outputAddressLo = outputAddress & 0xFFFFFFFF; 28057 u32 outputAddressLo = outputAddress & 0xFFFFFFFF;
@@ -29061,10 +28060,22 @@ diff -urNp linux-2.6.32.24/drivers/staging/hv/Hv.c linux-2.6.32.24/drivers/stagi
29061 28060
29062 DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>", 28061 DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>",
29063 Control, Input, Output); 28062 Control, Input, Output);
29064diff -urNp linux-2.6.32.24/drivers/staging/panel/panel.c linux-2.6.32.24/drivers/staging/panel/panel.c 28063diff -urNp linux-2.6.35.7/drivers/staging/msm/msm_fb_bl.c linux-2.6.35.7/drivers/staging/msm/msm_fb_bl.c
29065--- linux-2.6.32.24/drivers/staging/panel/panel.c 2010-08-13 16:24:37.000000000 -0400 28064--- linux-2.6.35.7/drivers/staging/msm/msm_fb_bl.c 2010-08-26 19:47:12.000000000 -0400
29066+++ linux-2.6.32.24/drivers/staging/panel/panel.c 2010-10-23 19:59:20.000000000 -0400 28065+++ linux-2.6.35.7/drivers/staging/msm/msm_fb_bl.c 2010-09-17 20:12:09.000000000 -0400
29067@@ -1305,7 +1305,7 @@ static int lcd_release(struct inode *ino 28066@@ -42,7 +42,7 @@ static int msm_fb_bl_update_status(struc
28067 return 0;
28068 }
28069
28070-static struct backlight_ops msm_fb_bl_ops = {
28071+static const struct backlight_ops msm_fb_bl_ops = {
28072 .get_brightness = msm_fb_bl_get_brightness,
28073 .update_status = msm_fb_bl_update_status,
28074 };
28075diff -urNp linux-2.6.35.7/drivers/staging/panel/panel.c linux-2.6.35.7/drivers/staging/panel/panel.c
28076--- linux-2.6.35.7/drivers/staging/panel/panel.c 2010-08-26 19:47:12.000000000 -0400
28077+++ linux-2.6.35.7/drivers/staging/panel/panel.c 2010-09-17 20:12:09.000000000 -0400
28078@@ -1304,7 +1304,7 @@ static int lcd_release(struct inode *ino
29068 return 0; 28079 return 0;
29069 } 28080 }
29070 28081
@@ -29073,7 +28084,7 @@ diff -urNp linux-2.6.32.24/drivers/staging/panel/panel.c linux-2.6.32.24/drivers
29073 .write = lcd_write, 28084 .write = lcd_write,
29074 .open = lcd_open, 28085 .open = lcd_open,
29075 .release = lcd_release, 28086 .release = lcd_release,
29076@@ -1565,7 +1565,7 @@ static int keypad_release(struct inode * 28087@@ -1564,7 +1564,7 @@ static int keypad_release(struct inode *
29077 return 0; 28088 return 0;
29078 } 28089 }
29079 28090
@@ -29082,9 +28093,9 @@ diff -urNp linux-2.6.32.24/drivers/staging/panel/panel.c linux-2.6.32.24/drivers
29082 .read = keypad_read, /* read */ 28093 .read = keypad_read, /* read */
29083 .open = keypad_open, /* open */ 28094 .open = keypad_open, /* open */
29084 .release = keypad_release, /* close */ 28095 .release = keypad_release, /* close */
29085diff -urNp linux-2.6.32.24/drivers/staging/phison/phison.c linux-2.6.32.24/drivers/staging/phison/phison.c 28096diff -urNp linux-2.6.35.7/drivers/staging/phison/phison.c linux-2.6.35.7/drivers/staging/phison/phison.c
29086--- linux-2.6.32.24/drivers/staging/phison/phison.c 2010-08-13 16:24:37.000000000 -0400 28097--- linux-2.6.35.7/drivers/staging/phison/phison.c 2010-08-26 19:47:12.000000000 -0400
29087+++ linux-2.6.32.24/drivers/staging/phison/phison.c 2010-10-23 19:59:20.000000000 -0400 28098+++ linux-2.6.35.7/drivers/staging/phison/phison.c 2010-09-17 20:12:09.000000000 -0400
29088@@ -43,7 +43,7 @@ static struct scsi_host_template phison_ 28099@@ -43,7 +43,7 @@ static struct scsi_host_template phison_
29089 ATA_BMDMA_SHT(DRV_NAME), 28100 ATA_BMDMA_SHT(DRV_NAME),
29090 }; 28101 };
@@ -29094,22 +28105,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/phison/phison.c linux-2.6.32.24/drive
29094 .inherits = &ata_bmdma_port_ops, 28105 .inherits = &ata_bmdma_port_ops,
29095 .prereset = phison_pre_reset, 28106 .prereset = phison_pre_reset,
29096 }; 28107 };
29097diff -urNp linux-2.6.32.24/drivers/staging/poch/poch.c linux-2.6.32.24/drivers/staging/poch/poch.c 28108diff -urNp linux-2.6.35.7/drivers/staging/pohmelfs/inode.c linux-2.6.35.7/drivers/staging/pohmelfs/inode.c
29098--- linux-2.6.32.24/drivers/staging/poch/poch.c 2010-08-13 16:24:37.000000000 -0400 28109--- linux-2.6.35.7/drivers/staging/pohmelfs/inode.c 2010-08-26 19:47:12.000000000 -0400
29099+++ linux-2.6.32.24/drivers/staging/poch/poch.c 2010-10-23 19:59:20.000000000 -0400 28110+++ linux-2.6.35.7/drivers/staging/pohmelfs/inode.c 2010-09-17 20:12:09.000000000 -0400
29100@@ -1057,7 +1057,7 @@ static int poch_ioctl(struct inode *inod 28111@@ -1846,7 +1846,7 @@ static int pohmelfs_fill_super(struct su
29101 return 0;
29102 }
29103
29104-static struct file_operations poch_fops = {
29105+static const struct file_operations poch_fops = {
29106 .owner = THIS_MODULE,
29107 .open = poch_open,
29108 .release = poch_release,
29109diff -urNp linux-2.6.32.24/drivers/staging/pohmelfs/inode.c linux-2.6.32.24/drivers/staging/pohmelfs/inode.c
29110--- linux-2.6.32.24/drivers/staging/pohmelfs/inode.c 2010-08-13 16:24:37.000000000 -0400
29111+++ linux-2.6.32.24/drivers/staging/pohmelfs/inode.c 2010-10-23 19:59:20.000000000 -0400
29112@@ -1850,7 +1850,7 @@ static int pohmelfs_fill_super(struct su
29113 mutex_init(&psb->mcache_lock); 28112 mutex_init(&psb->mcache_lock);
29114 psb->mcache_root = RB_ROOT; 28113 psb->mcache_root = RB_ROOT;
29115 psb->mcache_timeout = msecs_to_jiffies(5000); 28114 psb->mcache_timeout = msecs_to_jiffies(5000);
@@ -29118,9 +28117,9 @@ diff -urNp linux-2.6.32.24/drivers/staging/pohmelfs/inode.c linux-2.6.32.24/driv
29118 28117
29119 psb->trans_max_pages = 100; 28118 psb->trans_max_pages = 100;
29120 28119
29121diff -urNp linux-2.6.32.24/drivers/staging/pohmelfs/mcache.c linux-2.6.32.24/drivers/staging/pohmelfs/mcache.c 28120diff -urNp linux-2.6.35.7/drivers/staging/pohmelfs/mcache.c linux-2.6.35.7/drivers/staging/pohmelfs/mcache.c
29122--- linux-2.6.32.24/drivers/staging/pohmelfs/mcache.c 2010-08-13 16:24:37.000000000 -0400 28121--- linux-2.6.35.7/drivers/staging/pohmelfs/mcache.c 2010-08-26 19:47:12.000000000 -0400
29123+++ linux-2.6.32.24/drivers/staging/pohmelfs/mcache.c 2010-10-23 19:59:20.000000000 -0400 28122+++ linux-2.6.35.7/drivers/staging/pohmelfs/mcache.c 2010-09-17 20:12:09.000000000 -0400
29124@@ -121,7 +121,7 @@ struct pohmelfs_mcache *pohmelfs_mcache_ 28123@@ -121,7 +121,7 @@ struct pohmelfs_mcache *pohmelfs_mcache_
29125 m->data = data; 28124 m->data = data;
29126 m->start = start; 28125 m->start = start;
@@ -29130,10 +28129,10 @@ diff -urNp linux-2.6.32.24/drivers/staging/pohmelfs/mcache.c linux-2.6.32.24/dri
29130 28129
29131 mutex_lock(&psb->mcache_lock); 28130 mutex_lock(&psb->mcache_lock);
29132 err = pohmelfs_mcache_insert(psb, m); 28131 err = pohmelfs_mcache_insert(psb, m);
29133diff -urNp linux-2.6.32.24/drivers/staging/pohmelfs/netfs.h linux-2.6.32.24/drivers/staging/pohmelfs/netfs.h 28132diff -urNp linux-2.6.35.7/drivers/staging/pohmelfs/netfs.h linux-2.6.35.7/drivers/staging/pohmelfs/netfs.h
29134--- linux-2.6.32.24/drivers/staging/pohmelfs/netfs.h 2010-08-13 16:24:37.000000000 -0400 28133--- linux-2.6.35.7/drivers/staging/pohmelfs/netfs.h 2010-08-26 19:47:12.000000000 -0400
29135+++ linux-2.6.32.24/drivers/staging/pohmelfs/netfs.h 2010-10-23 19:59:20.000000000 -0400 28134+++ linux-2.6.35.7/drivers/staging/pohmelfs/netfs.h 2010-09-17 20:12:09.000000000 -0400
29136@@ -570,7 +570,7 @@ struct pohmelfs_config; 28135@@ -571,7 +571,7 @@ struct pohmelfs_config;
29137 struct pohmelfs_sb { 28136 struct pohmelfs_sb {
29138 struct rb_root mcache_root; 28137 struct rb_root mcache_root;
29139 struct mutex mcache_lock; 28138 struct mutex mcache_lock;
@@ -29142,22 +28141,58 @@ diff -urNp linux-2.6.32.24/drivers/staging/pohmelfs/netfs.h linux-2.6.32.24/driv
29142 unsigned long mcache_timeout; 28141 unsigned long mcache_timeout;
29143 28142
29144 unsigned int idx; 28143 unsigned int idx;
29145diff -urNp linux-2.6.32.24/drivers/staging/sep/sep_driver.c linux-2.6.32.24/drivers/staging/sep/sep_driver.c 28144diff -urNp linux-2.6.35.7/drivers/staging/ramzswap/ramzswap_drv.c linux-2.6.35.7/drivers/staging/ramzswap/ramzswap_drv.c
29146--- linux-2.6.32.24/drivers/staging/sep/sep_driver.c 2010-08-13 16:24:37.000000000 -0400 28145--- linux-2.6.35.7/drivers/staging/ramzswap/ramzswap_drv.c 2010-08-26 19:47:12.000000000 -0400
29147+++ linux-2.6.32.24/drivers/staging/sep/sep_driver.c 2010-10-23 19:59:20.000000000 -0400 28146+++ linux-2.6.35.7/drivers/staging/ramzswap/ramzswap_drv.c 2010-09-17 20:12:09.000000000 -0400
29148@@ -2603,7 +2603,7 @@ static struct pci_driver sep_pci_driver 28147@@ -693,7 +693,7 @@ void ramzswap_slot_free_notify(struct bl
28148 return;
28149 }
28150
28151-static struct block_device_operations ramzswap_devops = {
28152+static const struct block_device_operations ramzswap_devops = {
28153 .ioctl = ramzswap_ioctl,
28154 .swap_slot_free_notify = ramzswap_slot_free_notify,
28155 .owner = THIS_MODULE
28156diff -urNp linux-2.6.35.7/drivers/staging/rtl8192u/ieee80211/proc.c linux-2.6.35.7/drivers/staging/rtl8192u/ieee80211/proc.c
28157--- linux-2.6.35.7/drivers/staging/rtl8192u/ieee80211/proc.c 2010-08-26 19:47:12.000000000 -0400
28158+++ linux-2.6.35.7/drivers/staging/rtl8192u/ieee80211/proc.c 2010-09-17 20:12:09.000000000 -0400
28159@@ -99,7 +99,7 @@ static int crypto_info_open(struct inode
28160 return seq_open(file, &crypto_seq_ops);
28161 }
28162
28163-static struct file_operations proc_crypto_ops = {
28164+static const struct file_operations proc_crypto_ops = {
28165 .open = crypto_info_open,
28166 .read = seq_read,
28167 .llseek = seq_lseek,
28168diff -urNp linux-2.6.35.7/drivers/staging/samsung-laptop/samsung-laptop.c linux-2.6.35.7/drivers/staging/samsung-laptop/samsung-laptop.c
28169--- linux-2.6.35.7/drivers/staging/samsung-laptop/samsung-laptop.c 2010-08-26 19:47:12.000000000 -0400
28170+++ linux-2.6.35.7/drivers/staging/samsung-laptop/samsung-laptop.c 2010-09-17 20:12:09.000000000 -0400
28171@@ -269,7 +269,7 @@ static int update_status(struct backligh
28172 return 0;
28173 }
28174
28175-static struct backlight_ops backlight_ops = {
28176+static const struct backlight_ops backlight_ops = {
28177 .get_brightness = get_brightness,
28178 .update_status = update_status,
28179 };
28180diff -urNp linux-2.6.35.7/drivers/staging/sep/sep_driver.c linux-2.6.35.7/drivers/staging/sep/sep_driver.c
28181--- linux-2.6.35.7/drivers/staging/sep/sep_driver.c 2010-08-26 19:47:12.000000000 -0400
28182+++ linux-2.6.35.7/drivers/staging/sep/sep_driver.c 2010-09-17 20:12:09.000000000 -0400
28183@@ -2637,7 +2637,7 @@ static struct pci_driver sep_pci_driver
29149 static dev_t sep_devno; 28184 static dev_t sep_devno;
29150 28185
29151 /* the files operations structure of the driver */ 28186 /* the files operations structure of the driver */
29152-static struct file_operations sep_file_operations = { 28187-static struct file_operations sep_file_operations = {
29153+static const struct file_operations sep_file_operations = { 28188+static const struct file_operations sep_file_operations = {
29154 .owner = THIS_MODULE, 28189 .owner = THIS_MODULE,
29155 .ioctl = sep_ioctl, 28190 .unlocked_ioctl = sep_ioctl,
29156 .poll = sep_poll, 28191 .poll = sep_poll,
29157diff -urNp linux-2.6.32.24/drivers/staging/vme/devices/vme_user.c linux-2.6.32.24/drivers/staging/vme/devices/vme_user.c 28192diff -urNp linux-2.6.35.7/drivers/staging/vme/devices/vme_user.c linux-2.6.35.7/drivers/staging/vme/devices/vme_user.c
29158--- linux-2.6.32.24/drivers/staging/vme/devices/vme_user.c 2010-08-13 16:24:37.000000000 -0400 28193--- linux-2.6.35.7/drivers/staging/vme/devices/vme_user.c 2010-08-26 19:47:12.000000000 -0400
29159+++ linux-2.6.32.24/drivers/staging/vme/devices/vme_user.c 2010-10-23 19:59:20.000000000 -0400 28194+++ linux-2.6.35.7/drivers/staging/vme/devices/vme_user.c 2010-09-17 20:12:09.000000000 -0400
29160@@ -136,7 +136,7 @@ static int vme_user_ioctl(struct inode * 28195@@ -136,7 +136,7 @@ static long vme_user_unlocked_ioctl(stru
29161 static int __init vme_user_probe(struct device *, int, int); 28196 static int __init vme_user_probe(struct device *, int, int);
29162 static int __exit vme_user_remove(struct device *, int, int); 28197 static int __exit vme_user_remove(struct device *, int, int);
29163 28198
@@ -29166,30 +28201,21 @@ diff -urNp linux-2.6.32.24/drivers/staging/vme/devices/vme_user.c linux-2.6.32.2
29166 .open = vme_user_open, 28201 .open = vme_user_open,
29167 .release = vme_user_release, 28202 .release = vme_user_release,
29168 .read = vme_user_read, 28203 .read = vme_user_read,
29169diff -urNp linux-2.6.32.24/drivers/uio/uio.c linux-2.6.32.24/drivers/uio/uio.c 28204diff -urNp linux-2.6.35.7/drivers/usb/atm/cxacru.c linux-2.6.35.7/drivers/usb/atm/cxacru.c
29170--- linux-2.6.32.24/drivers/uio/uio.c 2010-08-13 16:24:37.000000000 -0400 28205--- linux-2.6.35.7/drivers/usb/atm/cxacru.c 2010-09-20 17:33:09.000000000 -0400
29171+++ linux-2.6.32.24/drivers/uio/uio.c 2010-10-23 19:59:20.000000000 -0400 28206+++ linux-2.6.35.7/drivers/usb/atm/cxacru.c 2010-10-11 22:41:44.000000000 -0400
29172@@ -129,7 +129,7 @@ static ssize_t map_type_show(struct kobj 28207@@ -473,7 +473,7 @@ static ssize_t cxacru_sysfs_store_adsl_c
29173 return entry->show(mem, buf); 28208 ret = sscanf(buf + pos, "%x=%x%n", &index, &value, &tmp);
29174 } 28209 if (ret < 2)
29175 28210 return -EINVAL;
29176-static struct sysfs_ops map_sysfs_ops = { 28211- if (index < 0 || index > 0x7f)
29177+static const struct sysfs_ops map_sysfs_ops = { 28212+ if (index > 0x7f)
29178 .show = map_type_show, 28213 return -EINVAL;
29179 }; 28214 pos += tmp;
29180
29181@@ -217,7 +217,7 @@ static ssize_t portio_type_show(struct k
29182 return entry->show(port, buf);
29183 }
29184
29185-static struct sysfs_ops portio_sysfs_ops = {
29186+static const struct sysfs_ops portio_sysfs_ops = {
29187 .show = portio_type_show,
29188 };
29189 28215
29190diff -urNp linux-2.6.32.24/drivers/usb/atm/usbatm.c linux-2.6.32.24/drivers/usb/atm/usbatm.c 28216diff -urNp linux-2.6.35.7/drivers/usb/atm/usbatm.c linux-2.6.35.7/drivers/usb/atm/usbatm.c
29191--- linux-2.6.32.24/drivers/usb/atm/usbatm.c 2010-08-13 16:24:37.000000000 -0400 28217--- linux-2.6.35.7/drivers/usb/atm/usbatm.c 2010-08-26 19:47:12.000000000 -0400
29192+++ linux-2.6.32.24/drivers/usb/atm/usbatm.c 2010-10-23 19:59:20.000000000 -0400 28218+++ linux-2.6.35.7/drivers/usb/atm/usbatm.c 2010-09-17 20:12:09.000000000 -0400
29193@@ -333,7 +333,7 @@ static void usbatm_extract_one_cell(stru 28219@@ -333,7 +333,7 @@ static void usbatm_extract_one_cell(stru
29194 if (printk_ratelimit()) 28220 if (printk_ratelimit())
29195 atm_warn(instance, "%s: OAM not supported (vpi %d, vci %d)!\n", 28221 atm_warn(instance, "%s: OAM not supported (vpi %d, vci %d)!\n",
@@ -29269,10 +28295,10 @@ diff -urNp linux-2.6.32.24/drivers/usb/atm/usbatm.c linux-2.6.32.24/drivers/usb/
29269 28295
29270 if (!left--) { 28296 if (!left--) {
29271 if (instance->disconnected) 28297 if (instance->disconnected)
29272diff -urNp linux-2.6.32.24/drivers/usb/class/cdc-acm.c linux-2.6.32.24/drivers/usb/class/cdc-acm.c 28298diff -urNp linux-2.6.35.7/drivers/usb/class/cdc-acm.c linux-2.6.35.7/drivers/usb/class/cdc-acm.c
29273--- linux-2.6.32.24/drivers/usb/class/cdc-acm.c 2010-09-20 17:26:42.000000000 -0400 28299--- linux-2.6.35.7/drivers/usb/class/cdc-acm.c 2010-09-20 17:33:09.000000000 -0400
29274+++ linux-2.6.32.24/drivers/usb/class/cdc-acm.c 2010-10-23 19:59:20.000000000 -0400 28300+++ linux-2.6.35.7/drivers/usb/class/cdc-acm.c 2010-09-20 17:33:32.000000000 -0400
29275@@ -1618,7 +1618,7 @@ static struct usb_device_id acm_ids[] = 28301@@ -1640,7 +1640,7 @@ static const struct usb_device_id acm_id
29276 { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, 28302 { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
29277 USB_CDC_ACM_PROTO_AT_CDMA) }, 28303 USB_CDC_ACM_PROTO_AT_CDMA) },
29278 28304
@@ -29281,22 +28307,22 @@ diff -urNp linux-2.6.32.24/drivers/usb/class/cdc-acm.c linux-2.6.32.24/drivers/u
29281 }; 28307 };
29282 28308
29283 MODULE_DEVICE_TABLE(usb, acm_ids); 28309 MODULE_DEVICE_TABLE(usb, acm_ids);
29284diff -urNp linux-2.6.32.24/drivers/usb/class/cdc-wdm.c linux-2.6.32.24/drivers/usb/class/cdc-wdm.c 28310diff -urNp linux-2.6.35.7/drivers/usb/class/cdc-wdm.c linux-2.6.35.7/drivers/usb/class/cdc-wdm.c
29285--- linux-2.6.32.24/drivers/usb/class/cdc-wdm.c 2010-08-13 16:24:37.000000000 -0400 28311--- linux-2.6.35.7/drivers/usb/class/cdc-wdm.c 2010-08-26 19:47:12.000000000 -0400
29286+++ linux-2.6.32.24/drivers/usb/class/cdc-wdm.c 2010-10-23 19:59:20.000000000 -0400 28312+++ linux-2.6.35.7/drivers/usb/class/cdc-wdm.c 2010-09-17 20:12:09.000000000 -0400
29287@@ -314,7 +314,7 @@ static ssize_t wdm_write 28313@@ -342,7 +342,7 @@ static ssize_t wdm_write
29288 if (r < 0)
29289 goto outnp; 28314 goto outnp;
28315 }
29290 28316
29291- if (!file->f_flags && O_NONBLOCK) 28317- if (!file->f_flags && O_NONBLOCK)
29292+ if (!(file->f_flags & O_NONBLOCK)) 28318+ if (!(file->f_flags & O_NONBLOCK))
29293 r = wait_event_interruptible(desc->wait, !test_bit(WDM_IN_USE, 28319 r = wait_event_interruptible(desc->wait, !test_bit(WDM_IN_USE,
29294 &desc->flags)); 28320 &desc->flags));
29295 else 28321 else
29296diff -urNp linux-2.6.32.24/drivers/usb/class/usblp.c linux-2.6.32.24/drivers/usb/class/usblp.c 28322diff -urNp linux-2.6.35.7/drivers/usb/class/usblp.c linux-2.6.35.7/drivers/usb/class/usblp.c
29297--- linux-2.6.32.24/drivers/usb/class/usblp.c 2010-08-13 16:24:37.000000000 -0400 28323--- linux-2.6.35.7/drivers/usb/class/usblp.c 2010-08-26 19:47:12.000000000 -0400
29298+++ linux-2.6.32.24/drivers/usb/class/usblp.c 2010-10-23 19:59:20.000000000 -0400 28324+++ linux-2.6.35.7/drivers/usb/class/usblp.c 2010-09-17 20:12:09.000000000 -0400
29299@@ -228,7 +228,7 @@ static const struct quirk_printer_struct 28325@@ -226,7 +226,7 @@ static const struct quirk_printer_struct
29300 { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */ 28326 { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */
29301 { 0x04f9, 0x000d, USBLP_QUIRK_BIDIR }, /* Brother Industries, Ltd HL-1440 Laser Printer */ 28327 { 0x04f9, 0x000d, USBLP_QUIRK_BIDIR }, /* Brother Industries, Ltd HL-1440 Laser Printer */
29302 { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt Printer M129C */ 28328 { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt Printer M129C */
@@ -29305,7 +28331,7 @@ diff -urNp linux-2.6.32.24/drivers/usb/class/usblp.c linux-2.6.32.24/drivers/usb
29305 }; 28331 };
29306 28332
29307 static int usblp_wwait(struct usblp *usblp, int nonblock); 28333 static int usblp_wwait(struct usblp *usblp, int nonblock);
29308@@ -1412,7 +1412,7 @@ static struct usb_device_id usblp_ids [] 28334@@ -1398,7 +1398,7 @@ static const struct usb_device_id usblp_
29309 { USB_INTERFACE_INFO(7, 1, 2) }, 28335 { USB_INTERFACE_INFO(7, 1, 2) },
29310 { USB_INTERFACE_INFO(7, 1, 3) }, 28336 { USB_INTERFACE_INFO(7, 1, 3) },
29311 { USB_DEVICE(0x04b8, 0x0202) }, /* Seiko Epson Receipt Printer M129C */ 28337 { USB_DEVICE(0x04b8, 0x0202) }, /* Seiko Epson Receipt Printer M129C */
@@ -29314,10 +28340,10 @@ diff -urNp linux-2.6.32.24/drivers/usb/class/usblp.c linux-2.6.32.24/drivers/usb
29314 }; 28340 };
29315 28341
29316 MODULE_DEVICE_TABLE (usb, usblp_ids); 28342 MODULE_DEVICE_TABLE (usb, usblp_ids);
29317diff -urNp linux-2.6.32.24/drivers/usb/core/hcd.c linux-2.6.32.24/drivers/usb/core/hcd.c 28343diff -urNp linux-2.6.35.7/drivers/usb/core/hcd.c linux-2.6.35.7/drivers/usb/core/hcd.c
29318--- linux-2.6.32.24/drivers/usb/core/hcd.c 2010-08-13 16:24:37.000000000 -0400 28344--- linux-2.6.35.7/drivers/usb/core/hcd.c 2010-08-26 19:47:12.000000000 -0400
29319+++ linux-2.6.32.24/drivers/usb/core/hcd.c 2010-10-23 19:59:20.000000000 -0400 28345+++ linux-2.6.35.7/drivers/usb/core/hcd.c 2010-09-17 20:12:09.000000000 -0400
29320@@ -2216,7 +2216,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_platform_shutd 28346@@ -2381,7 +2381,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_platform_shutd
29321 28347
29322 #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) 28348 #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
29323 28349
@@ -29326,7 +28352,7 @@ diff -urNp linux-2.6.32.24/drivers/usb/core/hcd.c linux-2.6.32.24/drivers/usb/co
29326 28352
29327 /* 28353 /*
29328 * The registration is unlocked. 28354 * The registration is unlocked.
29329@@ -2226,7 +2226,7 @@ struct usb_mon_operations *mon_ops; 28355@@ -2391,7 +2391,7 @@ struct usb_mon_operations *mon_ops;
29330 * symbols from usbcore, usbcore gets referenced and cannot be unloaded first. 28356 * symbols from usbcore, usbcore gets referenced and cannot be unloaded first.
29331 */ 28357 */
29332 28358
@@ -29335,40 +28361,10 @@ diff -urNp linux-2.6.32.24/drivers/usb/core/hcd.c linux-2.6.32.24/drivers/usb/co
29335 { 28361 {
29336 28362
29337 if (mon_ops) 28363 if (mon_ops)
29338diff -urNp linux-2.6.32.24/drivers/usb/core/hcd.h linux-2.6.32.24/drivers/usb/core/hcd.h 28364diff -urNp linux-2.6.35.7/drivers/usb/core/hub.c linux-2.6.35.7/drivers/usb/core/hub.c
29339--- linux-2.6.32.24/drivers/usb/core/hcd.h 2010-08-13 16:24:37.000000000 -0400 28365--- linux-2.6.35.7/drivers/usb/core/hub.c 2010-08-26 19:47:12.000000000 -0400
29340+++ linux-2.6.32.24/drivers/usb/core/hcd.h 2010-10-23 19:59:20.000000000 -0400 28366+++ linux-2.6.35.7/drivers/usb/core/hub.c 2010-09-17 20:12:09.000000000 -0400
29341@@ -486,13 +486,13 @@ static inline void usbfs_cleanup(void) { 28367@@ -3453,7 +3453,7 @@ static const struct usb_device_id hub_id
29342 #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE)
29343
29344 struct usb_mon_operations {
29345- void (*urb_submit)(struct usb_bus *bus, struct urb *urb);
29346- void (*urb_submit_error)(struct usb_bus *bus, struct urb *urb, int err);
29347- void (*urb_complete)(struct usb_bus *bus, struct urb *urb, int status);
29348+ void (* const urb_submit)(struct usb_bus *bus, struct urb *urb);
29349+ void (* const urb_submit_error)(struct usb_bus *bus, struct urb *urb, int err);
29350+ void (* const urb_complete)(struct usb_bus *bus, struct urb *urb, int status);
29351 /* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */
29352 };
29353
29354-extern struct usb_mon_operations *mon_ops;
29355+extern const struct usb_mon_operations *mon_ops;
29356
29357 static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb)
29358 {
29359@@ -514,7 +514,7 @@ static inline void usbmon_urb_complete(s
29360 (*mon_ops->urb_complete)(bus, urb, status);
29361 }
29362
29363-int usb_mon_register(struct usb_mon_operations *ops);
29364+int usb_mon_register(const struct usb_mon_operations *ops);
29365 void usb_mon_deregister(void);
29366
29367 #else
29368diff -urNp linux-2.6.32.24/drivers/usb/core/hub.c linux-2.6.32.24/drivers/usb/core/hub.c
29369--- linux-2.6.32.24/drivers/usb/core/hub.c 2010-08-13 16:24:37.000000000 -0400
29370+++ linux-2.6.32.24/drivers/usb/core/hub.c 2010-10-23 19:59:20.000000000 -0400
29371@@ -3401,7 +3401,7 @@ static struct usb_device_id hub_id_table
29372 .bDeviceClass = USB_CLASS_HUB}, 28368 .bDeviceClass = USB_CLASS_HUB},
29373 { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS, 28369 { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
29374 .bInterfaceClass = USB_CLASS_HUB}, 28370 .bInterfaceClass = USB_CLASS_HUB},
@@ -29377,10 +28373,10 @@ diff -urNp linux-2.6.32.24/drivers/usb/core/hub.c linux-2.6.32.24/drivers/usb/co
29377 }; 28373 };
29378 28374
29379 MODULE_DEVICE_TABLE (usb, hub_id_table); 28375 MODULE_DEVICE_TABLE (usb, hub_id_table);
29380diff -urNp linux-2.6.32.24/drivers/usb/core/message.c linux-2.6.32.24/drivers/usb/core/message.c 28376diff -urNp linux-2.6.35.7/drivers/usb/core/message.c linux-2.6.35.7/drivers/usb/core/message.c
29381--- linux-2.6.32.24/drivers/usb/core/message.c 2010-08-13 16:24:37.000000000 -0400 28377--- linux-2.6.35.7/drivers/usb/core/message.c 2010-09-20 17:33:09.000000000 -0400
29382+++ linux-2.6.32.24/drivers/usb/core/message.c 2010-10-23 19:59:20.000000000 -0400 28378+++ linux-2.6.35.7/drivers/usb/core/message.c 2010-09-20 17:33:32.000000000 -0400
29383@@ -914,8 +914,8 @@ char *usb_cache_string(struct usb_device 28379@@ -869,8 +869,8 @@ char *usb_cache_string(struct usb_device
29384 buf = kmalloc(MAX_USB_STRING_SIZE, GFP_NOIO); 28380 buf = kmalloc(MAX_USB_STRING_SIZE, GFP_NOIO);
29385 if (buf) { 28381 if (buf) {
29386 len = usb_string(udev, index, buf, MAX_USB_STRING_SIZE); 28382 len = usb_string(udev, index, buf, MAX_USB_STRING_SIZE);
@@ -29391,10 +28387,21 @@ diff -urNp linux-2.6.32.24/drivers/usb/core/message.c linux-2.6.32.24/drivers/us
29391 if (!smallbuf) 28387 if (!smallbuf)
29392 return buf; 28388 return buf;
29393 memcpy(smallbuf, buf, len); 28389 memcpy(smallbuf, buf, len);
29394diff -urNp linux-2.6.32.24/drivers/usb/host/ehci-pci.c linux-2.6.32.24/drivers/usb/host/ehci-pci.c 28390diff -urNp linux-2.6.35.7/drivers/usb/early/ehci-dbgp.c linux-2.6.35.7/drivers/usb/early/ehci-dbgp.c
29395--- linux-2.6.32.24/drivers/usb/host/ehci-pci.c 2010-08-13 16:24:37.000000000 -0400 28391--- linux-2.6.35.7/drivers/usb/early/ehci-dbgp.c 2010-08-26 19:47:12.000000000 -0400
29396+++ linux-2.6.32.24/drivers/usb/host/ehci-pci.c 2010-10-23 19:59:20.000000000 -0400 28392+++ linux-2.6.35.7/drivers/usb/early/ehci-dbgp.c 2010-09-17 20:12:09.000000000 -0400
29397@@ -422,7 +422,7 @@ static const struct pci_device_id pci_id 28393@@ -1026,6 +1026,7 @@ static void kgdbdbgp_write_char(u8 chr)
28394 early_dbgp_write(NULL, &chr, 1);
28395 }
28396
28397+/* cannot be const, see kgdbdbgp_parse_config() */
28398 static struct kgdb_io kgdbdbgp_io_ops = {
28399 .name = "kgdbdbgp",
28400 .read_char = kgdbdbgp_read_char,
28401diff -urNp linux-2.6.35.7/drivers/usb/host/ehci-pci.c linux-2.6.35.7/drivers/usb/host/ehci-pci.c
28402--- linux-2.6.35.7/drivers/usb/host/ehci-pci.c 2010-08-26 19:47:12.000000000 -0400
28403+++ linux-2.6.35.7/drivers/usb/host/ehci-pci.c 2010-09-17 20:12:09.000000000 -0400
28404@@ -419,7 +419,7 @@ static const struct pci_device_id pci_id
29398 PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_EHCI, ~0), 28405 PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_EHCI, ~0),
29399 .driver_data = (unsigned long) &ehci_pci_hc_driver, 28406 .driver_data = (unsigned long) &ehci_pci_hc_driver,
29400 }, 28407 },
@@ -29403,9 +28410,9 @@ diff -urNp linux-2.6.32.24/drivers/usb/host/ehci-pci.c linux-2.6.32.24/drivers/u
29403 }; 28410 };
29404 MODULE_DEVICE_TABLE(pci, pci_ids); 28411 MODULE_DEVICE_TABLE(pci, pci_ids);
29405 28412
29406diff -urNp linux-2.6.32.24/drivers/usb/host/uhci-hcd.c linux-2.6.32.24/drivers/usb/host/uhci-hcd.c 28413diff -urNp linux-2.6.35.7/drivers/usb/host/uhci-hcd.c linux-2.6.35.7/drivers/usb/host/uhci-hcd.c
29407--- linux-2.6.32.24/drivers/usb/host/uhci-hcd.c 2010-08-13 16:24:37.000000000 -0400 28414--- linux-2.6.35.7/drivers/usb/host/uhci-hcd.c 2010-08-26 19:47:12.000000000 -0400
29408+++ linux-2.6.32.24/drivers/usb/host/uhci-hcd.c 2010-10-23 19:59:20.000000000 -0400 28415+++ linux-2.6.35.7/drivers/usb/host/uhci-hcd.c 2010-09-17 20:12:09.000000000 -0400
29409@@ -941,7 +941,7 @@ static const struct pci_device_id uhci_p 28416@@ -941,7 +941,7 @@ static const struct pci_device_id uhci_p
29410 /* handle any USB UHCI controller */ 28417 /* handle any USB UHCI controller */
29411 PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0), 28418 PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0),
@@ -29415,22 +28422,10 @@ diff -urNp linux-2.6.32.24/drivers/usb/host/uhci-hcd.c linux-2.6.32.24/drivers/u
29415 }; 28422 };
29416 28423
29417 MODULE_DEVICE_TABLE(pci, uhci_pci_ids); 28424 MODULE_DEVICE_TABLE(pci, uhci_pci_ids);
29418diff -urNp linux-2.6.32.24/drivers/usb/misc/appledisplay.c linux-2.6.32.24/drivers/usb/misc/appledisplay.c 28425diff -urNp linux-2.6.35.7/drivers/usb/mon/mon_main.c linux-2.6.35.7/drivers/usb/mon/mon_main.c
29419--- linux-2.6.32.24/drivers/usb/misc/appledisplay.c 2010-08-13 16:24:37.000000000 -0400 28426--- linux-2.6.35.7/drivers/usb/mon/mon_main.c 2010-08-26 19:47:12.000000000 -0400
29420+++ linux-2.6.32.24/drivers/usb/misc/appledisplay.c 2010-10-23 19:59:20.000000000 -0400 28427+++ linux-2.6.35.7/drivers/usb/mon/mon_main.c 2010-09-17 20:12:09.000000000 -0400
29421@@ -178,7 +178,7 @@ static int appledisplay_bl_get_brightnes 28428@@ -240,7 +240,7 @@ static struct notifier_block mon_nb = {
29422 return pdata->msgdata[1];
29423 }
29424
29425-static struct backlight_ops appledisplay_bl_data = {
29426+static const struct backlight_ops appledisplay_bl_data = {
29427 .get_brightness = appledisplay_bl_get_brightness,
29428 .update_status = appledisplay_bl_update_status,
29429 };
29430diff -urNp linux-2.6.32.24/drivers/usb/mon/mon_main.c linux-2.6.32.24/drivers/usb/mon/mon_main.c
29431--- linux-2.6.32.24/drivers/usb/mon/mon_main.c 2010-08-13 16:24:37.000000000 -0400
29432+++ linux-2.6.32.24/drivers/usb/mon/mon_main.c 2010-10-23 19:59:20.000000000 -0400
29433@@ -238,7 +238,7 @@ static struct notifier_block mon_nb = {
29434 /* 28429 /*
29435 * Ops 28430 * Ops
29436 */ 28431 */
@@ -29439,9 +28434,9 @@ diff -urNp linux-2.6.32.24/drivers/usb/mon/mon_main.c linux-2.6.32.24/drivers/us
29439 .urb_submit = mon_submit, 28434 .urb_submit = mon_submit,
29440 .urb_submit_error = mon_submit_error, 28435 .urb_submit_error = mon_submit_error,
29441 .urb_complete = mon_complete, 28436 .urb_complete = mon_complete,
29442diff -urNp linux-2.6.32.24/drivers/usb/storage/debug.h linux-2.6.32.24/drivers/usb/storage/debug.h 28437diff -urNp linux-2.6.35.7/drivers/usb/storage/debug.h linux-2.6.35.7/drivers/usb/storage/debug.h
29443--- linux-2.6.32.24/drivers/usb/storage/debug.h 2010-08-13 16:24:37.000000000 -0400 28438--- linux-2.6.35.7/drivers/usb/storage/debug.h 2010-08-26 19:47:12.000000000 -0400
29444+++ linux-2.6.32.24/drivers/usb/storage/debug.h 2010-10-23 19:59:20.000000000 -0400 28439+++ linux-2.6.35.7/drivers/usb/storage/debug.h 2010-09-17 20:12:09.000000000 -0400
29445@@ -54,9 +54,9 @@ void usb_stor_show_sense( unsigned char 28440@@ -54,9 +54,9 @@ void usb_stor_show_sense( unsigned char
29446 #define US_DEBUGPX(x...) printk( x ) 28441 #define US_DEBUGPX(x...) printk( x )
29447 #define US_DEBUG(x) x 28442 #define US_DEBUG(x) x
@@ -29455,10 +28450,10 @@ diff -urNp linux-2.6.32.24/drivers/usb/storage/debug.h linux-2.6.32.24/drivers/u
29455 #endif 28450 #endif
29456 28451
29457 #endif 28452 #endif
29458diff -urNp linux-2.6.32.24/drivers/usb/storage/usb.c linux-2.6.32.24/drivers/usb/storage/usb.c 28453diff -urNp linux-2.6.35.7/drivers/usb/storage/usb.c linux-2.6.35.7/drivers/usb/storage/usb.c
29459--- linux-2.6.32.24/drivers/usb/storage/usb.c 2010-08-13 16:24:37.000000000 -0400 28454--- linux-2.6.35.7/drivers/usb/storage/usb.c 2010-08-26 19:47:12.000000000 -0400
29460+++ linux-2.6.32.24/drivers/usb/storage/usb.c 2010-10-23 19:59:20.000000000 -0400 28455+++ linux-2.6.35.7/drivers/usb/storage/usb.c 2010-09-17 20:12:09.000000000 -0400
29461@@ -118,7 +118,7 @@ MODULE_PARM_DESC(quirks, "supplemental l 28456@@ -122,7 +122,7 @@ MODULE_PARM_DESC(quirks, "supplemental l
29462 28457
29463 static struct us_unusual_dev us_unusual_dev_list[] = { 28458 static struct us_unusual_dev us_unusual_dev_list[] = {
29464 # include "unusual_devs.h" 28459 # include "unusual_devs.h"
@@ -29467,9 +28462,9 @@ diff -urNp linux-2.6.32.24/drivers/usb/storage/usb.c linux-2.6.32.24/drivers/usb
29467 }; 28462 };
29468 28463
29469 #undef UNUSUAL_DEV 28464 #undef UNUSUAL_DEV
29470diff -urNp linux-2.6.32.24/drivers/usb/storage/usual-tables.c linux-2.6.32.24/drivers/usb/storage/usual-tables.c 28465diff -urNp linux-2.6.35.7/drivers/usb/storage/usual-tables.c linux-2.6.35.7/drivers/usb/storage/usual-tables.c
29471--- linux-2.6.32.24/drivers/usb/storage/usual-tables.c 2010-08-13 16:24:37.000000000 -0400 28466--- linux-2.6.35.7/drivers/usb/storage/usual-tables.c 2010-08-26 19:47:12.000000000 -0400
29472+++ linux-2.6.32.24/drivers/usb/storage/usual-tables.c 2010-10-23 19:59:20.000000000 -0400 28467+++ linux-2.6.35.7/drivers/usb/storage/usual-tables.c 2010-09-17 20:12:09.000000000 -0400
29473@@ -48,7 +48,7 @@ 28468@@ -48,7 +48,7 @@
29474 28469
29475 struct usb_device_id usb_storage_usb_ids[] = { 28470 struct usb_device_id usb_storage_usb_ids[] = {
@@ -29479,10 +28474,10 @@ diff -urNp linux-2.6.32.24/drivers/usb/storage/usual-tables.c linux-2.6.32.24/dr
29479 }; 28474 };
29480 EXPORT_SYMBOL_GPL(usb_storage_usb_ids); 28475 EXPORT_SYMBOL_GPL(usb_storage_usb_ids);
29481 28476
29482diff -urNp linux-2.6.32.24/drivers/uwb/wlp/messages.c linux-2.6.32.24/drivers/uwb/wlp/messages.c 28477diff -urNp linux-2.6.35.7/drivers/uwb/wlp/messages.c linux-2.6.35.7/drivers/uwb/wlp/messages.c
29483--- linux-2.6.32.24/drivers/uwb/wlp/messages.c 2010-08-13 16:24:37.000000000 -0400 28478--- linux-2.6.35.7/drivers/uwb/wlp/messages.c 2010-08-26 19:47:12.000000000 -0400
29484+++ linux-2.6.32.24/drivers/uwb/wlp/messages.c 2010-10-23 19:59:20.000000000 -0400 28479+++ linux-2.6.35.7/drivers/uwb/wlp/messages.c 2010-09-17 20:12:09.000000000 -0400
29485@@ -903,7 +903,7 @@ int wlp_parse_f0(struct wlp *wlp, struct 28480@@ -920,7 +920,7 @@ int wlp_parse_f0(struct wlp *wlp, struct
29486 size_t len = skb->len; 28481 size_t len = skb->len;
29487 size_t used; 28482 size_t used;
29488 ssize_t result; 28483 ssize_t result;
@@ -29491,23 +28486,22 @@ diff -urNp linux-2.6.32.24/drivers/uwb/wlp/messages.c linux-2.6.32.24/drivers/uw
29491 enum wlp_assc_error assc_err; 28486 enum wlp_assc_error assc_err;
29492 char enonce_buf[WLP_WSS_NONCE_STRSIZE]; 28487 char enonce_buf[WLP_WSS_NONCE_STRSIZE];
29493 char rnonce_buf[WLP_WSS_NONCE_STRSIZE]; 28488 char rnonce_buf[WLP_WSS_NONCE_STRSIZE];
29494diff -urNp linux-2.6.32.24/drivers/uwb/wlp/sysfs.c linux-2.6.32.24/drivers/uwb/wlp/sysfs.c 28489diff -urNp linux-2.6.35.7/drivers/vhost/vhost.c linux-2.6.35.7/drivers/vhost/vhost.c
29495--- linux-2.6.32.24/drivers/uwb/wlp/sysfs.c 2010-08-13 16:24:37.000000000 -0400 28490--- linux-2.6.35.7/drivers/vhost/vhost.c 2010-08-26 19:47:12.000000000 -0400
29496+++ linux-2.6.32.24/drivers/uwb/wlp/sysfs.c 2010-10-23 19:59:20.000000000 -0400 28491+++ linux-2.6.35.7/drivers/vhost/vhost.c 2010-09-17 20:12:09.000000000 -0400
29497@@ -615,8 +615,7 @@ ssize_t wlp_wss_attr_store(struct kobjec 28492@@ -357,7 +357,7 @@ static int init_used(struct vhost_virtqu
29498 return ret; 28493 return get_user(vq->last_used_idx, &used->idx);
29499 } 28494 }
29500 28495
29501-static 28496-static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp)
29502-struct sysfs_ops wss_sysfs_ops = { 28497+static long vhost_set_vring(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
29503+static const struct sysfs_ops wss_sysfs_ops = { 28498 {
29504 .show = wlp_wss_attr_show, 28499 struct file *eventfp, *filep = NULL,
29505 .store = wlp_wss_attr_store, 28500 *pollstart = NULL, *pollstop = NULL;
29506 }; 28501diff -urNp linux-2.6.35.7/drivers/video/atmel_lcdfb.c linux-2.6.35.7/drivers/video/atmel_lcdfb.c
29507diff -urNp linux-2.6.32.24/drivers/video/atmel_lcdfb.c linux-2.6.32.24/drivers/video/atmel_lcdfb.c 28502--- linux-2.6.35.7/drivers/video/atmel_lcdfb.c 2010-08-26 19:47:12.000000000 -0400
29508--- linux-2.6.32.24/drivers/video/atmel_lcdfb.c 2010-08-13 16:24:37.000000000 -0400 28503+++ linux-2.6.35.7/drivers/video/atmel_lcdfb.c 2010-09-17 20:12:09.000000000 -0400
29509+++ linux-2.6.32.24/drivers/video/atmel_lcdfb.c 2010-10-23 19:59:20.000000000 -0400 28504@@ -111,7 +111,7 @@ static int atmel_bl_get_brightness(struc
29510@@ -110,7 +110,7 @@ static int atmel_bl_get_brightness(struc
29511 return lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL); 28505 return lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
29512 } 28506 }
29513 28507
@@ -29516,10 +28510,10 @@ diff -urNp linux-2.6.32.24/drivers/video/atmel_lcdfb.c linux-2.6.32.24/drivers/v
29516 .update_status = atmel_bl_update_status, 28510 .update_status = atmel_bl_update_status,
29517 .get_brightness = atmel_bl_get_brightness, 28511 .get_brightness = atmel_bl_get_brightness,
29518 }; 28512 };
29519diff -urNp linux-2.6.32.24/drivers/video/aty/aty128fb.c linux-2.6.32.24/drivers/video/aty/aty128fb.c 28513diff -urNp linux-2.6.35.7/drivers/video/aty/aty128fb.c linux-2.6.35.7/drivers/video/aty/aty128fb.c
29520--- linux-2.6.32.24/drivers/video/aty/aty128fb.c 2010-08-13 16:24:37.000000000 -0400 28514--- linux-2.6.35.7/drivers/video/aty/aty128fb.c 2010-08-26 19:47:12.000000000 -0400
29521+++ linux-2.6.32.24/drivers/video/aty/aty128fb.c 2010-10-23 19:59:20.000000000 -0400 28515+++ linux-2.6.35.7/drivers/video/aty/aty128fb.c 2010-09-17 20:12:09.000000000 -0400
29522@@ -1787,7 +1787,7 @@ static int aty128_bl_get_brightness(stru 28516@@ -1786,7 +1786,7 @@ static int aty128_bl_get_brightness(stru
29523 return bd->props.brightness; 28517 return bd->props.brightness;
29524 } 28518 }
29525 28519
@@ -29528,10 +28522,10 @@ diff -urNp linux-2.6.32.24/drivers/video/aty/aty128fb.c linux-2.6.32.24/drivers/
29528 .get_brightness = aty128_bl_get_brightness, 28522 .get_brightness = aty128_bl_get_brightness,
29529 .update_status = aty128_bl_update_status, 28523 .update_status = aty128_bl_update_status,
29530 }; 28524 };
29531diff -urNp linux-2.6.32.24/drivers/video/aty/atyfb_base.c linux-2.6.32.24/drivers/video/aty/atyfb_base.c 28525diff -urNp linux-2.6.35.7/drivers/video/aty/atyfb_base.c linux-2.6.35.7/drivers/video/aty/atyfb_base.c
29532--- linux-2.6.32.24/drivers/video/aty/atyfb_base.c 2010-08-13 16:24:37.000000000 -0400 28526--- linux-2.6.35.7/drivers/video/aty/atyfb_base.c 2010-08-26 19:47:12.000000000 -0400
29533+++ linux-2.6.32.24/drivers/video/aty/atyfb_base.c 2010-10-23 19:59:20.000000000 -0400 28527+++ linux-2.6.35.7/drivers/video/aty/atyfb_base.c 2010-09-17 20:12:09.000000000 -0400
29534@@ -2225,7 +2225,7 @@ static int aty_bl_get_brightness(struct 28528@@ -2221,7 +2221,7 @@ static int aty_bl_get_brightness(struct
29535 return bd->props.brightness; 28529 return bd->props.brightness;
29536 } 28530 }
29537 28531
@@ -29540,10 +28534,10 @@ diff -urNp linux-2.6.32.24/drivers/video/aty/atyfb_base.c linux-2.6.32.24/driver
29540 .get_brightness = aty_bl_get_brightness, 28534 .get_brightness = aty_bl_get_brightness,
29541 .update_status = aty_bl_update_status, 28535 .update_status = aty_bl_update_status,
29542 }; 28536 };
29543diff -urNp linux-2.6.32.24/drivers/video/aty/radeon_backlight.c linux-2.6.32.24/drivers/video/aty/radeon_backlight.c 28537diff -urNp linux-2.6.35.7/drivers/video/aty/radeon_backlight.c linux-2.6.35.7/drivers/video/aty/radeon_backlight.c
29544--- linux-2.6.32.24/drivers/video/aty/radeon_backlight.c 2010-08-13 16:24:37.000000000 -0400 28538--- linux-2.6.35.7/drivers/video/aty/radeon_backlight.c 2010-08-26 19:47:12.000000000 -0400
29545+++ linux-2.6.32.24/drivers/video/aty/radeon_backlight.c 2010-10-23 19:59:20.000000000 -0400 28539+++ linux-2.6.35.7/drivers/video/aty/radeon_backlight.c 2010-09-17 20:12:09.000000000 -0400
29546@@ -127,7 +127,7 @@ static int radeon_bl_get_brightness(stru 28540@@ -128,7 +128,7 @@ static int radeon_bl_get_brightness(stru
29547 return bd->props.brightness; 28541 return bd->props.brightness;
29548 } 28542 }
29549 28543
@@ -29552,249 +28546,33 @@ diff -urNp linux-2.6.32.24/drivers/video/aty/radeon_backlight.c linux-2.6.32.24/
29552 .get_brightness = radeon_bl_get_brightness, 28546 .get_brightness = radeon_bl_get_brightness,
29553 .update_status = radeon_bl_update_status, 28547 .update_status = radeon_bl_update_status,
29554 }; 28548 };
29555diff -urNp linux-2.6.32.24/drivers/video/backlight/adp5520_bl.c linux-2.6.32.24/drivers/video/backlight/adp5520_bl.c 28549diff -urNp linux-2.6.35.7/drivers/video/backlight/88pm860x_bl.c linux-2.6.35.7/drivers/video/backlight/88pm860x_bl.c
29556--- linux-2.6.32.24/drivers/video/backlight/adp5520_bl.c 2010-08-13 16:24:37.000000000 -0400 28550--- linux-2.6.35.7/drivers/video/backlight/88pm860x_bl.c 2010-08-26 19:47:12.000000000 -0400
29557+++ linux-2.6.32.24/drivers/video/backlight/adp5520_bl.c 2010-10-23 19:59:20.000000000 -0400 28551+++ linux-2.6.35.7/drivers/video/backlight/88pm860x_bl.c 2010-09-17 20:12:09.000000000 -0400
29558@@ -84,7 +84,7 @@ static int adp5520_bl_get_brightness(str 28552@@ -155,7 +155,7 @@ out:
29559 return error ? data->current_brightness : reg_val; 28553 return -EINVAL;
29560 } 28554 }
29561 28555
29562-static struct backlight_ops adp5520_bl_ops = { 28556-static struct backlight_ops pm860x_backlight_ops = {
29563+static const struct backlight_ops adp5520_bl_ops = { 28557+static const struct backlight_ops pm860x_backlight_ops = {
29564 .update_status = adp5520_bl_update_status, 28558 .options = BL_CORE_SUSPENDRESUME,
29565 .get_brightness = adp5520_bl_get_brightness, 28559 .update_status = pm860x_backlight_update_status,
29566 }; 28560 .get_brightness = pm860x_backlight_get_brightness,
29567diff -urNp linux-2.6.32.24/drivers/video/backlight/adx_bl.c linux-2.6.32.24/drivers/video/backlight/adx_bl.c 28561diff -urNp linux-2.6.35.7/drivers/video/backlight/max8925_bl.c linux-2.6.35.7/drivers/video/backlight/max8925_bl.c
29568--- linux-2.6.32.24/drivers/video/backlight/adx_bl.c 2010-08-13 16:24:37.000000000 -0400 28562--- linux-2.6.35.7/drivers/video/backlight/max8925_bl.c 2010-08-26 19:47:12.000000000 -0400
29569+++ linux-2.6.32.24/drivers/video/backlight/adx_bl.c 2010-10-23 19:59:20.000000000 -0400 28563+++ linux-2.6.35.7/drivers/video/backlight/max8925_bl.c 2010-09-17 20:12:09.000000000 -0400
29570@@ -61,7 +61,7 @@ static int adx_backlight_check_fb(struct 28564@@ -92,7 +92,7 @@ static int max8925_backlight_get_brightn
29571 return 1;
29572 }
29573
29574-static struct backlight_ops adx_backlight_ops = {
29575+static const struct backlight_ops adx_backlight_ops = {
29576 .options = 0,
29577 .update_status = adx_backlight_update_status,
29578 .get_brightness = adx_backlight_get_brightness,
29579diff -urNp linux-2.6.32.24/drivers/video/backlight/atmel-pwm-bl.c linux-2.6.32.24/drivers/video/backlight/atmel-pwm-bl.c
29580--- linux-2.6.32.24/drivers/video/backlight/atmel-pwm-bl.c 2010-08-13 16:24:37.000000000 -0400
29581+++ linux-2.6.32.24/drivers/video/backlight/atmel-pwm-bl.c 2010-10-23 19:59:20.000000000 -0400
29582@@ -113,7 +113,7 @@ static int atmel_pwm_bl_init_pwm(struct
29583 return pwm_channel_enable(&pwmbl->pwmc);
29584 }
29585
29586-static struct backlight_ops atmel_pwm_bl_ops = {
29587+static const struct backlight_ops atmel_pwm_bl_ops = {
29588 .get_brightness = atmel_pwm_bl_get_intensity,
29589 .update_status = atmel_pwm_bl_set_intensity,
29590 };
29591diff -urNp linux-2.6.32.24/drivers/video/backlight/backlight.c linux-2.6.32.24/drivers/video/backlight/backlight.c
29592--- linux-2.6.32.24/drivers/video/backlight/backlight.c 2010-08-13 16:24:37.000000000 -0400
29593+++ linux-2.6.32.24/drivers/video/backlight/backlight.c 2010-10-23 19:59:20.000000000 -0400
29594@@ -269,7 +269,7 @@ EXPORT_SYMBOL(backlight_force_update);
29595 * ERR_PTR() or a pointer to the newly allocated device.
29596 */
29597 struct backlight_device *backlight_device_register(const char *name,
29598- struct device *parent, void *devdata, struct backlight_ops *ops)
29599+ struct device *parent, void *devdata, const struct backlight_ops *ops)
29600 {
29601 struct backlight_device *new_bd;
29602 int rc;
29603diff -urNp linux-2.6.32.24/drivers/video/backlight/corgi_lcd.c linux-2.6.32.24/drivers/video/backlight/corgi_lcd.c
29604--- linux-2.6.32.24/drivers/video/backlight/corgi_lcd.c 2010-08-13 16:24:37.000000000 -0400
29605+++ linux-2.6.32.24/drivers/video/backlight/corgi_lcd.c 2010-10-23 19:59:20.000000000 -0400
29606@@ -451,7 +451,7 @@ void corgi_lcd_limit_intensity(int limit
29607 }
29608 EXPORT_SYMBOL(corgi_lcd_limit_intensity);
29609
29610-static struct backlight_ops corgi_bl_ops = {
29611+static const struct backlight_ops corgi_bl_ops = {
29612 .get_brightness = corgi_bl_get_intensity,
29613 .update_status = corgi_bl_update_status,
29614 };
29615diff -urNp linux-2.6.32.24/drivers/video/backlight/cr_bllcd.c linux-2.6.32.24/drivers/video/backlight/cr_bllcd.c
29616--- linux-2.6.32.24/drivers/video/backlight/cr_bllcd.c 2010-08-13 16:24:37.000000000 -0400
29617+++ linux-2.6.32.24/drivers/video/backlight/cr_bllcd.c 2010-10-23 19:59:20.000000000 -0400
29618@@ -108,7 +108,7 @@ static int cr_backlight_get_intensity(st
29619 return intensity;
29620 }
29621
29622-static struct backlight_ops cr_backlight_ops = {
29623+static const struct backlight_ops cr_backlight_ops = {
29624 .get_brightness = cr_backlight_get_intensity,
29625 .update_status = cr_backlight_set_intensity,
29626 };
29627diff -urNp linux-2.6.32.24/drivers/video/backlight/da903x_bl.c linux-2.6.32.24/drivers/video/backlight/da903x_bl.c
29628--- linux-2.6.32.24/drivers/video/backlight/da903x_bl.c 2010-08-13 16:24:37.000000000 -0400
29629+++ linux-2.6.32.24/drivers/video/backlight/da903x_bl.c 2010-10-23 19:59:20.000000000 -0400
29630@@ -94,7 +94,7 @@ static int da903x_backlight_get_brightne
29631 return data->current_brightness;
29632 }
29633
29634-static struct backlight_ops da903x_backlight_ops = {
29635+static const struct backlight_ops da903x_backlight_ops = {
29636 .update_status = da903x_backlight_update_status,
29637 .get_brightness = da903x_backlight_get_brightness,
29638 };
29639diff -urNp linux-2.6.32.24/drivers/video/backlight/generic_bl.c linux-2.6.32.24/drivers/video/backlight/generic_bl.c
29640--- linux-2.6.32.24/drivers/video/backlight/generic_bl.c 2010-08-13 16:24:37.000000000 -0400
29641+++ linux-2.6.32.24/drivers/video/backlight/generic_bl.c 2010-10-23 19:59:20.000000000 -0400
29642@@ -70,7 +70,7 @@ void corgibl_limit_intensity(int limit)
29643 }
29644 EXPORT_SYMBOL(corgibl_limit_intensity);
29645
29646-static struct backlight_ops genericbl_ops = {
29647+static const struct backlight_ops genericbl_ops = {
29648 .options = BL_CORE_SUSPENDRESUME,
29649 .get_brightness = genericbl_get_intensity,
29650 .update_status = genericbl_send_intensity,
29651diff -urNp linux-2.6.32.24/drivers/video/backlight/hp680_bl.c linux-2.6.32.24/drivers/video/backlight/hp680_bl.c
29652--- linux-2.6.32.24/drivers/video/backlight/hp680_bl.c 2010-08-13 16:24:37.000000000 -0400
29653+++ linux-2.6.32.24/drivers/video/backlight/hp680_bl.c 2010-10-23 19:59:20.000000000 -0400
29654@@ -98,7 +98,7 @@ static int hp680bl_get_intensity(struct
29655 return current_intensity;
29656 }
29657
29658-static struct backlight_ops hp680bl_ops = {
29659+static const struct backlight_ops hp680bl_ops = {
29660 .get_brightness = hp680bl_get_intensity,
29661 .update_status = hp680bl_set_intensity,
29662 };
29663diff -urNp linux-2.6.32.24/drivers/video/backlight/jornada720_bl.c linux-2.6.32.24/drivers/video/backlight/jornada720_bl.c
29664--- linux-2.6.32.24/drivers/video/backlight/jornada720_bl.c 2010-08-13 16:24:37.000000000 -0400
29665+++ linux-2.6.32.24/drivers/video/backlight/jornada720_bl.c 2010-10-23 19:59:20.000000000 -0400
29666@@ -93,7 +93,7 @@ out:
29667 return ret; 28565 return ret;
29668 } 28566 }
29669 28567
29670-static struct backlight_ops jornada_bl_ops = { 28568-static struct backlight_ops max8925_backlight_ops = {
29671+static const struct backlight_ops jornada_bl_ops = { 28569+static const struct backlight_ops max8925_backlight_ops = {
29672 .get_brightness = jornada_bl_get_brightness, 28570 .options = BL_CORE_SUSPENDRESUME,
29673 .update_status = jornada_bl_update_status, 28571 .update_status = max8925_backlight_update_status,
29674 .options = BL_CORE_SUSPENDRESUME, 28572 .get_brightness = max8925_backlight_get_brightness,
29675diff -urNp linux-2.6.32.24/drivers/video/backlight/kb3886_bl.c linux-2.6.32.24/drivers/video/backlight/kb3886_bl.c 28573diff -urNp linux-2.6.35.7/drivers/video/fbcmap.c linux-2.6.35.7/drivers/video/fbcmap.c
29676--- linux-2.6.32.24/drivers/video/backlight/kb3886_bl.c 2010-08-13 16:24:37.000000000 -0400 28574--- linux-2.6.35.7/drivers/video/fbcmap.c 2010-08-26 19:47:12.000000000 -0400
29677+++ linux-2.6.32.24/drivers/video/backlight/kb3886_bl.c 2010-10-23 19:59:20.000000000 -0400 28575+++ linux-2.6.35.7/drivers/video/fbcmap.c 2010-09-17 20:12:09.000000000 -0400
29678@@ -134,7 +134,7 @@ static int kb3886bl_get_intensity(struct
29679 return kb3886bl_intensity;
29680 }
29681
29682-static struct backlight_ops kb3886bl_ops = {
29683+static const struct backlight_ops kb3886bl_ops = {
29684 .get_brightness = kb3886bl_get_intensity,
29685 .update_status = kb3886bl_send_intensity,
29686 };
29687diff -urNp linux-2.6.32.24/drivers/video/backlight/locomolcd.c linux-2.6.32.24/drivers/video/backlight/locomolcd.c
29688--- linux-2.6.32.24/drivers/video/backlight/locomolcd.c 2010-08-13 16:24:37.000000000 -0400
29689+++ linux-2.6.32.24/drivers/video/backlight/locomolcd.c 2010-10-23 19:59:20.000000000 -0400
29690@@ -141,7 +141,7 @@ static int locomolcd_get_intensity(struc
29691 return current_intensity;
29692 }
29693
29694-static struct backlight_ops locomobl_data = {
29695+static const struct backlight_ops locomobl_data = {
29696 .get_brightness = locomolcd_get_intensity,
29697 .update_status = locomolcd_set_intensity,
29698 };
29699diff -urNp linux-2.6.32.24/drivers/video/backlight/mbp_nvidia_bl.c linux-2.6.32.24/drivers/video/backlight/mbp_nvidia_bl.c
29700--- linux-2.6.32.24/drivers/video/backlight/mbp_nvidia_bl.c 2010-08-13 16:24:37.000000000 -0400
29701+++ linux-2.6.32.24/drivers/video/backlight/mbp_nvidia_bl.c 2010-10-23 19:59:20.000000000 -0400
29702@@ -33,7 +33,7 @@ struct dmi_match_data {
29703 unsigned long iostart;
29704 unsigned long iolen;
29705 /* Backlight operations structure. */
29706- struct backlight_ops backlight_ops;
29707+ const struct backlight_ops backlight_ops;
29708 };
29709
29710 /* Module parameters. */
29711diff -urNp linux-2.6.32.24/drivers/video/backlight/omap1_bl.c linux-2.6.32.24/drivers/video/backlight/omap1_bl.c
29712--- linux-2.6.32.24/drivers/video/backlight/omap1_bl.c 2010-08-13 16:24:37.000000000 -0400
29713+++ linux-2.6.32.24/drivers/video/backlight/omap1_bl.c 2010-10-23 19:59:20.000000000 -0400
29714@@ -125,7 +125,7 @@ static int omapbl_get_intensity(struct b
29715 return bl->current_intensity;
29716 }
29717
29718-static struct backlight_ops omapbl_ops = {
29719+static const struct backlight_ops omapbl_ops = {
29720 .get_brightness = omapbl_get_intensity,
29721 .update_status = omapbl_update_status,
29722 };
29723diff -urNp linux-2.6.32.24/drivers/video/backlight/progear_bl.c linux-2.6.32.24/drivers/video/backlight/progear_bl.c
29724--- linux-2.6.32.24/drivers/video/backlight/progear_bl.c 2010-08-13 16:24:37.000000000 -0400
29725+++ linux-2.6.32.24/drivers/video/backlight/progear_bl.c 2010-10-23 19:59:20.000000000 -0400
29726@@ -54,7 +54,7 @@ static int progearbl_get_intensity(struc
29727 return intensity - HW_LEVEL_MIN;
29728 }
29729
29730-static struct backlight_ops progearbl_ops = {
29731+static const struct backlight_ops progearbl_ops = {
29732 .get_brightness = progearbl_get_intensity,
29733 .update_status = progearbl_set_intensity,
29734 };
29735diff -urNp linux-2.6.32.24/drivers/video/backlight/pwm_bl.c linux-2.6.32.24/drivers/video/backlight/pwm_bl.c
29736--- linux-2.6.32.24/drivers/video/backlight/pwm_bl.c 2010-08-13 16:24:37.000000000 -0400
29737+++ linux-2.6.32.24/drivers/video/backlight/pwm_bl.c 2010-10-23 19:59:20.000000000 -0400
29738@@ -56,7 +56,7 @@ static int pwm_backlight_get_brightness(
29739 return bl->props.brightness;
29740 }
29741
29742-static struct backlight_ops pwm_backlight_ops = {
29743+static const struct backlight_ops pwm_backlight_ops = {
29744 .update_status = pwm_backlight_update_status,
29745 .get_brightness = pwm_backlight_get_brightness,
29746 };
29747diff -urNp linux-2.6.32.24/drivers/video/backlight/tosa_bl.c linux-2.6.32.24/drivers/video/backlight/tosa_bl.c
29748--- linux-2.6.32.24/drivers/video/backlight/tosa_bl.c 2010-08-13 16:24:37.000000000 -0400
29749+++ linux-2.6.32.24/drivers/video/backlight/tosa_bl.c 2010-10-23 19:59:20.000000000 -0400
29750@@ -72,7 +72,7 @@ static int tosa_bl_get_brightness(struct
29751 return props->brightness;
29752 }
29753
29754-static struct backlight_ops bl_ops = {
29755+static const struct backlight_ops bl_ops = {
29756 .get_brightness = tosa_bl_get_brightness,
29757 .update_status = tosa_bl_update_status,
29758 };
29759diff -urNp linux-2.6.32.24/drivers/video/backlight/wm831x_bl.c linux-2.6.32.24/drivers/video/backlight/wm831x_bl.c
29760--- linux-2.6.32.24/drivers/video/backlight/wm831x_bl.c 2010-08-13 16:24:37.000000000 -0400
29761+++ linux-2.6.32.24/drivers/video/backlight/wm831x_bl.c 2010-10-23 19:59:20.000000000 -0400
29762@@ -112,7 +112,7 @@ static int wm831x_backlight_get_brightne
29763 return data->current_brightness;
29764 }
29765
29766-static struct backlight_ops wm831x_backlight_ops = {
29767+static const struct backlight_ops wm831x_backlight_ops = {
29768 .options = BL_CORE_SUSPENDRESUME,
29769 .update_status = wm831x_backlight_update_status,
29770 .get_brightness = wm831x_backlight_get_brightness,
29771diff -urNp linux-2.6.32.24/drivers/video/bf54x-lq043fb.c linux-2.6.32.24/drivers/video/bf54x-lq043fb.c
29772--- linux-2.6.32.24/drivers/video/bf54x-lq043fb.c 2010-08-13 16:24:37.000000000 -0400
29773+++ linux-2.6.32.24/drivers/video/bf54x-lq043fb.c 2010-10-23 19:59:20.000000000 -0400
29774@@ -463,7 +463,7 @@ static int bl_get_brightness(struct back
29775 return 0;
29776 }
29777
29778-static struct backlight_ops bfin_lq043fb_bl_ops = {
29779+static const struct backlight_ops bfin_lq043fb_bl_ops = {
29780 .get_brightness = bl_get_brightness,
29781 };
29782
29783diff -urNp linux-2.6.32.24/drivers/video/bfin-t350mcqb-fb.c linux-2.6.32.24/drivers/video/bfin-t350mcqb-fb.c
29784--- linux-2.6.32.24/drivers/video/bfin-t350mcqb-fb.c 2010-08-13 16:24:37.000000000 -0400
29785+++ linux-2.6.32.24/drivers/video/bfin-t350mcqb-fb.c 2010-10-23 19:59:20.000000000 -0400
29786@@ -381,7 +381,7 @@ static int bl_get_brightness(struct back
29787 return 0;
29788 }
29789
29790-static struct backlight_ops bfin_lq043fb_bl_ops = {
29791+static const struct backlight_ops bfin_lq043fb_bl_ops = {
29792 .get_brightness = bl_get_brightness,
29793 };
29794
29795diff -urNp linux-2.6.32.24/drivers/video/fbcmap.c linux-2.6.32.24/drivers/video/fbcmap.c
29796--- linux-2.6.32.24/drivers/video/fbcmap.c 2010-08-13 16:24:37.000000000 -0400
29797+++ linux-2.6.32.24/drivers/video/fbcmap.c 2010-10-23 19:59:20.000000000 -0400
29798@@ -266,8 +266,7 @@ int fb_set_user_cmap(struct fb_cmap_user 28576@@ -266,8 +266,7 @@ int fb_set_user_cmap(struct fb_cmap_user
29799 rc = -ENODEV; 28577 rc = -ENODEV;
29800 goto out; 28578 goto out;
@@ -29805,9 +28583,9 @@ diff -urNp linux-2.6.32.24/drivers/video/fbcmap.c linux-2.6.32.24/drivers/video/
29805 rc = -EINVAL; 28583 rc = -EINVAL;
29806 goto out1; 28584 goto out1;
29807 } 28585 }
29808diff -urNp linux-2.6.32.24/drivers/video/fbmem.c linux-2.6.32.24/drivers/video/fbmem.c 28586diff -urNp linux-2.6.35.7/drivers/video/fbmem.c linux-2.6.35.7/drivers/video/fbmem.c
29809--- linux-2.6.32.24/drivers/video/fbmem.c 2010-08-13 16:24:37.000000000 -0400 28587--- linux-2.6.35.7/drivers/video/fbmem.c 2010-08-26 19:47:12.000000000 -0400
29810+++ linux-2.6.32.24/drivers/video/fbmem.c 2010-10-23 19:59:20.000000000 -0400 28588+++ linux-2.6.35.7/drivers/video/fbmem.c 2010-09-17 20:12:09.000000000 -0400
29811@@ -403,7 +403,7 @@ static void fb_do_show_logo(struct fb_in 28589@@ -403,7 +403,7 @@ static void fb_do_show_logo(struct fb_in
29812 image->dx += image->width + 8; 28590 image->dx += image->width + 8;
29813 } 28591 }
@@ -29835,10 +28613,10 @@ diff -urNp linux-2.6.32.24/drivers/video/fbmem.c linux-2.6.32.24/drivers/video/f
29835 return -EINVAL; 28613 return -EINVAL;
29836 if (!registered_fb[con2fb.framebuffer]) 28614 if (!registered_fb[con2fb.framebuffer])
29837 request_module("fb%d", con2fb.framebuffer); 28615 request_module("fb%d", con2fb.framebuffer);
29838diff -urNp linux-2.6.32.24/drivers/video/fbmon.c linux-2.6.32.24/drivers/video/fbmon.c 28616diff -urNp linux-2.6.35.7/drivers/video/fbmon.c linux-2.6.35.7/drivers/video/fbmon.c
29839--- linux-2.6.32.24/drivers/video/fbmon.c 2010-08-13 16:24:37.000000000 -0400 28617--- linux-2.6.35.7/drivers/video/fbmon.c 2010-08-26 19:47:12.000000000 -0400
29840+++ linux-2.6.32.24/drivers/video/fbmon.c 2010-10-23 19:59:20.000000000 -0400 28618+++ linux-2.6.35.7/drivers/video/fbmon.c 2010-09-17 20:12:09.000000000 -0400
29841@@ -45,7 +45,7 @@ 28619@@ -46,7 +46,7 @@
29842 #ifdef DEBUG 28620 #ifdef DEBUG
29843 #define DPRINTK(fmt, args...) printk(fmt,## args) 28621 #define DPRINTK(fmt, args...) printk(fmt,## args)
29844 #else 28622 #else
@@ -29847,9 +28625,9 @@ diff -urNp linux-2.6.32.24/drivers/video/fbmon.c linux-2.6.32.24/drivers/video/f
29847 #endif 28625 #endif
29848 28626
29849 #define FBMON_FIX_HEADER 1 28627 #define FBMON_FIX_HEADER 1
29850diff -urNp linux-2.6.32.24/drivers/video/i810/i810_accel.c linux-2.6.32.24/drivers/video/i810/i810_accel.c 28628diff -urNp linux-2.6.35.7/drivers/video/i810/i810_accel.c linux-2.6.35.7/drivers/video/i810/i810_accel.c
29851--- linux-2.6.32.24/drivers/video/i810/i810_accel.c 2010-08-13 16:24:37.000000000 -0400 28629--- linux-2.6.35.7/drivers/video/i810/i810_accel.c 2010-08-26 19:47:12.000000000 -0400
29852+++ linux-2.6.32.24/drivers/video/i810/i810_accel.c 2010-10-23 19:59:20.000000000 -0400 28630+++ linux-2.6.35.7/drivers/video/i810/i810_accel.c 2010-09-17 20:12:09.000000000 -0400
29853@@ -73,6 +73,7 @@ static inline int wait_for_space(struct 28631@@ -73,6 +73,7 @@ static inline int wait_for_space(struct
29854 } 28632 }
29855 } 28633 }
@@ -29858,9 +28636,9 @@ diff -urNp linux-2.6.32.24/drivers/video/i810/i810_accel.c linux-2.6.32.24/drive
29858 i810_report_error(mmio); 28636 i810_report_error(mmio);
29859 par->dev_flags |= LOCKUP; 28637 par->dev_flags |= LOCKUP;
29860 info->pixmap.scan_align = 1; 28638 info->pixmap.scan_align = 1;
29861diff -urNp linux-2.6.32.24/drivers/video/i810/i810_main.c linux-2.6.32.24/drivers/video/i810/i810_main.c 28639diff -urNp linux-2.6.35.7/drivers/video/i810/i810_main.c linux-2.6.35.7/drivers/video/i810/i810_main.c
29862--- linux-2.6.32.24/drivers/video/i810/i810_main.c 2010-08-13 16:24:37.000000000 -0400 28640--- linux-2.6.35.7/drivers/video/i810/i810_main.c 2010-08-26 19:47:12.000000000 -0400
29863+++ linux-2.6.32.24/drivers/video/i810/i810_main.c 2010-10-23 19:59:20.000000000 -0400 28641+++ linux-2.6.35.7/drivers/video/i810/i810_main.c 2010-09-17 20:12:09.000000000 -0400
29864@@ -120,7 +120,7 @@ static struct pci_device_id i810fb_pci_t 28642@@ -120,7 +120,7 @@ static struct pci_device_id i810fb_pci_t
29865 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, 28643 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
29866 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_CGC, 28644 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_CGC,
@@ -29870,10 +28648,10 @@ diff -urNp linux-2.6.32.24/drivers/video/i810/i810_main.c linux-2.6.32.24/driver
29870 }; 28648 };
29871 28649
29872 static struct pci_driver i810fb_driver = { 28650 static struct pci_driver i810fb_driver = {
29873diff -urNp linux-2.6.32.24/drivers/video/modedb.c linux-2.6.32.24/drivers/video/modedb.c 28651diff -urNp linux-2.6.35.7/drivers/video/modedb.c linux-2.6.35.7/drivers/video/modedb.c
29874--- linux-2.6.32.24/drivers/video/modedb.c 2010-08-13 16:24:37.000000000 -0400 28652--- linux-2.6.35.7/drivers/video/modedb.c 2010-08-26 19:47:12.000000000 -0400
29875+++ linux-2.6.32.24/drivers/video/modedb.c 2010-10-23 19:59:20.000000000 -0400 28653+++ linux-2.6.35.7/drivers/video/modedb.c 2010-09-17 20:12:09.000000000 -0400
29876@@ -38,240 +38,240 @@ static const struct fb_videomode modedb[ 28654@@ -40,240 +40,240 @@ static const struct fb_videomode modedb[
29877 { 28655 {
29878 /* 640x400 @ 70 Hz, 31.5 kHz hsync */ 28656 /* 640x400 @ 70 Hz, 31.5 kHz hsync */
29879 NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2, 28657 NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2,
@@ -30173,9 +28951,9 @@ diff -urNp linux-2.6.32.24/drivers/video/modedb.c linux-2.6.32.24/drivers/video/
30173 }, 28951 },
30174 }; 28952 };
30175 28953
30176diff -urNp linux-2.6.32.24/drivers/video/nvidia/nv_backlight.c linux-2.6.32.24/drivers/video/nvidia/nv_backlight.c 28954diff -urNp linux-2.6.35.7/drivers/video/nvidia/nv_backlight.c linux-2.6.35.7/drivers/video/nvidia/nv_backlight.c
30177--- linux-2.6.32.24/drivers/video/nvidia/nv_backlight.c 2010-08-13 16:24:37.000000000 -0400 28955--- linux-2.6.35.7/drivers/video/nvidia/nv_backlight.c 2010-08-26 19:47:12.000000000 -0400
30178+++ linux-2.6.32.24/drivers/video/nvidia/nv_backlight.c 2010-10-23 19:59:20.000000000 -0400 28956+++ linux-2.6.35.7/drivers/video/nvidia/nv_backlight.c 2010-09-17 20:12:09.000000000 -0400
30179@@ -87,7 +87,7 @@ static int nvidia_bl_get_brightness(stru 28957@@ -87,7 +87,7 @@ static int nvidia_bl_get_brightness(stru
30180 return bd->props.brightness; 28958 return bd->props.brightness;
30181 } 28959 }
@@ -30185,9 +28963,21 @@ diff -urNp linux-2.6.32.24/drivers/video/nvidia/nv_backlight.c linux-2.6.32.24/d
30185 .get_brightness = nvidia_bl_get_brightness, 28963 .get_brightness = nvidia_bl_get_brightness,
30186 .update_status = nvidia_bl_update_status, 28964 .update_status = nvidia_bl_update_status,
30187 }; 28965 };
30188diff -urNp linux-2.6.32.24/drivers/video/riva/fbdev.c linux-2.6.32.24/drivers/video/riva/fbdev.c 28966diff -urNp linux-2.6.35.7/drivers/video/omap2/displays/panel-taal.c linux-2.6.35.7/drivers/video/omap2/displays/panel-taal.c
30189--- linux-2.6.32.24/drivers/video/riva/fbdev.c 2010-08-13 16:24:37.000000000 -0400 28967--- linux-2.6.35.7/drivers/video/omap2/displays/panel-taal.c 2010-08-26 19:47:12.000000000 -0400
30190+++ linux-2.6.32.24/drivers/video/riva/fbdev.c 2010-10-23 19:59:20.000000000 -0400 28968+++ linux-2.6.35.7/drivers/video/omap2/displays/panel-taal.c 2010-09-17 20:12:09.000000000 -0400
28969@@ -319,7 +319,7 @@ static int taal_bl_get_intensity(struct
28970 return 0;
28971 }
28972
28973-static struct backlight_ops taal_bl_ops = {
28974+static const struct backlight_ops taal_bl_ops = {
28975 .get_brightness = taal_bl_get_intensity,
28976 .update_status = taal_bl_update_status,
28977 };
28978diff -urNp linux-2.6.35.7/drivers/video/riva/fbdev.c linux-2.6.35.7/drivers/video/riva/fbdev.c
28979--- linux-2.6.35.7/drivers/video/riva/fbdev.c 2010-08-26 19:47:12.000000000 -0400
28980+++ linux-2.6.35.7/drivers/video/riva/fbdev.c 2010-09-17 20:12:09.000000000 -0400
30191@@ -331,7 +331,7 @@ static int riva_bl_get_brightness(struct 28981@@ -331,7 +331,7 @@ static int riva_bl_get_brightness(struct
30192 return bd->props.brightness; 28982 return bd->props.brightness;
30193 } 28983 }
@@ -30197,18 +28987,18 @@ diff -urNp linux-2.6.32.24/drivers/video/riva/fbdev.c linux-2.6.32.24/drivers/vi
30197 .get_brightness = riva_bl_get_brightness, 28987 .get_brightness = riva_bl_get_brightness,
30198 .update_status = riva_bl_update_status, 28988 .update_status = riva_bl_update_status,
30199 }; 28989 };
30200diff -urNp linux-2.6.32.24/drivers/video/uvesafb.c linux-2.6.32.24/drivers/video/uvesafb.c 28990diff -urNp linux-2.6.35.7/drivers/video/uvesafb.c linux-2.6.35.7/drivers/video/uvesafb.c
30201--- linux-2.6.32.24/drivers/video/uvesafb.c 2010-08-13 16:24:37.000000000 -0400 28991--- linux-2.6.35.7/drivers/video/uvesafb.c 2010-08-26 19:47:12.000000000 -0400
30202+++ linux-2.6.32.24/drivers/video/uvesafb.c 2010-10-23 19:59:20.000000000 -0400 28992+++ linux-2.6.35.7/drivers/video/uvesafb.c 2010-09-17 20:12:09.000000000 -0400
30203@@ -18,6 +18,7 @@ 28993@@ -19,6 +19,7 @@
30204 #include <linux/fb.h>
30205 #include <linux/io.h> 28994 #include <linux/io.h>
30206 #include <linux/mutex.h> 28995 #include <linux/mutex.h>
28996 #include <linux/slab.h>
30207+#include <linux/moduleloader.h> 28997+#include <linux/moduleloader.h>
30208 #include <video/edid.h> 28998 #include <video/edid.h>
30209 #include <video/uvesafb.h> 28999 #include <video/uvesafb.h>
30210 #ifdef CONFIG_X86 29000 #ifdef CONFIG_X86
30211@@ -120,7 +121,7 @@ static int uvesafb_helper_start(void) 29001@@ -121,7 +122,7 @@ static int uvesafb_helper_start(void)
30212 NULL, 29002 NULL,
30213 }; 29003 };
30214 29004
@@ -30217,7 +29007,7 @@ diff -urNp linux-2.6.32.24/drivers/video/uvesafb.c linux-2.6.32.24/drivers/video
30217 } 29007 }
30218 29008
30219 /* 29009 /*
30220@@ -568,10 +569,32 @@ static int __devinit uvesafb_vbe_getpmi( 29010@@ -569,10 +570,32 @@ static int __devinit uvesafb_vbe_getpmi(
30221 if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) { 29011 if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) {
30222 par->pmi_setpal = par->ypan = 0; 29012 par->pmi_setpal = par->ypan = 0;
30223 } else { 29013 } else {
@@ -30250,7 +29040,7 @@ diff -urNp linux-2.6.32.24/drivers/video/uvesafb.c linux-2.6.32.24/drivers/video
30250 printk(KERN_INFO "uvesafb: protected mode interface info at " 29040 printk(KERN_INFO "uvesafb: protected mode interface info at "
30251 "%04x:%04x\n", 29041 "%04x:%04x\n",
30252 (u16)task->t.regs.es, (u16)task->t.regs.edi); 29042 (u16)task->t.regs.es, (u16)task->t.regs.edi);
30253@@ -1799,6 +1822,11 @@ out: 29043@@ -1800,6 +1823,11 @@ out:
30254 if (par->vbe_modes) 29044 if (par->vbe_modes)
30255 kfree(par->vbe_modes); 29045 kfree(par->vbe_modes);
30256 29046
@@ -30262,7 +29052,7 @@ diff -urNp linux-2.6.32.24/drivers/video/uvesafb.c linux-2.6.32.24/drivers/video
30262 framebuffer_release(info); 29052 framebuffer_release(info);
30263 return err; 29053 return err;
30264 } 29054 }
30265@@ -1825,6 +1853,12 @@ static int uvesafb_remove(struct platfor 29055@@ -1826,6 +1854,12 @@ static int uvesafb_remove(struct platfor
30266 kfree(par->vbe_state_orig); 29056 kfree(par->vbe_state_orig);
30267 if (par->vbe_state_saved) 29057 if (par->vbe_state_saved)
30268 kfree(par->vbe_state_saved); 29058 kfree(par->vbe_state_saved);
@@ -30275,9 +29065,9 @@ diff -urNp linux-2.6.32.24/drivers/video/uvesafb.c linux-2.6.32.24/drivers/video
30275 } 29065 }
30276 29066
30277 framebuffer_release(info); 29067 framebuffer_release(info);
30278diff -urNp linux-2.6.32.24/drivers/video/vesafb.c linux-2.6.32.24/drivers/video/vesafb.c 29068diff -urNp linux-2.6.35.7/drivers/video/vesafb.c linux-2.6.35.7/drivers/video/vesafb.c
30279--- linux-2.6.32.24/drivers/video/vesafb.c 2010-08-13 16:24:37.000000000 -0400 29069--- linux-2.6.35.7/drivers/video/vesafb.c 2010-08-26 19:47:12.000000000 -0400
30280+++ linux-2.6.32.24/drivers/video/vesafb.c 2010-10-23 19:59:20.000000000 -0400 29070+++ linux-2.6.35.7/drivers/video/vesafb.c 2010-09-17 20:12:09.000000000 -0400
30281@@ -9,6 +9,7 @@ 29071@@ -9,6 +9,7 @@
30282 */ 29072 */
30283 29073
@@ -30286,7 +29076,7 @@ diff -urNp linux-2.6.32.24/drivers/video/vesafb.c linux-2.6.32.24/drivers/video/
30286 #include <linux/kernel.h> 29076 #include <linux/kernel.h>
30287 #include <linux/errno.h> 29077 #include <linux/errno.h>
30288 #include <linux/string.h> 29078 #include <linux/string.h>
30289@@ -53,8 +54,8 @@ static int vram_remap __initdata; /* 29079@@ -52,8 +53,8 @@ static int vram_remap __initdata; /*
30290 static int vram_total __initdata; /* Set total amount of memory */ 29080 static int vram_total __initdata; /* Set total amount of memory */
30291 static int pmi_setpal __read_mostly = 1; /* pmi for palette changes ??? */ 29081 static int pmi_setpal __read_mostly = 1; /* pmi for palette changes ??? */
30292 static int ypan __read_mostly; /* 0..nothing, 1..ypan, 2..ywrap */ 29082 static int ypan __read_mostly; /* 0..nothing, 1..ypan, 2..ywrap */
@@ -30297,7 +29087,7 @@ diff -urNp linux-2.6.32.24/drivers/video/vesafb.c linux-2.6.32.24/drivers/video/
30297 static int depth __read_mostly; 29087 static int depth __read_mostly;
30298 static int vga_compat __read_mostly; 29088 static int vga_compat __read_mostly;
30299 /* --------------------------------------------------------------------- */ 29089 /* --------------------------------------------------------------------- */
30300@@ -233,6 +234,7 @@ static int __init vesafb_probe(struct pl 29090@@ -232,6 +233,7 @@ static int __init vesafb_probe(struct pl
30301 unsigned int size_vmode; 29091 unsigned int size_vmode;
30302 unsigned int size_remap; 29092 unsigned int size_remap;
30303 unsigned int size_total; 29093 unsigned int size_total;
@@ -30305,7 +29095,7 @@ diff -urNp linux-2.6.32.24/drivers/video/vesafb.c linux-2.6.32.24/drivers/video/
30305 29095
30306 if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB) 29096 if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
30307 return -ENODEV; 29097 return -ENODEV;
30308@@ -275,10 +277,6 @@ static int __init vesafb_probe(struct pl 29098@@ -274,10 +276,6 @@ static int __init vesafb_probe(struct pl
30309 size_remap = size_total; 29099 size_remap = size_total;
30310 vesafb_fix.smem_len = size_remap; 29100 vesafb_fix.smem_len = size_remap;
30311 29101
@@ -30316,7 +29106,7 @@ diff -urNp linux-2.6.32.24/drivers/video/vesafb.c linux-2.6.32.24/drivers/video/
30316 if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) { 29106 if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) {
30317 printk(KERN_WARNING 29107 printk(KERN_WARNING
30318 "vesafb: cannot reserve video memory at 0x%lx\n", 29108 "vesafb: cannot reserve video memory at 0x%lx\n",
30319@@ -315,9 +313,21 @@ static int __init vesafb_probe(struct pl 29109@@ -319,9 +317,21 @@ static int __init vesafb_probe(struct pl
30320 printk(KERN_INFO "vesafb: mode is %dx%dx%d, linelength=%d, pages=%d\n", 29110 printk(KERN_INFO "vesafb: mode is %dx%dx%d, linelength=%d, pages=%d\n",
30321 vesafb_defined.xres, vesafb_defined.yres, vesafb_defined.bits_per_pixel, vesafb_fix.line_length, screen_info.pages); 29111 vesafb_defined.xres, vesafb_defined.yres, vesafb_defined.bits_per_pixel, vesafb_fix.line_length, screen_info.pages);
30322 29112
@@ -30340,7 +29130,7 @@ diff -urNp linux-2.6.32.24/drivers/video/vesafb.c linux-2.6.32.24/drivers/video/
30340 } 29130 }
30341 29131
30342 if (screen_info.vesapm_seg < 0xc000) 29132 if (screen_info.vesapm_seg < 0xc000)
30343@@ -325,9 +335,25 @@ static int __init vesafb_probe(struct pl 29133@@ -329,9 +339,25 @@ static int __init vesafb_probe(struct pl
30344 29134
30345 if (ypan || pmi_setpal) { 29135 if (ypan || pmi_setpal) {
30346 unsigned short *pmi_base; 29136 unsigned short *pmi_base;
@@ -30369,7 +29159,7 @@ diff -urNp linux-2.6.32.24/drivers/video/vesafb.c linux-2.6.32.24/drivers/video/
30369 printk(KERN_INFO "vesafb: pmi: set display start = %p, set palette = %p\n",pmi_start,pmi_pal); 29159 printk(KERN_INFO "vesafb: pmi: set display start = %p, set palette = %p\n",pmi_start,pmi_pal);
30370 if (pmi_base[3]) { 29160 if (pmi_base[3]) {
30371 printk(KERN_INFO "vesafb: pmi: ports = "); 29161 printk(KERN_INFO "vesafb: pmi: ports = ");
30372@@ -469,6 +495,11 @@ static int __init vesafb_probe(struct pl 29162@@ -473,6 +499,11 @@ static int __init vesafb_probe(struct pl
30373 info->node, info->fix.id); 29163 info->node, info->fix.id);
30374 return 0; 29164 return 0;
30375 err: 29165 err:
@@ -30381,22 +29171,10 @@ diff -urNp linux-2.6.32.24/drivers/video/vesafb.c linux-2.6.32.24/drivers/video/
30381 if (info->screen_base) 29171 if (info->screen_base)
30382 iounmap(info->screen_base); 29172 iounmap(info->screen_base);
30383 framebuffer_release(info); 29173 framebuffer_release(info);
30384diff -urNp linux-2.6.32.24/drivers/xen/sys-hypervisor.c linux-2.6.32.24/drivers/xen/sys-hypervisor.c 29174diff -urNp linux-2.6.35.7/fs/9p/vfs_inode.c linux-2.6.35.7/fs/9p/vfs_inode.c
30385--- linux-2.6.32.24/drivers/xen/sys-hypervisor.c 2010-08-13 16:24:37.000000000 -0400 29175--- linux-2.6.35.7/fs/9p/vfs_inode.c 2010-08-26 19:47:12.000000000 -0400
30386+++ linux-2.6.32.24/drivers/xen/sys-hypervisor.c 2010-10-23 19:59:20.000000000 -0400 29176+++ linux-2.6.35.7/fs/9p/vfs_inode.c 2010-09-17 20:12:09.000000000 -0400
30387@@ -425,7 +425,7 @@ static ssize_t hyp_sysfs_store(struct ko 29177@@ -1087,7 +1087,7 @@ static void *v9fs_vfs_follow_link(struct
30388 return 0;
30389 }
30390
30391-static struct sysfs_ops hyp_sysfs_ops = {
30392+static const struct sysfs_ops hyp_sysfs_ops = {
30393 .show = hyp_sysfs_show,
30394 .store = hyp_sysfs_store,
30395 };
30396diff -urNp linux-2.6.32.24/fs/9p/vfs_inode.c linux-2.6.32.24/fs/9p/vfs_inode.c
30397--- linux-2.6.32.24/fs/9p/vfs_inode.c 2010-08-13 16:24:37.000000000 -0400
30398+++ linux-2.6.32.24/fs/9p/vfs_inode.c 2010-10-23 19:59:20.000000000 -0400
30399@@ -1079,7 +1079,7 @@ static void *v9fs_vfs_follow_link(struct
30400 static void 29178 static void
30401 v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) 29179 v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
30402 { 29180 {
@@ -30405,10 +29183,10 @@ diff -urNp linux-2.6.32.24/fs/9p/vfs_inode.c linux-2.6.32.24/fs/9p/vfs_inode.c
30405 29183
30406 P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name, 29184 P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
30407 IS_ERR(s) ? "<error>" : s); 29185 IS_ERR(s) ? "<error>" : s);
30408diff -urNp linux-2.6.32.24/fs/aio.c linux-2.6.32.24/fs/aio.c 29186diff -urNp linux-2.6.35.7/fs/aio.c linux-2.6.35.7/fs/aio.c
30409--- linux-2.6.32.24/fs/aio.c 2010-09-26 17:26:05.000000000 -0400 29187--- linux-2.6.35.7/fs/aio.c 2010-09-26 17:32:11.000000000 -0400
30410+++ linux-2.6.32.24/fs/aio.c 2010-10-23 19:59:20.000000000 -0400 29188+++ linux-2.6.35.7/fs/aio.c 2010-09-26 17:32:46.000000000 -0400
30411@@ -115,7 +115,7 @@ static int aio_setup_ring(struct kioctx 29189@@ -130,7 +130,7 @@ static int aio_setup_ring(struct kioctx
30412 size += sizeof(struct io_event) * nr_events; 29190 size += sizeof(struct io_event) * nr_events;
30413 nr_pages = (size + PAGE_SIZE-1) >> PAGE_SHIFT; 29191 nr_pages = (size + PAGE_SIZE-1) >> PAGE_SHIFT;
30414 29192
@@ -30417,21 +29195,21 @@ diff -urNp linux-2.6.32.24/fs/aio.c linux-2.6.32.24/fs/aio.c
30417 return -EINVAL; 29195 return -EINVAL;
30418 29196
30419 nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) / sizeof(struct io_event); 29197 nr_events = (PAGE_SIZE * nr_pages - sizeof(struct aio_ring)) / sizeof(struct io_event);
30420diff -urNp linux-2.6.32.24/fs/attr.c linux-2.6.32.24/fs/attr.c 29198diff -urNp linux-2.6.35.7/fs/attr.c linux-2.6.35.7/fs/attr.c
30421--- linux-2.6.32.24/fs/attr.c 2010-08-13 16:24:37.000000000 -0400 29199--- linux-2.6.35.7/fs/attr.c 2010-08-26 19:47:12.000000000 -0400
30422+++ linux-2.6.32.24/fs/attr.c 2010-10-23 19:59:20.000000000 -0400 29200+++ linux-2.6.35.7/fs/attr.c 2010-09-17 20:12:37.000000000 -0400
30423@@ -83,6 +83,7 @@ int inode_newsize_ok(const struct inode 29201@@ -82,6 +82,7 @@ int inode_newsize_ok(const struct inode
30424 unsigned long limit; 29202 unsigned long limit;
30425 29203
30426 limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur; 29204 limit = rlimit(RLIMIT_FSIZE);
30427+ gr_learn_resource(current, RLIMIT_FSIZE, (unsigned long)offset, 1); 29205+ gr_learn_resource(current, RLIMIT_FSIZE, (unsigned long)offset, 1);
30428 if (limit != RLIM_INFINITY && offset > limit) 29206 if (limit != RLIM_INFINITY && offset > limit)
30429 goto out_sig; 29207 goto out_sig;
30430 if (offset > inode->i_sb->s_maxbytes) 29208 if (offset > inode->i_sb->s_maxbytes)
30431diff -urNp linux-2.6.32.24/fs/autofs/root.c linux-2.6.32.24/fs/autofs/root.c 29209diff -urNp linux-2.6.35.7/fs/autofs/root.c linux-2.6.35.7/fs/autofs/root.c
30432--- linux-2.6.32.24/fs/autofs/root.c 2010-08-13 16:24:37.000000000 -0400 29210--- linux-2.6.35.7/fs/autofs/root.c 2010-08-26 19:47:12.000000000 -0400
30433+++ linux-2.6.32.24/fs/autofs/root.c 2010-10-23 19:59:20.000000000 -0400 29211+++ linux-2.6.35.7/fs/autofs/root.c 2010-09-17 20:12:09.000000000 -0400
30434@@ -299,7 +299,8 @@ static int autofs_root_symlink(struct in 29212@@ -301,7 +301,8 @@ static int autofs_root_symlink(struct in
30435 set_bit(n,sbi->symlink_bitmap); 29213 set_bit(n,sbi->symlink_bitmap);
30436 sl = &sbi->symlink[n]; 29214 sl = &sbi->symlink[n];
30437 sl->len = strlen(symname); 29215 sl->len = strlen(symname);
@@ -30441,9 +29219,9 @@ diff -urNp linux-2.6.32.24/fs/autofs/root.c linux-2.6.32.24/fs/autofs/root.c
30441 if (!sl->data) { 29219 if (!sl->data) {
30442 clear_bit(n,sbi->symlink_bitmap); 29220 clear_bit(n,sbi->symlink_bitmap);
30443 unlock_kernel(); 29221 unlock_kernel();
30444diff -urNp linux-2.6.32.24/fs/autofs4/symlink.c linux-2.6.32.24/fs/autofs4/symlink.c 29222diff -urNp linux-2.6.35.7/fs/autofs4/symlink.c linux-2.6.35.7/fs/autofs4/symlink.c
30445--- linux-2.6.32.24/fs/autofs4/symlink.c 2010-08-13 16:24:37.000000000 -0400 29223--- linux-2.6.35.7/fs/autofs4/symlink.c 2010-08-26 19:47:12.000000000 -0400
30446+++ linux-2.6.32.24/fs/autofs4/symlink.c 2010-10-23 19:59:20.000000000 -0400 29224+++ linux-2.6.35.7/fs/autofs4/symlink.c 2010-09-17 20:12:09.000000000 -0400
30447@@ -15,7 +15,7 @@ 29225@@ -15,7 +15,7 @@
30448 static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) 29226 static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
30449 { 29227 {
@@ -30453,9 +29231,9 @@ diff -urNp linux-2.6.32.24/fs/autofs4/symlink.c linux-2.6.32.24/fs/autofs4/symli
30453 return NULL; 29231 return NULL;
30454 } 29232 }
30455 29233
30456diff -urNp linux-2.6.32.24/fs/befs/linuxvfs.c linux-2.6.32.24/fs/befs/linuxvfs.c 29234diff -urNp linux-2.6.35.7/fs/befs/linuxvfs.c linux-2.6.35.7/fs/befs/linuxvfs.c
30457--- linux-2.6.32.24/fs/befs/linuxvfs.c 2010-08-13 16:24:37.000000000 -0400 29235--- linux-2.6.35.7/fs/befs/linuxvfs.c 2010-08-26 19:47:12.000000000 -0400
30458+++ linux-2.6.32.24/fs/befs/linuxvfs.c 2010-10-23 19:59:20.000000000 -0400 29236+++ linux-2.6.35.7/fs/befs/linuxvfs.c 2010-09-17 20:12:09.000000000 -0400
30459@@ -493,7 +493,7 @@ static void befs_put_link(struct dentry 29237@@ -493,7 +493,7 @@ static void befs_put_link(struct dentry
30460 { 29238 {
30461 befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); 29239 befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
@@ -30465,9 +29243,9 @@ diff -urNp linux-2.6.32.24/fs/befs/linuxvfs.c linux-2.6.32.24/fs/befs/linuxvfs.c
30465 if (!IS_ERR(link)) 29243 if (!IS_ERR(link))
30466 kfree(link); 29244 kfree(link);
30467 } 29245 }
30468diff -urNp linux-2.6.32.24/fs/binfmt_aout.c linux-2.6.32.24/fs/binfmt_aout.c 29246diff -urNp linux-2.6.35.7/fs/binfmt_aout.c linux-2.6.35.7/fs/binfmt_aout.c
30469--- linux-2.6.32.24/fs/binfmt_aout.c 2010-08-13 16:24:37.000000000 -0400 29247--- linux-2.6.35.7/fs/binfmt_aout.c 2010-08-26 19:47:12.000000000 -0400
30470+++ linux-2.6.32.24/fs/binfmt_aout.c 2010-10-23 19:59:20.000000000 -0400 29248+++ linux-2.6.35.7/fs/binfmt_aout.c 2010-09-23 20:16:12.000000000 -0400
30471@@ -16,6 +16,7 @@ 29249@@ -16,6 +16,7 @@
30472 #include <linux/string.h> 29250 #include <linux/string.h>
30473 #include <linux/fs.h> 29251 #include <linux/fs.h>
@@ -30476,41 +29254,42 @@ diff -urNp linux-2.6.32.24/fs/binfmt_aout.c linux-2.6.32.24/fs/binfmt_aout.c
30476 #include <linux/stat.h> 29254 #include <linux/stat.h>
30477 #include <linux/fcntl.h> 29255 #include <linux/fcntl.h>
30478 #include <linux/ptrace.h> 29256 #include <linux/ptrace.h>
30479@@ -102,6 +103,8 @@ static int aout_core_dump(long signr, st 29257@@ -86,6 +87,8 @@ static int aout_core_dump(struct coredum
30480 #endif 29258 #endif
30481 # define START_STACK(u) (u.start_stack) 29259 # define START_STACK(u) ((void __user *)u.start_stack)
30482 29260
30483+ memset(&dump, 0, sizeof(dump)); 29261+ memset(&dump, 0, sizeof(dump));
30484+ 29262+
30485 fs = get_fs(); 29263 fs = get_fs();
30486 set_fs(KERNEL_DS); 29264 set_fs(KERNEL_DS);
30487 has_dumped = 1; 29265 has_dumped = 1;
30488@@ -113,10 +116,12 @@ static int aout_core_dump(long signr, st 29266@@ -97,10 +100,12 @@ static int aout_core_dump(struct coredum
30489 29267
30490 /* If the size of the dump file exceeds the rlimit, then see what would happen 29268 /* If the size of the dump file exceeds the rlimit, then see what would happen
30491 if we wrote the stack, but not the data area. */ 29269 if we wrote the stack, but not the data area. */
30492+ gr_learn_resource(current, RLIMIT_CORE, (dump.u_dsize + dump.u_ssize+1) * PAGE_SIZE, 1); 29270+ gr_learn_resource(current, RLIMIT_CORE, (dump.u_dsize + dump.u_ssize+1) * PAGE_SIZE, 1);
30493 if ((dump.u_dsize + dump.u_ssize+1) * PAGE_SIZE > limit) 29271 if ((dump.u_dsize + dump.u_ssize+1) * PAGE_SIZE > cprm->limit)
30494 dump.u_dsize = 0; 29272 dump.u_dsize = 0;
30495 29273
30496 /* Make sure we have enough room to write the stack and data areas. */ 29274 /* Make sure we have enough room to write the stack and data areas. */
30497+ gr_learn_resource(current, RLIMIT_CORE, (dump.u_ssize + 1) * PAGE_SIZE, 1); 29275+ gr_learn_resource(current, RLIMIT_CORE, (dump.u_ssize + 1) * PAGE_SIZE, 1);
30498 if ((dump.u_ssize + 1) * PAGE_SIZE > limit) 29276 if ((dump.u_ssize + 1) * PAGE_SIZE > cprm->limit)
30499 dump.u_ssize = 0; 29277 dump.u_ssize = 0;
30500 29278
30501@@ -146,9 +151,7 @@ static int aout_core_dump(long signr, st 29279@@ -134,10 +139,7 @@ static int aout_core_dump(struct coredum
30502 dump_size = dump.u_ssize << PAGE_SHIFT; 29280 if (!dump_write(file, dump_start, dump_size))
30503 DUMP_WRITE(dump_start,dump_size); 29281 goto end_coredump;
30504 } 29282 }
30505-/* Finally dump the task struct. Not be used by gdb, but could be useful */ 29283-/* Finally dump the task struct. Not be used by gdb, but could be useful */
30506- set_fs(KERNEL_DS); 29284- set_fs(KERNEL_DS);
30507- DUMP_WRITE(current,sizeof(*current)); 29285- if (!dump_write(file, current, sizeof(*current)))
30508+/* Finally, let's not dump the task struct. Not be used by gdb, but could be useful to an attacker */ 29286- goto end_coredump;
29287+/* Finally let's not dump the task struct. Not be used by gdb, but could be useful to an attacker */
30509 end_coredump: 29288 end_coredump:
30510 set_fs(fs); 29289 set_fs(fs);
30511 return has_dumped; 29290 return has_dumped;
30512@@ -249,6 +252,8 @@ static int load_aout_binary(struct linux 29291@@ -238,6 +240,8 @@ static int load_aout_binary(struct linux
30513 rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur; 29292 rlim = rlimit(RLIMIT_DATA);
30514 if (rlim >= RLIM_INFINITY) 29293 if (rlim >= RLIM_INFINITY)
30515 rlim = ~0; 29294 rlim = ~0;
30516+ 29295+
@@ -30518,7 +29297,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_aout.c linux-2.6.32.24/fs/binfmt_aout.c
30518 if (ex.a_data + ex.a_bss > rlim) 29297 if (ex.a_data + ex.a_bss > rlim)
30519 return -ENOMEM; 29298 return -ENOMEM;
30520 29299
30521@@ -277,6 +282,27 @@ static int load_aout_binary(struct linux 29300@@ -266,6 +270,27 @@ static int load_aout_binary(struct linux
30522 install_exec_creds(bprm); 29301 install_exec_creds(bprm);
30523 current->flags &= ~PF_FORKNOEXEC; 29302 current->flags &= ~PF_FORKNOEXEC;
30524 29303
@@ -30546,7 +29325,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_aout.c linux-2.6.32.24/fs/binfmt_aout.c
30546 if (N_MAGIC(ex) == OMAGIC) { 29325 if (N_MAGIC(ex) == OMAGIC) {
30547 unsigned long text_addr, map_size; 29326 unsigned long text_addr, map_size;
30548 loff_t pos; 29327 loff_t pos;
30549@@ -349,7 +375,7 @@ static int load_aout_binary(struct linux 29328@@ -338,7 +363,7 @@ static int load_aout_binary(struct linux
30550 29329
30551 down_write(&current->mm->mmap_sem); 29330 down_write(&current->mm->mmap_sem);
30552 error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data, 29331 error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
@@ -30555,10 +29334,10 @@ diff -urNp linux-2.6.32.24/fs/binfmt_aout.c linux-2.6.32.24/fs/binfmt_aout.c
30555 MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE, 29334 MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
30556 fd_offset + ex.a_text); 29335 fd_offset + ex.a_text);
30557 up_write(&current->mm->mmap_sem); 29336 up_write(&current->mm->mmap_sem);
30558diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c 29337diff -urNp linux-2.6.35.7/fs/binfmt_elf.c linux-2.6.35.7/fs/binfmt_elf.c
30559--- linux-2.6.32.24/fs/binfmt_elf.c 2010-08-13 16:24:37.000000000 -0400 29338--- linux-2.6.35.7/fs/binfmt_elf.c 2010-08-26 19:47:12.000000000 -0400
30560+++ linux-2.6.32.24/fs/binfmt_elf.c 2010-10-23 19:59:20.000000000 -0400 29339+++ linux-2.6.35.7/fs/binfmt_elf.c 2010-09-17 20:12:37.000000000 -0400
30561@@ -50,6 +50,10 @@ static int elf_core_dump(long signr, str 29340@@ -51,6 +51,10 @@ static int elf_core_dump(struct coredump
30562 #define elf_core_dump NULL 29341 #define elf_core_dump NULL
30563 #endif 29342 #endif
30564 29343
@@ -30569,7 +29348,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30569 #if ELF_EXEC_PAGESIZE > PAGE_SIZE 29348 #if ELF_EXEC_PAGESIZE > PAGE_SIZE
30570 #define ELF_MIN_ALIGN ELF_EXEC_PAGESIZE 29349 #define ELF_MIN_ALIGN ELF_EXEC_PAGESIZE
30571 #else 29350 #else
30572@@ -69,6 +73,11 @@ static struct linux_binfmt elf_format = 29351@@ -70,6 +74,11 @@ static struct linux_binfmt elf_format =
30573 .load_binary = load_elf_binary, 29352 .load_binary = load_elf_binary,
30574 .load_shlib = load_elf_library, 29353 .load_shlib = load_elf_library,
30575 .core_dump = elf_core_dump, 29354 .core_dump = elf_core_dump,
@@ -30581,7 +29360,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30581 .min_coredump = ELF_EXEC_PAGESIZE, 29360 .min_coredump = ELF_EXEC_PAGESIZE,
30582 .hasvdso = 1 29361 .hasvdso = 1
30583 }; 29362 };
30584@@ -77,6 +86,8 @@ static struct linux_binfmt elf_format = 29363@@ -78,6 +87,8 @@ static struct linux_binfmt elf_format =
30585 29364
30586 static int set_brk(unsigned long start, unsigned long end) 29365 static int set_brk(unsigned long start, unsigned long end)
30587 { 29366 {
@@ -30590,7 +29369,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30590 start = ELF_PAGEALIGN(start); 29369 start = ELF_PAGEALIGN(start);
30591 end = ELF_PAGEALIGN(end); 29370 end = ELF_PAGEALIGN(end);
30592 if (end > start) { 29371 if (end > start) {
30593@@ -87,7 +98,7 @@ static int set_brk(unsigned long start, 29372@@ -88,7 +99,7 @@ static int set_brk(unsigned long start,
30594 if (BAD_ADDR(addr)) 29373 if (BAD_ADDR(addr))
30595 return addr; 29374 return addr;
30596 } 29375 }
@@ -30599,7 +29378,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30599 return 0; 29378 return 0;
30600 } 29379 }
30601 29380
30602@@ -148,7 +159,7 @@ create_elf_tables(struct linux_binprm *b 29381@@ -149,7 +160,7 @@ create_elf_tables(struct linux_binprm *b
30603 elf_addr_t __user *u_rand_bytes; 29382 elf_addr_t __user *u_rand_bytes;
30604 const char *k_platform = ELF_PLATFORM; 29383 const char *k_platform = ELF_PLATFORM;
30605 const char *k_base_platform = ELF_BASE_PLATFORM; 29384 const char *k_base_platform = ELF_BASE_PLATFORM;
@@ -30608,7 +29387,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30608 int items; 29387 int items;
30609 elf_addr_t *elf_info; 29388 elf_addr_t *elf_info;
30610 int ei_index = 0; 29389 int ei_index = 0;
30611@@ -195,8 +206,12 @@ create_elf_tables(struct linux_binprm *b 29390@@ -196,8 +207,12 @@ create_elf_tables(struct linux_binprm *b
30612 * Generate 16 random bytes for userspace PRNG seeding. 29391 * Generate 16 random bytes for userspace PRNG seeding.
30613 */ 29392 */
30614 get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes)); 29393 get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));
@@ -30623,7 +29402,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30623 if (__copy_to_user(u_rand_bytes, k_rand_bytes, sizeof(k_rand_bytes))) 29402 if (__copy_to_user(u_rand_bytes, k_rand_bytes, sizeof(k_rand_bytes)))
30624 return -EFAULT; 29403 return -EFAULT;
30625 29404
30626@@ -385,10 +400,10 @@ static unsigned long load_elf_interp(str 29405@@ -386,10 +401,10 @@ static unsigned long load_elf_interp(str
30627 { 29406 {
30628 struct elf_phdr *elf_phdata; 29407 struct elf_phdr *elf_phdata;
30629 struct elf_phdr *eppnt; 29408 struct elf_phdr *eppnt;
@@ -30636,7 +29415,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30636 unsigned long total_size; 29415 unsigned long total_size;
30637 int retval, i, size; 29416 int retval, i, size;
30638 29417
30639@@ -434,6 +449,11 @@ static unsigned long load_elf_interp(str 29418@@ -435,6 +450,11 @@ static unsigned long load_elf_interp(str
30640 goto out_close; 29419 goto out_close;
30641 } 29420 }
30642 29421
@@ -30648,7 +29427,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30648 eppnt = elf_phdata; 29427 eppnt = elf_phdata;
30649 for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) { 29428 for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
30650 if (eppnt->p_type == PT_LOAD) { 29429 if (eppnt->p_type == PT_LOAD) {
30651@@ -477,8 +497,8 @@ static unsigned long load_elf_interp(str 29430@@ -478,8 +498,8 @@ static unsigned long load_elf_interp(str
30652 k = load_addr + eppnt->p_vaddr; 29431 k = load_addr + eppnt->p_vaddr;
30653 if (BAD_ADDR(k) || 29432 if (BAD_ADDR(k) ||
30654 eppnt->p_filesz > eppnt->p_memsz || 29433 eppnt->p_filesz > eppnt->p_memsz ||
@@ -30659,7 +29438,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30659 error = -ENOMEM; 29438 error = -ENOMEM;
30660 goto out_close; 29439 goto out_close;
30661 } 29440 }
30662@@ -532,6 +552,177 @@ out: 29441@@ -533,6 +553,177 @@ out:
30663 return error; 29442 return error;
30664 } 29443 }
30665 29444
@@ -30680,7 +29459,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30680+ 29459+
30681+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_PAX_SEGMEXEC) 29460+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_PAX_SEGMEXEC)
30682+ if ((pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) == (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) { 29461+ if ((pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) == (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) {
30683+ if (nx_enabled) 29462+ if ((__supported_pte_mask & _PAGE_NX))
30684+ pax_flags &= ~MF_PAX_SEGMEXEC; 29463+ pax_flags &= ~MF_PAX_SEGMEXEC;
30685+ else 29464+ else
30686+ pax_flags &= ~MF_PAX_PAGEEXEC; 29465+ pax_flags &= ~MF_PAX_PAGEEXEC;
@@ -30723,7 +29502,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30723+ 29502+
30724+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_PAX_SEGMEXEC) 29503+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_PAX_SEGMEXEC)
30725+ if ((pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) == (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) { 29504+ if ((pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) == (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) {
30726+ if (nx_enabled) 29505+ if ((__supported_pte_mask & _PAGE_NX))
30727+ pax_flags &= ~MF_PAX_SEGMEXEC; 29506+ pax_flags &= ~MF_PAX_SEGMEXEC;
30728+ else 29507+ else
30729+ pax_flags &= ~MF_PAX_PAGEEXEC; 29508+ pax_flags &= ~MF_PAX_PAGEEXEC;
@@ -30766,7 +29545,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30766+ 29545+
30767+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_PAX_SEGMEXEC) 29546+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_PAX_SEGMEXEC)
30768+ if ((pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) == (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) { 29547+ if ((pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) == (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) {
30769+ if (nx_enabled) 29548+ if ((__supported_pte_mask & _PAGE_NX))
30770+ pax_flags &= ~MF_PAX_SEGMEXEC; 29549+ pax_flags &= ~MF_PAX_SEGMEXEC;
30771+ else 29550+ else
30772+ pax_flags &= ~MF_PAX_PAGEEXEC; 29551+ pax_flags &= ~MF_PAX_PAGEEXEC;
@@ -30837,7 +29616,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30837 /* 29616 /*
30838 * These are the functions used to load ELF style executables and shared 29617 * These are the functions used to load ELF style executables and shared
30839 * libraries. There is no binary dependent code anywhere else. 29618 * libraries. There is no binary dependent code anywhere else.
30840@@ -548,6 +739,11 @@ static unsigned long randomize_stack_top 29619@@ -549,6 +740,11 @@ static unsigned long randomize_stack_top
30841 { 29620 {
30842 unsigned int random_variable = 0; 29621 unsigned int random_variable = 0;
30843 29622
@@ -30849,7 +29628,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30849 if ((current->flags & PF_RANDOMIZE) && 29628 if ((current->flags & PF_RANDOMIZE) &&
30850 !(current->personality & ADDR_NO_RANDOMIZE)) { 29629 !(current->personality & ADDR_NO_RANDOMIZE)) {
30851 random_variable = get_random_int() & STACK_RND_MASK; 29630 random_variable = get_random_int() & STACK_RND_MASK;
30852@@ -566,7 +762,7 @@ static int load_elf_binary(struct linux_ 29631@@ -567,7 +763,7 @@ static int load_elf_binary(struct linux_
30853 unsigned long load_addr = 0, load_bias = 0; 29632 unsigned long load_addr = 0, load_bias = 0;
30854 int load_addr_set = 0; 29633 int load_addr_set = 0;
30855 char * elf_interpreter = NULL; 29634 char * elf_interpreter = NULL;
@@ -30858,7 +29637,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30858 struct elf_phdr *elf_ppnt, *elf_phdata; 29637 struct elf_phdr *elf_ppnt, *elf_phdata;
30859 unsigned long elf_bss, elf_brk; 29638 unsigned long elf_bss, elf_brk;
30860 int retval, i; 29639 int retval, i;
30861@@ -576,11 +772,11 @@ static int load_elf_binary(struct linux_ 29640@@ -577,11 +773,11 @@ static int load_elf_binary(struct linux_
30862 unsigned long start_code, end_code, start_data, end_data; 29641 unsigned long start_code, end_code, start_data, end_data;
30863 unsigned long reloc_func_desc = 0; 29642 unsigned long reloc_func_desc = 0;
30864 int executable_stack = EXSTACK_DEFAULT; 29643 int executable_stack = EXSTACK_DEFAULT;
@@ -30871,7 +29650,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30871 29650
30872 loc = kmalloc(sizeof(*loc), GFP_KERNEL); 29651 loc = kmalloc(sizeof(*loc), GFP_KERNEL);
30873 if (!loc) { 29652 if (!loc) {
30874@@ -718,11 +914,80 @@ static int load_elf_binary(struct linux_ 29653@@ -719,11 +915,80 @@ static int load_elf_binary(struct linux_
30875 29654
30876 /* OK, This is the point of no return */ 29655 /* OK, This is the point of no return */
30877 current->flags &= ~PF_FORKNOEXEC; 29656 current->flags &= ~PF_FORKNOEXEC;
@@ -30911,7 +29690,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30911+#endif 29690+#endif
30912+ 29691+
30913+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT 29692+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
30914+ if ((current->mm->pax_flags & MF_PAX_PAGEEXEC) && !nx_enabled) { 29693+ if ((current->mm->pax_flags & MF_PAX_PAGEEXEC) && !(__supported_pte_mask & _PAGE_NX)) {
30915+ current->mm->context.user_cs_limit = PAGE_SIZE; 29694+ current->mm->context.user_cs_limit = PAGE_SIZE;
30916+ current->mm->def_flags |= VM_PAGEEXEC; 29695+ current->mm->def_flags |= VM_PAGEEXEC;
30917+ } 29696+ }
@@ -30953,7 +29732,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30953 if (elf_read_implies_exec(loc->elf_ex, executable_stack)) 29732 if (elf_read_implies_exec(loc->elf_ex, executable_stack))
30954 current->personality |= READ_IMPLIES_EXEC; 29733 current->personality |= READ_IMPLIES_EXEC;
30955 29734
30956@@ -804,6 +1069,20 @@ static int load_elf_binary(struct linux_ 29735@@ -805,6 +1070,20 @@ static int load_elf_binary(struct linux_
30957 #else 29736 #else
30958 load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr); 29737 load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
30959 #endif 29738 #endif
@@ -30974,7 +29753,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30974 } 29753 }
30975 29754
30976 error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, 29755 error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
30977@@ -836,9 +1115,9 @@ static int load_elf_binary(struct linux_ 29756@@ -837,9 +1116,9 @@ static int load_elf_binary(struct linux_
30978 * allowed task size. Note that p_filesz must always be 29757 * allowed task size. Note that p_filesz must always be
30979 * <= p_memsz so it is only necessary to check p_memsz. 29758 * <= p_memsz so it is only necessary to check p_memsz.
30980 */ 29759 */
@@ -30987,7 +29766,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30987 /* set_brk can never work. Avoid overflows. */ 29766 /* set_brk can never work. Avoid overflows. */
30988 send_sig(SIGKILL, current, 0); 29767 send_sig(SIGKILL, current, 0);
30989 retval = -EINVAL; 29768 retval = -EINVAL;
30990@@ -866,6 +1145,11 @@ static int load_elf_binary(struct linux_ 29769@@ -867,6 +1146,11 @@ static int load_elf_binary(struct linux_
30991 start_data += load_bias; 29770 start_data += load_bias;
30992 end_data += load_bias; 29771 end_data += load_bias;
30993 29772
@@ -30999,7 +29778,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
30999 /* Calling set_brk effectively mmaps the pages that we need 29778 /* Calling set_brk effectively mmaps the pages that we need
31000 * for the bss and break sections. We must do this before 29779 * for the bss and break sections. We must do this before
31001 * mapping in the interpreter, to make sure it doesn't wind 29780 * mapping in the interpreter, to make sure it doesn't wind
31002@@ -877,9 +1161,11 @@ static int load_elf_binary(struct linux_ 29781@@ -878,9 +1162,11 @@ static int load_elf_binary(struct linux_
31003 goto out_free_dentry; 29782 goto out_free_dentry;
31004 } 29783 }
31005 if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) { 29784 if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
@@ -31014,19 +29793,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
31014 } 29793 }
31015 29794
31016 if (elf_interpreter) { 29795 if (elf_interpreter) {
31017@@ -1112,8 +1398,10 @@ static int dump_seek(struct file *file, 29796@@ -1091,7 +1377,7 @@ out:
31018 unsigned long n = off;
31019 if (n > PAGE_SIZE)
31020 n = PAGE_SIZE;
31021- if (!dump_write(file, buf, n))
31022+ if (!dump_write(file, buf, n)) {
31023+ free_page((unsigned long)buf);
31024 return 0;
31025+ }
31026 off -= n;
31027 }
31028 free_page((unsigned long)buf);
31029@@ -1125,7 +1413,7 @@ static int dump_seek(struct file *file,
31030 * Decide what to dump of a segment, part, all or none. 29797 * Decide what to dump of a segment, part, all or none.
31031 */ 29798 */
31032 static unsigned long vma_dump_size(struct vm_area_struct *vma, 29799 static unsigned long vma_dump_size(struct vm_area_struct *vma,
@@ -31035,7 +29802,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
31035 { 29802 {
31036 #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type)) 29803 #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
31037 29804
31038@@ -1159,7 +1447,7 @@ static unsigned long vma_dump_size(struc 29805@@ -1125,7 +1411,7 @@ static unsigned long vma_dump_size(struc
31039 if (vma->vm_file == NULL) 29806 if (vma->vm_file == NULL)
31040 return 0; 29807 return 0;
31041 29808
@@ -31044,20 +29811,7 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
31044 goto whole; 29811 goto whole;
31045 29812
31046 /* 29813 /*
31047@@ -1255,8 +1543,11 @@ static int writenote(struct memelfnote * 29814@@ -1347,9 +1633,9 @@ static void fill_auxv_note(struct memelf
31048 #undef DUMP_WRITE
31049
31050 #define DUMP_WRITE(addr, nr) \
31051+ do { \
31052+ gr_learn_resource(current, RLIMIT_CORE, size + (nr), 1); \
31053 if ((size += (nr)) > limit || !dump_write(file, (addr), (nr))) \
31054- goto end_coredump;
31055+ goto end_coredump; \
31056+ } while (0);
31057
31058 static void fill_elf_header(struct elfhdr *elf, int segs,
31059 u16 machine, u32 flags, u8 osabi)
31060@@ -1385,9 +1676,9 @@ static void fill_auxv_note(struct memelf
31061 { 29815 {
31062 elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv; 29816 elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
31063 int i = 0; 29817 int i = 0;
@@ -31069,35 +29823,90 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
31069 fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv); 29823 fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
31070 } 29824 }
31071 29825
31072@@ -1973,7 +2264,7 @@ static int elf_core_dump(long signr, str 29826@@ -1855,14 +2141,14 @@ static void fill_extnum_info(struct elfh
29827 }
29828
29829 static size_t elf_core_vma_data_size(struct vm_area_struct *gate_vma,
29830- unsigned long mm_flags)
29831+ struct coredump_params *cprm)
29832 {
29833 struct vm_area_struct *vma;
29834 size_t size = 0;
29835
29836 for (vma = first_vma(current, gate_vma); vma != NULL;
29837 vma = next_vma(vma, gate_vma))
29838- size += vma_dump_size(vma, mm_flags);
29839+ size += vma_dump_size(vma, cprm->mm_flags, cprm->signr);
29840 return size;
29841 }
29842
29843@@ -1956,7 +2242,7 @@ static int elf_core_dump(struct coredump
29844
29845 dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
29846
29847- offset += elf_core_vma_data_size(gate_vma, cprm->mm_flags);
29848+ offset += elf_core_vma_data_size(gate_vma, cprm);
29849 offset += elf_core_extra_data_size();
29850 e_shoff = offset;
29851
29852@@ -1970,10 +2256,12 @@ static int elf_core_dump(struct coredump
29853 offset = dataoff;
29854
29855 size += sizeof(*elf);
29856+ gr_learn_resource(current, RLIMIT_CORE, size, 1);
29857 if (size > cprm->limit || !dump_write(cprm->file, elf, sizeof(*elf)))
29858 goto end_coredump;
29859
29860 size += sizeof(*phdr4note);
29861+ gr_learn_resource(current, RLIMIT_CORE, size, 1);
29862 if (size > cprm->limit
29863 || !dump_write(cprm->file, phdr4note, sizeof(*phdr4note)))
29864 goto end_coredump;
29865@@ -1987,7 +2275,7 @@ static int elf_core_dump(struct coredump
31073 phdr.p_offset = offset; 29866 phdr.p_offset = offset;
31074 phdr.p_vaddr = vma->vm_start; 29867 phdr.p_vaddr = vma->vm_start;
31075 phdr.p_paddr = 0; 29868 phdr.p_paddr = 0;
31076- phdr.p_filesz = vma_dump_size(vma, mm_flags); 29869- phdr.p_filesz = vma_dump_size(vma, cprm->mm_flags);
31077+ phdr.p_filesz = vma_dump_size(vma, mm_flags, signr); 29870+ phdr.p_filesz = vma_dump_size(vma, cprm->mm_flags, cprm->signr);
31078 phdr.p_memsz = vma->vm_end - vma->vm_start; 29871 phdr.p_memsz = vma->vm_end - vma->vm_start;
31079 offset += phdr.p_filesz; 29872 offset += phdr.p_filesz;
31080 phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0; 29873 phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
31081@@ -2006,7 +2297,7 @@ static int elf_core_dump(long signr, str 29874@@ -1998,6 +2286,7 @@ static int elf_core_dump(struct coredump
29875 phdr.p_align = ELF_EXEC_PAGESIZE;
29876
29877 size += sizeof(phdr);
29878+ gr_learn_resource(current, RLIMIT_CORE, size, 1);
29879 if (size > cprm->limit
29880 || !dump_write(cprm->file, &phdr, sizeof(phdr)))
29881 goto end_coredump;
29882@@ -2022,7 +2311,7 @@ static int elf_core_dump(struct coredump
31082 unsigned long addr; 29883 unsigned long addr;
31083 unsigned long end; 29884 unsigned long end;
31084 29885
31085- end = vma->vm_start + vma_dump_size(vma, mm_flags); 29886- end = vma->vm_start + vma_dump_size(vma, cprm->mm_flags);
31086+ end = vma->vm_start + vma_dump_size(vma, mm_flags, signr); 29887+ end = vma->vm_start + vma_dump_size(vma, cprm->mm_flags, cprm->signr);
31087 29888
31088 for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) { 29889 for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) {
31089 struct page *page; 29890 struct page *page;
31090@@ -2015,6 +2306,7 @@ static int elf_core_dump(long signr, str 29891@@ -2031,6 +2320,7 @@ static int elf_core_dump(struct coredump
31091 page = get_dump_page(addr); 29892 page = get_dump_page(addr);
31092 if (page) { 29893 if (page) {
31093 void *kaddr = kmap(page); 29894 void *kaddr = kmap(page);
31094+ gr_learn_resource(current, RLIMIT_CORE, size + PAGE_SIZE, 1); 29895+ gr_learn_resource(current, RLIMIT_CORE, size + PAGE_SIZE, 1);
31095 stop = ((size += PAGE_SIZE) > limit) || 29896 stop = ((size += PAGE_SIZE) > cprm->limit) ||
31096 !dump_write(file, kaddr, PAGE_SIZE); 29897 !dump_write(cprm->file, kaddr,
31097 kunmap(page); 29898 PAGE_SIZE);
31098@@ -2042,6 +2334,97 @@ out: 29899@@ -2048,6 +2338,7 @@ static int elf_core_dump(struct coredump
29900
29901 if (e_phnum == PN_XNUM) {
29902 size += sizeof(*shdr4extnum);
29903+ gr_learn_resource(current, RLIMIT_CORE, size, 1);
29904 if (size > cprm->limit
29905 || !dump_write(cprm->file, shdr4extnum,
29906 sizeof(*shdr4extnum)))
29907@@ -2068,6 +2359,97 @@ out:
31099 29908
31100 #endif /* USE_ELF_CORE_DUMP */ 29909 #endif /* CONFIG_ELF_CORE */
31101 29910
31102+#ifdef CONFIG_PAX_MPROTECT 29911+#ifdef CONFIG_PAX_MPROTECT
31103+/* PaX: non-PIC ELF libraries need relocations on their executable segments 29912+/* PaX: non-PIC ELF libraries need relocations on their executable segments
@@ -31193,10 +30002,10 @@ diff -urNp linux-2.6.32.24/fs/binfmt_elf.c linux-2.6.32.24/fs/binfmt_elf.c
31193 static int __init init_elf_binfmt(void) 30002 static int __init init_elf_binfmt(void)
31194 { 30003 {
31195 return register_binfmt(&elf_format); 30004 return register_binfmt(&elf_format);
31196diff -urNp linux-2.6.32.24/fs/binfmt_flat.c linux-2.6.32.24/fs/binfmt_flat.c 30005diff -urNp linux-2.6.35.7/fs/binfmt_flat.c linux-2.6.35.7/fs/binfmt_flat.c
31197--- linux-2.6.32.24/fs/binfmt_flat.c 2010-08-13 16:24:37.000000000 -0400 30006--- linux-2.6.35.7/fs/binfmt_flat.c 2010-08-26 19:47:12.000000000 -0400
31198+++ linux-2.6.32.24/fs/binfmt_flat.c 2010-10-23 19:59:20.000000000 -0400 30007+++ linux-2.6.35.7/fs/binfmt_flat.c 2010-09-17 20:12:09.000000000 -0400
31199@@ -564,7 +564,9 @@ static int load_flat_file(struct linux_b 30008@@ -567,7 +567,9 @@ static int load_flat_file(struct linux_b
31200 realdatastart = (unsigned long) -ENOMEM; 30009 realdatastart = (unsigned long) -ENOMEM;
31201 printk("Unable to allocate RAM for process data, errno %d\n", 30010 printk("Unable to allocate RAM for process data, errno %d\n",
31202 (int)-realdatastart); 30011 (int)-realdatastart);
@@ -31206,18 +30015,18 @@ diff -urNp linux-2.6.32.24/fs/binfmt_flat.c linux-2.6.32.24/fs/binfmt_flat.c
31206 ret = realdatastart; 30015 ret = realdatastart;
31207 goto err; 30016 goto err;
31208 } 30017 }
31209@@ -588,8 +590,10 @@ static int load_flat_file(struct linux_b 30018@@ -591,8 +593,10 @@ static int load_flat_file(struct linux_b
31210 } 30019 }
31211 if (IS_ERR_VALUE(result)) { 30020 if (IS_ERR_VALUE(result)) {
31212 printk("Unable to read data+bss, errno %d\n", (int)-result); 30021 printk("Unable to read data+bss, errno %d\n", (int)-result);
31213+ down_write(&current->mm->mmap_sem); 30022+ down_write(&current->mm->mmap_sem);
31214 do_munmap(current->mm, textpos, text_len); 30023 do_munmap(current->mm, textpos, text_len);
31215 do_munmap(current->mm, realdatastart, data_len + extra); 30024 do_munmap(current->mm, realdatastart, len);
31216+ up_write(&current->mm->mmap_sem); 30025+ up_write(&current->mm->mmap_sem);
31217 ret = result; 30026 ret = result;
31218 goto err; 30027 goto err;
31219 } 30028 }
31220@@ -658,8 +662,10 @@ static int load_flat_file(struct linux_b 30029@@ -661,8 +665,10 @@ static int load_flat_file(struct linux_b
31221 } 30030 }
31222 if (IS_ERR_VALUE(result)) { 30031 if (IS_ERR_VALUE(result)) {
31223 printk("Unable to read code+data+bss, errno %d\n",(int)-result); 30032 printk("Unable to read code+data+bss, errno %d\n",(int)-result);
@@ -31228,9 +30037,9 @@ diff -urNp linux-2.6.32.24/fs/binfmt_flat.c linux-2.6.32.24/fs/binfmt_flat.c
31228 ret = result; 30037 ret = result;
31229 goto err; 30038 goto err;
31230 } 30039 }
31231diff -urNp linux-2.6.32.24/fs/binfmt_misc.c linux-2.6.32.24/fs/binfmt_misc.c 30040diff -urNp linux-2.6.35.7/fs/binfmt_misc.c linux-2.6.35.7/fs/binfmt_misc.c
31232--- linux-2.6.32.24/fs/binfmt_misc.c 2010-09-20 17:26:42.000000000 -0400 30041--- linux-2.6.35.7/fs/binfmt_misc.c 2010-09-20 17:33:09.000000000 -0400
31233+++ linux-2.6.32.24/fs/binfmt_misc.c 2010-10-23 19:59:20.000000000 -0400 30042+++ linux-2.6.35.7/fs/binfmt_misc.c 2010-09-20 17:33:32.000000000 -0400
31234@@ -693,7 +693,7 @@ static int bm_fill_super(struct super_bl 30043@@ -693,7 +693,7 @@ static int bm_fill_super(struct super_bl
31235 static struct tree_descr bm_files[] = { 30044 static struct tree_descr bm_files[] = {
31236 [2] = {"status", &bm_status_operations, S_IWUSR|S_IRUGO}, 30045 [2] = {"status", &bm_status_operations, S_IWUSR|S_IRUGO},
@@ -31240,19 +30049,10 @@ diff -urNp linux-2.6.32.24/fs/binfmt_misc.c linux-2.6.32.24/fs/binfmt_misc.c
31240 }; 30049 };
31241 int err = simple_fill_super(sb, 0x42494e4d, bm_files); 30050 int err = simple_fill_super(sb, 0x42494e4d, bm_files);
31242 if (!err) 30051 if (!err)
31243diff -urNp linux-2.6.32.24/fs/bio.c linux-2.6.32.24/fs/bio.c 30052diff -urNp linux-2.6.35.7/fs/bio.c linux-2.6.35.7/fs/bio.c
31244--- linux-2.6.32.24/fs/bio.c 2010-08-13 16:24:37.000000000 -0400 30053--- linux-2.6.35.7/fs/bio.c 2010-08-26 19:47:12.000000000 -0400
31245+++ linux-2.6.32.24/fs/bio.c 2010-10-23 19:59:20.000000000 -0400 30054+++ linux-2.6.35.7/fs/bio.c 2010-09-17 20:12:09.000000000 -0400
31246@@ -78,7 +78,7 @@ static struct kmem_cache *bio_find_or_cr 30055@@ -1213,7 +1213,7 @@ static void bio_copy_kern_endio(struct b
31247
31248 i = 0;
31249 while (i < bio_slab_nr) {
31250- struct bio_slab *bslab = &bio_slabs[i];
31251+ bslab = &bio_slabs[i];
31252
31253 if (!bslab->slab && entry == -1)
31254 entry = i;
31255@@ -1217,7 +1217,7 @@ static void bio_copy_kern_endio(struct b
31256 const int read = bio_data_dir(bio) == READ; 30056 const int read = bio_data_dir(bio) == READ;
31257 struct bio_map_data *bmd = bio->bi_private; 30057 struct bio_map_data *bmd = bio->bi_private;
31258 int i; 30058 int i;
@@ -31261,22 +30061,22 @@ diff -urNp linux-2.6.32.24/fs/bio.c linux-2.6.32.24/fs/bio.c
31261 30061
31262 __bio_for_each_segment(bvec, bio, i, 0) { 30062 __bio_for_each_segment(bvec, bio, i, 0) {
31263 char *addr = page_address(bvec->bv_page); 30063 char *addr = page_address(bvec->bv_page);
31264diff -urNp linux-2.6.32.24/fs/block_dev.c linux-2.6.32.24/fs/block_dev.c 30064diff -urNp linux-2.6.35.7/fs/block_dev.c linux-2.6.35.7/fs/block_dev.c
31265--- linux-2.6.32.24/fs/block_dev.c 2010-08-13 16:24:37.000000000 -0400 30065--- linux-2.6.35.7/fs/block_dev.c 2010-08-26 19:47:12.000000000 -0400
31266+++ linux-2.6.32.24/fs/block_dev.c 2010-10-23 19:59:20.000000000 -0400 30066+++ linux-2.6.35.7/fs/block_dev.c 2010-09-17 20:12:09.000000000 -0400
31267@@ -664,7 +664,7 @@ int bd_claim(struct block_device *bdev, 30067@@ -647,7 +647,7 @@ static bool bd_may_claim(struct block_de
31268 else if (bdev->bd_contains == bdev) 30068 else if (bdev->bd_contains == bdev)
31269 res = 0; /* is a whole device which isn't held */ 30069 return true; /* is a whole device which isn't held */
31270 30070
31271- else if (bdev->bd_contains->bd_holder == bd_claim) 30071- else if (whole->bd_holder == bd_claim)
31272+ else if (bdev->bd_contains->bd_holder == (void *)bd_claim) 30072+ else if (whole->bd_holder == (void *)bd_claim)
31273 res = 0; /* is a partition of a device that is being partitioned */ 30073 return true; /* is a partition of a device that is being partitioned */
31274 else if (bdev->bd_contains->bd_holder != NULL) 30074 else if (whole->bd_holder != NULL)
31275 res = -EBUSY; /* is a partition of a held device */ 30075 return false; /* is a partition of a held device */
31276diff -urNp linux-2.6.32.24/fs/btrfs/ctree.c linux-2.6.32.24/fs/btrfs/ctree.c 30076diff -urNp linux-2.6.35.7/fs/btrfs/ctree.c linux-2.6.35.7/fs/btrfs/ctree.c
31277--- linux-2.6.32.24/fs/btrfs/ctree.c 2010-08-13 16:24:37.000000000 -0400 30077--- linux-2.6.35.7/fs/btrfs/ctree.c 2010-08-26 19:47:12.000000000 -0400
31278+++ linux-2.6.32.24/fs/btrfs/ctree.c 2010-10-23 19:59:24.000000000 -0400 30078+++ linux-2.6.35.7/fs/btrfs/ctree.c 2010-10-11 22:41:44.000000000 -0400
31279@@ -461,9 +461,12 @@ static noinline int __btrfs_cow_block(st 30079@@ -468,9 +468,12 @@ static noinline int __btrfs_cow_block(st
31280 free_extent_buffer(buf); 30080 free_extent_buffer(buf);
31281 add_root_to_dirty_list(root); 30081 add_root_to_dirty_list(root);
31282 } else { 30082 } else {
@@ -31292,7 +30092,7 @@ diff -urNp linux-2.6.32.24/fs/btrfs/ctree.c linux-2.6.32.24/fs/btrfs/ctree.c
31292 parent_start = 0; 30092 parent_start = 0;
31293 30093
31294 WARN_ON(trans->transid != btrfs_header_generation(parent)); 30094 WARN_ON(trans->transid != btrfs_header_generation(parent));
31295@@ -3645,7 +3648,6 @@ setup_items_for_insert(struct btrfs_tran 30095@@ -3763,7 +3766,6 @@ setup_items_for_insert(struct btrfs_tran
31296 30096
31297 ret = 0; 30097 ret = 0;
31298 if (slot == 0) { 30098 if (slot == 0) {
@@ -31300,10 +30100,10 @@ diff -urNp linux-2.6.32.24/fs/btrfs/ctree.c linux-2.6.32.24/fs/btrfs/ctree.c
31300 btrfs_cpu_key_to_disk(&disk_key, cpu_key); 30100 btrfs_cpu_key_to_disk(&disk_key, cpu_key);
31301 ret = fixup_low_keys(trans, root, path, &disk_key, 1); 30101 ret = fixup_low_keys(trans, root, path, &disk_key, 1);
31302 } 30102 }
31303diff -urNp linux-2.6.32.24/fs/btrfs/disk-io.c linux-2.6.32.24/fs/btrfs/disk-io.c 30103diff -urNp linux-2.6.35.7/fs/btrfs/disk-io.c linux-2.6.35.7/fs/btrfs/disk-io.c
31304--- linux-2.6.32.24/fs/btrfs/disk-io.c 2010-08-13 16:24:37.000000000 -0400 30104--- linux-2.6.35.7/fs/btrfs/disk-io.c 2010-08-26 19:47:12.000000000 -0400
31305+++ linux-2.6.32.24/fs/btrfs/disk-io.c 2010-10-23 19:59:20.000000000 -0400 30105+++ linux-2.6.35.7/fs/btrfs/disk-io.c 2010-09-17 20:12:09.000000000 -0400
31306@@ -39,7 +39,7 @@ 30106@@ -40,7 +40,7 @@
31307 #include "tree-log.h" 30107 #include "tree-log.h"
31308 #include "free-space-cache.h" 30108 #include "free-space-cache.h"
31309 30109
@@ -31312,7 +30112,7 @@ diff -urNp linux-2.6.32.24/fs/btrfs/disk-io.c linux-2.6.32.24/fs/btrfs/disk-io.c
31312 static void end_workqueue_fn(struct btrfs_work *work); 30112 static void end_workqueue_fn(struct btrfs_work *work);
31313 static void free_fs_root(struct btrfs_root *root); 30113 static void free_fs_root(struct btrfs_root *root);
31314 30114
31315@@ -2605,7 +2605,7 @@ out: 30115@@ -2597,7 +2597,7 @@ out:
31316 return 0; 30116 return 0;
31317 } 30117 }
31318 30118
@@ -31321,12 +30121,12 @@ diff -urNp linux-2.6.32.24/fs/btrfs/disk-io.c linux-2.6.32.24/fs/btrfs/disk-io.c
31321 .write_cache_pages_lock_hook = btree_lock_page_hook, 30121 .write_cache_pages_lock_hook = btree_lock_page_hook,
31322 .readpage_end_io_hook = btree_readpage_end_io_hook, 30122 .readpage_end_io_hook = btree_readpage_end_io_hook,
31323 .submit_bio_hook = btree_submit_bio_hook, 30123 .submit_bio_hook = btree_submit_bio_hook,
31324diff -urNp linux-2.6.32.24/fs/btrfs/extent_io.h linux-2.6.32.24/fs/btrfs/extent_io.h 30124diff -urNp linux-2.6.35.7/fs/btrfs/extent_io.h linux-2.6.35.7/fs/btrfs/extent_io.h
31325--- linux-2.6.32.24/fs/btrfs/extent_io.h 2010-08-13 16:24:37.000000000 -0400 30125--- linux-2.6.35.7/fs/btrfs/extent_io.h 2010-08-26 19:47:12.000000000 -0400
31326+++ linux-2.6.32.24/fs/btrfs/extent_io.h 2010-10-23 19:59:20.000000000 -0400 30126+++ linux-2.6.35.7/fs/btrfs/extent_io.h 2010-09-17 20:12:09.000000000 -0400
31327@@ -49,36 +49,36 @@ typedef int (extent_submit_bio_hook_t)(s 30127@@ -51,36 +51,36 @@ typedef int (extent_submit_bio_hook_t)(s
31328 struct bio *bio, int mirror_num, 30128 struct bio *bio, int mirror_num,
31329 unsigned long bio_flags); 30129 unsigned long bio_flags, u64 bio_offset);
31330 struct extent_io_ops { 30130 struct extent_io_ops {
31331- int (*fill_delalloc)(struct inode *inode, struct page *locked_page, 30131- int (*fill_delalloc)(struct inode *inode, struct page *locked_page,
31332+ int (* const fill_delalloc)(struct inode *inode, struct page *locked_page, 30132+ int (* const fill_delalloc)(struct inode *inode, struct page *locked_page,
@@ -31357,12 +30157,12 @@ diff -urNp linux-2.6.32.24/fs/btrfs/extent_io.h linux-2.6.32.24/fs/btrfs/extent_
31357- int (*writepage_end_io_hook)(struct page *page, u64 start, u64 end, 30157- int (*writepage_end_io_hook)(struct page *page, u64 start, u64 end,
31358+ int (* const writepage_end_io_hook)(struct page *page, u64 start, u64 end, 30158+ int (* const writepage_end_io_hook)(struct page *page, u64 start, u64 end,
31359 struct extent_state *state, int uptodate); 30159 struct extent_state *state, int uptodate);
31360- int (*set_bit_hook)(struct inode *inode, u64 start, u64 end, 30160- int (*set_bit_hook)(struct inode *inode, struct extent_state *state,
31361+ int (* const set_bit_hook)(struct inode *inode, u64 start, u64 end, 30161+ int (* const set_bit_hook)(struct inode *inode, struct extent_state *state,
31362 unsigned long old, unsigned long bits); 30162 int *bits);
31363- int (*clear_bit_hook)(struct inode *inode, struct extent_state *state, 30163- int (*clear_bit_hook)(struct inode *inode, struct extent_state *state,
31364+ int (* const clear_bit_hook)(struct inode *inode, struct extent_state *state, 30164+ int (* const clear_bit_hook)(struct inode *inode, struct extent_state *state,
31365 unsigned long bits); 30165 int *bits);
31366- int (*merge_extent_hook)(struct inode *inode, 30166- int (*merge_extent_hook)(struct inode *inode,
31367+ int (* const merge_extent_hook)(struct inode *inode, 30167+ int (* const merge_extent_hook)(struct inode *inode,
31368 struct extent_state *new, 30168 struct extent_state *new,
@@ -31375,7 +30175,7 @@ diff -urNp linux-2.6.32.24/fs/btrfs/extent_io.h linux-2.6.32.24/fs/btrfs/extent_
31375 }; 30175 };
31376 30176
31377 struct extent_io_tree { 30177 struct extent_io_tree {
31378@@ -88,7 +88,7 @@ struct extent_io_tree { 30178@@ -90,7 +90,7 @@ struct extent_io_tree {
31379 u64 dirty_bytes; 30179 u64 dirty_bytes;
31380 spinlock_t lock; 30180 spinlock_t lock;
31381 spinlock_t buffer_lock; 30181 spinlock_t buffer_lock;
@@ -31384,10 +30184,10 @@ diff -urNp linux-2.6.32.24/fs/btrfs/extent_io.h linux-2.6.32.24/fs/btrfs/extent_
31384 }; 30184 };
31385 30185
31386 struct extent_state { 30186 struct extent_state {
31387diff -urNp linux-2.6.32.24/fs/btrfs/free-space-cache.c linux-2.6.32.24/fs/btrfs/free-space-cache.c 30187diff -urNp linux-2.6.35.7/fs/btrfs/free-space-cache.c linux-2.6.35.7/fs/btrfs/free-space-cache.c
31388--- linux-2.6.32.24/fs/btrfs/free-space-cache.c 2010-08-13 16:24:37.000000000 -0400 30188--- linux-2.6.35.7/fs/btrfs/free-space-cache.c 2010-08-26 19:47:12.000000000 -0400
31389+++ linux-2.6.32.24/fs/btrfs/free-space-cache.c 2010-10-23 19:59:20.000000000 -0400 30189+++ linux-2.6.35.7/fs/btrfs/free-space-cache.c 2010-09-17 20:12:09.000000000 -0400
31390@@ -1074,8 +1074,6 @@ u64 btrfs_alloc_from_cluster(struct btrf 30190@@ -1075,8 +1075,6 @@ u64 btrfs_alloc_from_cluster(struct btrf
31391 30191
31392 while(1) { 30192 while(1) {
31393 if (entry->bytes < bytes || entry->offset < min_start) { 30193 if (entry->bytes < bytes || entry->offset < min_start) {
@@ -31396,7 +30196,7 @@ diff -urNp linux-2.6.32.24/fs/btrfs/free-space-cache.c linux-2.6.32.24/fs/btrfs/
31396 node = rb_next(&entry->offset_index); 30196 node = rb_next(&entry->offset_index);
31397 if (!node) 30197 if (!node)
31398 break; 30198 break;
31399@@ -1226,7 +1224,7 @@ again: 30199@@ -1227,7 +1225,7 @@ again:
31400 */ 30200 */
31401 while (entry->bitmap || found_bitmap || 30201 while (entry->bitmap || found_bitmap ||
31402 (!entry->bitmap && entry->bytes < min_bytes)) { 30202 (!entry->bitmap && entry->bytes < min_bytes)) {
@@ -31405,10 +30205,10 @@ diff -urNp linux-2.6.32.24/fs/btrfs/free-space-cache.c linux-2.6.32.24/fs/btrfs/
31405 30205
31406 if (entry->bitmap && entry->bytes > bytes + empty_size) { 30206 if (entry->bitmap && entry->bytes > bytes + empty_size) {
31407 ret = btrfs_bitmap_cluster(block_group, entry, cluster, 30207 ret = btrfs_bitmap_cluster(block_group, entry, cluster,
31408diff -urNp linux-2.6.32.24/fs/btrfs/inode.c linux-2.6.32.24/fs/btrfs/inode.c 30208diff -urNp linux-2.6.35.7/fs/btrfs/inode.c linux-2.6.35.7/fs/btrfs/inode.c
31409--- linux-2.6.32.24/fs/btrfs/inode.c 2010-08-13 16:24:37.000000000 -0400 30209--- linux-2.6.35.7/fs/btrfs/inode.c 2010-08-26 19:47:12.000000000 -0400
31410+++ linux-2.6.32.24/fs/btrfs/inode.c 2010-10-23 19:59:20.000000000 -0400 30210+++ linux-2.6.35.7/fs/btrfs/inode.c 2010-09-17 20:12:09.000000000 -0400
31411@@ -63,7 +63,7 @@ static const struct inode_operations btr 30211@@ -64,7 +64,7 @@ static const struct inode_operations btr
31412 static const struct address_space_operations btrfs_aops; 30212 static const struct address_space_operations btrfs_aops;
31413 static const struct address_space_operations btrfs_symlink_aops; 30213 static const struct address_space_operations btrfs_symlink_aops;
31414 static const struct file_operations btrfs_dir_file_operations; 30214 static const struct file_operations btrfs_dir_file_operations;
@@ -31417,7 +30217,7 @@ diff -urNp linux-2.6.32.24/fs/btrfs/inode.c linux-2.6.32.24/fs/btrfs/inode.c
31417 30217
31418 static struct kmem_cache *btrfs_inode_cachep; 30218 static struct kmem_cache *btrfs_inode_cachep;
31419 struct kmem_cache *btrfs_trans_handle_cachep; 30219 struct kmem_cache *btrfs_trans_handle_cachep;
31420@@ -5972,7 +5972,7 @@ static const struct file_operations btrf 30220@@ -6958,7 +6958,7 @@ static const struct file_operations btrf
31421 .fsync = btrfs_sync_file, 30221 .fsync = btrfs_sync_file,
31422 }; 30222 };
31423 30223
@@ -31426,10 +30226,10 @@ diff -urNp linux-2.6.32.24/fs/btrfs/inode.c linux-2.6.32.24/fs/btrfs/inode.c
31426 .fill_delalloc = run_delalloc_range, 30226 .fill_delalloc = run_delalloc_range,
31427 .submit_bio_hook = btrfs_submit_bio_hook, 30227 .submit_bio_hook = btrfs_submit_bio_hook,
31428 .merge_bio_hook = btrfs_merge_bio_hook, 30228 .merge_bio_hook = btrfs_merge_bio_hook,
31429diff -urNp linux-2.6.32.24/fs/btrfs/relocation.c linux-2.6.32.24/fs/btrfs/relocation.c 30229diff -urNp linux-2.6.35.7/fs/btrfs/relocation.c linux-2.6.35.7/fs/btrfs/relocation.c
31430--- linux-2.6.32.24/fs/btrfs/relocation.c 2010-08-13 16:24:37.000000000 -0400 30230--- linux-2.6.35.7/fs/btrfs/relocation.c 2010-08-26 19:47:12.000000000 -0400
31431+++ linux-2.6.32.24/fs/btrfs/relocation.c 2010-10-23 19:59:24.000000000 -0400 30231+++ linux-2.6.35.7/fs/btrfs/relocation.c 2010-10-11 22:41:44.000000000 -0400
31432@@ -884,7 +884,7 @@ static int __update_reloc_root(struct bt 30232@@ -1239,7 +1239,7 @@ static int __update_reloc_root(struct bt
31433 } 30233 }
31434 spin_unlock(&rc->reloc_root_tree.lock); 30234 spin_unlock(&rc->reloc_root_tree.lock);
31435 30235
@@ -31438,38 +30238,9 @@ diff -urNp linux-2.6.32.24/fs/btrfs/relocation.c linux-2.6.32.24/fs/btrfs/reloca
31438 30238
31439 if (!del) { 30239 if (!del) {
31440 spin_lock(&rc->reloc_root_tree.lock); 30240 spin_lock(&rc->reloc_root_tree.lock);
31441diff -urNp linux-2.6.32.24/fs/btrfs/sysfs.c linux-2.6.32.24/fs/btrfs/sysfs.c 30241diff -urNp linux-2.6.35.7/fs/cachefiles/bind.c linux-2.6.35.7/fs/cachefiles/bind.c
31442--- linux-2.6.32.24/fs/btrfs/sysfs.c 2010-08-13 16:24:37.000000000 -0400 30242--- linux-2.6.35.7/fs/cachefiles/bind.c 2010-08-26 19:47:12.000000000 -0400
31443+++ linux-2.6.32.24/fs/btrfs/sysfs.c 2010-10-23 19:59:20.000000000 -0400 30243+++ linux-2.6.35.7/fs/cachefiles/bind.c 2010-09-17 20:12:09.000000000 -0400
31444@@ -164,12 +164,12 @@ static void btrfs_root_release(struct ko
31445 complete(&root->kobj_unregister);
31446 }
31447
31448-static struct sysfs_ops btrfs_super_attr_ops = {
31449+static const struct sysfs_ops btrfs_super_attr_ops = {
31450 .show = btrfs_super_attr_show,
31451 .store = btrfs_super_attr_store,
31452 };
31453
31454-static struct sysfs_ops btrfs_root_attr_ops = {
31455+static const struct sysfs_ops btrfs_root_attr_ops = {
31456 .show = btrfs_root_attr_show,
31457 .store = btrfs_root_attr_store,
31458 };
31459diff -urNp linux-2.6.32.24/fs/buffer.c linux-2.6.32.24/fs/buffer.c
31460--- linux-2.6.32.24/fs/buffer.c 2010-08-13 16:24:37.000000000 -0400
31461+++ linux-2.6.32.24/fs/buffer.c 2010-10-23 19:59:20.000000000 -0400
31462@@ -25,6 +25,7 @@
31463 #include <linux/percpu.h>
31464 #include <linux/slab.h>
31465 #include <linux/capability.h>
31466+#include <linux/security.h>
31467 #include <linux/blkdev.h>
31468 #include <linux/file.h>
31469 #include <linux/quotaops.h>
31470diff -urNp linux-2.6.32.24/fs/cachefiles/bind.c linux-2.6.32.24/fs/cachefiles/bind.c
31471--- linux-2.6.32.24/fs/cachefiles/bind.c 2010-08-13 16:24:37.000000000 -0400
31472+++ linux-2.6.32.24/fs/cachefiles/bind.c 2010-10-23 19:59:20.000000000 -0400
31473@@ -39,13 +39,11 @@ int cachefiles_daemon_bind(struct cachef 30244@@ -39,13 +39,11 @@ int cachefiles_daemon_bind(struct cachef
31474 args); 30245 args);
31475 30246
@@ -31486,10 +30257,19 @@ diff -urNp linux-2.6.32.24/fs/cachefiles/bind.c linux-2.6.32.24/fs/cachefiles/bi
31486 cache->bcull_percent < cache->brun_percent && 30257 cache->bcull_percent < cache->brun_percent &&
31487 cache->brun_percent < 100); 30258 cache->brun_percent < 100);
31488 30259
31489diff -urNp linux-2.6.32.24/fs/cachefiles/daemon.c linux-2.6.32.24/fs/cachefiles/daemon.c 30260diff -urNp linux-2.6.35.7/fs/cachefiles/daemon.c linux-2.6.35.7/fs/cachefiles/daemon.c
31490--- linux-2.6.32.24/fs/cachefiles/daemon.c 2010-08-13 16:24:37.000000000 -0400 30261--- linux-2.6.35.7/fs/cachefiles/daemon.c 2010-08-26 19:47:12.000000000 -0400
31491+++ linux-2.6.32.24/fs/cachefiles/daemon.c 2010-10-23 19:59:20.000000000 -0400 30262+++ linux-2.6.35.7/fs/cachefiles/daemon.c 2010-09-17 20:12:09.000000000 -0400
31492@@ -220,7 +220,7 @@ static ssize_t cachefiles_daemon_write(s 30263@@ -195,7 +195,7 @@ static ssize_t cachefiles_daemon_read(st
30264 if (n > buflen)
30265 return -EMSGSIZE;
30266
30267- if (copy_to_user(_buffer, buffer, n) != 0)
30268+ if (n > sizeof(buffer) || copy_to_user(_buffer, buffer, n) != 0)
30269 return -EFAULT;
30270
30271 return n;
30272@@ -221,7 +221,7 @@ static ssize_t cachefiles_daemon_write(s
31493 if (test_bit(CACHEFILES_DEAD, &cache->flags)) 30273 if (test_bit(CACHEFILES_DEAD, &cache->flags))
31494 return -EIO; 30274 return -EIO;
31495 30275
@@ -31516,10 +30296,10 @@ diff -urNp linux-2.6.32.24/fs/cachefiles/daemon.c linux-2.6.32.24/fs/cachefiles/
31516 return cachefiles_daemon_range_error(cache, args); 30296 return cachefiles_daemon_range_error(cache, args);
31517 30297
31518 cache->bstop_percent = bstop; 30298 cache->bstop_percent = bstop;
31519diff -urNp linux-2.6.32.24/fs/cachefiles/rdwr.c linux-2.6.32.24/fs/cachefiles/rdwr.c 30299diff -urNp linux-2.6.35.7/fs/cachefiles/rdwr.c linux-2.6.35.7/fs/cachefiles/rdwr.c
31520--- linux-2.6.32.24/fs/cachefiles/rdwr.c 2010-08-13 16:24:37.000000000 -0400 30300--- linux-2.6.35.7/fs/cachefiles/rdwr.c 2010-08-26 19:47:12.000000000 -0400
31521+++ linux-2.6.32.24/fs/cachefiles/rdwr.c 2010-10-23 19:59:20.000000000 -0400 30301+++ linux-2.6.35.7/fs/cachefiles/rdwr.c 2010-09-17 20:12:09.000000000 -0400
31522@@ -946,7 +946,7 @@ int cachefiles_write_page(struct fscache 30302@@ -945,7 +945,7 @@ int cachefiles_write_page(struct fscache
31523 old_fs = get_fs(); 30303 old_fs = get_fs();
31524 set_fs(KERNEL_DS); 30304 set_fs(KERNEL_DS);
31525 ret = file->f_op->write( 30305 ret = file->f_op->write(
@@ -31528,9 +30308,30 @@ diff -urNp linux-2.6.32.24/fs/cachefiles/rdwr.c linux-2.6.32.24/fs/cachefiles/rd
31528 set_fs(old_fs); 30308 set_fs(old_fs);
31529 kunmap(page); 30309 kunmap(page);
31530 if (ret != len) 30310 if (ret != len)
31531diff -urNp linux-2.6.32.24/fs/cifs/cifs_uniupr.h linux-2.6.32.24/fs/cifs/cifs_uniupr.h 30311diff -urNp linux-2.6.35.7/fs/ceph/dir.c linux-2.6.35.7/fs/ceph/dir.c
31532--- linux-2.6.32.24/fs/cifs/cifs_uniupr.h 2010-08-13 16:24:37.000000000 -0400 30312--- linux-2.6.35.7/fs/ceph/dir.c 2010-08-26 19:47:12.000000000 -0400
31533+++ linux-2.6.32.24/fs/cifs/cifs_uniupr.h 2010-10-23 19:59:20.000000000 -0400 30313+++ linux-2.6.35.7/fs/ceph/dir.c 2010-10-11 22:41:44.000000000 -0400
30314@@ -228,7 +228,7 @@ static int ceph_readdir(struct file *fil
30315 struct ceph_client *client = ceph_inode_to_client(inode);
30316 struct ceph_mds_client *mdsc = &client->mdsc;
30317 unsigned frag = fpos_frag(filp->f_pos);
30318- int off = fpos_off(filp->f_pos);
30319+ unsigned int off = fpos_off(filp->f_pos);
30320 int err;
30321 u32 ftype;
30322 struct ceph_mds_reply_info_parsed *rinfo;
30323@@ -357,7 +357,7 @@ more:
30324 rinfo = &fi->last_readdir->r_reply_info;
30325 dout("readdir frag %x num %d off %d chunkoff %d\n", frag,
30326 rinfo->dir_nr, off, fi->offset);
30327- while (off - fi->offset >= 0 && off - fi->offset < rinfo->dir_nr) {
30328+ while (off >= fi->offset && off - fi->offset < rinfo->dir_nr) {
30329 u64 pos = ceph_make_fpos(frag, off);
30330 struct ceph_mds_reply_inode *in =
30331 rinfo->dir_in[off - fi->offset].in;
30332diff -urNp linux-2.6.35.7/fs/cifs/cifs_uniupr.h linux-2.6.35.7/fs/cifs/cifs_uniupr.h
30333--- linux-2.6.35.7/fs/cifs/cifs_uniupr.h 2010-08-26 19:47:12.000000000 -0400
30334+++ linux-2.6.35.7/fs/cifs/cifs_uniupr.h 2010-09-17 20:12:09.000000000 -0400
31534@@ -132,7 +132,7 @@ const struct UniCaseRange CifsUniUpperRa 30335@@ -132,7 +132,7 @@ const struct UniCaseRange CifsUniUpperRa
31535 {0x0490, 0x04cc, UniCaseRangeU0490}, 30336 {0x0490, 0x04cc, UniCaseRangeU0490},
31536 {0x1e00, 0x1ffc, UniCaseRangeU1e00}, 30337 {0x1e00, 0x1ffc, UniCaseRangeU1e00},
@@ -31540,10 +30341,10 @@ diff -urNp linux-2.6.32.24/fs/cifs/cifs_uniupr.h linux-2.6.32.24/fs/cifs/cifs_un
31540 }; 30341 };
31541 #endif 30342 #endif
31542 30343
31543diff -urNp linux-2.6.32.24/fs/cifs/link.c linux-2.6.32.24/fs/cifs/link.c 30344diff -urNp linux-2.6.35.7/fs/cifs/link.c linux-2.6.35.7/fs/cifs/link.c
31544--- linux-2.6.32.24/fs/cifs/link.c 2010-08-13 16:24:37.000000000 -0400 30345--- linux-2.6.35.7/fs/cifs/link.c 2010-08-26 19:47:12.000000000 -0400
31545+++ linux-2.6.32.24/fs/cifs/link.c 2010-10-23 19:59:20.000000000 -0400 30346+++ linux-2.6.35.7/fs/cifs/link.c 2010-09-17 20:12:09.000000000 -0400
31546@@ -215,7 +215,7 @@ cifs_symlink(struct inode *inode, struct 30347@@ -216,7 +216,7 @@ cifs_symlink(struct inode *inode, struct
31547 30348
31548 void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie) 30349 void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie)
31549 { 30350 {
@@ -31552,26 +30353,36 @@ diff -urNp linux-2.6.32.24/fs/cifs/link.c linux-2.6.32.24/fs/cifs/link.c
31552 if (!IS_ERR(p)) 30353 if (!IS_ERR(p))
31553 kfree(p); 30354 kfree(p);
31554 } 30355 }
31555diff -urNp linux-2.6.32.24/fs/compat_binfmt_elf.c linux-2.6.32.24/fs/compat_binfmt_elf.c 30356diff -urNp linux-2.6.35.7/fs/compat_binfmt_elf.c linux-2.6.35.7/fs/compat_binfmt_elf.c
31556--- linux-2.6.32.24/fs/compat_binfmt_elf.c 2010-08-13 16:24:37.000000000 -0400 30357--- linux-2.6.35.7/fs/compat_binfmt_elf.c 2010-08-26 19:47:12.000000000 -0400
31557+++ linux-2.6.32.24/fs/compat_binfmt_elf.c 2010-10-23 19:59:20.000000000 -0400 30358+++ linux-2.6.35.7/fs/compat_binfmt_elf.c 2010-09-17 20:12:09.000000000 -0400
31558@@ -29,10 +29,12 @@ 30359@@ -30,11 +30,13 @@
31559 #undef elfhdr
31560 #undef elf_phdr 30360 #undef elf_phdr
30361 #undef elf_shdr
31561 #undef elf_note 30362 #undef elf_note
31562+#undef elf_dyn 30363+#undef elf_dyn
31563 #undef elf_addr_t 30364 #undef elf_addr_t
31564 #define elfhdr elf32_hdr 30365 #define elfhdr elf32_hdr
31565 #define elf_phdr elf32_phdr 30366 #define elf_phdr elf32_phdr
30367 #define elf_shdr elf32_shdr
31566 #define elf_note elf32_note 30368 #define elf_note elf32_note
31567+#define elf_dyn Elf32_Dyn 30369+#define elf_dyn Elf32_Dyn
31568 #define elf_addr_t Elf32_Addr 30370 #define elf_addr_t Elf32_Addr
31569 30371
31570 /* 30372 /*
31571diff -urNp linux-2.6.32.24/fs/compat.c linux-2.6.32.24/fs/compat.c 30373diff -urNp linux-2.6.35.7/fs/compat.c linux-2.6.35.7/fs/compat.c
31572--- linux-2.6.32.24/fs/compat.c 2010-08-13 16:24:37.000000000 -0400 30374--- linux-2.6.35.7/fs/compat.c 2010-09-26 17:32:11.000000000 -0400
31573+++ linux-2.6.32.24/fs/compat.c 2010-10-23 19:59:20.000000000 -0400 30375+++ linux-2.6.35.7/fs/compat.c 2010-10-11 22:41:44.000000000 -0400
31574@@ -1410,14 +1410,12 @@ static int compat_copy_strings(int argc, 30376@@ -590,7 +590,7 @@ ssize_t compat_rw_copy_check_uvector(int
30377 goto out;
30378
30379 ret = -EINVAL;
30380- if (nr_segs > UIO_MAXIOV || nr_segs < 0)
30381+ if (nr_segs > UIO_MAXIOV)
30382 goto out;
30383 if (nr_segs > fast_segs) {
30384 ret = -ENOMEM;
30385@@ -1433,14 +1433,12 @@ static int compat_copy_strings(int argc,
31575 if (!kmapped_page || kpos != (pos & PAGE_MASK)) { 30386 if (!kmapped_page || kpos != (pos & PAGE_MASK)) {
31576 struct page *page; 30387 struct page *page;
31577 30388
@@ -31586,7 +30397,7 @@ diff -urNp linux-2.6.32.24/fs/compat.c linux-2.6.32.24/fs/compat.c
31586 ret = get_user_pages(current, bprm->mm, pos, 30397 ret = get_user_pages(current, bprm->mm, pos,
31587 1, 1, 1, &page, NULL); 30398 1, 1, 1, &page, NULL);
31588 if (ret <= 0) { 30399 if (ret <= 0) {
31589@@ -1463,6 +1461,11 @@ int compat_do_execve(char * filename, 30400@@ -1486,6 +1484,11 @@ int compat_do_execve(char * filename,
31590 compat_uptr_t __user *envp, 30401 compat_uptr_t __user *envp,
31591 struct pt_regs * regs) 30402 struct pt_regs * regs)
31592 { 30403 {
@@ -31598,7 +30409,7 @@ diff -urNp linux-2.6.32.24/fs/compat.c linux-2.6.32.24/fs/compat.c
31598 struct linux_binprm *bprm; 30409 struct linux_binprm *bprm;
31599 struct file *file; 30410 struct file *file;
31600 struct files_struct *displaced; 30411 struct files_struct *displaced;
31601@@ -1499,6 +1502,14 @@ int compat_do_execve(char * filename, 30412@@ -1522,6 +1525,14 @@ int compat_do_execve(char * filename,
31602 bprm->filename = filename; 30413 bprm->filename = filename;
31603 bprm->interp = filename; 30414 bprm->interp = filename;
31604 30415
@@ -31613,7 +30424,7 @@ diff -urNp linux-2.6.32.24/fs/compat.c linux-2.6.32.24/fs/compat.c
31613 retval = bprm_mm_init(bprm); 30424 retval = bprm_mm_init(bprm);
31614 if (retval) 30425 if (retval)
31615 goto out_file; 30426 goto out_file;
31616@@ -1528,9 +1539,40 @@ int compat_do_execve(char * filename, 30427@@ -1551,9 +1562,40 @@ int compat_do_execve(char * filename,
31617 if (retval < 0) 30428 if (retval < 0)
31618 goto out; 30429 goto out;
31619 30430
@@ -31655,7 +30466,7 @@ diff -urNp linux-2.6.32.24/fs/compat.c linux-2.6.32.24/fs/compat.c
31655 30466
31656 /* execve succeeded */ 30467 /* execve succeeded */
31657 current->fs->in_exec = 0; 30468 current->fs->in_exec = 0;
31658@@ -1541,6 +1583,14 @@ int compat_do_execve(char * filename, 30469@@ -1564,6 +1606,14 @@ int compat_do_execve(char * filename,
31659 put_files_struct(displaced); 30470 put_files_struct(displaced);
31660 return retval; 30471 return retval;
31661 30472
@@ -31670,11 +30481,11 @@ diff -urNp linux-2.6.32.24/fs/compat.c linux-2.6.32.24/fs/compat.c
31670 out: 30481 out:
31671 if (bprm->mm) 30482 if (bprm->mm)
31672 mmput(bprm->mm); 30483 mmput(bprm->mm);
31673diff -urNp linux-2.6.32.24/fs/compat_ioctl.c linux-2.6.32.24/fs/compat_ioctl.c 30484diff -urNp linux-2.6.35.7/fs/compat_ioctl.c linux-2.6.35.7/fs/compat_ioctl.c
31674--- linux-2.6.32.24/fs/compat_ioctl.c 2010-08-13 16:24:37.000000000 -0400 30485--- linux-2.6.35.7/fs/compat_ioctl.c 2010-08-26 19:47:12.000000000 -0400
31675+++ linux-2.6.32.24/fs/compat_ioctl.c 2010-10-23 19:59:24.000000000 -0400 30486+++ linux-2.6.35.7/fs/compat_ioctl.c 2010-10-11 22:41:44.000000000 -0400
31676@@ -234,6 +234,8 @@ static int do_video_set_spu_palette(unsi 30487@@ -227,6 +227,8 @@ static int do_video_set_spu_palette(unsi
31677 up = (struct compat_video_spu_palette __user *) arg; 30488
31678 err = get_user(palp, &up->palette); 30489 err = get_user(palp, &up->palette);
31679 err |= get_user(length, &up->length); 30490 err |= get_user(length, &up->length);
31680+ if (err) 30491+ if (err)
@@ -31682,29 +30493,10 @@ diff -urNp linux-2.6.32.24/fs/compat_ioctl.c linux-2.6.32.24/fs/compat_ioctl.c
31682 30493
31683 up_native = compat_alloc_user_space(sizeof(struct video_spu_palette)); 30494 up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
31684 err = put_user(compat_ptr(palp), &up_native->palette); 30495 err = put_user(compat_ptr(palp), &up_native->palette);
31685@@ -1827,15 +1829,15 @@ struct ioctl_trans { 30496diff -urNp linux-2.6.35.7/fs/debugfs/inode.c linux-2.6.35.7/fs/debugfs/inode.c
31686 }; 30497--- linux-2.6.35.7/fs/debugfs/inode.c 2010-08-26 19:47:12.000000000 -0400
31687 30498+++ linux-2.6.35.7/fs/debugfs/inode.c 2010-09-17 20:12:09.000000000 -0400
31688 #define HANDLE_IOCTL(cmd,handler) \ 30499@@ -129,7 +129,7 @@ static inline int debugfs_positive(struc
31689- { (cmd), (ioctl_trans_handler_t)(handler) },
31690+ { (cmd), (ioctl_trans_handler_t)(handler), NULL },
31691
31692 /* pointer to compatible structure or no argument */
31693 #define COMPATIBLE_IOCTL(cmd) \
31694- { (cmd), do_ioctl32_pointer },
31695+ { (cmd), do_ioctl32_pointer, NULL },
31696
31697 /* argument is an unsigned long integer, not a pointer */
31698 #define ULONG_IOCTL(cmd) \
31699- { (cmd), (ioctl_trans_handler_t)sys_ioctl },
31700+ { (cmd), (ioctl_trans_handler_t)sys_ioctl, NULL },
31701
31702 /* ioctl should not be warned about even if it's not implemented.
31703 Valid reasons to use this:
31704diff -urNp linux-2.6.32.24/fs/debugfs/inode.c linux-2.6.32.24/fs/debugfs/inode.c
31705--- linux-2.6.32.24/fs/debugfs/inode.c 2010-08-13 16:24:37.000000000 -0400
31706+++ linux-2.6.32.24/fs/debugfs/inode.c 2010-10-23 19:59:20.000000000 -0400
31707@@ -128,7 +128,7 @@ static inline int debugfs_positive(struc
31708 30500
31709 static int debug_fill_super(struct super_block *sb, void *data, int silent) 30501 static int debug_fill_super(struct super_block *sb, void *data, int silent)
31710 { 30502 {
@@ -31713,22 +30505,22 @@ diff -urNp linux-2.6.32.24/fs/debugfs/inode.c linux-2.6.32.24/fs/debugfs/inode.c
31713 30505
31714 return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files); 30506 return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files);
31715 } 30507 }
31716diff -urNp linux-2.6.32.24/fs/dlm/lockspace.c linux-2.6.32.24/fs/dlm/lockspace.c 30508diff -urNp linux-2.6.35.7/fs/dlm/lockspace.c linux-2.6.35.7/fs/dlm/lockspace.c
31717--- linux-2.6.32.24/fs/dlm/lockspace.c 2010-08-13 16:24:37.000000000 -0400 30509--- linux-2.6.35.7/fs/dlm/lockspace.c 2010-08-26 19:47:12.000000000 -0400
31718+++ linux-2.6.32.24/fs/dlm/lockspace.c 2010-10-23 19:59:20.000000000 -0400 30510+++ linux-2.6.35.7/fs/dlm/lockspace.c 2010-09-17 20:12:09.000000000 -0400
31719@@ -148,7 +148,7 @@ static void lockspace_kobj_release(struc 30511@@ -200,7 +200,7 @@ static int dlm_uevent(struct kset *kset,
31720 kfree(ls); 30512 return 0;
31721 } 30513 }
31722 30514
31723-static struct sysfs_ops dlm_attr_ops = { 30515-static struct kset_uevent_ops dlm_uevent_ops = {
31724+static const struct sysfs_ops dlm_attr_ops = { 30516+static const struct kset_uevent_ops dlm_uevent_ops = {
31725 .show = dlm_attr_show, 30517 .uevent = dlm_uevent,
31726 .store = dlm_attr_store,
31727 }; 30518 };
31728diff -urNp linux-2.6.32.24/fs/ecryptfs/inode.c linux-2.6.32.24/fs/ecryptfs/inode.c 30519
31729--- linux-2.6.32.24/fs/ecryptfs/inode.c 2010-08-13 16:24:37.000000000 -0400 30520diff -urNp linux-2.6.35.7/fs/ecryptfs/inode.c linux-2.6.35.7/fs/ecryptfs/inode.c
31730+++ linux-2.6.32.24/fs/ecryptfs/inode.c 2010-10-23 19:59:20.000000000 -0400 30521--- linux-2.6.35.7/fs/ecryptfs/inode.c 2010-08-26 19:47:12.000000000 -0400
31731@@ -656,7 +656,7 @@ static int ecryptfs_readlink_lower(struc 30522+++ linux-2.6.35.7/fs/ecryptfs/inode.c 2010-09-17 20:12:09.000000000 -0400
30523@@ -658,7 +658,7 @@ static int ecryptfs_readlink_lower(struc
31732 old_fs = get_fs(); 30524 old_fs = get_fs();
31733 set_fs(get_ds()); 30525 set_fs(get_ds());
31734 rc = lower_dentry->d_inode->i_op->readlink(lower_dentry, 30526 rc = lower_dentry->d_inode->i_op->readlink(lower_dentry,
@@ -31737,19 +30529,40 @@ diff -urNp linux-2.6.32.24/fs/ecryptfs/inode.c linux-2.6.32.24/fs/ecryptfs/inode
31737 lower_bufsiz); 30529 lower_bufsiz);
31738 set_fs(old_fs); 30530 set_fs(old_fs);
31739 if (rc < 0) 30531 if (rc < 0)
31740@@ -702,7 +702,7 @@ static void *ecryptfs_follow_link(struct 30532@@ -704,7 +704,7 @@ static void *ecryptfs_follow_link(struct
31741 } 30533 }
31742 old_fs = get_fs(); 30534 old_fs = get_fs();
31743 set_fs(get_ds()); 30535 set_fs(get_ds());
31744- rc = dentry->d_inode->i_op->readlink(dentry, (char __user *)buf, len); 30536- rc = dentry->d_inode->i_op->readlink(dentry, (char __user *)buf, len);
31745+ rc = dentry->d_inode->i_op->readlink(dentry, (__force char __user *)buf, len); 30537+ rc = dentry->d_inode->i_op->readlink(dentry, (__force char __user *)buf, len);
31746 set_fs(old_fs); 30538 set_fs(old_fs);
31747 if (rc < 0) 30539 if (rc < 0) {
31748 goto out_free; 30540 kfree(buf);
31749diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c 30541@@ -719,7 +719,7 @@ out:
31750--- linux-2.6.32.24/fs/exec.c 2010-08-13 16:24:37.000000000 -0400 30542 static void
31751+++ linux-2.6.32.24/fs/exec.c 2010-10-23 19:59:20.000000000 -0400 30543 ecryptfs_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr)
31752@@ -56,12 +56,24 @@ 30544 {
30545- char *buf = nd_get_link(nd);
30546+ const char *buf = nd_get_link(nd);
30547 if (!IS_ERR(buf)) {
30548 /* Free the char* */
30549 kfree(buf);
30550diff -urNp linux-2.6.35.7/fs/ecryptfs/miscdev.c linux-2.6.35.7/fs/ecryptfs/miscdev.c
30551--- linux-2.6.35.7/fs/ecryptfs/miscdev.c 2010-08-26 19:47:12.000000000 -0400
30552+++ linux-2.6.35.7/fs/ecryptfs/miscdev.c 2010-09-17 20:12:09.000000000 -0400
30553@@ -328,7 +328,7 @@ check_list:
30554 goto out_unlock_msg_ctx;
30555 i = 5;
30556 if (msg_ctx->msg) {
30557- if (copy_to_user(&buf[i], packet_length, packet_length_size))
30558+ if (packet_length_size > sizeof(packet_length) || copy_to_user(&buf[i], packet_length, packet_length_size))
30559 goto out_unlock_msg_ctx;
30560 i += packet_length_size;
30561 if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size))
30562diff -urNp linux-2.6.35.7/fs/exec.c linux-2.6.35.7/fs/exec.c
30563--- linux-2.6.35.7/fs/exec.c 2010-08-26 19:47:12.000000000 -0400
30564+++ linux-2.6.35.7/fs/exec.c 2010-09-28 18:50:18.000000000 -0400
30565@@ -55,12 +55,24 @@
31753 #include <linux/fsnotify.h> 30566 #include <linux/fsnotify.h>
31754 #include <linux/fs_struct.h> 30567 #include <linux/fs_struct.h>
31755 #include <linux/pipe_fs_i.h> 30568 #include <linux/pipe_fs_i.h>
@@ -31774,7 +30587,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31774 int core_uses_pid; 30587 int core_uses_pid;
31775 char core_pattern[CORENAME_MAX_SIZE] = "core"; 30588 char core_pattern[CORENAME_MAX_SIZE] = "core";
31776 unsigned int core_pipe_limit; 30589 unsigned int core_pipe_limit;
31777@@ -115,7 +127,7 @@ SYSCALL_DEFINE1(uselib, const char __use 30590@@ -114,7 +126,7 @@ SYSCALL_DEFINE1(uselib, const char __use
31778 goto out; 30591 goto out;
31779 30592
31780 file = do_filp_open(AT_FDCWD, tmp, 30593 file = do_filp_open(AT_FDCWD, tmp,
@@ -31783,7 +30596,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31783 MAY_READ | MAY_EXEC | MAY_OPEN); 30596 MAY_READ | MAY_EXEC | MAY_OPEN);
31784 putname(tmp); 30597 putname(tmp);
31785 error = PTR_ERR(file); 30598 error = PTR_ERR(file);
31786@@ -163,18 +175,10 @@ static struct page *get_arg_page(struct 30599@@ -162,18 +174,10 @@ static struct page *get_arg_page(struct
31787 int write) 30600 int write)
31788 { 30601 {
31789 struct page *page; 30602 struct page *page;
@@ -31808,16 +30621,16 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31808@@ -246,6 +250,11 @@ static int __bprm_mm_init(struct linux_b 30621@@ -246,6 +250,11 @@ static int __bprm_mm_init(struct linux_b
31809 vma->vm_end = STACK_TOP_MAX; 30622 vma->vm_end = STACK_TOP_MAX;
31810 vma->vm_start = vma->vm_end - PAGE_SIZE; 30623 vma->vm_start = vma->vm_end - PAGE_SIZE;
31811 vma->vm_flags = VM_STACK_FLAGS; 30624 vma->vm_flags = VM_STACK_FLAGS | VM_STACK_INCOMPLETE_SETUP;
31812+ 30625+
31813+#ifdef CONFIG_PAX_SEGMEXEC 30626+#ifdef CONFIG_PAX_SEGMEXEC
31814+ vma->vm_flags &= ~(VM_EXEC | VM_MAYEXEC); 30627+ vma->vm_flags &= ~(VM_EXEC | VM_MAYEXEC);
31815+#endif 30628+#endif
31816+ 30629+
31817 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); 30630 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
30631 INIT_LIST_HEAD(&vma->anon_vma_chain);
31818 err = insert_vm_struct(mm, vma); 30632 err = insert_vm_struct(mm, vma);
31819 if (err) 30633@@ -255,6 +264,12 @@ static int __bprm_mm_init(struct linux_b
31820@@ -254,6 +263,12 @@ static int __bprm_mm_init(struct linux_b
31821 mm->stack_vm = mm->total_vm = 1; 30634 mm->stack_vm = mm->total_vm = 1;
31822 up_write(&mm->mmap_sem); 30635 up_write(&mm->mmap_sem);
31823 bprm->p = vma->vm_end - sizeof(void *); 30636 bprm->p = vma->vm_end - sizeof(void *);
@@ -31830,7 +30643,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31830 return 0; 30643 return 0;
31831 err: 30644 err:
31832 up_write(&mm->mmap_sem); 30645 up_write(&mm->mmap_sem);
31833@@ -376,6 +391,9 @@ static int count(char __user * __user * 30646@@ -377,6 +392,9 @@ static int count(char __user * __user *
31834 argv++; 30647 argv++;
31835 if (i++ >= max) 30648 if (i++ >= max)
31836 return -E2BIG; 30649 return -E2BIG;
@@ -31840,7 +30653,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31840 cond_resched(); 30653 cond_resched();
31841 } 30654 }
31842 } 30655 }
31843@@ -419,6 +437,12 @@ static int copy_strings(int argc, char _ 30656@@ -420,6 +438,12 @@ static int copy_strings(int argc, char _
31844 while (len > 0) { 30657 while (len > 0) {
31845 int offset, bytes_to_copy; 30658 int offset, bytes_to_copy;
31846 30659
@@ -31853,7 +30666,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31853 offset = pos % PAGE_SIZE; 30666 offset = pos % PAGE_SIZE;
31854 if (offset == 0) 30667 if (offset == 0)
31855 offset = PAGE_SIZE; 30668 offset = PAGE_SIZE;
31856@@ -475,7 +499,7 @@ int copy_strings_kernel(int argc,char ** 30669@@ -476,7 +500,7 @@ int copy_strings_kernel(int argc,char **
31857 int r; 30670 int r;
31858 mm_segment_t oldfs = get_fs(); 30671 mm_segment_t oldfs = get_fs();
31859 set_fs(KERNEL_DS); 30672 set_fs(KERNEL_DS);
@@ -31862,7 +30675,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31862 set_fs(oldfs); 30675 set_fs(oldfs);
31863 return r; 30676 return r;
31864 } 30677 }
31865@@ -505,7 +529,8 @@ static int shift_arg_pages(struct vm_are 30678@@ -506,7 +530,8 @@ static int shift_arg_pages(struct vm_are
31866 unsigned long new_end = old_end - shift; 30679 unsigned long new_end = old_end - shift;
31867 struct mmu_gather *tlb; 30680 struct mmu_gather *tlb;
31868 30681
@@ -31872,7 +30685,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31872 30685
31873 /* 30686 /*
31874 * ensure there are no vmas between where we want to go 30687 * ensure there are no vmas between where we want to go
31875@@ -514,6 +539,10 @@ static int shift_arg_pages(struct vm_are 30688@@ -515,6 +540,10 @@ static int shift_arg_pages(struct vm_are
31876 if (vma != find_vma(mm, new_start)) 30689 if (vma != find_vma(mm, new_start))
31877 return -EFAULT; 30690 return -EFAULT;
31878 30691
@@ -31883,7 +30696,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31883 /* 30696 /*
31884 * cover the whole range: [new_start, old_end) 30697 * cover the whole range: [new_start, old_end)
31885 */ 30698 */
31886@@ -605,6 +634,14 @@ int setup_arg_pages(struct linux_binprm 30699@@ -605,8 +634,28 @@ int setup_arg_pages(struct linux_binprm
31887 bprm->exec -= stack_shift; 30700 bprm->exec -= stack_shift;
31888 30701
31889 down_write(&mm->mmap_sem); 30702 down_write(&mm->mmap_sem);
@@ -31897,11 +30710,6 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31897+ 30710+
31898 vm_flags = VM_STACK_FLAGS; 30711 vm_flags = VM_STACK_FLAGS;
31899 30712
31900 /*
31901@@ -618,19 +655,24 @@ int setup_arg_pages(struct linux_binprm
31902 vm_flags &= ~VM_EXEC;
31903 vm_flags |= mm->def_flags;
31904
31905+#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC) 30713+#if defined(CONFIG_PAX_PAGEEXEC) || defined(CONFIG_PAX_SEGMEXEC)
31906+ if (mm->pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) { 30714+ if (mm->pax_flags & (MF_PAX_PAGEEXEC | MF_PAX_SEGMEXEC)) {
31907+ vm_flags &= ~VM_EXEC; 30715+ vm_flags &= ~VM_EXEC;
@@ -31914,9 +30722,10 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31914+ } 30722+ }
31915+#endif 30723+#endif
31916+ 30724+
31917 ret = mprotect_fixup(vma, &prev, vma->vm_start, vma->vm_end, 30725 /*
31918 vm_flags); 30726 * Adjust stack execute permissions; explicitly enable for
31919 if (ret) 30727 * EXSTACK_ENABLE_X, disable for EXSTACK_DISABLE_X and leave alone
30728@@ -625,13 +674,6 @@ int setup_arg_pages(struct linux_binprm
31920 goto out_unlock; 30729 goto out_unlock;
31921 BUG_ON(prev != vma); 30730 BUG_ON(prev != vma);
31922 30731
@@ -31927,10 +30736,10 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31927- goto out_unlock; 30736- goto out_unlock;
31928- } 30737- }
31929- 30738-
31930 stack_expand = EXTRA_STACK_VM_PAGES * PAGE_SIZE; 30739 /* mprotect_fixup is overkill to remove the temporary stack flags */
31931 stack_size = vma->vm_end - vma->vm_start; 30740 vma->vm_flags &= ~VM_STACK_INCOMPLETE_SETUP;
31932 /* 30741
31933@@ -667,7 +709,7 @@ struct file *open_exec(const char *name) 30742@@ -671,7 +713,7 @@ struct file *open_exec(const char *name)
31934 int err; 30743 int err;
31935 30744
31936 file = do_filp_open(AT_FDCWD, name, 30745 file = do_filp_open(AT_FDCWD, name,
@@ -31939,7 +30748,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31939 MAY_EXEC | MAY_OPEN); 30748 MAY_EXEC | MAY_OPEN);
31940 if (IS_ERR(file)) 30749 if (IS_ERR(file))
31941 goto out; 30750 goto out;
31942@@ -704,7 +746,7 @@ int kernel_read(struct file *file, loff_ 30751@@ -708,7 +750,7 @@ int kernel_read(struct file *file, loff_
31943 old_fs = get_fs(); 30752 old_fs = get_fs();
31944 set_fs(get_ds()); 30753 set_fs(get_ds());
31945 /* The cast to a user pointer is valid due to the set_fs() */ 30754 /* The cast to a user pointer is valid due to the set_fs() */
@@ -31948,7 +30757,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31948 set_fs(old_fs); 30757 set_fs(old_fs);
31949 return result; 30758 return result;
31950 } 30759 }
31951@@ -1110,7 +1152,7 @@ int check_unsafe_exec(struct linux_binpr 30760@@ -1125,7 +1167,7 @@ int check_unsafe_exec(struct linux_binpr
31952 } 30761 }
31953 rcu_read_unlock(); 30762 rcu_read_unlock();
31954 30763
@@ -31957,7 +30766,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31957 bprm->unsafe |= LSM_UNSAFE_SHARE; 30766 bprm->unsafe |= LSM_UNSAFE_SHARE;
31958 } else { 30767 } else {
31959 res = -EAGAIN; 30768 res = -EAGAIN;
31960@@ -1309,6 +1351,11 @@ int do_execve(char * filename, 30769@@ -1321,6 +1363,11 @@ int do_execve(char * filename,
31961 char __user *__user *envp, 30770 char __user *__user *envp,
31962 struct pt_regs * regs) 30771 struct pt_regs * regs)
31963 { 30772 {
@@ -31969,7 +30778,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31969 struct linux_binprm *bprm; 30778 struct linux_binprm *bprm;
31970 struct file *file; 30779 struct file *file;
31971 struct files_struct *displaced; 30780 struct files_struct *displaced;
31972@@ -1345,6 +1392,18 @@ int do_execve(char * filename, 30781@@ -1357,6 +1404,18 @@ int do_execve(char * filename,
31973 bprm->filename = filename; 30782 bprm->filename = filename;
31974 bprm->interp = filename; 30783 bprm->interp = filename;
31975 30784
@@ -31988,7 +30797,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
31988 retval = bprm_mm_init(bprm); 30797 retval = bprm_mm_init(bprm);
31989 if (retval) 30798 if (retval)
31990 goto out_file; 30799 goto out_file;
31991@@ -1374,10 +1433,41 @@ int do_execve(char * filename, 30800@@ -1386,10 +1445,41 @@ int do_execve(char * filename,
31992 if (retval < 0) 30801 if (retval < 0)
31993 goto out; 30802 goto out;
31994 30803
@@ -32031,7 +30840,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
32031 30840
32032 /* execve succeeded */ 30841 /* execve succeeded */
32033 current->fs->in_exec = 0; 30842 current->fs->in_exec = 0;
32034@@ -1388,6 +1478,14 @@ int do_execve(char * filename, 30843@@ -1400,6 +1490,14 @@ int do_execve(char * filename,
32035 put_files_struct(displaced); 30844 put_files_struct(displaced);
32036 return retval; 30845 return retval;
32037 30846
@@ -32046,7 +30855,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
32046 out: 30855 out:
32047 if (bprm->mm) 30856 if (bprm->mm)
32048 mmput (bprm->mm); 30857 mmput (bprm->mm);
32049@@ -1551,6 +1649,217 @@ out: 30858@@ -1563,6 +1661,217 @@ out:
32050 return ispipe; 30859 return ispipe;
32051 } 30860 }
32052 30861
@@ -32185,7 +30994,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
32185+ current->comm, task_pid_nr(current), current_uid(), current_euid()); 30994+ current->comm, task_pid_nr(current), current_uid(), current_euid());
32186+ print_symbol(KERN_ERR "PAX: refcount overflow occured at: %s\n", instruction_pointer(regs)); 30995+ print_symbol(KERN_ERR "PAX: refcount overflow occured at: %s\n", instruction_pointer(regs));
32187+ show_regs(regs); 30996+ show_regs(regs);
32188+ force_sig_specific(SIGKILL, current); 30997+ force_sig_info(SIGKILL, SEND_SIG_FORCED, current);
32189+} 30998+}
32190+#endif 30999+#endif
32191+ 31000+
@@ -32261,10 +31070,10 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
32261+} 31070+}
32262+#endif 31071+#endif
32263+ 31072+
32264 static int zap_process(struct task_struct *start) 31073 static int zap_process(struct task_struct *start, int exit_code)
32265 { 31074 {
32266 struct task_struct *t; 31075 struct task_struct *t;
32267@@ -1753,17 +2062,17 @@ static void wait_for_dump_helpers(struct 31076@@ -1773,17 +2082,17 @@ static void wait_for_dump_helpers(struct
32268 pipe = file->f_path.dentry->d_inode->i_pipe; 31077 pipe = file->f_path.dentry->d_inode->i_pipe;
32269 31078
32270 pipe_lock(pipe); 31079 pipe_lock(pipe);
@@ -32287,7 +31096,7 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
32287 pipe_unlock(pipe); 31096 pipe_unlock(pipe);
32288 31097
32289 } 31098 }
32290@@ -1834,6 +2143,10 @@ void do_coredump(long signr, int exit_co 31099@@ -1891,6 +2200,10 @@ void do_coredump(long signr, int exit_co
32291 */ 31100 */
32292 clear_thread_flag(TIF_SIGPENDING); 31101 clear_thread_flag(TIF_SIGPENDING);
32293 31102
@@ -32298,10 +31107,10 @@ diff -urNp linux-2.6.32.24/fs/exec.c linux-2.6.32.24/fs/exec.c
32298 /* 31107 /*
32299 * lock_kernel() because format_corename() is controlled by sysctl, which 31108 * lock_kernel() because format_corename() is controlled by sysctl, which
32300 * uses lock_kernel() 31109 * uses lock_kernel()
32301diff -urNp linux-2.6.32.24/fs/ext2/balloc.c linux-2.6.32.24/fs/ext2/balloc.c 31110diff -urNp linux-2.6.35.7/fs/ext2/balloc.c linux-2.6.35.7/fs/ext2/balloc.c
32302--- linux-2.6.32.24/fs/ext2/balloc.c 2010-08-13 16:24:37.000000000 -0400 31111--- linux-2.6.35.7/fs/ext2/balloc.c 2010-08-26 19:47:12.000000000 -0400
32303+++ linux-2.6.32.24/fs/ext2/balloc.c 2010-10-23 19:59:20.000000000 -0400 31112+++ linux-2.6.35.7/fs/ext2/balloc.c 2010-09-17 20:12:37.000000000 -0400
32304@@ -1192,7 +1192,7 @@ static int ext2_has_free_blocks(struct e 31113@@ -1193,7 +1193,7 @@ static int ext2_has_free_blocks(struct e
32305 31114
32306 free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter); 31115 free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
32307 root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count); 31116 root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
@@ -32310,10 +31119,10 @@ diff -urNp linux-2.6.32.24/fs/ext2/balloc.c linux-2.6.32.24/fs/ext2/balloc.c
32310 sbi->s_resuid != current_fsuid() && 31119 sbi->s_resuid != current_fsuid() &&
32311 (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) { 31120 (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
32312 return 0; 31121 return 0;
32313diff -urNp linux-2.6.32.24/fs/ext2/xattr.c linux-2.6.32.24/fs/ext2/xattr.c 31122diff -urNp linux-2.6.35.7/fs/ext2/xattr.c linux-2.6.35.7/fs/ext2/xattr.c
32314--- linux-2.6.32.24/fs/ext2/xattr.c 2010-08-13 16:24:37.000000000 -0400 31123--- linux-2.6.35.7/fs/ext2/xattr.c 2010-08-26 19:47:12.000000000 -0400
32315+++ linux-2.6.32.24/fs/ext2/xattr.c 2010-10-23 19:59:20.000000000 -0400 31124+++ linux-2.6.35.7/fs/ext2/xattr.c 2010-09-17 20:12:09.000000000 -0400
32316@@ -85,8 +85,8 @@ 31125@@ -86,8 +86,8 @@
32317 printk("\n"); \ 31126 printk("\n"); \
32318 } while (0) 31127 } while (0)
32319 #else 31128 #else
@@ -32324,10 +31133,10 @@ diff -urNp linux-2.6.32.24/fs/ext2/xattr.c linux-2.6.32.24/fs/ext2/xattr.c
32324 #endif 31133 #endif
32325 31134
32326 static int ext2_xattr_set2(struct inode *, struct buffer_head *, 31135 static int ext2_xattr_set2(struct inode *, struct buffer_head *,
32327diff -urNp linux-2.6.32.24/fs/ext3/balloc.c linux-2.6.32.24/fs/ext3/balloc.c 31136diff -urNp linux-2.6.35.7/fs/ext3/balloc.c linux-2.6.35.7/fs/ext3/balloc.c
32328--- linux-2.6.32.24/fs/ext3/balloc.c 2010-08-13 16:24:37.000000000 -0400 31137--- linux-2.6.35.7/fs/ext3/balloc.c 2010-08-26 19:47:12.000000000 -0400
32329+++ linux-2.6.32.24/fs/ext3/balloc.c 2010-10-23 19:59:20.000000000 -0400 31138+++ linux-2.6.35.7/fs/ext3/balloc.c 2010-09-17 20:12:37.000000000 -0400
32330@@ -1421,7 +1421,7 @@ static int ext3_has_free_blocks(struct e 31139@@ -1422,7 +1422,7 @@ static int ext3_has_free_blocks(struct e
32331 31140
32332 free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter); 31141 free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
32333 root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count); 31142 root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
@@ -32336,9 +31145,9 @@ diff -urNp linux-2.6.32.24/fs/ext3/balloc.c linux-2.6.32.24/fs/ext3/balloc.c
32336 sbi->s_resuid != current_fsuid() && 31145 sbi->s_resuid != current_fsuid() &&
32337 (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) { 31146 (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
32338 return 0; 31147 return 0;
32339diff -urNp linux-2.6.32.24/fs/ext3/namei.c linux-2.6.32.24/fs/ext3/namei.c 31148diff -urNp linux-2.6.35.7/fs/ext3/namei.c linux-2.6.35.7/fs/ext3/namei.c
32340--- linux-2.6.32.24/fs/ext3/namei.c 2010-08-13 16:24:37.000000000 -0400 31149--- linux-2.6.35.7/fs/ext3/namei.c 2010-08-26 19:47:12.000000000 -0400
32341+++ linux-2.6.32.24/fs/ext3/namei.c 2010-10-23 19:59:20.000000000 -0400 31150+++ linux-2.6.35.7/fs/ext3/namei.c 2010-09-17 20:12:09.000000000 -0400
32342@@ -1168,7 +1168,7 @@ static struct ext3_dir_entry_2 *do_split 31151@@ -1168,7 +1168,7 @@ static struct ext3_dir_entry_2 *do_split
32343 char *data1 = (*bh)->b_data, *data2; 31152 char *data1 = (*bh)->b_data, *data2;
32344 unsigned split, move, size; 31153 unsigned split, move, size;
@@ -32348,9 +31157,9 @@ diff -urNp linux-2.6.32.24/fs/ext3/namei.c linux-2.6.32.24/fs/ext3/namei.c
32348 31157
32349 bh2 = ext3_append (handle, dir, &newblock, &err); 31158 bh2 = ext3_append (handle, dir, &newblock, &err);
32350 if (!(bh2)) { 31159 if (!(bh2)) {
32351diff -urNp linux-2.6.32.24/fs/ext3/xattr.c linux-2.6.32.24/fs/ext3/xattr.c 31160diff -urNp linux-2.6.35.7/fs/ext3/xattr.c linux-2.6.35.7/fs/ext3/xattr.c
32352--- linux-2.6.32.24/fs/ext3/xattr.c 2010-08-13 16:24:37.000000000 -0400 31161--- linux-2.6.35.7/fs/ext3/xattr.c 2010-08-26 19:47:12.000000000 -0400
32353+++ linux-2.6.32.24/fs/ext3/xattr.c 2010-10-23 19:59:20.000000000 -0400 31162+++ linux-2.6.35.7/fs/ext3/xattr.c 2010-09-17 20:12:09.000000000 -0400
32354@@ -89,8 +89,8 @@ 31163@@ -89,8 +89,8 @@
32355 printk("\n"); \ 31164 printk("\n"); \
32356 } while (0) 31165 } while (0)
@@ -32362,10 +31171,10 @@ diff -urNp linux-2.6.32.24/fs/ext3/xattr.c linux-2.6.32.24/fs/ext3/xattr.c
32362 #endif 31171 #endif
32363 31172
32364 static void ext3_xattr_cache_insert(struct buffer_head *); 31173 static void ext3_xattr_cache_insert(struct buffer_head *);
32365diff -urNp linux-2.6.32.24/fs/ext4/balloc.c linux-2.6.32.24/fs/ext4/balloc.c 31174diff -urNp linux-2.6.35.7/fs/ext4/balloc.c linux-2.6.35.7/fs/ext4/balloc.c
32366--- linux-2.6.32.24/fs/ext4/balloc.c 2010-08-29 21:08:20.000000000 -0400 31175--- linux-2.6.35.7/fs/ext4/balloc.c 2010-08-26 19:47:12.000000000 -0400
32367+++ linux-2.6.32.24/fs/ext4/balloc.c 2010-10-23 19:59:20.000000000 -0400 31176+++ linux-2.6.35.7/fs/ext4/balloc.c 2010-09-17 20:12:37.000000000 -0400
32368@@ -570,7 +570,7 @@ int ext4_has_free_blocks(struct ext4_sb_ 31177@@ -522,7 +522,7 @@ int ext4_has_free_blocks(struct ext4_sb_
32369 /* Hm, nope. Are (enough) root reserved blocks available? */ 31178 /* Hm, nope. Are (enough) root reserved blocks available? */
32370 if (sbi->s_resuid == current_fsuid() || 31179 if (sbi->s_resuid == current_fsuid() ||
32371 ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) || 31180 ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
@@ -32374,10 +31183,10 @@ diff -urNp linux-2.6.32.24/fs/ext4/balloc.c linux-2.6.32.24/fs/ext4/balloc.c
32374 if (free_blocks >= (nblocks + dirty_blocks)) 31183 if (free_blocks >= (nblocks + dirty_blocks))
32375 return 1; 31184 return 1;
32376 } 31185 }
32377diff -urNp linux-2.6.32.24/fs/ext4/namei.c linux-2.6.32.24/fs/ext4/namei.c 31186diff -urNp linux-2.6.35.7/fs/ext4/namei.c linux-2.6.35.7/fs/ext4/namei.c
32378--- linux-2.6.32.24/fs/ext4/namei.c 2010-08-13 16:24:37.000000000 -0400 31187--- linux-2.6.35.7/fs/ext4/namei.c 2010-08-26 19:47:12.000000000 -0400
32379+++ linux-2.6.32.24/fs/ext4/namei.c 2010-10-23 19:59:20.000000000 -0400 31188+++ linux-2.6.35.7/fs/ext4/namei.c 2010-09-17 20:12:09.000000000 -0400
32380@@ -1203,7 +1203,7 @@ static struct ext4_dir_entry_2 *do_split 31189@@ -1197,7 +1197,7 @@ static struct ext4_dir_entry_2 *do_split
32381 char *data1 = (*bh)->b_data, *data2; 31190 char *data1 = (*bh)->b_data, *data2;
32382 unsigned split, move, size; 31191 unsigned split, move, size;
32383 struct ext4_dir_entry_2 *de = NULL, *de2; 31192 struct ext4_dir_entry_2 *de = NULL, *de2;
@@ -32386,21 +31195,9 @@ diff -urNp linux-2.6.32.24/fs/ext4/namei.c linux-2.6.32.24/fs/ext4/namei.c
32386 31195
32387 bh2 = ext4_append (handle, dir, &newblock, &err); 31196 bh2 = ext4_append (handle, dir, &newblock, &err);
32388 if (!(bh2)) { 31197 if (!(bh2)) {
32389diff -urNp linux-2.6.32.24/fs/ext4/super.c linux-2.6.32.24/fs/ext4/super.c 31198diff -urNp linux-2.6.35.7/fs/ext4/xattr.c linux-2.6.35.7/fs/ext4/xattr.c
32390--- linux-2.6.32.24/fs/ext4/super.c 2010-08-13 16:24:37.000000000 -0400 31199--- linux-2.6.35.7/fs/ext4/xattr.c 2010-08-26 19:47:12.000000000 -0400
32391+++ linux-2.6.32.24/fs/ext4/super.c 2010-10-23 19:59:20.000000000 -0400 31200+++ linux-2.6.35.7/fs/ext4/xattr.c 2010-09-17 20:12:09.000000000 -0400
32392@@ -2287,7 +2287,7 @@ static void ext4_sb_release(struct kobje
32393 }
32394
32395
32396-static struct sysfs_ops ext4_attr_ops = {
32397+static const struct sysfs_ops ext4_attr_ops = {
32398 .show = ext4_attr_show,
32399 .store = ext4_attr_store,
32400 };
32401diff -urNp linux-2.6.32.24/fs/ext4/xattr.c linux-2.6.32.24/fs/ext4/xattr.c
32402--- linux-2.6.32.24/fs/ext4/xattr.c 2010-08-13 16:24:37.000000000 -0400
32403+++ linux-2.6.32.24/fs/ext4/xattr.c 2010-10-23 19:59:20.000000000 -0400
32404@@ -82,8 +82,8 @@ 31201@@ -82,8 +82,8 @@
32405 printk("\n"); \ 31202 printk("\n"); \
32406 } while (0) 31203 } while (0)
@@ -32412,10 +31209,10 @@ diff -urNp linux-2.6.32.24/fs/ext4/xattr.c linux-2.6.32.24/fs/ext4/xattr.c
32412 #endif 31209 #endif
32413 31210
32414 static void ext4_xattr_cache_insert(struct buffer_head *); 31211 static void ext4_xattr_cache_insert(struct buffer_head *);
32415diff -urNp linux-2.6.32.24/fs/fcntl.c linux-2.6.32.24/fs/fcntl.c 31212diff -urNp linux-2.6.35.7/fs/fcntl.c linux-2.6.35.7/fs/fcntl.c
32416--- linux-2.6.32.24/fs/fcntl.c 2010-08-13 16:24:37.000000000 -0400 31213--- linux-2.6.35.7/fs/fcntl.c 2010-08-26 19:47:12.000000000 -0400
32417+++ linux-2.6.32.24/fs/fcntl.c 2010-10-23 19:59:20.000000000 -0400 31214+++ linux-2.6.35.7/fs/fcntl.c 2010-09-17 20:12:37.000000000 -0400
32418@@ -223,6 +223,11 @@ int __f_setown(struct file *filp, struct 31215@@ -224,6 +224,11 @@ int __f_setown(struct file *filp, struct
32419 if (err) 31216 if (err)
32420 return err; 31217 return err;
32421 31218
@@ -32427,18 +31224,18 @@ diff -urNp linux-2.6.32.24/fs/fcntl.c linux-2.6.32.24/fs/fcntl.c
32427 f_modown(filp, pid, type, force); 31224 f_modown(filp, pid, type, force);
32428 return 0; 31225 return 0;
32429 } 31226 }
32430@@ -344,6 +349,7 @@ static long do_fcntl(int fd, unsigned in 31227@@ -348,6 +353,7 @@ static long do_fcntl(int fd, unsigned in
32431 switch (cmd) { 31228 switch (cmd) {
32432 case F_DUPFD: 31229 case F_DUPFD:
32433 case F_DUPFD_CLOEXEC: 31230 case F_DUPFD_CLOEXEC:
32434+ gr_learn_resource(current, RLIMIT_NOFILE, arg, 0); 31231+ gr_learn_resource(current, RLIMIT_NOFILE, arg, 0);
32435 if (arg >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur) 31232 if (arg >= rlimit(RLIMIT_NOFILE))
32436 break; 31233 break;
32437 err = alloc_fd(arg, cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0); 31234 err = alloc_fd(arg, cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0);
32438diff -urNp linux-2.6.32.24/fs/fifo.c linux-2.6.32.24/fs/fifo.c 31235diff -urNp linux-2.6.35.7/fs/fifo.c linux-2.6.35.7/fs/fifo.c
32439--- linux-2.6.32.24/fs/fifo.c 2010-08-13 16:24:37.000000000 -0400 31236--- linux-2.6.35.7/fs/fifo.c 2010-08-26 19:47:12.000000000 -0400
32440+++ linux-2.6.32.24/fs/fifo.c 2010-10-23 19:59:20.000000000 -0400 31237+++ linux-2.6.35.7/fs/fifo.c 2010-09-17 20:12:09.000000000 -0400
32441@@ -59,10 +59,10 @@ static int fifo_open(struct inode *inode 31238@@ -58,10 +58,10 @@ static int fifo_open(struct inode *inode
32442 */ 31239 */
32443 filp->f_op = &read_pipefifo_fops; 31240 filp->f_op = &read_pipefifo_fops;
32444 pipe->r_counter++; 31241 pipe->r_counter++;
@@ -32451,7 +31248,7 @@ diff -urNp linux-2.6.32.24/fs/fifo.c linux-2.6.32.24/fs/fifo.c
32451 if ((filp->f_flags & O_NONBLOCK)) { 31248 if ((filp->f_flags & O_NONBLOCK)) {
32452 /* suppress POLLHUP until we have 31249 /* suppress POLLHUP until we have
32453 * seen a writer */ 31250 * seen a writer */
32454@@ -83,15 +83,15 @@ static int fifo_open(struct inode *inode 31251@@ -82,15 +82,15 @@ static int fifo_open(struct inode *inode
32455 * errno=ENXIO when there is no process reading the FIFO. 31252 * errno=ENXIO when there is no process reading the FIFO.
32456 */ 31253 */
32457 ret = -ENXIO; 31254 ret = -ENXIO;
@@ -32470,7 +31267,7 @@ diff -urNp linux-2.6.32.24/fs/fifo.c linux-2.6.32.24/fs/fifo.c
32470 wait_for_partner(inode, &pipe->r_counter); 31267 wait_for_partner(inode, &pipe->r_counter);
32471 if (signal_pending(current)) 31268 if (signal_pending(current))
32472 goto err_wr; 31269 goto err_wr;
32473@@ -107,11 +107,11 @@ static int fifo_open(struct inode *inode 31270@@ -106,11 +106,11 @@ static int fifo_open(struct inode *inode
32474 */ 31271 */
32475 filp->f_op = &rdwr_pipefifo_fops; 31272 filp->f_op = &rdwr_pipefifo_fops;
32476 31273
@@ -32485,7 +31282,7 @@ diff -urNp linux-2.6.32.24/fs/fifo.c linux-2.6.32.24/fs/fifo.c
32485 wake_up_partner(inode); 31282 wake_up_partner(inode);
32486 break; 31283 break;
32487 31284
32488@@ -125,19 +125,19 @@ static int fifo_open(struct inode *inode 31285@@ -124,19 +124,19 @@ static int fifo_open(struct inode *inode
32489 return 0; 31286 return 0;
32490 31287
32491 err_rd: 31288 err_rd:
@@ -32508,9 +31305,9 @@ diff -urNp linux-2.6.32.24/fs/fifo.c linux-2.6.32.24/fs/fifo.c
32508 free_pipe_info(inode); 31305 free_pipe_info(inode);
32509 31306
32510 err_nocleanup: 31307 err_nocleanup:
32511diff -urNp linux-2.6.32.24/fs/file.c linux-2.6.32.24/fs/file.c 31308diff -urNp linux-2.6.35.7/fs/file.c linux-2.6.35.7/fs/file.c
32512--- linux-2.6.32.24/fs/file.c 2010-08-13 16:24:37.000000000 -0400 31309--- linux-2.6.35.7/fs/file.c 2010-08-26 19:47:12.000000000 -0400
32513+++ linux-2.6.32.24/fs/file.c 2010-10-23 19:59:20.000000000 -0400 31310+++ linux-2.6.35.7/fs/file.c 2010-09-17 20:12:37.000000000 -0400
32514@@ -14,6 +14,7 @@ 31311@@ -14,6 +14,7 @@
32515 #include <linux/slab.h> 31312 #include <linux/slab.h>
32516 #include <linux/vmalloc.h> 31313 #include <linux/vmalloc.h>
@@ -32519,18 +31316,17 @@ diff -urNp linux-2.6.32.24/fs/file.c linux-2.6.32.24/fs/file.c
32519 #include <linux/fdtable.h> 31316 #include <linux/fdtable.h>
32520 #include <linux/bitops.h> 31317 #include <linux/bitops.h>
32521 #include <linux/interrupt.h> 31318 #include <linux/interrupt.h>
32522@@ -257,6 +258,8 @@ int expand_files(struct files_struct *fi 31319@@ -257,6 +258,7 @@ int expand_files(struct files_struct *fi
32523 * N.B. For clone tasks sharing a files structure, this test 31320 * N.B. For clone tasks sharing a files structure, this test
32524 * will limit the total number of files that can be opened. 31321 * will limit the total number of files that can be opened.
32525 */ 31322 */
32526+
32527+ gr_learn_resource(current, RLIMIT_NOFILE, nr, 0); 31323+ gr_learn_resource(current, RLIMIT_NOFILE, nr, 0);
32528 if (nr >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur) 31324 if (nr >= rlimit(RLIMIT_NOFILE))
32529 return -EMFILE; 31325 return -EMFILE;
32530 31326
32531diff -urNp linux-2.6.32.24/fs/fs_struct.c linux-2.6.32.24/fs/fs_struct.c 31327diff -urNp linux-2.6.35.7/fs/fs_struct.c linux-2.6.35.7/fs/fs_struct.c
32532--- linux-2.6.32.24/fs/fs_struct.c 2010-08-13 16:24:37.000000000 -0400 31328--- linux-2.6.35.7/fs/fs_struct.c 2010-08-26 19:47:12.000000000 -0400
32533+++ linux-2.6.32.24/fs/fs_struct.c 2010-10-23 19:59:20.000000000 -0400 31329+++ linux-2.6.35.7/fs/fs_struct.c 2010-09-17 20:12:37.000000000 -0400
32534@@ -4,6 +4,7 @@ 31330@@ -4,6 +4,7 @@
32535 #include <linux/path.h> 31331 #include <linux/path.h>
32536 #include <linux/slab.h> 31332 #include <linux/slab.h>
@@ -32610,9 +31406,9 @@ diff -urNp linux-2.6.32.24/fs/fs_struct.c linux-2.6.32.24/fs/fs_struct.c
32610 write_unlock(&fs->lock); 31406 write_unlock(&fs->lock);
32611 31407
32612 task_unlock(current); 31408 task_unlock(current);
32613diff -urNp linux-2.6.32.24/fs/fuse/control.c linux-2.6.32.24/fs/fuse/control.c 31409diff -urNp linux-2.6.35.7/fs/fuse/control.c linux-2.6.35.7/fs/fuse/control.c
32614--- linux-2.6.32.24/fs/fuse/control.c 2010-08-13 16:24:37.000000000 -0400 31410--- linux-2.6.35.7/fs/fuse/control.c 2010-08-26 19:47:12.000000000 -0400
32615+++ linux-2.6.32.24/fs/fuse/control.c 2010-10-23 19:59:20.000000000 -0400 31411+++ linux-2.6.35.7/fs/fuse/control.c 2010-09-17 20:12:09.000000000 -0400
32616@@ -293,7 +293,7 @@ void fuse_ctl_remove_conn(struct fuse_co 31412@@ -293,7 +293,7 @@ void fuse_ctl_remove_conn(struct fuse_co
32617 31413
32618 static int fuse_ctl_fill_super(struct super_block *sb, void *data, int silent) 31414 static int fuse_ctl_fill_super(struct super_block *sb, void *data, int silent)
@@ -32622,10 +31418,10 @@ diff -urNp linux-2.6.32.24/fs/fuse/control.c linux-2.6.32.24/fs/fuse/control.c
32622 struct fuse_conn *fc; 31418 struct fuse_conn *fc;
32623 int err; 31419 int err;
32624 31420
32625diff -urNp linux-2.6.32.24/fs/fuse/cuse.c linux-2.6.32.24/fs/fuse/cuse.c 31421diff -urNp linux-2.6.35.7/fs/fuse/cuse.c linux-2.6.35.7/fs/fuse/cuse.c
32626--- linux-2.6.32.24/fs/fuse/cuse.c 2010-08-13 16:24:37.000000000 -0400 31422--- linux-2.6.35.7/fs/fuse/cuse.c 2010-08-26 19:47:12.000000000 -0400
32627+++ linux-2.6.32.24/fs/fuse/cuse.c 2010-10-23 19:59:20.000000000 -0400 31423+++ linux-2.6.35.7/fs/fuse/cuse.c 2010-09-17 20:12:09.000000000 -0400
32628@@ -528,8 +528,18 @@ static int cuse_channel_release(struct i 31424@@ -529,8 +529,18 @@ static int cuse_channel_release(struct i
32629 return rc; 31425 return rc;
32630 } 31426 }
32631 31427
@@ -32646,7 +31442,7 @@ diff -urNp linux-2.6.32.24/fs/fuse/cuse.c linux-2.6.32.24/fs/fuse/cuse.c
32646 31442
32647 /************************************************************************** 31443 /**************************************************************************
32648 * Misc stuff and module initializatiion 31444 * Misc stuff and module initializatiion
32649@@ -575,12 +585,6 @@ static int __init cuse_init(void) 31445@@ -576,12 +586,6 @@ static int __init cuse_init(void)
32650 for (i = 0; i < CUSE_CONNTBL_LEN; i++) 31446 for (i = 0; i < CUSE_CONNTBL_LEN; i++)
32651 INIT_LIST_HEAD(&cuse_conntbl[i]); 31447 INIT_LIST_HEAD(&cuse_conntbl[i]);
32652 31448
@@ -32659,98 +31455,73 @@ diff -urNp linux-2.6.32.24/fs/fuse/cuse.c linux-2.6.32.24/fs/fuse/cuse.c
32659 cuse_class = class_create(THIS_MODULE, "cuse"); 31455 cuse_class = class_create(THIS_MODULE, "cuse");
32660 if (IS_ERR(cuse_class)) 31456 if (IS_ERR(cuse_class))
32661 return PTR_ERR(cuse_class); 31457 return PTR_ERR(cuse_class);
32662diff -urNp linux-2.6.32.24/fs/fuse/dev.c linux-2.6.32.24/fs/fuse/dev.c 31458diff -urNp linux-2.6.35.7/fs/fuse/dev.c linux-2.6.35.7/fs/fuse/dev.c
32663--- linux-2.6.32.24/fs/fuse/dev.c 2010-09-20 17:26:42.000000000 -0400 31459--- linux-2.6.35.7/fs/fuse/dev.c 2010-09-20 17:33:09.000000000 -0400
32664+++ linux-2.6.32.24/fs/fuse/dev.c 2010-10-23 19:59:20.000000000 -0400 31460+++ linux-2.6.35.7/fs/fuse/dev.c 2010-09-20 17:33:32.000000000 -0400
32665@@ -745,7 +745,7 @@ __releases(&fc->lock) 31461@@ -1031,7 +1031,7 @@ static ssize_t fuse_dev_do_read(struct f
32666 * request_end(). Otherwise add it to the processing list, and set 31462 return err;
32667 * the 'sent' flag. 31463 }
32668 */ 31464
32669-static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov, 31465-static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov,
32670+ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov, 31466+ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov,
32671 unsigned long nr_segs, loff_t pos) 31467 unsigned long nr_segs, loff_t pos)
32672 { 31468 {
32673 int err; 31469 struct fuse_copy_state cs;
32674@@ -827,6 +827,7 @@ static ssize_t fuse_dev_read(struct kioc 31470@@ -1045,6 +1045,8 @@ static ssize_t fuse_dev_read(struct kioc
32675 spin_unlock(&fc->lock); 31471 return fuse_dev_do_read(fc, file, &cs, iov_length(iov, nr_segs));
32676 return err;
32677 } 31472 }
32678+EXPORT_SYMBOL_GPL(fuse_dev_read);
32679 31473
32680 static int fuse_notify_poll(struct fuse_conn *fc, unsigned int size, 31474+EXPORT_SYMBOL_GPL(fuse_dev_read);
32681 struct fuse_copy_state *cs) 31475+
32682@@ -885,7 +886,7 @@ static int fuse_notify_inval_entry(struc 31476 static int fuse_dev_pipe_buf_steal(struct pipe_inode_info *pipe,
32683 { 31477 struct pipe_buffer *buf)
32684 struct fuse_notify_inval_entry_out outarg; 31478 {
32685 int err = -EINVAL; 31479@@ -1088,7 +1090,7 @@ static ssize_t fuse_dev_splice_read(stru
32686- char buf[FUSE_NAME_MAX+1]; 31480 ret = 0;
32687+ char *buf = NULL; 31481 pipe_lock(pipe);
32688 struct qstr name;
32689
32690 if (size < sizeof(outarg))
32691@@ -899,6 +900,11 @@ static int fuse_notify_inval_entry(struc
32692 if (outarg.namelen > FUSE_NAME_MAX)
32693 goto err;
32694
32695+ err = -ENOMEM;
32696+ buf = kmalloc(FUSE_NAME_MAX+1, GFP_KERNEL);
32697+ if (!buf)
32698+ goto err;
32699+
32700 name.name = buf;
32701 name.len = outarg.namelen;
32702 err = fuse_copy_one(cs, buf, outarg.namelen + 1);
32703@@ -910,17 +916,15 @@ static int fuse_notify_inval_entry(struc
32704
32705 down_read(&fc->killsb);
32706 err = -ENOENT;
32707- if (!fc->sb)
32708- goto err_unlock;
32709-
32710- err = fuse_reverse_inval_entry(fc->sb, outarg.parent, &name);
32711-
32712-err_unlock:
32713+ if (fc->sb)
32714+ err = fuse_reverse_inval_entry(fc->sb, outarg.parent, &name);
32715 up_read(&fc->killsb);
32716+ kfree(buf);
32717 return err;
32718 31482
32719 err: 31483- if (!pipe->readers) {
32720 fuse_copy_finish(cs); 31484+ if (!atomic_read(&pipe->readers)) {
32721+ kfree(buf); 31485 send_sig(SIGPIPE, current, 0);
31486 if (!ret)
31487 ret = -EPIPE;
31488@@ -1387,7 +1389,7 @@ static ssize_t fuse_dev_do_write(struct
32722 return err; 31489 return err;
32723 } 31490 }
32724 31491
32725@@ -987,7 +991,7 @@ static int copy_out_args(struct fuse_cop
32726 * it from the list and copy the rest of the buffer to the request.
32727 * The request is finished by calling request_end()
32728 */
32729-static ssize_t fuse_dev_write(struct kiocb *iocb, const struct iovec *iov, 31492-static ssize_t fuse_dev_write(struct kiocb *iocb, const struct iovec *iov,
32730+ssize_t fuse_dev_write(struct kiocb *iocb, const struct iovec *iov, 31493+ssize_t fuse_dev_write(struct kiocb *iocb, const struct iovec *iov,
32731 unsigned long nr_segs, loff_t pos) 31494 unsigned long nr_segs, loff_t pos)
32732 { 31495 {
32733 int err; 31496 struct fuse_copy_state cs;
32734@@ -1083,8 +1087,9 @@ static ssize_t fuse_dev_write(struct kio 31497@@ -1400,6 +1402,8 @@ static ssize_t fuse_dev_write(struct kio
32735 fuse_copy_finish(&cs); 31498 return fuse_dev_do_write(fc, &cs, iov_length(iov, nr_segs));
32736 return err;
32737 } 31499 }
31500
32738+EXPORT_SYMBOL_GPL(fuse_dev_write); 31501+EXPORT_SYMBOL_GPL(fuse_dev_write);
31502+
31503 static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe,
31504 struct file *out, loff_t *ppos,
31505 size_t len, unsigned int flags)
31506@@ -1478,7 +1482,7 @@ out:
31507 return ret;
31508 }
32739 31509
32740-static unsigned fuse_dev_poll(struct file *file, poll_table *wait) 31510-static unsigned fuse_dev_poll(struct file *file, poll_table *wait)
32741+unsigned fuse_dev_poll(struct file *file, poll_table *wait) 31511+unsigned fuse_dev_poll(struct file *file, poll_table *wait)
32742 { 31512 {
32743 unsigned mask = POLLOUT | POLLWRNORM; 31513 unsigned mask = POLLOUT | POLLWRNORM;
32744 struct fuse_conn *fc = fuse_get_conn(file); 31514 struct fuse_conn *fc = fuse_get_conn(file);
32745@@ -1102,6 +1107,7 @@ static unsigned fuse_dev_poll(struct fil 31515@@ -1497,6 +1501,8 @@ static unsigned fuse_dev_poll(struct fil
32746
32747 return mask; 31516 return mask;
32748 } 31517 }
32749+EXPORT_SYMBOL_GPL(fuse_dev_poll);
32750 31518
31519+EXPORT_SYMBOL_GPL(fuse_dev_poll);
31520+
32751 /* 31521 /*
32752 * Abort all requests on the given list (pending or processing) 31522 * Abort all requests on the given list (pending or processing)
32753@@ -1218,7 +1224,7 @@ int fuse_dev_release(struct inode *inode 31523 *
31524@@ -1612,7 +1618,7 @@ int fuse_dev_release(struct inode *inode
32754 } 31525 }
32755 EXPORT_SYMBOL_GPL(fuse_dev_release); 31526 EXPORT_SYMBOL_GPL(fuse_dev_release);
32756 31527
@@ -32759,17 +31530,18 @@ diff -urNp linux-2.6.32.24/fs/fuse/dev.c linux-2.6.32.24/fs/fuse/dev.c
32759 { 31530 {
32760 struct fuse_conn *fc = fuse_get_conn(file); 31531 struct fuse_conn *fc = fuse_get_conn(file);
32761 if (!fc) 31532 if (!fc)
32762@@ -1227,6 +1233,7 @@ static int fuse_dev_fasync(int fd, struc 31533@@ -1622,6 +1628,8 @@ static int fuse_dev_fasync(int fd, struc
32763 /* No locking - fasync_helper does its own locking */
32764 return fasync_helper(fd, file, on, &fc->fasync); 31534 return fasync_helper(fd, file, on, &fc->fasync);
32765 } 31535 }
32766+EXPORT_SYMBOL_GPL(fuse_dev_fasync);
32767 31536
31537+EXPORT_SYMBOL_GPL(fuse_dev_fasync);
31538+
32768 const struct file_operations fuse_dev_operations = { 31539 const struct file_operations fuse_dev_operations = {
32769 .owner = THIS_MODULE, 31540 .owner = THIS_MODULE,
32770diff -urNp linux-2.6.32.24/fs/fuse/dir.c linux-2.6.32.24/fs/fuse/dir.c 31541 .llseek = no_llseek,
32771--- linux-2.6.32.24/fs/fuse/dir.c 2010-08-13 16:24:37.000000000 -0400 31542diff -urNp linux-2.6.35.7/fs/fuse/dir.c linux-2.6.35.7/fs/fuse/dir.c
32772+++ linux-2.6.32.24/fs/fuse/dir.c 2010-10-23 19:59:20.000000000 -0400 31543--- linux-2.6.35.7/fs/fuse/dir.c 2010-08-26 19:47:12.000000000 -0400
31544+++ linux-2.6.35.7/fs/fuse/dir.c 2010-09-17 20:12:09.000000000 -0400
32773@@ -1127,7 +1127,7 @@ static char *read_link(struct dentry *de 31545@@ -1127,7 +1127,7 @@ static char *read_link(struct dentry *de
32774 return link; 31546 return link;
32775 } 31547 }
@@ -32779,10 +31551,10 @@ diff -urNp linux-2.6.32.24/fs/fuse/dir.c linux-2.6.32.24/fs/fuse/dir.c
32779 { 31551 {
32780 if (!IS_ERR(link)) 31552 if (!IS_ERR(link))
32781 free_page((unsigned long) link); 31553 free_page((unsigned long) link);
32782diff -urNp linux-2.6.32.24/fs/fuse/fuse_i.h linux-2.6.32.24/fs/fuse/fuse_i.h 31554diff -urNp linux-2.6.35.7/fs/fuse/fuse_i.h linux-2.6.35.7/fs/fuse/fuse_i.h
32783--- linux-2.6.32.24/fs/fuse/fuse_i.h 2010-08-13 16:24:37.000000000 -0400 31555--- linux-2.6.35.7/fs/fuse/fuse_i.h 2010-08-26 19:47:12.000000000 -0400
32784+++ linux-2.6.32.24/fs/fuse/fuse_i.h 2010-10-23 19:59:20.000000000 -0400 31556+++ linux-2.6.35.7/fs/fuse/fuse_i.h 2010-09-17 20:12:09.000000000 -0400
32785@@ -521,6 +521,16 @@ extern const struct file_operations fuse 31557@@ -524,6 +524,16 @@ extern const struct file_operations fuse
32786 31558
32787 extern const struct dentry_operations fuse_dentry_operations; 31559 extern const struct dentry_operations fuse_dentry_operations;
32788 31560
@@ -32799,30 +31571,9 @@ diff -urNp linux-2.6.32.24/fs/fuse/fuse_i.h linux-2.6.32.24/fs/fuse/fuse_i.h
32799 /** 31571 /**
32800 * Inode to nodeid comparison. 31572 * Inode to nodeid comparison.
32801 */ 31573 */
32802diff -urNp linux-2.6.32.24/fs/gfs2/sys.c linux-2.6.32.24/fs/gfs2/sys.c 31574diff -urNp linux-2.6.35.7/fs/hfs/inode.c linux-2.6.35.7/fs/hfs/inode.c
32803--- linux-2.6.32.24/fs/gfs2/sys.c 2010-08-13 16:24:37.000000000 -0400 31575--- linux-2.6.35.7/fs/hfs/inode.c 2010-08-26 19:47:12.000000000 -0400
32804+++ linux-2.6.32.24/fs/gfs2/sys.c 2010-10-23 19:59:20.000000000 -0400 31576+++ linux-2.6.35.7/fs/hfs/inode.c 2010-09-17 20:12:09.000000000 -0400
32805@@ -49,7 +49,7 @@ static ssize_t gfs2_attr_store(struct ko
32806 return a->store ? a->store(sdp, buf, len) : len;
32807 }
32808
32809-static struct sysfs_ops gfs2_attr_ops = {
32810+static const struct sysfs_ops gfs2_attr_ops = {
32811 .show = gfs2_attr_show,
32812 .store = gfs2_attr_store,
32813 };
32814@@ -584,7 +584,7 @@ static int gfs2_uevent(struct kset *kset
32815 return 0;
32816 }
32817
32818-static struct kset_uevent_ops gfs2_uevent_ops = {
32819+static const struct kset_uevent_ops gfs2_uevent_ops = {
32820 .uevent = gfs2_uevent,
32821 };
32822
32823diff -urNp linux-2.6.32.24/fs/hfs/inode.c linux-2.6.32.24/fs/hfs/inode.c
32824--- linux-2.6.32.24/fs/hfs/inode.c 2010-08-13 16:24:37.000000000 -0400
32825+++ linux-2.6.32.24/fs/hfs/inode.c 2010-10-23 19:59:20.000000000 -0400
32826@@ -423,7 +423,7 @@ int hfs_write_inode(struct inode *inode, 31577@@ -423,7 +423,7 @@ int hfs_write_inode(struct inode *inode,
32827 31578
32828 if (S_ISDIR(main_inode->i_mode)) { 31579 if (S_ISDIR(main_inode->i_mode)) {
@@ -32841,9 +31592,9 @@ diff -urNp linux-2.6.32.24/fs/hfs/inode.c linux-2.6.32.24/fs/hfs/inode.c
32841 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset, 31592 hfs_bnode_read(fd.bnode, &rec, fd.entryoffset,
32842 sizeof(struct hfs_cat_file)); 31593 sizeof(struct hfs_cat_file));
32843 if (rec.type != HFS_CDR_FIL || 31594 if (rec.type != HFS_CDR_FIL ||
32844diff -urNp linux-2.6.32.24/fs/hfsplus/inode.c linux-2.6.32.24/fs/hfsplus/inode.c 31595diff -urNp linux-2.6.35.7/fs/hfsplus/inode.c linux-2.6.35.7/fs/hfsplus/inode.c
32845--- linux-2.6.32.24/fs/hfsplus/inode.c 2010-08-13 16:24:37.000000000 -0400 31596--- linux-2.6.35.7/fs/hfsplus/inode.c 2010-08-26 19:47:12.000000000 -0400
32846+++ linux-2.6.32.24/fs/hfsplus/inode.c 2010-10-23 19:59:20.000000000 -0400 31597+++ linux-2.6.35.7/fs/hfsplus/inode.c 2010-09-17 20:12:09.000000000 -0400
32847@@ -406,7 +406,7 @@ int hfsplus_cat_read_inode(struct inode 31598@@ -406,7 +406,7 @@ int hfsplus_cat_read_inode(struct inode
32848 struct hfsplus_cat_folder *folder = &entry.folder; 31599 struct hfsplus_cat_folder *folder = &entry.folder;
32849 31600
@@ -32880,10 +31631,10 @@ diff -urNp linux-2.6.32.24/fs/hfsplus/inode.c linux-2.6.32.24/fs/hfsplus/inode.c
32880 hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, 31631 hfs_bnode_read(fd.bnode, &entry, fd.entryoffset,
32881 sizeof(struct hfsplus_cat_file)); 31632 sizeof(struct hfsplus_cat_file));
32882 hfsplus_inode_write_fork(inode, &file->data_fork); 31633 hfsplus_inode_write_fork(inode, &file->data_fork);
32883diff -urNp linux-2.6.32.24/fs/hugetlbfs/inode.c linux-2.6.32.24/fs/hugetlbfs/inode.c 31634diff -urNp linux-2.6.35.7/fs/hugetlbfs/inode.c linux-2.6.35.7/fs/hugetlbfs/inode.c
32884--- linux-2.6.32.24/fs/hugetlbfs/inode.c 2010-08-13 16:24:37.000000000 -0400 31635--- linux-2.6.35.7/fs/hugetlbfs/inode.c 2010-08-26 19:47:12.000000000 -0400
32885+++ linux-2.6.32.24/fs/hugetlbfs/inode.c 2010-10-23 19:59:20.000000000 -0400 31636+++ linux-2.6.35.7/fs/hugetlbfs/inode.c 2010-09-17 20:12:37.000000000 -0400
32886@@ -909,7 +909,7 @@ static struct file_system_type hugetlbfs 31637@@ -908,7 +908,7 @@ static struct file_system_type hugetlbfs
32887 .kill_sb = kill_litter_super, 31638 .kill_sb = kill_litter_super,
32888 }; 31639 };
32889 31640
@@ -32892,9 +31643,9 @@ diff -urNp linux-2.6.32.24/fs/hugetlbfs/inode.c linux-2.6.32.24/fs/hugetlbfs/ino
32892 31643
32893 static int can_do_hugetlb_shm(void) 31644 static int can_do_hugetlb_shm(void)
32894 { 31645 {
32895diff -urNp linux-2.6.32.24/fs/ioctl.c linux-2.6.32.24/fs/ioctl.c 31646diff -urNp linux-2.6.35.7/fs/ioctl.c linux-2.6.35.7/fs/ioctl.c
32896--- linux-2.6.32.24/fs/ioctl.c 2010-08-13 16:24:37.000000000 -0400 31647--- linux-2.6.35.7/fs/ioctl.c 2010-08-26 19:47:12.000000000 -0400
32897+++ linux-2.6.32.24/fs/ioctl.c 2010-10-23 19:59:20.000000000 -0400 31648+++ linux-2.6.35.7/fs/ioctl.c 2010-09-17 20:12:09.000000000 -0400
32898@@ -97,7 +97,7 @@ int fiemap_fill_next_extent(struct fiema 31649@@ -97,7 +97,7 @@ int fiemap_fill_next_extent(struct fiema
32899 u64 phys, u64 len, u32 flags) 31650 u64 phys, u64 len, u32 flags)
32900 { 31651 {
@@ -32922,9 +31673,9 @@ diff -urNp linux-2.6.32.24/fs/ioctl.c linux-2.6.32.24/fs/ioctl.c
32922 error = -EFAULT; 31673 error = -EFAULT;
32923 31674
32924 return error; 31675 return error;
32925diff -urNp linux-2.6.32.24/fs/jffs2/debug.h linux-2.6.32.24/fs/jffs2/debug.h 31676diff -urNp linux-2.6.35.7/fs/jffs2/debug.h linux-2.6.35.7/fs/jffs2/debug.h
32926--- linux-2.6.32.24/fs/jffs2/debug.h 2010-08-13 16:24:37.000000000 -0400 31677--- linux-2.6.35.7/fs/jffs2/debug.h 2010-08-26 19:47:12.000000000 -0400
32927+++ linux-2.6.32.24/fs/jffs2/debug.h 2010-10-23 19:59:20.000000000 -0400 31678+++ linux-2.6.35.7/fs/jffs2/debug.h 2010-09-17 20:12:09.000000000 -0400
32928@@ -52,13 +52,13 @@ 31679@@ -52,13 +52,13 @@
32929 #if CONFIG_JFFS2_FS_DEBUG > 0 31680 #if CONFIG_JFFS2_FS_DEBUG > 0
32930 #define D1(x) x 31681 #define D1(x) x
@@ -33026,10 +31777,10 @@ diff -urNp linux-2.6.32.24/fs/jffs2/debug.h linux-2.6.32.24/fs/jffs2/debug.h
33026 #endif 31777 #endif
33027 31778
33028 /* "Sanity" checks */ 31779 /* "Sanity" checks */
33029diff -urNp linux-2.6.32.24/fs/jffs2/erase.c linux-2.6.32.24/fs/jffs2/erase.c 31780diff -urNp linux-2.6.35.7/fs/jffs2/erase.c linux-2.6.35.7/fs/jffs2/erase.c
33030--- linux-2.6.32.24/fs/jffs2/erase.c 2010-08-13 16:24:37.000000000 -0400 31781--- linux-2.6.35.7/fs/jffs2/erase.c 2010-08-26 19:47:12.000000000 -0400
33031+++ linux-2.6.32.24/fs/jffs2/erase.c 2010-10-23 19:59:20.000000000 -0400 31782+++ linux-2.6.35.7/fs/jffs2/erase.c 2010-09-17 20:12:09.000000000 -0400
33032@@ -434,7 +434,8 @@ static void jffs2_mark_erased_block(stru 31783@@ -438,7 +438,8 @@ static void jffs2_mark_erased_block(stru
33033 struct jffs2_unknown_node marker = { 31784 struct jffs2_unknown_node marker = {
33034 .magic = cpu_to_je16(JFFS2_MAGIC_BITMASK), 31785 .magic = cpu_to_je16(JFFS2_MAGIC_BITMASK),
33035 .nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER), 31786 .nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER),
@@ -33039,9 +31790,9 @@ diff -urNp linux-2.6.32.24/fs/jffs2/erase.c linux-2.6.32.24/fs/jffs2/erase.c
33039 }; 31790 };
33040 31791
33041 jffs2_prealloc_raw_node_refs(c, jeb, 1); 31792 jffs2_prealloc_raw_node_refs(c, jeb, 1);
33042diff -urNp linux-2.6.32.24/fs/jffs2/summary.h linux-2.6.32.24/fs/jffs2/summary.h 31793diff -urNp linux-2.6.35.7/fs/jffs2/summary.h linux-2.6.35.7/fs/jffs2/summary.h
33043--- linux-2.6.32.24/fs/jffs2/summary.h 2010-08-13 16:24:37.000000000 -0400 31794--- linux-2.6.35.7/fs/jffs2/summary.h 2010-08-26 19:47:12.000000000 -0400
33044+++ linux-2.6.32.24/fs/jffs2/summary.h 2010-10-23 19:59:20.000000000 -0400 31795+++ linux-2.6.35.7/fs/jffs2/summary.h 2010-09-17 20:12:09.000000000 -0400
33045@@ -194,18 +194,18 @@ int jffs2_sum_scan_sumnode(struct jffs2_ 31796@@ -194,18 +194,18 @@ int jffs2_sum_scan_sumnode(struct jffs2_
33046 31797
33047 #define jffs2_sum_active() (0) 31798 #define jffs2_sum_active() (0)
@@ -33070,9 +31821,9 @@ diff -urNp linux-2.6.32.24/fs/jffs2/summary.h linux-2.6.32.24/fs/jffs2/summary.h
33070 #define jffs2_sum_scan_sumnode(a,b,c,d,e) (0) 31821 #define jffs2_sum_scan_sumnode(a,b,c,d,e) (0)
33071 31822
33072 #endif /* CONFIG_JFFS2_SUMMARY */ 31823 #endif /* CONFIG_JFFS2_SUMMARY */
33073diff -urNp linux-2.6.32.24/fs/jffs2/wbuf.c linux-2.6.32.24/fs/jffs2/wbuf.c 31824diff -urNp linux-2.6.35.7/fs/jffs2/wbuf.c linux-2.6.35.7/fs/jffs2/wbuf.c
33074--- linux-2.6.32.24/fs/jffs2/wbuf.c 2010-08-13 16:24:37.000000000 -0400 31825--- linux-2.6.35.7/fs/jffs2/wbuf.c 2010-08-26 19:47:12.000000000 -0400
33075+++ linux-2.6.32.24/fs/jffs2/wbuf.c 2010-10-23 19:59:20.000000000 -0400 31826+++ linux-2.6.35.7/fs/jffs2/wbuf.c 2010-09-17 20:12:09.000000000 -0400
33076@@ -1012,7 +1012,8 @@ static const struct jffs2_unknown_node o 31827@@ -1012,7 +1012,8 @@ static const struct jffs2_unknown_node o
33077 { 31828 {
33078 .magic = constant_cpu_to_je16(JFFS2_MAGIC_BITMASK), 31829 .magic = constant_cpu_to_je16(JFFS2_MAGIC_BITMASK),
@@ -33083,9 +31834,9 @@ diff -urNp linux-2.6.32.24/fs/jffs2/wbuf.c linux-2.6.32.24/fs/jffs2/wbuf.c
33083 }; 31834 };
33084 31835
33085 /* 31836 /*
33086diff -urNp linux-2.6.32.24/fs/Kconfig.binfmt linux-2.6.32.24/fs/Kconfig.binfmt 31837diff -urNp linux-2.6.35.7/fs/Kconfig.binfmt linux-2.6.35.7/fs/Kconfig.binfmt
33087--- linux-2.6.32.24/fs/Kconfig.binfmt 2010-08-13 16:24:37.000000000 -0400 31838--- linux-2.6.35.7/fs/Kconfig.binfmt 2010-08-26 19:47:12.000000000 -0400
33088+++ linux-2.6.32.24/fs/Kconfig.binfmt 2010-10-23 19:59:20.000000000 -0400 31839+++ linux-2.6.35.7/fs/Kconfig.binfmt 2010-09-23 20:17:27.000000000 -0400
33089@@ -86,7 +86,7 @@ config HAVE_AOUT 31840@@ -86,7 +86,7 @@ config HAVE_AOUT
33090 31841
33091 config BINFMT_AOUT 31842 config BINFMT_AOUT
@@ -33095,10 +31846,10 @@ diff -urNp linux-2.6.32.24/fs/Kconfig.binfmt linux-2.6.32.24/fs/Kconfig.binfmt
33095 ---help--- 31846 ---help---
33096 A.out (Assembler.OUTput) is a set of formats for libraries and 31847 A.out (Assembler.OUTput) is a set of formats for libraries and
33097 executables used in the earliest versions of UNIX. Linux used 31848 executables used in the earliest versions of UNIX. Linux used
33098diff -urNp linux-2.6.32.24/fs/lockd/svc.c linux-2.6.32.24/fs/lockd/svc.c 31849diff -urNp linux-2.6.35.7/fs/lockd/svc.c linux-2.6.35.7/fs/lockd/svc.c
33099--- linux-2.6.32.24/fs/lockd/svc.c 2010-08-13 16:24:37.000000000 -0400 31850--- linux-2.6.35.7/fs/lockd/svc.c 2010-08-26 19:47:12.000000000 -0400
33100+++ linux-2.6.32.24/fs/lockd/svc.c 2010-10-23 19:59:20.000000000 -0400 31851+++ linux-2.6.35.7/fs/lockd/svc.c 2010-09-17 20:12:09.000000000 -0400
33101@@ -43,7 +43,7 @@ 31852@@ -42,7 +42,7 @@
33102 31853
33103 static struct svc_program nlmsvc_program; 31854 static struct svc_program nlmsvc_program;
33104 31855
@@ -33107,10 +31858,10 @@ diff -urNp linux-2.6.32.24/fs/lockd/svc.c linux-2.6.32.24/fs/lockd/svc.c
33107 EXPORT_SYMBOL_GPL(nlmsvc_ops); 31858 EXPORT_SYMBOL_GPL(nlmsvc_ops);
33108 31859
33109 static DEFINE_MUTEX(nlmsvc_mutex); 31860 static DEFINE_MUTEX(nlmsvc_mutex);
33110diff -urNp linux-2.6.32.24/fs/locks.c linux-2.6.32.24/fs/locks.c 31861diff -urNp linux-2.6.35.7/fs/locks.c linux-2.6.35.7/fs/locks.c
33111--- linux-2.6.32.24/fs/locks.c 2010-08-13 16:24:37.000000000 -0400 31862--- linux-2.6.35.7/fs/locks.c 2010-08-26 19:47:12.000000000 -0400
33112+++ linux-2.6.32.24/fs/locks.c 2010-10-23 19:59:20.000000000 -0400 31863+++ linux-2.6.35.7/fs/locks.c 2010-09-17 20:12:09.000000000 -0400
33113@@ -2007,16 +2007,16 @@ void locks_remove_flock(struct file *fil 31864@@ -2008,16 +2008,16 @@ void locks_remove_flock(struct file *fil
33114 return; 31865 return;
33115 31866
33116 if (filp->f_op && filp->f_op->flock) { 31867 if (filp->f_op && filp->f_op->flock) {
@@ -33131,19 +31882,19 @@ diff -urNp linux-2.6.32.24/fs/locks.c linux-2.6.32.24/fs/locks.c
33131 } 31882 }
33132 31883
33133 lock_kernel(); 31884 lock_kernel();
33134diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c 31885diff -urNp linux-2.6.35.7/fs/namei.c linux-2.6.35.7/fs/namei.c
33135--- linux-2.6.32.24/fs/namei.c 2010-08-13 16:24:37.000000000 -0400 31886--- linux-2.6.35.7/fs/namei.c 2010-08-26 19:47:12.000000000 -0400
33136+++ linux-2.6.32.24/fs/namei.c 2010-10-23 19:59:20.000000000 -0400 31887+++ linux-2.6.35.7/fs/namei.c 2010-09-17 20:12:37.000000000 -0400
33137@@ -638,7 +638,7 @@ static __always_inline int __do_follow_l 31888@@ -548,7 +548,7 @@ __do_follow_link(struct path *path, stru
33138 cookie = dentry->d_inode->i_op->follow_link(dentry, nd); 31889 *p = dentry->d_inode->i_op->follow_link(dentry, nd);
33139 error = PTR_ERR(cookie); 31890 error = PTR_ERR(*p);
33140 if (!IS_ERR(cookie)) { 31891 if (!IS_ERR(*p)) {
33141- char *s = nd_get_link(nd); 31892- char *s = nd_get_link(nd);
33142+ const char *s = nd_get_link(nd); 31893+ const char *s = nd_get_link(nd);
33143 error = 0; 31894 error = 0;
33144 if (s) 31895 if (s)
33145 error = __vfs_follow_link(nd, s); 31896 error = __vfs_follow_link(nd, s);
33146@@ -669,6 +669,13 @@ static inline int do_follow_link(struct 31897@@ -581,6 +581,13 @@ static inline int do_follow_link(struct
33147 err = security_inode_follow_link(path->dentry, nd); 31898 err = security_inode_follow_link(path->dentry, nd);
33148 if (err) 31899 if (err)
33149 goto loop; 31900 goto loop;
@@ -33157,11 +31908,11 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33157 current->link_count++; 31908 current->link_count++;
33158 current->total_link_count++; 31909 current->total_link_count++;
33159 nd->depth++; 31910 nd->depth++;
33160@@ -1016,11 +1023,18 @@ return_reval: 31911@@ -965,11 +972,18 @@ return_reval:
33161 break; 31912 break;
33162 } 31913 }
33163 return_base: 31914 return_base:
33164+ if (!gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt)) { 31915+ if (!(nd->flags & LOOKUP_PARENT) && !gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt)) {
33165+ path_put(&nd->path); 31916+ path_put(&nd->path);
33166+ return -ENOENT; 31917+ return -ENOENT;
33167+ } 31918+ }
@@ -33170,17 +31921,17 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33170 path_put_conditional(&next, nd); 31921 path_put_conditional(&next, nd);
33171 break; 31922 break;
33172 } 31923 }
33173+ if (!gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt)) 31924+ if (!(nd->flags & LOOKUP_PARENT) && !gr_acl_handle_hidden_file(nd->path.dentry, nd->path.mnt))
33174+ err = -ENOENT; 31925+ err = -ENOENT;
33175+ 31926+
33176 path_put(&nd->path); 31927 path_put(&nd->path);
33177 return_err: 31928 return_err:
33178 return err; 31929 return err;
33179@@ -1621,12 +1635,19 @@ static int __open_namei_create(struct na 31930@@ -1506,12 +1520,19 @@ static int __open_namei_create(struct na
33180 int error; 31931 int error;
33181 struct dentry *dir = nd->path.dentry; 31932 struct dentry *dir = nd->path.dentry;
33182 31933
33183+ if (!gr_acl_handle_creat(path->dentry, nd->path.dentry, nd->path.mnt, flag, mode)) { 31934+ if (!gr_acl_handle_creat(path->dentry, nd->path.dentry, nd->path.mnt, open_flag, mode)) {
33184+ error = -EACCES; 31935+ error = -EACCES;
33185+ goto out_unlock; 31936+ goto out_unlock;
33186+ } 31937+ }
@@ -33196,22 +31947,30 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33196 out_unlock: 31947 out_unlock:
33197 mutex_unlock(&dir->d_inode->i_mutex); 31948 mutex_unlock(&dir->d_inode->i_mutex);
33198 dput(nd->path.dentry); 31949 dput(nd->path.dentry);
33199@@ -1709,6 +1730,22 @@ struct file *do_filp_open(int dfd, const 31950@@ -1614,6 +1635,7 @@ static struct file *do_last(struct namei
33200 &nd, flag); 31951 int mode, const char *pathname)
33201 if (error) 31952 {
33202 return ERR_PTR(error); 31953 struct dentry *dir = nd->path.dentry;
31954+ int flag = open_to_namei_flags(open_flag);
31955 struct file *filp;
31956 int error = -EISDIR;
31957
31958@@ -1662,6 +1684,22 @@ static struct file *do_last(struct namei
31959 }
31960 path_to_nameidata(path, nd);
31961 audit_inode(pathname, nd->path.dentry);
33203+ 31962+
33204+ if (gr_handle_rofs_blockwrite(nd.path.dentry, nd.path.mnt, acc_mode)) { 31963+ if (gr_handle_rofs_blockwrite(nd->path.dentry, nd->path.mnt, acc_mode)) {
33205+ error = -EPERM; 31964+ error = -EPERM;
33206+ goto exit; 31965+ goto exit;
33207+ } 31966+ }
33208+ 31967+
33209+ if (gr_handle_rawio(nd.path.dentry->d_inode)) { 31968+ if (gr_handle_rawio(nd->path.dentry->d_inode)) {
33210+ error = -EPERM; 31969+ error = -EPERM;
33211+ goto exit; 31970+ goto exit;
33212+ } 31971+ }
33213+ 31972+
33214+ if (!gr_acl_handle_open(nd.path.dentry, nd.path.mnt, flag)) { 31973+ if (!gr_acl_handle_open(nd->path.dentry, nd->path.mnt, flag)) {
33215+ error = -EACCES; 31974+ error = -EACCES;
33216+ goto exit; 31975+ goto exit;
33217+ } 31976+ }
@@ -33219,46 +31978,32 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33219 goto ok; 31978 goto ok;
33220 } 31979 }
33221 31980
33222@@ -1795,6 +1832,24 @@ do_last: 31981@@ -1714,6 +1752,24 @@ static struct file *do_last(struct namei
33223 /* 31982 /*
33224 * It already exists. 31983 * It already exists.
33225 */ 31984 */
33226+ 31985+
33227+ if (gr_handle_rofs_blockwrite(path.dentry, nd.path.mnt, acc_mode)) { 31986+ if (gr_handle_rofs_blockwrite(path->dentry, nd->path.mnt, acc_mode)) {
33228+ error = -EPERM; 31987+ error = -EPERM;
33229+ goto exit_mutex_unlock; 31988+ goto exit_mutex_unlock;
33230+ } 31989+ }
33231+ if (gr_handle_rawio(path.dentry->d_inode)) { 31990+ if (gr_handle_rawio(path->dentry->d_inode)) {
33232+ error = -EPERM; 31991+ error = -EPERM;
33233+ goto exit_mutex_unlock; 31992+ goto exit_mutex_unlock;
33234+ } 31993+ }
33235+ if (!gr_acl_handle_open(path.dentry, nd.path.mnt, flag)) { 31994+ if (!gr_acl_handle_open(path->dentry, nd->path.mnt, flag)) {
33236+ error = -EACCES; 31995+ error = -EACCES;
33237+ goto exit_mutex_unlock; 31996+ goto exit_mutex_unlock;
33238+ } 31997+ }
33239+ if (gr_handle_fifo(path.dentry, nd.path.mnt, dir, flag, acc_mode)) { 31998+ if (gr_handle_fifo(path->dentry, nd->path.mnt, dir, flag, acc_mode)) {
33240+ error = -EACCES; 31999+ error = -EACCES;
33241+ goto exit_mutex_unlock; 32000+ goto exit_mutex_unlock;
33242+ } 32001+ }
33243+ 32002+
33244 mutex_unlock(&dir->d_inode->i_mutex); 32003 mutex_unlock(&dir->d_inode->i_mutex);
33245 audit_inode(pathname, path.dentry); 32004 audit_inode(pathname, path->dentry);
33246 32005
33247@@ -1887,6 +1942,13 @@ do_link: 32006@@ -2034,6 +2090,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
33248 error = security_inode_follow_link(path.dentry, &nd);
33249 if (error)
33250 goto exit_dput;
33251+
33252+ if (gr_handle_follow_link(path.dentry->d_parent->d_inode, path.dentry->d_inode,
33253+ path.dentry, nd.path.mnt)) {
33254+ error = -EACCES;
33255+ goto exit_dput;
33256+ }
33257+
33258 error = __do_follow_link(&path, &nd);
33259 if (error) {
33260 /* Does someone understand code flow here? Or it is only
33261@@ -2061,6 +2123,17 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
33262 error = may_mknod(mode); 32007 error = may_mknod(mode);
33263 if (error) 32008 if (error)
33264 goto out_dput; 32009 goto out_dput;
@@ -33276,7 +32021,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33276 error = mnt_want_write(nd.path.mnt); 32021 error = mnt_want_write(nd.path.mnt);
33277 if (error) 32022 if (error)
33278 goto out_dput; 32023 goto out_dput;
33279@@ -2081,6 +2154,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const 32024@@ -2054,6 +2121,9 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const
33280 } 32025 }
33281 out_drop_write: 32026 out_drop_write:
33282 mnt_drop_write(nd.path.mnt); 32027 mnt_drop_write(nd.path.mnt);
@@ -33286,7 +32031,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33286 out_dput: 32031 out_dput:
33287 dput(dentry); 32032 dput(dentry);
33288 out_unlock: 32033 out_unlock:
33289@@ -2134,6 +2210,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const 32034@@ -2106,6 +2176,11 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
33290 if (IS_ERR(dentry)) 32035 if (IS_ERR(dentry))
33291 goto out_unlock; 32036 goto out_unlock;
33292 32037
@@ -33298,7 +32043,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33298 if (!IS_POSIXACL(nd.path.dentry->d_inode)) 32043 if (!IS_POSIXACL(nd.path.dentry->d_inode))
33299 mode &= ~current_umask(); 32044 mode &= ~current_umask();
33300 error = mnt_want_write(nd.path.mnt); 32045 error = mnt_want_write(nd.path.mnt);
33301@@ -2145,6 +2226,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const 32046@@ -2117,6 +2192,10 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const
33302 error = vfs_mkdir(nd.path.dentry->d_inode, dentry, mode); 32047 error = vfs_mkdir(nd.path.dentry->d_inode, dentry, mode);
33303 out_drop_write: 32048 out_drop_write:
33304 mnt_drop_write(nd.path.mnt); 32049 mnt_drop_write(nd.path.mnt);
@@ -33309,7 +32054,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33309 out_dput: 32054 out_dput:
33310 dput(dentry); 32055 dput(dentry);
33311 out_unlock: 32056 out_unlock:
33312@@ -2226,6 +2311,8 @@ static long do_rmdir(int dfd, const char 32057@@ -2198,6 +2277,8 @@ static long do_rmdir(int dfd, const char
33313 char * name; 32058 char * name;
33314 struct dentry *dentry; 32059 struct dentry *dentry;
33315 struct nameidata nd; 32060 struct nameidata nd;
@@ -33318,7 +32063,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33318 32063
33319 error = user_path_parent(dfd, pathname, &nd, &name); 32064 error = user_path_parent(dfd, pathname, &nd, &name);
33320 if (error) 32065 if (error)
33321@@ -2250,6 +2337,19 @@ static long do_rmdir(int dfd, const char 32066@@ -2222,6 +2303,19 @@ static long do_rmdir(int dfd, const char
33322 error = PTR_ERR(dentry); 32067 error = PTR_ERR(dentry);
33323 if (IS_ERR(dentry)) 32068 if (IS_ERR(dentry))
33324 goto exit2; 32069 goto exit2;
@@ -33338,7 +32083,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33338 error = mnt_want_write(nd.path.mnt); 32083 error = mnt_want_write(nd.path.mnt);
33339 if (error) 32084 if (error)
33340 goto exit3; 32085 goto exit3;
33341@@ -2257,6 +2357,8 @@ static long do_rmdir(int dfd, const char 32086@@ -2229,6 +2323,8 @@ static long do_rmdir(int dfd, const char
33342 if (error) 32087 if (error)
33343 goto exit4; 32088 goto exit4;
33344 error = vfs_rmdir(nd.path.dentry->d_inode, dentry); 32089 error = vfs_rmdir(nd.path.dentry->d_inode, dentry);
@@ -33347,7 +32092,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33347 exit4: 32092 exit4:
33348 mnt_drop_write(nd.path.mnt); 32093 mnt_drop_write(nd.path.mnt);
33349 exit3: 32094 exit3:
33350@@ -2318,6 +2420,8 @@ static long do_unlinkat(int dfd, const c 32095@@ -2291,6 +2387,8 @@ static long do_unlinkat(int dfd, const c
33351 struct dentry *dentry; 32096 struct dentry *dentry;
33352 struct nameidata nd; 32097 struct nameidata nd;
33353 struct inode *inode = NULL; 32098 struct inode *inode = NULL;
@@ -33356,7 +32101,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33356 32101
33357 error = user_path_parent(dfd, pathname, &nd, &name); 32102 error = user_path_parent(dfd, pathname, &nd, &name);
33358 if (error) 32103 if (error)
33359@@ -2337,8 +2441,19 @@ static long do_unlinkat(int dfd, const c 32104@@ -2310,8 +2408,19 @@ static long do_unlinkat(int dfd, const c
33360 if (nd.last.name[nd.last.len]) 32105 if (nd.last.name[nd.last.len])
33361 goto slashes; 32106 goto slashes;
33362 inode = dentry->d_inode; 32107 inode = dentry->d_inode;
@@ -33377,7 +32122,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33377 error = mnt_want_write(nd.path.mnt); 32122 error = mnt_want_write(nd.path.mnt);
33378 if (error) 32123 if (error)
33379 goto exit2; 32124 goto exit2;
33380@@ -2346,6 +2461,8 @@ static long do_unlinkat(int dfd, const c 32125@@ -2319,6 +2428,8 @@ static long do_unlinkat(int dfd, const c
33381 if (error) 32126 if (error)
33382 goto exit3; 32127 goto exit3;
33383 error = vfs_unlink(nd.path.dentry->d_inode, dentry); 32128 error = vfs_unlink(nd.path.dentry->d_inode, dentry);
@@ -33386,7 +32131,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33386 exit3: 32131 exit3:
33387 mnt_drop_write(nd.path.mnt); 32132 mnt_drop_write(nd.path.mnt);
33388 exit2: 32133 exit2:
33389@@ -2424,6 +2541,11 @@ SYSCALL_DEFINE3(symlinkat, const char __ 32134@@ -2396,6 +2507,11 @@ SYSCALL_DEFINE3(symlinkat, const char __
33390 if (IS_ERR(dentry)) 32135 if (IS_ERR(dentry))
33391 goto out_unlock; 32136 goto out_unlock;
33392 32137
@@ -33398,7 +32143,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33398 error = mnt_want_write(nd.path.mnt); 32143 error = mnt_want_write(nd.path.mnt);
33399 if (error) 32144 if (error)
33400 goto out_dput; 32145 goto out_dput;
33401@@ -2431,6 +2553,8 @@ SYSCALL_DEFINE3(symlinkat, const char __ 32146@@ -2403,6 +2519,8 @@ SYSCALL_DEFINE3(symlinkat, const char __
33402 if (error) 32147 if (error)
33403 goto out_drop_write; 32148 goto out_drop_write;
33404 error = vfs_symlink(nd.path.dentry->d_inode, dentry, from); 32149 error = vfs_symlink(nd.path.dentry->d_inode, dentry, from);
@@ -33407,7 +32152,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33407 out_drop_write: 32152 out_drop_write:
33408 mnt_drop_write(nd.path.mnt); 32153 mnt_drop_write(nd.path.mnt);
33409 out_dput: 32154 out_dput:
33410@@ -2524,6 +2648,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con 32155@@ -2495,6 +2613,20 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
33411 error = PTR_ERR(new_dentry); 32156 error = PTR_ERR(new_dentry);
33412 if (IS_ERR(new_dentry)) 32157 if (IS_ERR(new_dentry))
33413 goto out_unlock; 32158 goto out_unlock;
@@ -33428,7 +32173,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33428 error = mnt_want_write(nd.path.mnt); 32173 error = mnt_want_write(nd.path.mnt);
33429 if (error) 32174 if (error)
33430 goto out_dput; 32175 goto out_dput;
33431@@ -2531,6 +2669,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con 32176@@ -2502,6 +2634,8 @@ SYSCALL_DEFINE5(linkat, int, olddfd, con
33432 if (error) 32177 if (error)
33433 goto out_drop_write; 32178 goto out_drop_write;
33434 error = vfs_link(old_path.dentry, nd.path.dentry->d_inode, new_dentry); 32179 error = vfs_link(old_path.dentry, nd.path.dentry->d_inode, new_dentry);
@@ -33437,7 +32182,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33437 out_drop_write: 32182 out_drop_write:
33438 mnt_drop_write(nd.path.mnt); 32183 mnt_drop_write(nd.path.mnt);
33439 out_dput: 32184 out_dput:
33440@@ -2764,6 +2904,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c 32185@@ -2735,6 +2869,12 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
33441 if (new_dentry == trap) 32186 if (new_dentry == trap)
33442 goto exit5; 32187 goto exit5;
33443 32188
@@ -33450,7 +32195,7 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33450 error = mnt_want_write(oldnd.path.mnt); 32195 error = mnt_want_write(oldnd.path.mnt);
33451 if (error) 32196 if (error)
33452 goto exit5; 32197 goto exit5;
33453@@ -2773,6 +2919,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c 32198@@ -2744,6 +2884,9 @@ SYSCALL_DEFINE4(renameat, int, olddfd, c
33454 goto exit6; 32199 goto exit6;
33455 error = vfs_rename(old_dir->d_inode, old_dentry, 32200 error = vfs_rename(old_dir->d_inode, old_dentry,
33456 new_dir->d_inode, new_dentry); 32201 new_dir->d_inode, new_dentry);
@@ -33460,10 +32205,10 @@ diff -urNp linux-2.6.32.24/fs/namei.c linux-2.6.32.24/fs/namei.c
33460 exit6: 32205 exit6:
33461 mnt_drop_write(oldnd.path.mnt); 32206 mnt_drop_write(oldnd.path.mnt);
33462 exit5: 32207 exit5:
33463diff -urNp linux-2.6.32.24/fs/namespace.c linux-2.6.32.24/fs/namespace.c 32208diff -urNp linux-2.6.35.7/fs/namespace.c linux-2.6.35.7/fs/namespace.c
33464--- linux-2.6.32.24/fs/namespace.c 2010-08-13 16:24:37.000000000 -0400 32209--- linux-2.6.35.7/fs/namespace.c 2010-08-26 19:47:12.000000000 -0400
33465+++ linux-2.6.32.24/fs/namespace.c 2010-10-23 19:59:20.000000000 -0400 32210+++ linux-2.6.35.7/fs/namespace.c 2010-09-17 20:21:58.000000000 -0400
33466@@ -1083,6 +1083,9 @@ static int do_umount(struct vfsmount *mn 32211@@ -1099,6 +1099,9 @@ static int do_umount(struct vfsmount *mn
33467 if (!(sb->s_flags & MS_RDONLY)) 32212 if (!(sb->s_flags & MS_RDONLY))
33468 retval = do_remount_sb(sb, MS_RDONLY, NULL, 0); 32213 retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
33469 up_write(&sb->s_umount); 32214 up_write(&sb->s_umount);
@@ -33473,8 +32218,8 @@ diff -urNp linux-2.6.32.24/fs/namespace.c linux-2.6.32.24/fs/namespace.c
33473 return retval; 32218 return retval;
33474 } 32219 }
33475 32220
33476@@ -1104,6 +1107,9 @@ static int do_umount(struct vfsmount *mn 32221@@ -1118,6 +1121,9 @@ static int do_umount(struct vfsmount *mn
33477 security_sb_umount_busy(mnt); 32222 spin_unlock(&vfsmount_lock);
33478 up_write(&namespace_sem); 32223 up_write(&namespace_sem);
33479 release_mounts(&umount_list); 32224 release_mounts(&umount_list);
33480+ 32225+
@@ -33483,9 +32228,9 @@ diff -urNp linux-2.6.32.24/fs/namespace.c linux-2.6.32.24/fs/namespace.c
33483 return retval; 32228 return retval;
33484 } 32229 }
33485 32230
33486@@ -1962,6 +1968,16 @@ long do_mount(char *dev_name, char *dir_ 32231@@ -1988,6 +1994,16 @@ long do_mount(char *dev_name, char *dir_
33487 if (retval) 32232 MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
33488 goto dput_out; 32233 MS_STRICTATIME);
33489 32234
33490+ if (gr_handle_rofs_mount(path.dentry, path.mnt, mnt_flags)) { 32235+ if (gr_handle_rofs_mount(path.dentry, path.mnt, mnt_flags)) {
33491+ retval = -EPERM; 32236+ retval = -EPERM;
@@ -33500,7 +32245,7 @@ diff -urNp linux-2.6.32.24/fs/namespace.c linux-2.6.32.24/fs/namespace.c
33500 if (flags & MS_REMOUNT) 32245 if (flags & MS_REMOUNT)
33501 retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags, 32246 retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
33502 data_page); 32247 data_page);
33503@@ -1976,6 +1992,9 @@ long do_mount(char *dev_name, char *dir_ 32248@@ -2002,6 +2018,9 @@ long do_mount(char *dev_name, char *dir_
33504 dev_name, data_page); 32249 dev_name, data_page);
33505 dput_out: 32250 dput_out:
33506 path_put(&path); 32251 path_put(&path);
@@ -33510,7 +32255,7 @@ diff -urNp linux-2.6.32.24/fs/namespace.c linux-2.6.32.24/fs/namespace.c
33510 return retval; 32255 return retval;
33511 } 32256 }
33512 32257
33513@@ -2182,6 +2201,12 @@ SYSCALL_DEFINE2(pivot_root, const char _ 32258@@ -2208,6 +2227,12 @@ SYSCALL_DEFINE2(pivot_root, const char _
33514 goto out1; 32259 goto out1;
33515 } 32260 }
33516 32261
@@ -33523,10 +32268,10 @@ diff -urNp linux-2.6.32.24/fs/namespace.c linux-2.6.32.24/fs/namespace.c
33523 read_lock(&current->fs->lock); 32268 read_lock(&current->fs->lock);
33524 root = current->fs->root; 32269 root = current->fs->root;
33525 path_get(&current->fs->root); 32270 path_get(&current->fs->root);
33526diff -urNp linux-2.6.32.24/fs/nfs/inode.c linux-2.6.32.24/fs/nfs/inode.c 32271diff -urNp linux-2.6.35.7/fs/nfs/inode.c linux-2.6.35.7/fs/nfs/inode.c
33527--- linux-2.6.32.24/fs/nfs/inode.c 2010-08-13 16:24:37.000000000 -0400 32272--- linux-2.6.35.7/fs/nfs/inode.c 2010-08-26 19:47:12.000000000 -0400
33528+++ linux-2.6.32.24/fs/nfs/inode.c 2010-10-23 19:59:20.000000000 -0400 32273+++ linux-2.6.35.7/fs/nfs/inode.c 2010-09-17 20:12:09.000000000 -0400
33529@@ -965,16 +965,16 @@ static int nfs_size_need_update(const st 32274@@ -915,16 +915,16 @@ static int nfs_size_need_update(const st
33530 return nfs_size_to_loff_t(fattr->size) > i_size_read(inode); 32275 return nfs_size_to_loff_t(fattr->size) > i_size_read(inode);
33531 } 32276 }
33532 32277
@@ -33546,10 +32291,10 @@ diff -urNp linux-2.6.32.24/fs/nfs/inode.c linux-2.6.32.24/fs/nfs/inode.c
33546 } 32291 }
33547 32292
33548 void nfs_fattr_init(struct nfs_fattr *fattr) 32293 void nfs_fattr_init(struct nfs_fattr *fattr)
33549diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c 32294diff -urNp linux-2.6.35.7/fs/nfs/nfs4proc.c linux-2.6.35.7/fs/nfs/nfs4proc.c
33550--- linux-2.6.32.24/fs/nfs/nfs4proc.c 2010-08-13 16:24:37.000000000 -0400 32295--- linux-2.6.35.7/fs/nfs/nfs4proc.c 2010-08-26 19:47:12.000000000 -0400
33551+++ linux-2.6.32.24/fs/nfs/nfs4proc.c 2010-10-23 19:59:20.000000000 -0400 32296+++ linux-2.6.35.7/fs/nfs/nfs4proc.c 2010-09-17 20:12:09.000000000 -0400
33552@@ -1131,7 +1131,7 @@ static int _nfs4_do_open_reclaim(struct 32297@@ -1166,7 +1166,7 @@ static int _nfs4_do_open_reclaim(struct
33553 static int nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state) 32298 static int nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state *state)
33554 { 32299 {
33555 struct nfs_server *server = NFS_SERVER(state->inode); 32300 struct nfs_server *server = NFS_SERVER(state->inode);
@@ -33558,7 +32303,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33558 int err; 32303 int err;
33559 do { 32304 do {
33560 err = _nfs4_do_open_reclaim(ctx, state); 32305 err = _nfs4_do_open_reclaim(ctx, state);
33561@@ -1173,7 +1173,7 @@ static int _nfs4_open_delegation_recall( 32306@@ -1208,7 +1208,7 @@ static int _nfs4_open_delegation_recall(
33562 32307
33563 int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state *state, const nfs4_stateid *stateid) 32308 int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state *state, const nfs4_stateid *stateid)
33564 { 32309 {
@@ -33567,8 +32312,8 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33567 struct nfs_server *server = NFS_SERVER(state->inode); 32312 struct nfs_server *server = NFS_SERVER(state->inode);
33568 int err; 32313 int err;
33569 do { 32314 do {
33570@@ -1493,7 +1493,7 @@ static int _nfs4_open_expired(struct nfs 32315@@ -1581,7 +1581,7 @@ static int _nfs4_open_expired(struct nfs
33571 static inline int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state) 32316 static int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
33572 { 32317 {
33573 struct nfs_server *server = NFS_SERVER(state->inode); 32318 struct nfs_server *server = NFS_SERVER(state->inode);
33574- struct nfs4_exception exception = { }; 32319- struct nfs4_exception exception = { };
@@ -33576,7 +32321,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33576 int err; 32321 int err;
33577 32322
33578 do { 32323 do {
33579@@ -1593,7 +1593,7 @@ out_err: 32324@@ -1697,7 +1697,7 @@ out_err:
33580 32325
33581 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) 32326 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)
33582 { 32327 {
@@ -33585,7 +32330,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33585 struct nfs4_state *res; 32330 struct nfs4_state *res;
33586 int status; 32331 int status;
33587 32332
33588@@ -1684,7 +1684,7 @@ static int nfs4_do_setattr(struct inode 32333@@ -1788,7 +1788,7 @@ static int nfs4_do_setattr(struct inode
33589 struct nfs4_state *state) 32334 struct nfs4_state *state)
33590 { 32335 {
33591 struct nfs_server *server = NFS_SERVER(inode); 32336 struct nfs_server *server = NFS_SERVER(inode);
@@ -33594,7 +32339,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33594 int err; 32339 int err;
33595 do { 32340 do {
33596 err = nfs4_handle_exception(server, 32341 err = nfs4_handle_exception(server,
33597@@ -2050,7 +2050,7 @@ static int _nfs4_server_capabilities(str 32342@@ -2166,7 +2166,7 @@ static int _nfs4_server_capabilities(str
33598 32343
33599 int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) 32344 int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
33600 { 32345 {
@@ -33603,7 +32348,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33603 int err; 32348 int err;
33604 do { 32349 do {
33605 err = nfs4_handle_exception(server, 32350 err = nfs4_handle_exception(server,
33606@@ -2084,7 +2084,7 @@ static int _nfs4_lookup_root(struct nfs_ 32351@@ -2200,7 +2200,7 @@ static int _nfs4_lookup_root(struct nfs_
33607 static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, 32352 static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
33608 struct nfs_fsinfo *info) 32353 struct nfs_fsinfo *info)
33609 { 32354 {
@@ -33612,7 +32357,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33612 int err; 32357 int err;
33613 do { 32358 do {
33614 err = nfs4_handle_exception(server, 32359 err = nfs4_handle_exception(server,
33615@@ -2173,7 +2173,7 @@ static int _nfs4_proc_getattr(struct nfs 32360@@ -2289,7 +2289,7 @@ static int _nfs4_proc_getattr(struct nfs
33616 32361
33617 static int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fattr *fattr) 32362 static int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
33618 { 32363 {
@@ -33621,7 +32366,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33621 int err; 32366 int err;
33622 do { 32367 do {
33623 err = nfs4_handle_exception(server, 32368 err = nfs4_handle_exception(server,
33624@@ -2261,7 +2261,7 @@ static int nfs4_proc_lookupfh(struct nfs 32369@@ -2377,7 +2377,7 @@ static int nfs4_proc_lookupfh(struct nfs
33625 struct qstr *name, struct nfs_fh *fhandle, 32370 struct qstr *name, struct nfs_fh *fhandle,
33626 struct nfs_fattr *fattr) 32371 struct nfs_fattr *fattr)
33627 { 32372 {
@@ -33630,7 +32375,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33630 int err; 32375 int err;
33631 do { 32376 do {
33632 err = _nfs4_proc_lookupfh(server, dirfh, name, fhandle, fattr); 32377 err = _nfs4_proc_lookupfh(server, dirfh, name, fhandle, fattr);
33633@@ -2290,7 +2290,7 @@ static int _nfs4_proc_lookup(struct inod 32378@@ -2406,7 +2406,7 @@ static int _nfs4_proc_lookup(struct inod
33634 32379
33635 static int nfs4_proc_lookup(struct inode *dir, struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr) 32380 static int nfs4_proc_lookup(struct inode *dir, struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
33636 { 32381 {
@@ -33639,7 +32384,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33639 int err; 32384 int err;
33640 do { 32385 do {
33641 err = nfs4_handle_exception(NFS_SERVER(dir), 32386 err = nfs4_handle_exception(NFS_SERVER(dir),
33642@@ -2354,7 +2354,7 @@ static int _nfs4_proc_access(struct inod 32387@@ -2473,7 +2473,7 @@ static int _nfs4_proc_access(struct inod
33643 32388
33644 static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry) 32389 static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry)
33645 { 32390 {
@@ -33648,7 +32393,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33648 int err; 32393 int err;
33649 do { 32394 do {
33650 err = nfs4_handle_exception(NFS_SERVER(inode), 32395 err = nfs4_handle_exception(NFS_SERVER(inode),
33651@@ -2410,7 +2410,7 @@ static int _nfs4_proc_readlink(struct in 32396@@ -2529,7 +2529,7 @@ static int _nfs4_proc_readlink(struct in
33652 static int nfs4_proc_readlink(struct inode *inode, struct page *page, 32397 static int nfs4_proc_readlink(struct inode *inode, struct page *page,
33653 unsigned int pgbase, unsigned int pglen) 32398 unsigned int pgbase, unsigned int pglen)
33654 { 32399 {
@@ -33657,7 +32402,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33657 int err; 32402 int err;
33658 do { 32403 do {
33659 err = nfs4_handle_exception(NFS_SERVER(inode), 32404 err = nfs4_handle_exception(NFS_SERVER(inode),
33660@@ -2508,7 +2508,7 @@ static int _nfs4_proc_remove(struct inod 32405@@ -2625,7 +2625,7 @@ out:
33661 32406
33662 static int nfs4_proc_remove(struct inode *dir, struct qstr *name) 32407 static int nfs4_proc_remove(struct inode *dir, struct qstr *name)
33663 { 32408 {
@@ -33666,7 +32411,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33666 int err; 32411 int err;
33667 do { 32412 do {
33668 err = nfs4_handle_exception(NFS_SERVER(dir), 32413 err = nfs4_handle_exception(NFS_SERVER(dir),
33669@@ -2582,7 +2582,7 @@ static int _nfs4_proc_rename(struct inod 32414@@ -2700,7 +2700,7 @@ out:
33670 static int nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name, 32415 static int nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name,
33671 struct inode *new_dir, struct qstr *new_name) 32416 struct inode *new_dir, struct qstr *new_name)
33672 { 32417 {
@@ -33675,7 +32420,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33675 int err; 32420 int err;
33676 do { 32421 do {
33677 err = nfs4_handle_exception(NFS_SERVER(old_dir), 32422 err = nfs4_handle_exception(NFS_SERVER(old_dir),
33678@@ -2629,7 +2629,7 @@ static int _nfs4_proc_link(struct inode 32423@@ -2749,7 +2749,7 @@ out:
33679 32424
33680 static int nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) 32425 static int nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
33681 { 32426 {
@@ -33684,7 +32429,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33684 int err; 32429 int err;
33685 do { 32430 do {
33686 err = nfs4_handle_exception(NFS_SERVER(inode), 32431 err = nfs4_handle_exception(NFS_SERVER(inode),
33687@@ -2721,7 +2721,7 @@ out: 32432@@ -2841,7 +2841,7 @@ out:
33688 static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry, 32433 static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
33689 struct page *page, unsigned int len, struct iattr *sattr) 32434 struct page *page, unsigned int len, struct iattr *sattr)
33690 { 32435 {
@@ -33693,7 +32438,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33693 int err; 32438 int err;
33694 do { 32439 do {
33695 err = nfs4_handle_exception(NFS_SERVER(dir), 32440 err = nfs4_handle_exception(NFS_SERVER(dir),
33696@@ -2752,7 +2752,7 @@ out: 32441@@ -2872,7 +2872,7 @@ out:
33697 static int nfs4_proc_mkdir(struct inode *dir, struct dentry *dentry, 32442 static int nfs4_proc_mkdir(struct inode *dir, struct dentry *dentry,
33698 struct iattr *sattr) 32443 struct iattr *sattr)
33699 { 32444 {
@@ -33702,7 +32447,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33702 int err; 32447 int err;
33703 do { 32448 do {
33704 err = nfs4_handle_exception(NFS_SERVER(dir), 32449 err = nfs4_handle_exception(NFS_SERVER(dir),
33705@@ -2801,7 +2801,7 @@ static int _nfs4_proc_readdir(struct den 32450@@ -2921,7 +2921,7 @@ static int _nfs4_proc_readdir(struct den
33706 static int nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, 32451 static int nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
33707 u64 cookie, struct page *page, unsigned int count, int plus) 32452 u64 cookie, struct page *page, unsigned int count, int plus)
33708 { 32453 {
@@ -33711,7 +32456,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33711 int err; 32456 int err;
33712 do { 32457 do {
33713 err = nfs4_handle_exception(NFS_SERVER(dentry->d_inode), 32458 err = nfs4_handle_exception(NFS_SERVER(dentry->d_inode),
33714@@ -2849,7 +2849,7 @@ out: 32459@@ -2969,7 +2969,7 @@ out:
33715 static int nfs4_proc_mknod(struct inode *dir, struct dentry *dentry, 32460 static int nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
33716 struct iattr *sattr, dev_t rdev) 32461 struct iattr *sattr, dev_t rdev)
33717 { 32462 {
@@ -33720,7 +32465,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33720 int err; 32465 int err;
33721 do { 32466 do {
33722 err = nfs4_handle_exception(NFS_SERVER(dir), 32467 err = nfs4_handle_exception(NFS_SERVER(dir),
33723@@ -2881,7 +2881,7 @@ static int _nfs4_proc_statfs(struct nfs_ 32468@@ -3001,7 +3001,7 @@ static int _nfs4_proc_statfs(struct nfs_
33724 32469
33725 static int nfs4_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsstat *fsstat) 32470 static int nfs4_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsstat *fsstat)
33726 { 32471 {
@@ -33729,7 +32474,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33729 int err; 32474 int err;
33730 do { 32475 do {
33731 err = nfs4_handle_exception(server, 32476 err = nfs4_handle_exception(server,
33732@@ -2912,7 +2912,7 @@ static int _nfs4_do_fsinfo(struct nfs_se 32477@@ -3032,7 +3032,7 @@ static int _nfs4_do_fsinfo(struct nfs_se
33733 32478
33734 static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo) 32479 static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo)
33735 { 32480 {
@@ -33738,7 +32483,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33738 int err; 32483 int err;
33739 32484
33740 do { 32485 do {
33741@@ -2958,7 +2958,7 @@ static int _nfs4_proc_pathconf(struct nf 32486@@ -3078,7 +3078,7 @@ static int _nfs4_proc_pathconf(struct nf
33742 static int nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle, 32487 static int nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
33743 struct nfs_pathconf *pathconf) 32488 struct nfs_pathconf *pathconf)
33744 { 32489 {
@@ -33747,7 +32492,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33747 int err; 32492 int err;
33748 32493
33749 do { 32494 do {
33750@@ -3257,7 +3257,7 @@ out_free: 32495@@ -3399,7 +3399,7 @@ out_free:
33751 32496
33752 static ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen) 32497 static ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen)
33753 { 32498 {
@@ -33756,7 +32501,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33756 ssize_t ret; 32501 ssize_t ret;
33757 do { 32502 do {
33758 ret = __nfs4_get_acl_uncached(inode, buf, buflen); 32503 ret = __nfs4_get_acl_uncached(inode, buf, buflen);
33759@@ -3313,7 +3313,7 @@ static int __nfs4_proc_set_acl(struct in 32504@@ -3455,7 +3455,7 @@ static int __nfs4_proc_set_acl(struct in
33760 32505
33761 static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen) 32506 static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen)
33762 { 32507 {
@@ -33765,7 +32510,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33765 int err; 32510 int err;
33766 do { 32511 do {
33767 err = nfs4_handle_exception(NFS_SERVER(inode), 32512 err = nfs4_handle_exception(NFS_SERVER(inode),
33768@@ -3578,7 +3578,7 @@ out: 32513@@ -3745,7 +3745,7 @@ out:
33769 int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid, int issync) 32514 int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid, int issync)
33770 { 32515 {
33771 struct nfs_server *server = NFS_SERVER(inode); 32516 struct nfs_server *server = NFS_SERVER(inode);
@@ -33774,7 +32519,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33774 int err; 32519 int err;
33775 do { 32520 do {
33776 err = _nfs4_proc_delegreturn(inode, cred, stateid, issync); 32521 err = _nfs4_proc_delegreturn(inode, cred, stateid, issync);
33777@@ -3651,7 +3651,7 @@ out: 32522@@ -3818,7 +3818,7 @@ out:
33778 32523
33779 static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request) 32524 static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request)
33780 { 32525 {
@@ -33783,7 +32528,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33783 int err; 32528 int err;
33784 32529
33785 do { 32530 do {
33786@@ -4044,7 +4044,7 @@ static int _nfs4_do_setlk(struct nfs4_st 32531@@ -4232,7 +4232,7 @@ static int _nfs4_do_setlk(struct nfs4_st
33787 static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request) 32532 static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request)
33788 { 32533 {
33789 struct nfs_server *server = NFS_SERVER(state->inode); 32534 struct nfs_server *server = NFS_SERVER(state->inode);
@@ -33792,7 +32537,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33792 int err; 32537 int err;
33793 32538
33794 do { 32539 do {
33795@@ -4062,7 +4062,7 @@ static int nfs4_lock_reclaim(struct nfs4 32540@@ -4250,7 +4250,7 @@ static int nfs4_lock_reclaim(struct nfs4
33796 static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request) 32541 static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request)
33797 { 32542 {
33798 struct nfs_server *server = NFS_SERVER(state->inode); 32543 struct nfs_server *server = NFS_SERVER(state->inode);
@@ -33801,7 +32546,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33801 int err; 32546 int err;
33802 32547
33803 err = nfs4_set_lock_state(state, request); 32548 err = nfs4_set_lock_state(state, request);
33804@@ -4120,7 +4120,7 @@ out: 32549@@ -4315,7 +4315,7 @@ out:
33805 32550
33806 static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request) 32551 static int nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
33807 { 32552 {
@@ -33810,7 +32555,7 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33810 int err; 32555 int err;
33811 32556
33812 do { 32557 do {
33813@@ -4180,7 +4180,7 @@ nfs4_proc_lock(struct file *filp, int cm 32558@@ -4375,7 +4375,7 @@ nfs4_proc_lock(struct file *filp, int cm
33814 int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl) 32559 int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl)
33815 { 32560 {
33816 struct nfs_server *server = NFS_SERVER(state->inode); 32561 struct nfs_server *server = NFS_SERVER(state->inode);
@@ -33819,10 +32564,10 @@ diff -urNp linux-2.6.32.24/fs/nfs/nfs4proc.c linux-2.6.32.24/fs/nfs/nfs4proc.c
33819 int err; 32564 int err;
33820 32565
33821 err = nfs4_set_lock_state(state, fl); 32566 err = nfs4_set_lock_state(state, fl);
33822diff -urNp linux-2.6.32.24/fs/nfsd/lockd.c linux-2.6.32.24/fs/nfsd/lockd.c 32567diff -urNp linux-2.6.35.7/fs/nfsd/lockd.c linux-2.6.35.7/fs/nfsd/lockd.c
33823--- linux-2.6.32.24/fs/nfsd/lockd.c 2010-08-13 16:24:37.000000000 -0400 32568--- linux-2.6.35.7/fs/nfsd/lockd.c 2010-08-26 19:47:12.000000000 -0400
33824+++ linux-2.6.32.24/fs/nfsd/lockd.c 2010-10-23 19:59:20.000000000 -0400 32569+++ linux-2.6.35.7/fs/nfsd/lockd.c 2010-09-17 20:12:09.000000000 -0400
33825@@ -67,7 +67,7 @@ nlm_fclose(struct file *filp) 32570@@ -61,7 +61,7 @@ nlm_fclose(struct file *filp)
33826 fput(filp); 32571 fput(filp);
33827 } 32572 }
33828 32573
@@ -33831,10 +32576,22 @@ diff -urNp linux-2.6.32.24/fs/nfsd/lockd.c linux-2.6.32.24/fs/nfsd/lockd.c
33831 .fopen = nlm_fopen, /* open file for locking */ 32576 .fopen = nlm_fopen, /* open file for locking */
33832 .fclose = nlm_fclose, /* close file */ 32577 .fclose = nlm_fclose, /* close file */
33833 }; 32578 };
33834diff -urNp linux-2.6.32.24/fs/nfsd/vfs.c linux-2.6.32.24/fs/nfsd/vfs.c 32579diff -urNp linux-2.6.35.7/fs/nfsd/nfsctl.c linux-2.6.35.7/fs/nfsd/nfsctl.c
33835--- linux-2.6.32.24/fs/nfsd/vfs.c 2010-08-13 16:24:37.000000000 -0400 32580--- linux-2.6.35.7/fs/nfsd/nfsctl.c 2010-08-26 19:47:12.000000000 -0400
33836+++ linux-2.6.32.24/fs/nfsd/vfs.c 2010-10-23 19:59:20.000000000 -0400 32581+++ linux-2.6.35.7/fs/nfsd/nfsctl.c 2010-09-17 20:12:09.000000000 -0400
33837@@ -937,7 +937,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st 32582@@ -163,7 +163,7 @@ static int export_features_open(struct i
32583 return single_open(file, export_features_show, NULL);
32584 }
32585
32586-static struct file_operations export_features_operations = {
32587+static const struct file_operations export_features_operations = {
32588 .open = export_features_open,
32589 .read = seq_read,
32590 .llseek = seq_lseek,
32591diff -urNp linux-2.6.35.7/fs/nfsd/vfs.c linux-2.6.35.7/fs/nfsd/vfs.c
32592--- linux-2.6.35.7/fs/nfsd/vfs.c 2010-08-26 19:47:12.000000000 -0400
32593+++ linux-2.6.35.7/fs/nfsd/vfs.c 2010-09-17 20:12:09.000000000 -0400
32594@@ -933,7 +933,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, st
33838 } else { 32595 } else {
33839 oldfs = get_fs(); 32596 oldfs = get_fs();
33840 set_fs(KERNEL_DS); 32597 set_fs(KERNEL_DS);
@@ -33843,7 +32600,7 @@ diff -urNp linux-2.6.32.24/fs/nfsd/vfs.c linux-2.6.32.24/fs/nfsd/vfs.c
33843 set_fs(oldfs); 32600 set_fs(oldfs);
33844 } 32601 }
33845 32602
33846@@ -1060,7 +1060,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s 32603@@ -1056,7 +1056,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, s
33847 32604
33848 /* Write the data. */ 32605 /* Write the data. */
33849 oldfs = get_fs(); set_fs(KERNEL_DS); 32606 oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -33852,7 +32609,7 @@ diff -urNp linux-2.6.32.24/fs/nfsd/vfs.c linux-2.6.32.24/fs/nfsd/vfs.c
33852 set_fs(oldfs); 32609 set_fs(oldfs);
33853 if (host_err < 0) 32610 if (host_err < 0)
33854 goto out_nfserr; 32611 goto out_nfserr;
33855@@ -1535,7 +1535,7 @@ nfsd_readlink(struct svc_rqst *rqstp, st 32612@@ -1541,7 +1541,7 @@ nfsd_readlink(struct svc_rqst *rqstp, st
33856 */ 32613 */
33857 32614
33858 oldfs = get_fs(); set_fs(KERNEL_DS); 32615 oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -33861,9 +32618,9 @@ diff -urNp linux-2.6.32.24/fs/nfsd/vfs.c linux-2.6.32.24/fs/nfsd/vfs.c
33861 set_fs(oldfs); 32618 set_fs(oldfs);
33862 32619
33863 if (host_err < 0) 32620 if (host_err < 0)
33864diff -urNp linux-2.6.32.24/fs/nls/nls_base.c linux-2.6.32.24/fs/nls/nls_base.c 32621diff -urNp linux-2.6.35.7/fs/nls/nls_base.c linux-2.6.35.7/fs/nls/nls_base.c
33865--- linux-2.6.32.24/fs/nls/nls_base.c 2010-08-13 16:24:37.000000000 -0400 32622--- linux-2.6.35.7/fs/nls/nls_base.c 2010-08-26 19:47:12.000000000 -0400
33866+++ linux-2.6.32.24/fs/nls/nls_base.c 2010-10-23 19:59:20.000000000 -0400 32623+++ linux-2.6.35.7/fs/nls/nls_base.c 2010-09-17 20:12:09.000000000 -0400
33867@@ -41,7 +41,7 @@ static const struct utf8_table utf8_tabl 32624@@ -41,7 +41,7 @@ static const struct utf8_table utf8_tabl
33868 {0xF8, 0xF0, 3*6, 0x1FFFFF, 0x10000, /* 4 byte sequence */}, 32625 {0xF8, 0xF0, 3*6, 0x1FFFFF, 0x10000, /* 4 byte sequence */},
33869 {0xFC, 0xF8, 4*6, 0x3FFFFFF, 0x200000, /* 5 byte sequence */}, 32626 {0xFC, 0xF8, 4*6, 0x3FFFFFF, 0x200000, /* 5 byte sequence */},
@@ -33873,10 +32630,10 @@ diff -urNp linux-2.6.32.24/fs/nls/nls_base.c linux-2.6.32.24/fs/nls/nls_base.c
33873 }; 32630 };
33874 32631
33875 #define UNICODE_MAX 0x0010ffff 32632 #define UNICODE_MAX 0x0010ffff
33876diff -urNp linux-2.6.32.24/fs/ntfs/dir.c linux-2.6.32.24/fs/ntfs/dir.c 32633diff -urNp linux-2.6.35.7/fs/ntfs/dir.c linux-2.6.35.7/fs/ntfs/dir.c
33877--- linux-2.6.32.24/fs/ntfs/dir.c 2010-08-13 16:24:37.000000000 -0400 32634--- linux-2.6.35.7/fs/ntfs/dir.c 2010-08-26 19:47:12.000000000 -0400
33878+++ linux-2.6.32.24/fs/ntfs/dir.c 2010-10-23 19:59:24.000000000 -0400 32635+++ linux-2.6.35.7/fs/ntfs/dir.c 2010-10-11 22:41:44.000000000 -0400
33879@@ -1328,7 +1328,7 @@ find_next_index_buffer: 32636@@ -1329,7 +1329,7 @@ find_next_index_buffer:
33880 ia = (INDEX_ALLOCATION*)(kaddr + (ia_pos & ~PAGE_CACHE_MASK & 32637 ia = (INDEX_ALLOCATION*)(kaddr + (ia_pos & ~PAGE_CACHE_MASK &
33881 ~(s64)(ndir->itype.index.block_size - 1))); 32638 ~(s64)(ndir->itype.index.block_size - 1)));
33882 /* Bounds checks. */ 32639 /* Bounds checks. */
@@ -33885,10 +32642,10 @@ diff -urNp linux-2.6.32.24/fs/ntfs/dir.c linux-2.6.32.24/fs/ntfs/dir.c
33885 ntfs_error(sb, "Out of bounds check failed. Corrupt directory " 32642 ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
33886 "inode 0x%lx or driver bug.", vdir->i_ino); 32643 "inode 0x%lx or driver bug.", vdir->i_ino);
33887 goto err_out; 32644 goto err_out;
33888diff -urNp linux-2.6.32.24/fs/ntfs/file.c linux-2.6.32.24/fs/ntfs/file.c 32645diff -urNp linux-2.6.35.7/fs/ntfs/file.c linux-2.6.35.7/fs/ntfs/file.c
33889--- linux-2.6.32.24/fs/ntfs/file.c 2010-08-13 16:24:37.000000000 -0400 32646--- linux-2.6.35.7/fs/ntfs/file.c 2010-08-26 19:47:12.000000000 -0400
33890+++ linux-2.6.32.24/fs/ntfs/file.c 2010-10-23 19:59:20.000000000 -0400 32647+++ linux-2.6.35.7/fs/ntfs/file.c 2010-09-17 20:12:09.000000000 -0400
33891@@ -2243,6 +2243,6 @@ const struct inode_operations ntfs_file_ 32648@@ -2223,6 +2223,6 @@ const struct inode_operations ntfs_file_
33892 #endif /* NTFS_RW */ 32649 #endif /* NTFS_RW */
33893 }; 32650 };
33894 32651
@@ -33897,34 +32654,22 @@ diff -urNp linux-2.6.32.24/fs/ntfs/file.c linux-2.6.32.24/fs/ntfs/file.c
33897 32654
33898-const struct inode_operations ntfs_empty_inode_ops = {}; 32655-const struct inode_operations ntfs_empty_inode_ops = {};
33899+const struct inode_operations ntfs_empty_inode_ops __read_only; 32656+const struct inode_operations ntfs_empty_inode_ops __read_only;
33900diff -urNp linux-2.6.32.24/fs/ocfs2/cluster/masklog.c linux-2.6.32.24/fs/ocfs2/cluster/masklog.c 32657diff -urNp linux-2.6.35.7/fs/ocfs2/localalloc.c linux-2.6.35.7/fs/ocfs2/localalloc.c
33901--- linux-2.6.32.24/fs/ocfs2/cluster/masklog.c 2010-08-13 16:24:37.000000000 -0400 32658--- linux-2.6.35.7/fs/ocfs2/localalloc.c 2010-08-26 19:47:12.000000000 -0400
33902+++ linux-2.6.32.24/fs/ocfs2/cluster/masklog.c 2010-10-23 19:59:20.000000000 -0400 32659+++ linux-2.6.35.7/fs/ocfs2/localalloc.c 2010-09-17 20:12:09.000000000 -0400
33903@@ -135,7 +135,7 @@ static ssize_t mlog_store(struct kobject 32660@@ -1307,7 +1307,7 @@ static int ocfs2_local_alloc_slide_windo
33904 return mlog_mask_store(mlog_attr->mask, buf, count);
33905 }
33906
33907-static struct sysfs_ops mlog_attr_ops = {
33908+static const struct sysfs_ops mlog_attr_ops = {
33909 .show = mlog_show,
33910 .store = mlog_store,
33911 };
33912diff -urNp linux-2.6.32.24/fs/ocfs2/localalloc.c linux-2.6.32.24/fs/ocfs2/localalloc.c
33913--- linux-2.6.32.24/fs/ocfs2/localalloc.c 2010-08-13 16:24:37.000000000 -0400
33914+++ linux-2.6.32.24/fs/ocfs2/localalloc.c 2010-10-23 19:59:20.000000000 -0400
33915@@ -1188,7 +1188,7 @@ static int ocfs2_local_alloc_slide_windo
33916 goto bail; 32661 goto bail;
33917 } 32662 }
33918 32663
33919- atomic_inc(&osb->alloc_stats.moves); 32664- atomic_inc(&osb->alloc_stats.moves);
33920+ atomic_inc_unchecked(&osb->alloc_stats.moves); 32665+ atomic_inc_unchecked(&osb->alloc_stats.moves);
33921 32666
33922 status = 0;
33923 bail: 32667 bail:
33924diff -urNp linux-2.6.32.24/fs/ocfs2/ocfs2.h linux-2.6.32.24/fs/ocfs2/ocfs2.h 32668 if (handle)
33925--- linux-2.6.32.24/fs/ocfs2/ocfs2.h 2010-08-13 16:24:37.000000000 -0400 32669diff -urNp linux-2.6.35.7/fs/ocfs2/ocfs2.h linux-2.6.35.7/fs/ocfs2/ocfs2.h
33926+++ linux-2.6.32.24/fs/ocfs2/ocfs2.h 2010-10-23 19:59:20.000000000 -0400 32670--- linux-2.6.35.7/fs/ocfs2/ocfs2.h 2010-08-26 19:47:12.000000000 -0400
33927@@ -217,11 +217,11 @@ enum ocfs2_vol_state 32671+++ linux-2.6.35.7/fs/ocfs2/ocfs2.h 2010-09-17 20:12:09.000000000 -0400
32672@@ -223,11 +223,11 @@ enum ocfs2_vol_state
33928 32673
33929 struct ocfs2_alloc_stats 32674 struct ocfs2_alloc_stats
33930 { 32675 {
@@ -33941,10 +32686,10 @@ diff -urNp linux-2.6.32.24/fs/ocfs2/ocfs2.h linux-2.6.32.24/fs/ocfs2/ocfs2.h
33941 }; 32686 };
33942 32687
33943 enum ocfs2_local_alloc_state 32688 enum ocfs2_local_alloc_state
33944diff -urNp linux-2.6.32.24/fs/ocfs2/suballoc.c linux-2.6.32.24/fs/ocfs2/suballoc.c 32689diff -urNp linux-2.6.35.7/fs/ocfs2/suballoc.c linux-2.6.35.7/fs/ocfs2/suballoc.c
33945--- linux-2.6.32.24/fs/ocfs2/suballoc.c 2010-08-13 16:24:37.000000000 -0400 32690--- linux-2.6.35.7/fs/ocfs2/suballoc.c 2010-08-26 19:47:12.000000000 -0400
33946+++ linux-2.6.32.24/fs/ocfs2/suballoc.c 2010-10-23 19:59:20.000000000 -0400 32691+++ linux-2.6.35.7/fs/ocfs2/suballoc.c 2010-09-17 20:12:09.000000000 -0400
33947@@ -623,7 +623,7 @@ static int ocfs2_reserve_suballoc_bits(s 32692@@ -856,7 +856,7 @@ static int ocfs2_reserve_suballoc_bits(s
33948 mlog_errno(status); 32693 mlog_errno(status);
33949 goto bail; 32694 goto bail;
33950 } 32695 }
@@ -33953,25 +32698,25 @@ diff -urNp linux-2.6.32.24/fs/ocfs2/suballoc.c linux-2.6.32.24/fs/ocfs2/suballoc
33953 32698
33954 /* You should never ask for this much metadata */ 32699 /* You should never ask for this much metadata */
33955 BUG_ON(bits_wanted > 32700 BUG_ON(bits_wanted >
33956@@ -1654,7 +1654,7 @@ int ocfs2_claim_metadata(struct ocfs2_su 32701@@ -1968,7 +1968,7 @@ int ocfs2_claim_metadata(handle_t *handl
33957 mlog_errno(status); 32702 mlog_errno(status);
33958 goto bail; 32703 goto bail;
33959 } 32704 }
33960- atomic_inc(&osb->alloc_stats.bg_allocs); 32705- atomic_inc(&OCFS2_SB(ac->ac_inode->i_sb)->alloc_stats.bg_allocs);
33961+ atomic_inc_unchecked(&osb->alloc_stats.bg_allocs); 32706+ atomic_inc_unchecked(&OCFS2_SB(ac->ac_inode->i_sb)->alloc_stats.bg_allocs);
33962 32707
33963 *blkno_start = bg_blkno + (u64) *suballoc_bit_start; 32708 *suballoc_loc = res.sr_bg_blkno;
33964 ac->ac_bits_given += (*num_bits); 32709 *suballoc_bit_start = res.sr_bit_offset;
33965@@ -1728,7 +1728,7 @@ int ocfs2_claim_new_inode(struct ocfs2_s 32710@@ -2045,7 +2045,7 @@ int ocfs2_claim_new_inode(handle_t *hand
33966 mlog_errno(status); 32711 mlog_errno(status);
33967 goto bail; 32712 goto bail;
33968 } 32713 }
33969- atomic_inc(&osb->alloc_stats.bg_allocs); 32714- atomic_inc(&OCFS2_SB(ac->ac_inode->i_sb)->alloc_stats.bg_allocs);
33970+ atomic_inc_unchecked(&osb->alloc_stats.bg_allocs); 32715+ atomic_inc_unchecked(&OCFS2_SB(ac->ac_inode->i_sb)->alloc_stats.bg_allocs);
33971 32716
33972 BUG_ON(num_bits != 1); 32717 BUG_ON(res.sr_bits != 1);
33973 32718
33974@@ -1830,7 +1830,7 @@ int __ocfs2_claim_clusters(struct ocfs2_ 32719@@ -2150,7 +2150,7 @@ int __ocfs2_claim_clusters(handle_t *han
33975 cluster_start, 32720 cluster_start,
33976 num_clusters); 32721 num_clusters);
33977 if (!status) 32722 if (!status)
@@ -33980,19 +32725,19 @@ diff -urNp linux-2.6.32.24/fs/ocfs2/suballoc.c linux-2.6.32.24/fs/ocfs2/suballoc
33980 } else { 32725 } else {
33981 if (min_clusters > (osb->bitmap_cpg - 1)) { 32726 if (min_clusters > (osb->bitmap_cpg - 1)) {
33982 /* The only paths asking for contiguousness 32727 /* The only paths asking for contiguousness
33983@@ -1858,7 +1858,7 @@ int __ocfs2_claim_clusters(struct ocfs2_ 32728@@ -2176,7 +2176,7 @@ int __ocfs2_claim_clusters(handle_t *han
33984 ocfs2_desc_bitmap_to_cluster_off(ac->ac_inode, 32729 ocfs2_desc_bitmap_to_cluster_off(ac->ac_inode,
33985 bg_blkno, 32730 res.sr_bg_blkno,
33986 bg_bit_off); 32731 res.sr_bit_offset);
33987- atomic_inc(&osb->alloc_stats.bitmap_data); 32732- atomic_inc(&osb->alloc_stats.bitmap_data);
33988+ atomic_inc_unchecked(&osb->alloc_stats.bitmap_data); 32733+ atomic_inc_unchecked(&osb->alloc_stats.bitmap_data);
32734 *num_clusters = res.sr_bits;
33989 } 32735 }
33990 } 32736 }
33991 if (status < 0) { 32737diff -urNp linux-2.6.35.7/fs/ocfs2/super.c linux-2.6.35.7/fs/ocfs2/super.c
33992diff -urNp linux-2.6.32.24/fs/ocfs2/super.c linux-2.6.32.24/fs/ocfs2/super.c 32738--- linux-2.6.35.7/fs/ocfs2/super.c 2010-08-26 19:47:12.000000000 -0400
33993--- linux-2.6.32.24/fs/ocfs2/super.c 2010-08-13 16:24:37.000000000 -0400 32739+++ linux-2.6.35.7/fs/ocfs2/super.c 2010-09-17 20:12:09.000000000 -0400
33994+++ linux-2.6.32.24/fs/ocfs2/super.c 2010-10-23 19:59:20.000000000 -0400 32740@@ -293,11 +293,11 @@ static int ocfs2_osb_dump(struct ocfs2_s
33995@@ -284,11 +284,11 @@ static int ocfs2_osb_dump(struct ocfs2_s
33996 "%10s => GlobalAllocs: %d LocalAllocs: %d " 32741 "%10s => GlobalAllocs: %d LocalAllocs: %d "
33997 "SubAllocs: %d LAWinMoves: %d SAExtends: %d\n", 32742 "SubAllocs: %d LAWinMoves: %d SAExtends: %d\n",
33998 "Stats", 32743 "Stats",
@@ -34009,9 +32754,9 @@ diff -urNp linux-2.6.32.24/fs/ocfs2/super.c linux-2.6.32.24/fs/ocfs2/super.c
34009 32754
34010 out += snprintf(buf + out, len - out, 32755 out += snprintf(buf + out, len - out,
34011 "%10s => State: %u Descriptor: %llu Size: %u bits " 32756 "%10s => State: %u Descriptor: %llu Size: %u bits "
34012@@ -2002,11 +2002,11 @@ static int ocfs2_initialize_super(struct 32757@@ -2047,11 +2047,11 @@ static int ocfs2_initialize_super(struct
34013 spin_lock_init(&osb->osb_xattr_lock); 32758 spin_lock_init(&osb->osb_xattr_lock);
34014 ocfs2_init_inode_steal_slot(osb); 32759 ocfs2_init_steal_slots(osb);
34015 32760
34016- atomic_set(&osb->alloc_stats.moves, 0); 32761- atomic_set(&osb->alloc_stats.moves, 0);
34017- atomic_set(&osb->alloc_stats.local_data, 0); 32762- atomic_set(&osb->alloc_stats.local_data, 0);
@@ -34026,10 +32771,22 @@ diff -urNp linux-2.6.32.24/fs/ocfs2/super.c linux-2.6.32.24/fs/ocfs2/super.c
34026 32771
34027 /* Copy the blockcheck stats from the superblock probe */ 32772 /* Copy the blockcheck stats from the superblock probe */
34028 osb->osb_ecc_stats = *stats; 32773 osb->osb_ecc_stats = *stats;
34029diff -urNp linux-2.6.32.24/fs/open.c linux-2.6.32.24/fs/open.c 32774diff -urNp linux-2.6.35.7/fs/ocfs2/symlink.c linux-2.6.35.7/fs/ocfs2/symlink.c
34030--- linux-2.6.32.24/fs/open.c 2010-08-13 16:24:37.000000000 -0400 32775--- linux-2.6.35.7/fs/ocfs2/symlink.c 2010-08-26 19:47:12.000000000 -0400
34031+++ linux-2.6.32.24/fs/open.c 2010-10-23 19:59:20.000000000 -0400 32776+++ linux-2.6.35.7/fs/ocfs2/symlink.c 2010-09-17 20:12:09.000000000 -0400
34032@@ -206,6 +206,9 @@ int do_truncate(struct dentry *dentry, l 32777@@ -148,7 +148,7 @@ bail:
32778
32779 static void ocfs2_fast_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
32780 {
32781- char *link = nd_get_link(nd);
32782+ const char *link = nd_get_link(nd);
32783 if (!IS_ERR(link))
32784 kfree(link);
32785 }
32786diff -urNp linux-2.6.35.7/fs/open.c linux-2.6.35.7/fs/open.c
32787--- linux-2.6.35.7/fs/open.c 2010-08-26 19:47:12.000000000 -0400
32788+++ linux-2.6.35.7/fs/open.c 2010-09-17 20:12:37.000000000 -0400
32789@@ -42,6 +42,9 @@ int do_truncate(struct dentry *dentry, l
34033 if (length < 0) 32790 if (length < 0)
34034 return -EINVAL; 32791 return -EINVAL;
34035 32792
@@ -34039,7 +32796,7 @@ diff -urNp linux-2.6.32.24/fs/open.c linux-2.6.32.24/fs/open.c
34039 newattrs.ia_size = length; 32796 newattrs.ia_size = length;
34040 newattrs.ia_valid = ATTR_SIZE | time_attrs; 32797 newattrs.ia_valid = ATTR_SIZE | time_attrs;
34041 if (filp) { 32798 if (filp) {
34042@@ -511,6 +514,9 @@ SYSCALL_DEFINE3(faccessat, int, dfd, con 32799@@ -345,6 +348,9 @@ SYSCALL_DEFINE3(faccessat, int, dfd, con
34043 if (__mnt_is_readonly(path.mnt)) 32800 if (__mnt_is_readonly(path.mnt))
34044 res = -EROFS; 32801 res = -EROFS;
34045 32802
@@ -34049,7 +32806,7 @@ diff -urNp linux-2.6.32.24/fs/open.c linux-2.6.32.24/fs/open.c
34049 out_path_release: 32806 out_path_release:
34050 path_put(&path); 32807 path_put(&path);
34051 out: 32808 out:
34052@@ -537,6 +543,8 @@ SYSCALL_DEFINE1(chdir, const char __user 32809@@ -371,6 +377,8 @@ SYSCALL_DEFINE1(chdir, const char __user
34053 if (error) 32810 if (error)
34054 goto dput_and_out; 32811 goto dput_and_out;
34055 32812
@@ -34058,7 +32815,7 @@ diff -urNp linux-2.6.32.24/fs/open.c linux-2.6.32.24/fs/open.c
34058 set_fs_pwd(current->fs, &path); 32815 set_fs_pwd(current->fs, &path);
34059 32816
34060 dput_and_out: 32817 dput_and_out:
34061@@ -563,6 +571,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd 32818@@ -397,6 +405,13 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd
34062 goto out_putf; 32819 goto out_putf;
34063 32820
34064 error = inode_permission(inode, MAY_EXEC | MAY_ACCESS); 32821 error = inode_permission(inode, MAY_EXEC | MAY_ACCESS);
@@ -34072,8 +32829,8 @@ diff -urNp linux-2.6.32.24/fs/open.c linux-2.6.32.24/fs/open.c
34072 if (!error) 32829 if (!error)
34073 set_fs_pwd(current->fs, &file->f_path); 32830 set_fs_pwd(current->fs, &file->f_path);
34074 out_putf: 32831 out_putf:
34075@@ -588,7 +603,18 @@ SYSCALL_DEFINE1(chroot, const char __use 32832@@ -425,7 +440,18 @@ SYSCALL_DEFINE1(chroot, const char __use
34076 if (!capable(CAP_SYS_CHROOT)) 32833 if (error)
34077 goto dput_and_out; 32834 goto dput_and_out;
34078 32835
34079+ if (gr_handle_chroot_chroot(path.dentry, path.mnt)) 32836+ if (gr_handle_chroot_chroot(path.dentry, path.mnt))
@@ -34091,7 +32848,7 @@ diff -urNp linux-2.6.32.24/fs/open.c linux-2.6.32.24/fs/open.c
34091 error = 0; 32848 error = 0;
34092 dput_and_out: 32849 dput_and_out:
34093 path_put(&path); 32850 path_put(&path);
34094@@ -616,13 +642,28 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd 32851@@ -453,6 +479,12 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd
34095 err = mnt_want_write_file(file); 32852 err = mnt_want_write_file(file);
34096 if (err) 32853 if (err)
34097 goto out_putf; 32854 goto out_putf;
@@ -34102,25 +32859,17 @@ diff -urNp linux-2.6.32.24/fs/open.c linux-2.6.32.24/fs/open.c
34102+ } 32859+ }
34103+ 32860+
34104 mutex_lock(&inode->i_mutex); 32861 mutex_lock(&inode->i_mutex);
34105 if (mode == (mode_t) -1) 32862 err = security_path_chmod(dentry, file->f_vfsmnt, mode);
34106 mode = inode->i_mode; 32863 if (err)
34107+ 32864@@ -464,6 +496,7 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd
34108+ if (gr_handle_chroot_chmod(dentry, file->f_path.mnt, mode)) {
34109+ err = -EPERM;
34110+ mutex_unlock(&inode->i_mutex);
34111+ goto out_drop_write;
34112+ }
34113+
34114 newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
34115 newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
34116 err = notify_change(dentry, &newattrs); 32865 err = notify_change(dentry, &newattrs);
32866 out_unlock:
34117 mutex_unlock(&inode->i_mutex); 32867 mutex_unlock(&inode->i_mutex);
34118+
34119+out_drop_write: 32868+out_drop_write:
34120 mnt_drop_write(file->f_path.mnt); 32869 mnt_drop_write(file->f_path.mnt);
34121 out_putf: 32870 out_putf:
34122 fput(file); 32871 fput(file);
34123@@ -645,13 +686,28 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, cons 32872@@ -486,17 +519,30 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, cons
34124 error = mnt_want_write(path.mnt); 32873 error = mnt_want_write(path.mnt);
34125 if (error) 32874 if (error)
34126 goto dput_and_out; 32875 goto dput_and_out;
@@ -34131,81 +32880,40 @@ diff -urNp linux-2.6.32.24/fs/open.c linux-2.6.32.24/fs/open.c
34131+ } 32880+ }
34132+ 32881+
34133 mutex_lock(&inode->i_mutex); 32882 mutex_lock(&inode->i_mutex);
32883 error = security_path_chmod(path.dentry, path.mnt, mode);
32884 if (error)
32885 goto out_unlock;
34134 if (mode == (mode_t) -1) 32886 if (mode == (mode_t) -1)
34135 mode = inode->i_mode; 32887 mode = inode->i_mode;
34136+ 32888+
34137+ if (gr_handle_chroot_chmod(path.dentry, path.mnt, mode)) { 32889+ if (gr_handle_chroot_chmod(path.dentry, path.mnt, mode)) {
34138+ error = -EACCES; 32890+ error = -EACCES;
34139+ mutex_unlock(&inode->i_mutex); 32891+ goto out_unlock;
34140+ goto out_drop_write;
34141+ } 32892+ }
34142+ 32893+
34143 newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); 32894 newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
34144 newattrs.ia_valid = ATTR_MODE | ATTR_CTIME; 32895 newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
34145 error = notify_change(path.dentry, &newattrs); 32896 error = notify_change(path.dentry, &newattrs);
32897 out_unlock:
34146 mutex_unlock(&inode->i_mutex); 32898 mutex_unlock(&inode->i_mutex);
34147+
34148+out_drop_write: 32899+out_drop_write:
34149 mnt_drop_write(path.mnt); 32900 mnt_drop_write(path.mnt);
34150 dput_and_out: 32901 dput_and_out:
34151 path_put(&path); 32902 path_put(&path);
34152@@ -664,12 +720,15 @@ SYSCALL_DEFINE2(chmod, const char __user 32903@@ -515,6 +561,9 @@ static int chown_common(struct path *pat
34153 return sys_fchmodat(AT_FDCWD, filename, mode);
34154 }
34155
34156-static int chown_common(struct dentry * dentry, uid_t user, gid_t group)
34157+static int chown_common(struct dentry * dentry, uid_t user, gid_t group, struct vfsmount *mnt)
34158 {
34159 struct inode *inode = dentry->d_inode;
34160 int error; 32904 int error;
34161 struct iattr newattrs; 32905 struct iattr newattrs;
34162 32906
34163+ if (!gr_acl_handle_chown(dentry, mnt)) 32907+ if (!gr_acl_handle_chown(path->dentry, path->mnt))
34164+ return -EACCES; 32908+ return -EACCES;
34165+ 32909+
34166 newattrs.ia_valid = ATTR_CTIME; 32910 newattrs.ia_valid = ATTR_CTIME;
34167 if (user != (uid_t) -1) { 32911 if (user != (uid_t) -1) {
34168 newattrs.ia_valid |= ATTR_UID; 32912 newattrs.ia_valid |= ATTR_UID;
34169@@ -700,7 +759,7 @@ SYSCALL_DEFINE3(chown, const char __user 32913diff -urNp linux-2.6.35.7/fs/pipe.c linux-2.6.35.7/fs/pipe.c
34170 error = mnt_want_write(path.mnt); 32914--- linux-2.6.35.7/fs/pipe.c 2010-08-26 19:47:12.000000000 -0400
34171 if (error) 32915+++ linux-2.6.35.7/fs/pipe.c 2010-10-11 22:41:44.000000000 -0400
34172 goto out_release; 32916@@ -382,7 +382,7 @@ pipe_read(struct kiocb *iocb, const stru
34173- error = chown_common(path.dentry, user, group);
34174+ error = chown_common(path.dentry, user, group, path.mnt);
34175 mnt_drop_write(path.mnt);
34176 out_release:
34177 path_put(&path);
34178@@ -725,7 +784,7 @@ SYSCALL_DEFINE5(fchownat, int, dfd, cons
34179 error = mnt_want_write(path.mnt);
34180 if (error)
34181 goto out_release;
34182- error = chown_common(path.dentry, user, group);
34183+ error = chown_common(path.dentry, user, group, path.mnt);
34184 mnt_drop_write(path.mnt);
34185 out_release:
34186 path_put(&path);
34187@@ -744,7 +803,7 @@ SYSCALL_DEFINE3(lchown, const char __use
34188 error = mnt_want_write(path.mnt);
34189 if (error)
34190 goto out_release;
34191- error = chown_common(path.dentry, user, group);
34192+ error = chown_common(path.dentry, user, group, path.mnt);
34193 mnt_drop_write(path.mnt);
34194 out_release:
34195 path_put(&path);
34196@@ -767,7 +826,7 @@ SYSCALL_DEFINE3(fchown, unsigned int, fd
34197 goto out_fput;
34198 dentry = file->f_path.dentry;
34199 audit_inode(NULL, dentry);
34200- error = chown_common(dentry, user, group);
34201+ error = chown_common(dentry, user, group, file->f_path.mnt);
34202 mnt_drop_write(file->f_path.mnt);
34203 out_fput:
34204 fput(file);
34205diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34206--- linux-2.6.32.24/fs/pipe.c 2010-08-13 16:24:37.000000000 -0400
34207+++ linux-2.6.32.24/fs/pipe.c 2010-10-23 19:59:24.000000000 -0400
34208@@ -363,7 +363,7 @@ pipe_read(struct kiocb *iocb, const stru
34209 error = ops->confirm(pipe, buf); 32917 error = ops->confirm(pipe, buf);
34210 if (error) { 32918 if (error) {
34211 if (!ret) 32919 if (!ret)
@@ -34214,7 +32922,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34214 break; 32922 break;
34215 } 32923 }
34216 32924
34217@@ -401,9 +401,9 @@ redo: 32925@@ -420,9 +420,9 @@ redo:
34218 } 32926 }
34219 if (bufs) /* More to do? */ 32927 if (bufs) /* More to do? */
34220 continue; 32928 continue;
@@ -34226,7 +32934,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34226 /* syscall merging: Usually we must not sleep 32934 /* syscall merging: Usually we must not sleep
34227 * if O_NONBLOCK is set, or if we got some data. 32935 * if O_NONBLOCK is set, or if we got some data.
34228 * But if a writer sleeps in kernel space, then 32936 * But if a writer sleeps in kernel space, then
34229@@ -462,7 +462,7 @@ pipe_write(struct kiocb *iocb, const str 32937@@ -481,7 +481,7 @@ pipe_write(struct kiocb *iocb, const str
34230 mutex_lock(&inode->i_mutex); 32938 mutex_lock(&inode->i_mutex);
34231 pipe = inode->i_pipe; 32939 pipe = inode->i_pipe;
34232 32940
@@ -34235,7 +32943,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34235 send_sig(SIGPIPE, current, 0); 32943 send_sig(SIGPIPE, current, 0);
34236 ret = -EPIPE; 32944 ret = -EPIPE;
34237 goto out; 32945 goto out;
34238@@ -511,7 +511,7 @@ redo1: 32946@@ -530,7 +530,7 @@ redo1:
34239 for (;;) { 32947 for (;;) {
34240 int bufs; 32948 int bufs;
34241 32949
@@ -34244,7 +32952,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34244 send_sig(SIGPIPE, current, 0); 32952 send_sig(SIGPIPE, current, 0);
34245 if (!ret) 32953 if (!ret)
34246 ret = -EPIPE; 32954 ret = -EPIPE;
34247@@ -597,9 +597,9 @@ redo2: 32955@@ -616,9 +616,9 @@ redo2:
34248 kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); 32956 kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
34249 do_wakeup = 0; 32957 do_wakeup = 0;
34250 } 32958 }
@@ -34256,7 +32964,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34256 } 32964 }
34257 out: 32965 out:
34258 mutex_unlock(&inode->i_mutex); 32966 mutex_unlock(&inode->i_mutex);
34259@@ -666,7 +666,7 @@ pipe_poll(struct file *filp, poll_table 32967@@ -685,7 +685,7 @@ pipe_poll(struct file *filp, poll_table
34260 mask = 0; 32968 mask = 0;
34261 if (filp->f_mode & FMODE_READ) { 32969 if (filp->f_mode & FMODE_READ) {
34262 mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0; 32970 mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0;
@@ -34265,7 +32973,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34265 mask |= POLLHUP; 32973 mask |= POLLHUP;
34266 } 32974 }
34267 32975
34268@@ -676,7 +676,7 @@ pipe_poll(struct file *filp, poll_table 32976@@ -695,7 +695,7 @@ pipe_poll(struct file *filp, poll_table
34269 * Most Unices do not set POLLERR for FIFOs but on Linux they 32977 * Most Unices do not set POLLERR for FIFOs but on Linux they
34270 * behave exactly like pipes for poll(). 32978 * behave exactly like pipes for poll().
34271 */ 32979 */
@@ -34274,7 +32982,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34274 mask |= POLLERR; 32982 mask |= POLLERR;
34275 } 32983 }
34276 32984
34277@@ -690,10 +690,10 @@ pipe_release(struct inode *inode, int de 32985@@ -709,10 +709,10 @@ pipe_release(struct inode *inode, int de
34278 32986
34279 mutex_lock(&inode->i_mutex); 32987 mutex_lock(&inode->i_mutex);
34280 pipe = inode->i_pipe; 32988 pipe = inode->i_pipe;
@@ -34288,7 +32996,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34288 free_pipe_info(inode); 32996 free_pipe_info(inode);
34289 } else { 32997 } else {
34290 wake_up_interruptible_sync(&pipe->wait); 32998 wake_up_interruptible_sync(&pipe->wait);
34291@@ -783,7 +783,7 @@ pipe_read_open(struct inode *inode, stru 32999@@ -802,7 +802,7 @@ pipe_read_open(struct inode *inode, stru
34292 33000
34293 if (inode->i_pipe) { 33001 if (inode->i_pipe) {
34294 ret = 0; 33002 ret = 0;
@@ -34297,7 +33005,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34297 } 33005 }
34298 33006
34299 mutex_unlock(&inode->i_mutex); 33007 mutex_unlock(&inode->i_mutex);
34300@@ -800,7 +800,7 @@ pipe_write_open(struct inode *inode, str 33008@@ -819,7 +819,7 @@ pipe_write_open(struct inode *inode, str
34301 33009
34302 if (inode->i_pipe) { 33010 if (inode->i_pipe) {
34303 ret = 0; 33011 ret = 0;
@@ -34306,7 +33014,7 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34306 } 33014 }
34307 33015
34308 mutex_unlock(&inode->i_mutex); 33016 mutex_unlock(&inode->i_mutex);
34309@@ -818,9 +818,9 @@ pipe_rdwr_open(struct inode *inode, stru 33017@@ -837,9 +837,9 @@ pipe_rdwr_open(struct inode *inode, stru
34310 if (inode->i_pipe) { 33018 if (inode->i_pipe) {
34311 ret = 0; 33019 ret = 0;
34312 if (filp->f_mode & FMODE_READ) 33020 if (filp->f_mode & FMODE_READ)
@@ -34318,16 +33026,16 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34318 } 33026 }
34319 33027
34320 mutex_unlock(&inode->i_mutex); 33028 mutex_unlock(&inode->i_mutex);
34321@@ -905,7 +905,7 @@ void free_pipe_info(struct inode *inode) 33029@@ -931,7 +931,7 @@ void free_pipe_info(struct inode *inode)
34322 inode->i_pipe = NULL; 33030 inode->i_pipe = NULL;
34323 } 33031 }
34324 33032
34325-static struct vfsmount *pipe_mnt __read_mostly; 33033-static struct vfsmount *pipe_mnt __read_mostly;
34326+struct vfsmount *pipe_mnt __read_mostly; 33034+struct vfsmount *pipe_mnt __read_mostly;
34327 static int pipefs_delete_dentry(struct dentry *dentry) 33035
34328 { 33036 /*
34329 /* 33037 * pipefs_dname() is called from d_path().
34330@@ -945,7 +945,8 @@ static struct inode * get_pipe_inode(voi 33038@@ -959,7 +959,8 @@ static struct inode * get_pipe_inode(voi
34331 goto fail_iput; 33039 goto fail_iput;
34332 inode->i_pipe = pipe; 33040 inode->i_pipe = pipe;
34333 33041
@@ -34337,11 +33045,11 @@ diff -urNp linux-2.6.32.24/fs/pipe.c linux-2.6.32.24/fs/pipe.c
34337 inode->i_fop = &rdwr_pipefifo_fops; 33045 inode->i_fop = &rdwr_pipefifo_fops;
34338 33046
34339 /* 33047 /*
34340diff -urNp linux-2.6.32.24/fs/proc/array.c linux-2.6.32.24/fs/proc/array.c 33048diff -urNp linux-2.6.35.7/fs/proc/array.c linux-2.6.35.7/fs/proc/array.c
34341--- linux-2.6.32.24/fs/proc/array.c 2010-08-13 16:24:37.000000000 -0400 33049--- linux-2.6.35.7/fs/proc/array.c 2010-08-26 19:47:12.000000000 -0400
34342+++ linux-2.6.32.24/fs/proc/array.c 2010-10-23 19:59:20.000000000 -0400 33050+++ linux-2.6.35.7/fs/proc/array.c 2010-09-17 20:12:37.000000000 -0400
34343@@ -321,6 +321,21 @@ static inline void task_context_switch_c 33051@@ -337,6 +337,21 @@ static void task_cpus_allowed(struct seq
34344 p->nivcsw); 33052 seq_printf(m, "\n");
34345 } 33053 }
34346 33054
34347+#if defined(CONFIG_PAX_NOEXEC) || defined(CONFIG_PAX_ASLR) 33055+#if defined(CONFIG_PAX_NOEXEC) || defined(CONFIG_PAX_ASLR)
@@ -34362,7 +33070,7 @@ diff -urNp linux-2.6.32.24/fs/proc/array.c linux-2.6.32.24/fs/proc/array.c
34362 int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, 33070 int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
34363 struct pid *pid, struct task_struct *task) 33071 struct pid *pid, struct task_struct *task)
34364 { 33072 {
34365@@ -340,9 +355,20 @@ int proc_pid_status(struct seq_file *m, 33073@@ -357,9 +372,20 @@ int proc_pid_status(struct seq_file *m,
34366 task_show_regs(m, task); 33074 task_show_regs(m, task);
34367 #endif 33075 #endif
34368 task_context_switch_counts(m, task); 33076 task_context_switch_counts(m, task);
@@ -34383,8 +33091,8 @@ diff -urNp linux-2.6.32.24/fs/proc/array.c linux-2.6.32.24/fs/proc/array.c
34383 static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, 33091 static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
34384 struct pid *pid, struct task_struct *task, int whole) 33092 struct pid *pid, struct task_struct *task, int whole)
34385 { 33093 {
34386@@ -436,6 +462,19 @@ static int do_task_stat(struct seq_file 33094@@ -452,6 +478,19 @@ static int do_task_stat(struct seq_file
34387 gtime = task_gtime(task); 33095 gtime = task->gtime;
34388 } 33096 }
34389 33097
34390+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP 33098+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
@@ -34403,7 +33111,7 @@ diff -urNp linux-2.6.32.24/fs/proc/array.c linux-2.6.32.24/fs/proc/array.c
34403 /* scale priority and nice values from timeslices to -20..20 */ 33111 /* scale priority and nice values from timeslices to -20..20 */
34404 /* to make it look like a "normal" Unix priority/nice value */ 33112 /* to make it look like a "normal" Unix priority/nice value */
34405 priority = task_prio(task); 33113 priority = task_prio(task);
34406@@ -476,9 +515,15 @@ static int do_task_stat(struct seq_file 33114@@ -492,9 +531,15 @@ static int do_task_stat(struct seq_file
34407 vsize, 33115 vsize,
34408 mm ? get_mm_rss(mm) : 0, 33116 mm ? get_mm_rss(mm) : 0,
34409 rsslim, 33117 rsslim,
@@ -34419,7 +33127,7 @@ diff -urNp linux-2.6.32.24/fs/proc/array.c linux-2.6.32.24/fs/proc/array.c
34419 esp, 33127 esp,
34420 eip, 33128 eip,
34421 /* The signal information here is obsolete. 33129 /* The signal information here is obsolete.
34422@@ -531,3 +576,10 @@ int proc_pid_statm(struct seq_file *m, s 33130@@ -547,3 +592,10 @@ int proc_pid_statm(struct seq_file *m, s
34423 33131
34424 return 0; 33132 return 0;
34425 } 33133 }
@@ -34430,10 +33138,10 @@ diff -urNp linux-2.6.32.24/fs/proc/array.c linux-2.6.32.24/fs/proc/array.c
34430+ return sprintf(buffer, "%pI4\n", &task->signal->curr_ip); 33138+ return sprintf(buffer, "%pI4\n", &task->signal->curr_ip);
34431+} 33139+}
34432+#endif 33140+#endif
34433diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c 33141diff -urNp linux-2.6.35.7/fs/proc/base.c linux-2.6.35.7/fs/proc/base.c
34434--- linux-2.6.32.24/fs/proc/base.c 2010-08-13 16:24:37.000000000 -0400 33142--- linux-2.6.35.7/fs/proc/base.c 2010-08-26 19:47:12.000000000 -0400
34435+++ linux-2.6.32.24/fs/proc/base.c 2010-10-23 19:59:20.000000000 -0400 33143+++ linux-2.6.35.7/fs/proc/base.c 2010-10-20 17:37:57.000000000 -0400
34436@@ -102,6 +102,22 @@ struct pid_entry { 33144@@ -103,6 +103,22 @@ struct pid_entry {
34437 union proc_op op; 33145 union proc_op op;
34438 }; 33146 };
34439 33147
@@ -34456,7 +33164,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34456 #define NOD(NAME, MODE, IOP, FOP, OP) { \ 33164 #define NOD(NAME, MODE, IOP, FOP, OP) { \
34457 .name = (NAME), \ 33165 .name = (NAME), \
34458 .len = sizeof(NAME) - 1, \ 33166 .len = sizeof(NAME) - 1, \
34459@@ -213,6 +229,9 @@ static int check_mem_permission(struct t 33167@@ -202,6 +218,9 @@ static int check_mem_permission(struct t
34460 if (task == current) 33168 if (task == current)
34461 return 0; 33169 return 0;
34462 33170
@@ -34466,7 +33174,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34466 /* 33174 /*
34467 * If current is actively ptrace'ing, and would also be 33175 * If current is actively ptrace'ing, and would also be
34468 * permitted to freshly attach with ptrace now, permit it. 33176 * permitted to freshly attach with ptrace now, permit it.
34469@@ -260,6 +279,9 @@ static int proc_pid_cmdline(struct task_ 33177@@ -249,6 +268,9 @@ static int proc_pid_cmdline(struct task_
34470 if (!mm->arg_end) 33178 if (!mm->arg_end)
34471 goto out_mm; /* Shh! No looking before we're done */ 33179 goto out_mm; /* Shh! No looking before we're done */
34472 33180
@@ -34476,7 +33184,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34476 len = mm->arg_end - mm->arg_start; 33184 len = mm->arg_end - mm->arg_start;
34477 33185
34478 if (len > PAGE_SIZE) 33186 if (len > PAGE_SIZE)
34479@@ -287,12 +309,28 @@ out: 33187@@ -276,12 +298,28 @@ out:
34480 return res; 33188 return res;
34481 } 33189 }
34482 33190
@@ -34505,7 +33213,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34505 do { 33213 do {
34506 nwords += 2; 33214 nwords += 2;
34507 } while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */ 33215 } while (mm->saved_auxv[nwords - 2] != 0); /* AT_NULL */
34508@@ -306,7 +344,7 @@ static int proc_pid_auxv(struct task_str 33216@@ -295,7 +333,7 @@ static int proc_pid_auxv(struct task_str
34509 } 33217 }
34510 33218
34511 33219
@@ -34514,7 +33222,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34514 /* 33222 /*
34515 * Provides a wchan file via kallsyms in a proper one-value-per-file format. 33223 * Provides a wchan file via kallsyms in a proper one-value-per-file format.
34516 * Returns the resolved symbol. If that fails, simply return the address. 33224 * Returns the resolved symbol. If that fails, simply return the address.
34517@@ -328,7 +366,7 @@ static int proc_pid_wchan(struct task_st 33225@@ -317,7 +355,7 @@ static int proc_pid_wchan(struct task_st
34518 } 33226 }
34519 #endif /* CONFIG_KALLSYMS */ 33227 #endif /* CONFIG_KALLSYMS */
34520 33228
@@ -34523,7 +33231,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34523 33231
34524 #define MAX_STACK_TRACE_DEPTH 64 33232 #define MAX_STACK_TRACE_DEPTH 64
34525 33233
34526@@ -522,7 +560,7 @@ static int proc_pid_limits(struct task_s 33234@@ -511,7 +549,7 @@ static int proc_pid_limits(struct task_s
34527 return count; 33235 return count;
34528 } 33236 }
34529 33237
@@ -34532,7 +33240,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34532 static int proc_pid_syscall(struct task_struct *task, char *buffer) 33240 static int proc_pid_syscall(struct task_struct *task, char *buffer)
34533 { 33241 {
34534 long nr; 33242 long nr;
34535@@ -936,6 +974,9 @@ static ssize_t environ_read(struct file 33243@@ -920,6 +958,9 @@ static ssize_t environ_read(struct file
34536 if (!task) 33244 if (!task)
34537 goto out_no_task; 33245 goto out_no_task;
34538 33246
@@ -34542,7 +33250,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34542 if (!ptrace_may_access(task, PTRACE_MODE_READ)) 33250 if (!ptrace_may_access(task, PTRACE_MODE_READ))
34543 goto out; 33251 goto out;
34544 33252
34545@@ -1456,7 +1497,11 @@ static struct inode *proc_pid_make_inode 33253@@ -1514,7 +1555,11 @@ static struct inode *proc_pid_make_inode
34546 rcu_read_lock(); 33254 rcu_read_lock();
34547 cred = __task_cred(task); 33255 cred = __task_cred(task);
34548 inode->i_uid = cred->euid; 33256 inode->i_uid = cred->euid;
@@ -34554,7 +33262,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34554 rcu_read_unlock(); 33262 rcu_read_unlock();
34555 } 33263 }
34556 security_task_to_inode(task, inode); 33264 security_task_to_inode(task, inode);
34557@@ -1474,6 +1519,9 @@ static int pid_getattr(struct vfsmount * 33265@@ -1532,6 +1577,9 @@ static int pid_getattr(struct vfsmount *
34558 struct inode *inode = dentry->d_inode; 33266 struct inode *inode = dentry->d_inode;
34559 struct task_struct *task; 33267 struct task_struct *task;
34560 const struct cred *cred; 33268 const struct cred *cred;
@@ -34564,7 +33272,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34564 33272
34565 generic_fillattr(inode, stat); 33273 generic_fillattr(inode, stat);
34566 33274
34567@@ -1481,12 +1529,34 @@ static int pid_getattr(struct vfsmount * 33275@@ -1539,12 +1587,34 @@ static int pid_getattr(struct vfsmount *
34568 stat->uid = 0; 33276 stat->uid = 0;
34569 stat->gid = 0; 33277 stat->gid = 0;
34570 task = pid_task(proc_pid(inode), PIDTYPE_PID); 33278 task = pid_task(proc_pid(inode), PIDTYPE_PID);
@@ -34600,7 +33308,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34600 } 33308 }
34601 } 33309 }
34602 rcu_read_unlock(); 33310 rcu_read_unlock();
34603@@ -1518,11 +1588,20 @@ static int pid_revalidate(struct dentry 33311@@ -1576,11 +1646,20 @@ static int pid_revalidate(struct dentry
34604 33312
34605 if (task) { 33313 if (task) {
34606 if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) || 33314 if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
@@ -34621,7 +33329,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34621 rcu_read_unlock(); 33329 rcu_read_unlock();
34622 } else { 33330 } else {
34623 inode->i_uid = 0; 33331 inode->i_uid = 0;
34624@@ -1643,7 +1722,8 @@ static int proc_fd_info(struct inode *in 33332@@ -1701,7 +1780,8 @@ static int proc_fd_info(struct inode *in
34625 int fd = proc_fd(inode); 33333 int fd = proc_fd(inode);
34626 33334
34627 if (task) { 33335 if (task) {
@@ -34631,7 +33339,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34631 put_task_struct(task); 33339 put_task_struct(task);
34632 } 33340 }
34633 if (files) { 33341 if (files) {
34634@@ -1895,12 +1975,22 @@ static const struct file_operations proc 33342@@ -1953,12 +2033,22 @@ static const struct file_operations proc
34635 static int proc_fd_permission(struct inode *inode, int mask) 33343 static int proc_fd_permission(struct inode *inode, int mask)
34636 { 33344 {
34637 int rv; 33345 int rv;
@@ -34656,7 +33364,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34656 return rv; 33364 return rv;
34657 } 33365 }
34658 33366
34659@@ -2009,6 +2099,9 @@ static struct dentry *proc_pident_lookup 33367@@ -2067,6 +2157,9 @@ static struct dentry *proc_pident_lookup
34660 if (!task) 33368 if (!task)
34661 goto out_no_task; 33369 goto out_no_task;
34662 33370
@@ -34666,7 +33374,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34666 /* 33374 /*
34667 * Yes, it does not scale. And it should not. Don't add 33375 * Yes, it does not scale. And it should not. Don't add
34668 * new entries into /proc/<tgid>/ without very good reasons. 33376 * new entries into /proc/<tgid>/ without very good reasons.
34669@@ -2053,6 +2146,9 @@ static int proc_pident_readdir(struct fi 33377@@ -2111,6 +2204,9 @@ static int proc_pident_readdir(struct fi
34670 if (!task) 33378 if (!task)
34671 goto out_no_task; 33379 goto out_no_task;
34672 33380
@@ -34676,7 +33384,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34676 ret = 0; 33384 ret = 0;
34677 i = filp->f_pos; 33385 i = filp->f_pos;
34678 switch (i) { 33386 switch (i) {
34679@@ -2320,7 +2416,7 @@ static void *proc_self_follow_link(struc 33387@@ -2380,7 +2476,7 @@ static void *proc_self_follow_link(struc
34680 static void proc_self_put_link(struct dentry *dentry, struct nameidata *nd, 33388 static void proc_self_put_link(struct dentry *dentry, struct nameidata *nd,
34681 void *cookie) 33389 void *cookie)
34682 { 33390 {
@@ -34685,16 +33393,16 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34685 if (!IS_ERR(s)) 33393 if (!IS_ERR(s))
34686 __putname(s); 33394 __putname(s);
34687 } 33395 }
34688@@ -2519,7 +2615,7 @@ static const struct pid_entry tgid_base_ 33396@@ -2580,7 +2676,7 @@ static const struct pid_entry tgid_base_
34689 #ifdef CONFIG_SCHED_DEBUG
34690 REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), 33397 REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
34691 #endif 33398 #endif
33399 REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
34692-#ifdef CONFIG_HAVE_ARCH_TRACEHOOK 33400-#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
34693+#if defined(CONFIG_HAVE_ARCH_TRACEHOOK) && !defined(CONFIG_GRKERNSEC_PROC_MEMMAP) 33401+#if defined(CONFIG_HAVE_ARCH_TRACEHOOK) && !defined(CONFIG_GRKERNSEC_PROC_MEMMAP)
34694 INF("syscall", S_IRUSR, proc_pid_syscall), 33402 INF("syscall", S_IRUSR, proc_pid_syscall),
34695 #endif 33403 #endif
34696 INF("cmdline", S_IRUGO, proc_pid_cmdline), 33404 INF("cmdline", S_IRUGO, proc_pid_cmdline),
34697@@ -2544,10 +2640,10 @@ static const struct pid_entry tgid_base_ 33405@@ -2605,10 +2701,10 @@ static const struct pid_entry tgid_base_
34698 #ifdef CONFIG_SECURITY 33406 #ifdef CONFIG_SECURITY
34699 DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), 33407 DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
34700 #endif 33408 #endif
@@ -34707,7 +33415,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34707 ONE("stack", S_IRUSR, proc_pid_stack), 33415 ONE("stack", S_IRUSR, proc_pid_stack),
34708 #endif 33416 #endif
34709 #ifdef CONFIG_SCHEDSTATS 33417 #ifdef CONFIG_SCHEDSTATS
34710@@ -2577,6 +2673,9 @@ static const struct pid_entry tgid_base_ 33418@@ -2638,6 +2734,9 @@ static const struct pid_entry tgid_base_
34711 #ifdef CONFIG_TASK_IO_ACCOUNTING 33419 #ifdef CONFIG_TASK_IO_ACCOUNTING
34712 INF("io", S_IRUGO, proc_tgid_io_accounting), 33420 INF("io", S_IRUGO, proc_tgid_io_accounting),
34713 #endif 33421 #endif
@@ -34717,7 +33425,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34717 }; 33425 };
34718 33426
34719 static int proc_tgid_base_readdir(struct file * filp, 33427 static int proc_tgid_base_readdir(struct file * filp,
34720@@ -2701,7 +2800,14 @@ static struct dentry *proc_pid_instantia 33428@@ -2762,7 +2861,14 @@ static struct dentry *proc_pid_instantia
34721 if (!inode) 33429 if (!inode)
34722 goto out; 33430 goto out;
34723 33431
@@ -34732,7 +33440,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34732 inode->i_op = &proc_tgid_base_inode_operations; 33440 inode->i_op = &proc_tgid_base_inode_operations;
34733 inode->i_fop = &proc_tgid_base_operations; 33441 inode->i_fop = &proc_tgid_base_operations;
34734 inode->i_flags|=S_IMMUTABLE; 33442 inode->i_flags|=S_IMMUTABLE;
34735@@ -2743,7 +2849,11 @@ struct dentry *proc_pid_lookup(struct in 33443@@ -2804,7 +2910,11 @@ struct dentry *proc_pid_lookup(struct in
34736 if (!task) 33444 if (!task)
34737 goto out; 33445 goto out;
34738 33446
@@ -34744,7 +33452,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34744 put_task_struct(task); 33452 put_task_struct(task);
34745 out: 33453 out:
34746 return result; 33454 return result;
34747@@ -2808,6 +2918,11 @@ int proc_pid_readdir(struct file * filp, 33455@@ -2869,6 +2979,11 @@ int proc_pid_readdir(struct file * filp,
34748 { 33456 {
34749 unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY; 33457 unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY;
34750 struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode); 33458 struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode);
@@ -34756,7 +33464,7 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34756 struct tgid_iter iter; 33464 struct tgid_iter iter;
34757 struct pid_namespace *ns; 33465 struct pid_namespace *ns;
34758 33466
34759@@ -2826,8 +2941,27 @@ int proc_pid_readdir(struct file * filp, 33467@@ -2887,8 +3002,27 @@ int proc_pid_readdir(struct file * filp,
34760 for (iter = next_tgid(ns, iter); 33468 for (iter = next_tgid(ns, iter);
34761 iter.task; 33469 iter.task;
34762 iter.tgid += 1, iter = next_tgid(ns, iter)) { 33470 iter.tgid += 1, iter = next_tgid(ns, iter)) {
@@ -34785,16 +33493,16 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34785 put_task_struct(iter.task); 33493 put_task_struct(iter.task);
34786 goto out; 33494 goto out;
34787 } 33495 }
34788@@ -2853,7 +2987,7 @@ static const struct pid_entry tid_base_s 33496@@ -2915,7 +3049,7 @@ static const struct pid_entry tid_base_s
34789 #ifdef CONFIG_SCHED_DEBUG
34790 REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations), 33497 REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
34791 #endif 33498 #endif
33499 REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
34792-#ifdef CONFIG_HAVE_ARCH_TRACEHOOK 33500-#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
34793+#if defined(CONFIG_HAVE_ARCH_TRACEHOOK) && !defined(CONFIG_GRKERNSEC_PROC_MEMMAP) 33501+#if defined(CONFIG_HAVE_ARCH_TRACEHOOK) && !defined(CONFIG_GRKERNSEC_PROC_MEMMAP)
34794 INF("syscall", S_IRUSR, proc_pid_syscall), 33502 INF("syscall", S_IRUSR, proc_pid_syscall),
34795 #endif 33503 #endif
34796 INF("cmdline", S_IRUGO, proc_pid_cmdline), 33504 INF("cmdline", S_IRUGO, proc_pid_cmdline),
34797@@ -2877,10 +3011,10 @@ static const struct pid_entry tid_base_s 33505@@ -2939,10 +3073,10 @@ static const struct pid_entry tid_base_s
34798 #ifdef CONFIG_SECURITY 33506 #ifdef CONFIG_SECURITY
34799 DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations), 33507 DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
34800 #endif 33508 #endif
@@ -34807,9 +33515,9 @@ diff -urNp linux-2.6.32.24/fs/proc/base.c linux-2.6.32.24/fs/proc/base.c
34807 ONE("stack", S_IRUSR, proc_pid_stack), 33515 ONE("stack", S_IRUSR, proc_pid_stack),
34808 #endif 33516 #endif
34809 #ifdef CONFIG_SCHEDSTATS 33517 #ifdef CONFIG_SCHEDSTATS
34810diff -urNp linux-2.6.32.24/fs/proc/cmdline.c linux-2.6.32.24/fs/proc/cmdline.c 33518diff -urNp linux-2.6.35.7/fs/proc/cmdline.c linux-2.6.35.7/fs/proc/cmdline.c
34811--- linux-2.6.32.24/fs/proc/cmdline.c 2010-08-13 16:24:37.000000000 -0400 33519--- linux-2.6.35.7/fs/proc/cmdline.c 2010-08-26 19:47:12.000000000 -0400
34812+++ linux-2.6.32.24/fs/proc/cmdline.c 2010-10-23 19:59:20.000000000 -0400 33520+++ linux-2.6.35.7/fs/proc/cmdline.c 2010-09-17 20:12:37.000000000 -0400
34813@@ -23,7 +23,11 @@ static const struct file_operations cmdl 33521@@ -23,7 +23,11 @@ static const struct file_operations cmdl
34814 33522
34815 static int __init proc_cmdline_init(void) 33523 static int __init proc_cmdline_init(void)
@@ -34822,9 +33530,9 @@ diff -urNp linux-2.6.32.24/fs/proc/cmdline.c linux-2.6.32.24/fs/proc/cmdline.c
34822 return 0; 33530 return 0;
34823 } 33531 }
34824 module_init(proc_cmdline_init); 33532 module_init(proc_cmdline_init);
34825diff -urNp linux-2.6.32.24/fs/proc/devices.c linux-2.6.32.24/fs/proc/devices.c 33533diff -urNp linux-2.6.35.7/fs/proc/devices.c linux-2.6.35.7/fs/proc/devices.c
34826--- linux-2.6.32.24/fs/proc/devices.c 2010-08-13 16:24:37.000000000 -0400 33534--- linux-2.6.35.7/fs/proc/devices.c 2010-08-26 19:47:12.000000000 -0400
34827+++ linux-2.6.32.24/fs/proc/devices.c 2010-10-23 19:59:20.000000000 -0400 33535+++ linux-2.6.35.7/fs/proc/devices.c 2010-09-17 20:12:37.000000000 -0400
34828@@ -64,7 +64,11 @@ static const struct file_operations proc 33536@@ -64,7 +64,11 @@ static const struct file_operations proc
34829 33537
34830 static int __init proc_devices_init(void) 33538 static int __init proc_devices_init(void)
@@ -34837,10 +33545,10 @@ diff -urNp linux-2.6.32.24/fs/proc/devices.c linux-2.6.32.24/fs/proc/devices.c
34837 return 0; 33545 return 0;
34838 } 33546 }
34839 module_init(proc_devices_init); 33547 module_init(proc_devices_init);
34840diff -urNp linux-2.6.32.24/fs/proc/inode.c linux-2.6.32.24/fs/proc/inode.c 33548diff -urNp linux-2.6.35.7/fs/proc/inode.c linux-2.6.35.7/fs/proc/inode.c
34841--- linux-2.6.32.24/fs/proc/inode.c 2010-08-13 16:24:37.000000000 -0400 33549--- linux-2.6.35.7/fs/proc/inode.c 2010-08-26 19:47:12.000000000 -0400
34842+++ linux-2.6.32.24/fs/proc/inode.c 2010-10-23 19:59:20.000000000 -0400 33550+++ linux-2.6.35.7/fs/proc/inode.c 2010-09-17 20:12:37.000000000 -0400
34843@@ -457,7 +457,11 @@ struct inode *proc_get_inode(struct supe 33551@@ -435,7 +435,11 @@ struct inode *proc_get_inode(struct supe
34844 if (de->mode) { 33552 if (de->mode) {
34845 inode->i_mode = de->mode; 33553 inode->i_mode = de->mode;
34846 inode->i_uid = de->uid; 33554 inode->i_uid = de->uid;
@@ -34852,9 +33560,9 @@ diff -urNp linux-2.6.32.24/fs/proc/inode.c linux-2.6.32.24/fs/proc/inode.c
34852 } 33560 }
34853 if (de->size) 33561 if (de->size)
34854 inode->i_size = de->size; 33562 inode->i_size = de->size;
34855diff -urNp linux-2.6.32.24/fs/proc/internal.h linux-2.6.32.24/fs/proc/internal.h 33563diff -urNp linux-2.6.35.7/fs/proc/internal.h linux-2.6.35.7/fs/proc/internal.h
34856--- linux-2.6.32.24/fs/proc/internal.h 2010-08-13 16:24:37.000000000 -0400 33564--- linux-2.6.35.7/fs/proc/internal.h 2010-08-26 19:47:12.000000000 -0400
34857+++ linux-2.6.32.24/fs/proc/internal.h 2010-10-23 19:59:20.000000000 -0400 33565+++ linux-2.6.35.7/fs/proc/internal.h 2010-09-17 20:12:37.000000000 -0400
34858@@ -51,6 +51,9 @@ extern int proc_pid_status(struct seq_fi 33566@@ -51,6 +51,9 @@ extern int proc_pid_status(struct seq_fi
34859 struct pid *pid, struct task_struct *task); 33567 struct pid *pid, struct task_struct *task);
34860 extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns, 33568 extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
@@ -34865,9 +33573,9 @@ diff -urNp linux-2.6.32.24/fs/proc/internal.h linux-2.6.32.24/fs/proc/internal.h
34865 extern loff_t mem_lseek(struct file *file, loff_t offset, int orig); 33573 extern loff_t mem_lseek(struct file *file, loff_t offset, int orig);
34866 33574
34867 extern const struct file_operations proc_maps_operations; 33575 extern const struct file_operations proc_maps_operations;
34868diff -urNp linux-2.6.32.24/fs/proc/Kconfig linux-2.6.32.24/fs/proc/Kconfig 33576diff -urNp linux-2.6.35.7/fs/proc/Kconfig linux-2.6.35.7/fs/proc/Kconfig
34869--- linux-2.6.32.24/fs/proc/Kconfig 2010-08-13 16:24:37.000000000 -0400 33577--- linux-2.6.35.7/fs/proc/Kconfig 2010-08-26 19:47:12.000000000 -0400
34870+++ linux-2.6.32.24/fs/proc/Kconfig 2010-10-23 19:59:20.000000000 -0400 33578+++ linux-2.6.35.7/fs/proc/Kconfig 2010-09-17 20:12:37.000000000 -0400
34871@@ -30,12 +30,12 @@ config PROC_FS 33579@@ -30,12 +30,12 @@ config PROC_FS
34872 33580
34873 config PROC_KCORE 33581 config PROC_KCORE
@@ -34895,10 +33603,10 @@ diff -urNp linux-2.6.32.24/fs/proc/Kconfig linux-2.6.32.24/fs/proc/Kconfig
34895 bool "Enable /proc page monitoring" if EMBEDDED 33603 bool "Enable /proc page monitoring" if EMBEDDED
34896 help 33604 help
34897 Various /proc files exist to monitor process memory utilization: 33605 Various /proc files exist to monitor process memory utilization:
34898diff -urNp linux-2.6.32.24/fs/proc/kcore.c linux-2.6.32.24/fs/proc/kcore.c 33606diff -urNp linux-2.6.35.7/fs/proc/kcore.c linux-2.6.35.7/fs/proc/kcore.c
34899--- linux-2.6.32.24/fs/proc/kcore.c 2010-08-13 16:24:37.000000000 -0400 33607--- linux-2.6.35.7/fs/proc/kcore.c 2010-08-26 19:47:12.000000000 -0400
34900+++ linux-2.6.32.24/fs/proc/kcore.c 2010-10-23 19:59:20.000000000 -0400 33608+++ linux-2.6.35.7/fs/proc/kcore.c 2010-09-17 20:12:37.000000000 -0400
34901@@ -477,9 +477,10 @@ read_kcore(struct file *file, char __use 33609@@ -478,9 +478,10 @@ read_kcore(struct file *file, char __use
34902 * the addresses in the elf_phdr on our list. 33610 * the addresses in the elf_phdr on our list.
34903 */ 33611 */
34904 start = kc_offset_to_vaddr(*fpos - elf_buflen); 33612 start = kc_offset_to_vaddr(*fpos - elf_buflen);
@@ -34911,7 +33619,7 @@ diff -urNp linux-2.6.32.24/fs/proc/kcore.c linux-2.6.32.24/fs/proc/kcore.c
34911 while (buflen) { 33619 while (buflen) {
34912 struct kcore_list *m; 33620 struct kcore_list *m;
34913 33621
34914@@ -508,20 +509,18 @@ read_kcore(struct file *file, char __use 33622@@ -509,20 +510,18 @@ read_kcore(struct file *file, char __use
34915 kfree(elf_buf); 33623 kfree(elf_buf);
34916 } else { 33624 } else {
34917 if (kern_addr_valid(start)) { 33625 if (kern_addr_valid(start)) {
@@ -34941,7 +33649,7 @@ diff -urNp linux-2.6.32.24/fs/proc/kcore.c linux-2.6.32.24/fs/proc/kcore.c
34941 } else { 33649 } else {
34942 if (clear_user(buffer, tsz)) 33650 if (clear_user(buffer, tsz))
34943 return -EFAULT; 33651 return -EFAULT;
34944@@ -541,6 +540,9 @@ read_kcore(struct file *file, char __use 33652@@ -542,6 +541,9 @@ read_kcore(struct file *file, char __use
34945 33653
34946 static int open_kcore(struct inode *inode, struct file *filp) 33654 static int open_kcore(struct inode *inode, struct file *filp)
34947 { 33655 {
@@ -34951,9 +33659,9 @@ diff -urNp linux-2.6.32.24/fs/proc/kcore.c linux-2.6.32.24/fs/proc/kcore.c
34951 if (!capable(CAP_SYS_RAWIO)) 33659 if (!capable(CAP_SYS_RAWIO))
34952 return -EPERM; 33660 return -EPERM;
34953 if (kcore_need_update) 33661 if (kcore_need_update)
34954diff -urNp linux-2.6.32.24/fs/proc/meminfo.c linux-2.6.32.24/fs/proc/meminfo.c 33662diff -urNp linux-2.6.35.7/fs/proc/meminfo.c linux-2.6.35.7/fs/proc/meminfo.c
34955--- linux-2.6.32.24/fs/proc/meminfo.c 2010-08-13 16:24:37.000000000 -0400 33663--- linux-2.6.35.7/fs/proc/meminfo.c 2010-08-26 19:47:12.000000000 -0400
34956+++ linux-2.6.32.24/fs/proc/meminfo.c 2010-10-23 19:59:20.000000000 -0400 33664+++ linux-2.6.35.7/fs/proc/meminfo.c 2010-09-17 20:12:09.000000000 -0400
34957@@ -149,7 +149,7 @@ static int meminfo_proc_show(struct seq_ 33665@@ -149,7 +149,7 @@ static int meminfo_proc_show(struct seq_
34958 vmi.used >> 10, 33666 vmi.used >> 10,
34959 vmi.largest_chunk >> 10 33667 vmi.largest_chunk >> 10
@@ -34963,10 +33671,10 @@ diff -urNp linux-2.6.32.24/fs/proc/meminfo.c linux-2.6.32.24/fs/proc/meminfo.c
34963 #endif 33671 #endif
34964 ); 33672 );
34965 33673
34966diff -urNp linux-2.6.32.24/fs/proc/nommu.c linux-2.6.32.24/fs/proc/nommu.c 33674diff -urNp linux-2.6.35.7/fs/proc/nommu.c linux-2.6.35.7/fs/proc/nommu.c
34967--- linux-2.6.32.24/fs/proc/nommu.c 2010-08-13 16:24:37.000000000 -0400 33675--- linux-2.6.35.7/fs/proc/nommu.c 2010-08-26 19:47:12.000000000 -0400
34968+++ linux-2.6.32.24/fs/proc/nommu.c 2010-10-23 19:59:20.000000000 -0400 33676+++ linux-2.6.35.7/fs/proc/nommu.c 2010-09-17 20:12:09.000000000 -0400
34969@@ -67,7 +67,7 @@ static int nommu_region_show(struct seq_ 33677@@ -66,7 +66,7 @@ static int nommu_region_show(struct seq_
34970 if (len < 1) 33678 if (len < 1)
34971 len = 1; 33679 len = 1;
34972 seq_printf(m, "%*c", len, ' '); 33680 seq_printf(m, "%*c", len, ' ');
@@ -34975,10 +33683,10 @@ diff -urNp linux-2.6.32.24/fs/proc/nommu.c linux-2.6.32.24/fs/proc/nommu.c
34975 } 33683 }
34976 33684
34977 seq_putc(m, '\n'); 33685 seq_putc(m, '\n');
34978diff -urNp linux-2.6.32.24/fs/proc/proc_net.c linux-2.6.32.24/fs/proc/proc_net.c 33686diff -urNp linux-2.6.35.7/fs/proc/proc_net.c linux-2.6.35.7/fs/proc/proc_net.c
34979--- linux-2.6.32.24/fs/proc/proc_net.c 2010-08-13 16:24:37.000000000 -0400 33687--- linux-2.6.35.7/fs/proc/proc_net.c 2010-08-26 19:47:12.000000000 -0400
34980+++ linux-2.6.32.24/fs/proc/proc_net.c 2010-10-23 19:59:20.000000000 -0400 33688+++ linux-2.6.35.7/fs/proc/proc_net.c 2010-09-17 20:12:37.000000000 -0400
34981@@ -104,6 +104,17 @@ static struct net *get_proc_task_net(str 33689@@ -105,6 +105,17 @@ static struct net *get_proc_task_net(str
34982 struct task_struct *task; 33690 struct task_struct *task;
34983 struct nsproxy *ns; 33691 struct nsproxy *ns;
34984 struct net *net = NULL; 33692 struct net *net = NULL;
@@ -34996,9 +33704,9 @@ diff -urNp linux-2.6.32.24/fs/proc/proc_net.c linux-2.6.32.24/fs/proc/proc_net.c
34996 33704
34997 rcu_read_lock(); 33705 rcu_read_lock();
34998 task = pid_task(proc_pid(dir), PIDTYPE_PID); 33706 task = pid_task(proc_pid(dir), PIDTYPE_PID);
34999diff -urNp linux-2.6.32.24/fs/proc/proc_sysctl.c linux-2.6.32.24/fs/proc/proc_sysctl.c 33707diff -urNp linux-2.6.35.7/fs/proc/proc_sysctl.c linux-2.6.35.7/fs/proc/proc_sysctl.c
35000--- linux-2.6.32.24/fs/proc/proc_sysctl.c 2010-08-13 16:24:37.000000000 -0400 33708--- linux-2.6.35.7/fs/proc/proc_sysctl.c 2010-08-26 19:47:12.000000000 -0400
35001+++ linux-2.6.32.24/fs/proc/proc_sysctl.c 2010-10-23 19:59:20.000000000 -0400 33709+++ linux-2.6.35.7/fs/proc/proc_sysctl.c 2010-09-17 20:12:37.000000000 -0400
35002@@ -7,6 +7,8 @@ 33710@@ -7,6 +7,8 @@
35003 #include <linux/security.h> 33711 #include <linux/security.h>
35004 #include "internal.h" 33712 #include "internal.h"
@@ -35038,10 +33746,10 @@ diff -urNp linux-2.6.32.24/fs/proc/proc_sysctl.c linux-2.6.32.24/fs/proc/proc_sy
35038 generic_fillattr(inode, stat); 33746 generic_fillattr(inode, stat);
35039 if (table) 33747 if (table)
35040 stat->mode = (stat->mode & S_IFMT) | table->mode; 33748 stat->mode = (stat->mode & S_IFMT) | table->mode;
35041diff -urNp linux-2.6.32.24/fs/proc/root.c linux-2.6.32.24/fs/proc/root.c 33749diff -urNp linux-2.6.35.7/fs/proc/root.c linux-2.6.35.7/fs/proc/root.c
35042--- linux-2.6.32.24/fs/proc/root.c 2010-08-13 16:24:37.000000000 -0400 33750--- linux-2.6.35.7/fs/proc/root.c 2010-08-26 19:47:12.000000000 -0400
35043+++ linux-2.6.32.24/fs/proc/root.c 2010-10-23 19:59:20.000000000 -0400 33751+++ linux-2.6.35.7/fs/proc/root.c 2010-09-17 20:12:37.000000000 -0400
35044@@ -134,7 +134,15 @@ void __init proc_root_init(void) 33752@@ -133,7 +133,15 @@ void __init proc_root_init(void)
35045 #ifdef CONFIG_PROC_DEVICETREE 33753 #ifdef CONFIG_PROC_DEVICETREE
35046 proc_device_tree_init(); 33754 proc_device_tree_init();
35047 #endif 33755 #endif
@@ -35057,16 +33765,16 @@ diff -urNp linux-2.6.32.24/fs/proc/root.c linux-2.6.32.24/fs/proc/root.c
35057 proc_sys_init(); 33765 proc_sys_init();
35058 } 33766 }
35059 33767
35060diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c 33768diff -urNp linux-2.6.35.7/fs/proc/task_mmu.c linux-2.6.35.7/fs/proc/task_mmu.c
35061--- linux-2.6.32.24/fs/proc/task_mmu.c 2010-08-29 21:08:16.000000000 -0400 33769--- linux-2.6.35.7/fs/proc/task_mmu.c 2010-08-26 19:47:12.000000000 -0400
35062+++ linux-2.6.32.24/fs/proc/task_mmu.c 2010-10-23 19:59:20.000000000 -0400 33770+++ linux-2.6.35.7/fs/proc/task_mmu.c 2010-09-17 20:12:37.000000000 -0400
35063@@ -46,15 +46,26 @@ void task_mem(struct seq_file *m, struct 33771@@ -49,8 +49,13 @@ void task_mem(struct seq_file *m, struct
35064 "VmStk:\t%8lu kB\n"
35065 "VmExe:\t%8lu kB\n" 33772 "VmExe:\t%8lu kB\n"
35066 "VmLib:\t%8lu kB\n" 33773 "VmLib:\t%8lu kB\n"
35067- "VmPTE:\t%8lu kB\n", 33774 "VmPTE:\t%8lu kB\n"
33775- "VmSwap:\t%8lu kB\n",
35068- hiwater_vm << (PAGE_SHIFT-10), 33776- hiwater_vm << (PAGE_SHIFT-10),
35069+ "VmPTE:\t%8lu kB\n" 33777+ "VmSwap:\t%8lu kB\n"
35070+ 33778+
35071+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT 33779+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
35072+ "CsBase:\t%8lx\nCsLim:\t%8lx\n" 33780+ "CsBase:\t%8lx\nCsLim:\t%8lx\n"
@@ -35076,11 +33784,12 @@ diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c
35076 (total_vm - mm->reserved_vm) << (PAGE_SHIFT-10), 33784 (total_vm - mm->reserved_vm) << (PAGE_SHIFT-10),
35077 mm->locked_vm << (PAGE_SHIFT-10), 33785 mm->locked_vm << (PAGE_SHIFT-10),
35078 hiwater_rss << (PAGE_SHIFT-10), 33786 hiwater_rss << (PAGE_SHIFT-10),
35079 total_rss << (PAGE_SHIFT-10), 33787@@ -58,7 +63,13 @@ void task_mem(struct seq_file *m, struct
35080 data << (PAGE_SHIFT-10), 33788 data << (PAGE_SHIFT-10),
35081 mm->stack_vm << (PAGE_SHIFT-10), text, lib, 33789 mm->stack_vm << (PAGE_SHIFT-10), text, lib,
35082- (PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10); 33790 (PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10,
35083+ (PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10 33791- swap << (PAGE_SHIFT-10));
33792+ swap << (PAGE_SHIFT-10)
35084+ 33793+
35085+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT 33794+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
35086+ , mm->context.user_cs_base, mm->context.user_cs_limit 33795+ , mm->context.user_cs_base, mm->context.user_cs_limit
@@ -35090,7 +33799,7 @@ diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c
35090 } 33799 }
35091 33800
35092 unsigned long task_vsize(struct mm_struct *mm) 33801 unsigned long task_vsize(struct mm_struct *mm)
35093@@ -199,6 +210,12 @@ static int do_maps_open(struct inode *in 33802@@ -203,6 +214,12 @@ static int do_maps_open(struct inode *in
35094 return ret; 33803 return ret;
35095 } 33804 }
35096 33805
@@ -35103,7 +33812,7 @@ diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c
35103 static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma) 33812 static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
35104 { 33813 {
35105 struct mm_struct *mm = vma->vm_mm; 33814 struct mm_struct *mm = vma->vm_mm;
35106@@ -206,7 +223,6 @@ static void show_map_vma(struct seq_file 33815@@ -210,7 +227,6 @@ static void show_map_vma(struct seq_file
35107 int flags = vma->vm_flags; 33816 int flags = vma->vm_flags;
35108 unsigned long ino = 0; 33817 unsigned long ino = 0;
35109 unsigned long long pgoff = 0; 33818 unsigned long long pgoff = 0;
@@ -35111,7 +33820,7 @@ diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c
35111 dev_t dev = 0; 33820 dev_t dev = 0;
35112 int len; 33821 int len;
35113 33822
35114@@ -217,19 +233,23 @@ static void show_map_vma(struct seq_file 33823@@ -221,19 +237,24 @@ static void show_map_vma(struct seq_file
35115 pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; 33824 pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
35116 } 33825 }
35117 33826
@@ -35119,7 +33828,7 @@ diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c
35119- start = vma->vm_start; 33828- start = vma->vm_start;
35120- if (vma->vm_flags & VM_GROWSDOWN) 33829- if (vma->vm_flags & VM_GROWSDOWN)
35121- start += PAGE_SIZE; 33830- start += PAGE_SIZE;
35122- 33831
35123 seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n", 33832 seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
35124- start, 33833- start,
35125+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP 33834+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
@@ -35141,7 +33850,7 @@ diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c
35141 MAJOR(dev), MINOR(dev), ino, &len); 33850 MAJOR(dev), MINOR(dev), ino, &len);
35142 33851
35143 /* 33852 /*
35144@@ -238,16 +258,16 @@ static void show_map_vma(struct seq_file 33853@@ -242,16 +263,16 @@ static void show_map_vma(struct seq_file
35145 */ 33854 */
35146 if (file) { 33855 if (file) {
35147 pad_len_spaces(m, len); 33856 pad_len_spaces(m, len);
@@ -35163,27 +33872,29 @@ diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c
35163 name = "[stack]"; 33872 name = "[stack]";
35164 } 33873 }
35165 } else { 33874 } else {
35166@@ -390,9 +410,16 @@ static int show_smap(struct seq_file *m, 33875@@ -393,11 +414,16 @@ static int show_smap(struct seq_file *m,
35167 }; 33876 };
35168 33877
35169 memset(&mss, 0, sizeof mss); 33878 memset(&mss, 0, sizeof mss);
35170- mss.vma = vma; 33879- mss.vma = vma;
33880- /* mmap_sem is held in m_start */
35171- if (vma->vm_mm && !is_vm_hugetlb_page(vma)) 33881- if (vma->vm_mm && !is_vm_hugetlb_page(vma))
35172- walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk); 33882- walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk);
35173+ 33883-
35174+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP 33884+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
35175+ if (!PAX_RAND_FLAGS(vma->vm_mm)) { 33885+ if (!PAX_RAND_FLAGS(vma->vm_mm)) {
35176+#endif 33886+#endif
35177+ mss.vma = vma; 33887+ mss.vma = vma;
33888+ /* mmap_sem is held in m_start */
35178+ if (vma->vm_mm && !is_vm_hugetlb_page(vma)) 33889+ if (vma->vm_mm && !is_vm_hugetlb_page(vma))
35179+ walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk); 33890+ walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk);
35180+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP 33891+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
35181+ } 33892+ }
35182+#endif 33893+#endif
35183
35184 show_map_vma(m, vma); 33894 show_map_vma(m, vma);
35185 33895
35186@@ -408,7 +435,11 @@ static int show_smap(struct seq_file *m, 33896 seq_printf(m,
33897@@ -412,7 +438,11 @@ static int show_smap(struct seq_file *m,
35187 "Swap: %8lu kB\n" 33898 "Swap: %8lu kB\n"
35188 "KernelPageSize: %8lu kB\n" 33899 "KernelPageSize: %8lu kB\n"
35189 "MMUPageSize: %8lu kB\n", 33900 "MMUPageSize: %8lu kB\n",
@@ -35195,10 +33906,10 @@ diff -urNp linux-2.6.32.24/fs/proc/task_mmu.c linux-2.6.32.24/fs/proc/task_mmu.c
35195 mss.resident >> 10, 33906 mss.resident >> 10,
35196 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)), 33907 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
35197 mss.shared_clean >> 10, 33908 mss.shared_clean >> 10,
35198diff -urNp linux-2.6.32.24/fs/proc/task_nommu.c linux-2.6.32.24/fs/proc/task_nommu.c 33909diff -urNp linux-2.6.35.7/fs/proc/task_nommu.c linux-2.6.35.7/fs/proc/task_nommu.c
35199--- linux-2.6.32.24/fs/proc/task_nommu.c 2010-08-13 16:24:37.000000000 -0400 33910--- linux-2.6.35.7/fs/proc/task_nommu.c 2010-08-26 19:47:12.000000000 -0400
35200+++ linux-2.6.32.24/fs/proc/task_nommu.c 2010-10-23 19:59:20.000000000 -0400 33911+++ linux-2.6.35.7/fs/proc/task_nommu.c 2010-09-17 20:12:09.000000000 -0400
35201@@ -50,7 +50,7 @@ void task_mem(struct seq_file *m, struct 33912@@ -51,7 +51,7 @@ void task_mem(struct seq_file *m, struct
35202 else 33913 else
35203 bytes += kobjsize(mm); 33914 bytes += kobjsize(mm);
35204 33915
@@ -35207,18 +33918,18 @@ diff -urNp linux-2.6.32.24/fs/proc/task_nommu.c linux-2.6.32.24/fs/proc/task_nom
35207 sbytes += kobjsize(current->fs); 33918 sbytes += kobjsize(current->fs);
35208 else 33919 else
35209 bytes += kobjsize(current->fs); 33920 bytes += kobjsize(current->fs);
35210@@ -154,7 +154,7 @@ static int nommu_vma_show(struct seq_fil 33921@@ -165,7 +165,7 @@ static int nommu_vma_show(struct seq_fil
35211 if (len < 1) 33922
35212 len = 1; 33923 if (file) {
35213 seq_printf(m, "%*c", len, ' '); 33924 pad_len_spaces(m, len);
35214- seq_path(m, &file->f_path, ""); 33925- seq_path(m, &file->f_path, "");
35215+ seq_path(m, &file->f_path, "\n\\"); 33926+ seq_path(m, &file->f_path, "\n\\");
35216 } 33927 } else if (mm) {
35217 33928 if (vma->vm_start <= mm->start_stack &&
35218 seq_putc(m, '\n'); 33929 vma->vm_end >= mm->start_stack) {
35219diff -urNp linux-2.6.32.24/fs/readdir.c linux-2.6.32.24/fs/readdir.c 33930diff -urNp linux-2.6.35.7/fs/readdir.c linux-2.6.35.7/fs/readdir.c
35220--- linux-2.6.32.24/fs/readdir.c 2010-08-13 16:24:37.000000000 -0400 33931--- linux-2.6.35.7/fs/readdir.c 2010-08-26 19:47:12.000000000 -0400
35221+++ linux-2.6.32.24/fs/readdir.c 2010-10-23 19:59:20.000000000 -0400 33932+++ linux-2.6.35.7/fs/readdir.c 2010-09-17 20:12:37.000000000 -0400
35222@@ -16,6 +16,7 @@ 33933@@ -16,6 +16,7 @@
35223 #include <linux/security.h> 33934 #include <linux/security.h>
35224 #include <linux/syscalls.h> 33935 #include <linux/syscalls.h>
@@ -35308,10 +34019,10 @@ diff -urNp linux-2.6.32.24/fs/readdir.c linux-2.6.32.24/fs/readdir.c
35308 buf.count = count; 34019 buf.count = count;
35309 buf.error = 0; 34020 buf.error = 0;
35310 34021
35311diff -urNp linux-2.6.32.24/fs/reiserfs/do_balan.c linux-2.6.32.24/fs/reiserfs/do_balan.c 34022diff -urNp linux-2.6.35.7/fs/reiserfs/do_balan.c linux-2.6.35.7/fs/reiserfs/do_balan.c
35312--- linux-2.6.32.24/fs/reiserfs/do_balan.c 2010-08-13 16:24:37.000000000 -0400 34023--- linux-2.6.35.7/fs/reiserfs/do_balan.c 2010-08-26 19:47:12.000000000 -0400
35313+++ linux-2.6.32.24/fs/reiserfs/do_balan.c 2010-10-23 19:59:20.000000000 -0400 34024+++ linux-2.6.35.7/fs/reiserfs/do_balan.c 2010-09-17 20:12:09.000000000 -0400
35314@@ -2058,7 +2058,7 @@ void do_balance(struct tree_balance *tb, 34025@@ -2051,7 +2051,7 @@ void do_balance(struct tree_balance *tb,
35315 return; 34026 return;
35316 } 34027 }
35317 34028
@@ -35320,9 +34031,9 @@ diff -urNp linux-2.6.32.24/fs/reiserfs/do_balan.c linux-2.6.32.24/fs/reiserfs/do
35320 do_balance_starts(tb); 34031 do_balance_starts(tb);
35321 34032
35322 /* balance leaf returns 0 except if combining L R and S into 34033 /* balance leaf returns 0 except if combining L R and S into
35323diff -urNp linux-2.6.32.24/fs/reiserfs/item_ops.c linux-2.6.32.24/fs/reiserfs/item_ops.c 34034diff -urNp linux-2.6.35.7/fs/reiserfs/item_ops.c linux-2.6.35.7/fs/reiserfs/item_ops.c
35324--- linux-2.6.32.24/fs/reiserfs/item_ops.c 2010-08-13 16:24:37.000000000 -0400 34035--- linux-2.6.35.7/fs/reiserfs/item_ops.c 2010-08-26 19:47:12.000000000 -0400
35325+++ linux-2.6.32.24/fs/reiserfs/item_ops.c 2010-10-23 19:59:20.000000000 -0400 34036+++ linux-2.6.35.7/fs/reiserfs/item_ops.c 2010-09-17 20:12:09.000000000 -0400
35326@@ -102,7 +102,7 @@ static void sd_print_vi(struct virtual_i 34037@@ -102,7 +102,7 @@ static void sd_print_vi(struct virtual_i
35327 vi->vi_index, vi->vi_type, vi->vi_ih); 34038 vi->vi_index, vi->vi_type, vi->vi_ih);
35328 } 34039 }
@@ -35377,10 +34088,10 @@ diff -urNp linux-2.6.32.24/fs/reiserfs/item_ops.c linux-2.6.32.24/fs/reiserfs/it
35377 &stat_data_ops, 34088 &stat_data_ops,
35378 &indirect_ops, 34089 &indirect_ops,
35379 &direct_ops, 34090 &direct_ops,
35380diff -urNp linux-2.6.32.24/fs/reiserfs/procfs.c linux-2.6.32.24/fs/reiserfs/procfs.c 34091diff -urNp linux-2.6.35.7/fs/reiserfs/procfs.c linux-2.6.35.7/fs/reiserfs/procfs.c
35381--- linux-2.6.32.24/fs/reiserfs/procfs.c 2010-08-13 16:24:37.000000000 -0400 34092--- linux-2.6.35.7/fs/reiserfs/procfs.c 2010-08-26 19:47:12.000000000 -0400
35382+++ linux-2.6.32.24/fs/reiserfs/procfs.c 2010-10-23 19:59:20.000000000 -0400 34093+++ linux-2.6.35.7/fs/reiserfs/procfs.c 2010-09-17 20:12:09.000000000 -0400
35383@@ -123,7 +123,7 @@ static int show_super(struct seq_file *m 34094@@ -113,7 +113,7 @@ static int show_super(struct seq_file *m
35384 "SMALL_TAILS " : "NO_TAILS ", 34095 "SMALL_TAILS " : "NO_TAILS ",
35385 replay_only(sb) ? "REPLAY_ONLY " : "", 34096 replay_only(sb) ? "REPLAY_ONLY " : "",
35386 convert_reiserfs(sb) ? "CONV " : "", 34097 convert_reiserfs(sb) ? "CONV " : "",
@@ -35389,9 +34100,9 @@ diff -urNp linux-2.6.32.24/fs/reiserfs/procfs.c linux-2.6.32.24/fs/reiserfs/proc
35389 SF(s_disk_reads), SF(s_disk_writes), SF(s_fix_nodes), 34100 SF(s_disk_reads), SF(s_disk_writes), SF(s_fix_nodes),
35390 SF(s_do_balance), SF(s_unneeded_left_neighbor), 34101 SF(s_do_balance), SF(s_unneeded_left_neighbor),
35391 SF(s_good_search_by_key_reada), SF(s_bmaps), 34102 SF(s_good_search_by_key_reada), SF(s_bmaps),
35392diff -urNp linux-2.6.32.24/fs/select.c linux-2.6.32.24/fs/select.c 34103diff -urNp linux-2.6.35.7/fs/select.c linux-2.6.35.7/fs/select.c
35393--- linux-2.6.32.24/fs/select.c 2010-08-13 16:24:37.000000000 -0400 34104--- linux-2.6.35.7/fs/select.c 2010-08-26 19:47:12.000000000 -0400
35394+++ linux-2.6.32.24/fs/select.c 2010-10-23 19:59:20.000000000 -0400 34105+++ linux-2.6.35.7/fs/select.c 2010-09-17 20:12:37.000000000 -0400
35395@@ -20,6 +20,7 @@ 34106@@ -20,6 +20,7 @@
35396 #include <linux/module.h> 34107 #include <linux/module.h>
35397 #include <linux/slab.h> 34108 #include <linux/slab.h>
@@ -35400,17 +34111,17 @@ diff -urNp linux-2.6.32.24/fs/select.c linux-2.6.32.24/fs/select.c
35400 #include <linux/personality.h> /* for STICKY_TIMEOUTS */ 34111 #include <linux/personality.h> /* for STICKY_TIMEOUTS */
35401 #include <linux/file.h> 34112 #include <linux/file.h>
35402 #include <linux/fdtable.h> 34113 #include <linux/fdtable.h>
35403@@ -821,6 +822,7 @@ int do_sys_poll(struct pollfd __user *uf 34114@@ -838,6 +839,7 @@ int do_sys_poll(struct pollfd __user *uf
35404 struct poll_list *walk = head; 34115 struct poll_list *walk = head;
35405 unsigned long todo = nfds; 34116 unsigned long todo = nfds;
35406 34117
35407+ gr_learn_resource(current, RLIMIT_NOFILE, nfds, 1); 34118+ gr_learn_resource(current, RLIMIT_NOFILE, nfds, 1);
35408 if (nfds > current->signal->rlim[RLIMIT_NOFILE].rlim_cur) 34119 if (nfds > rlimit(RLIMIT_NOFILE))
35409 return -EINVAL; 34120 return -EINVAL;
35410 34121
35411diff -urNp linux-2.6.32.24/fs/seq_file.c linux-2.6.32.24/fs/seq_file.c 34122diff -urNp linux-2.6.35.7/fs/seq_file.c linux-2.6.35.7/fs/seq_file.c
35412--- linux-2.6.32.24/fs/seq_file.c 2010-08-13 16:24:37.000000000 -0400 34123--- linux-2.6.35.7/fs/seq_file.c 2010-08-26 19:47:12.000000000 -0400
35413+++ linux-2.6.32.24/fs/seq_file.c 2010-10-23 19:59:20.000000000 -0400 34124+++ linux-2.6.35.7/fs/seq_file.c 2010-09-17 20:12:09.000000000 -0400
35414@@ -76,7 +76,8 @@ static int traverse(struct seq_file *m, 34125@@ -76,7 +76,8 @@ static int traverse(struct seq_file *m,
35415 return 0; 34126 return 0;
35416 } 34127 }
@@ -35451,9 +34162,9 @@ diff -urNp linux-2.6.32.24/fs/seq_file.c linux-2.6.32.24/fs/seq_file.c
35451 if (!m->buf) 34162 if (!m->buf)
35452 goto Enomem; 34163 goto Enomem;
35453 m->count = 0; 34164 m->count = 0;
35454diff -urNp linux-2.6.32.24/fs/smbfs/symlink.c linux-2.6.32.24/fs/smbfs/symlink.c 34165diff -urNp linux-2.6.35.7/fs/smbfs/symlink.c linux-2.6.35.7/fs/smbfs/symlink.c
35455--- linux-2.6.32.24/fs/smbfs/symlink.c 2010-08-13 16:24:37.000000000 -0400 34166--- linux-2.6.35.7/fs/smbfs/symlink.c 2010-08-26 19:47:12.000000000 -0400
35456+++ linux-2.6.32.24/fs/smbfs/symlink.c 2010-10-23 19:59:20.000000000 -0400 34167+++ linux-2.6.35.7/fs/smbfs/symlink.c 2010-09-17 20:12:09.000000000 -0400
35457@@ -55,7 +55,7 @@ static void *smb_follow_link(struct dent 34168@@ -55,7 +55,7 @@ static void *smb_follow_link(struct dent
35458 34169
35459 static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p) 34170 static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
@@ -35463,10 +34174,10 @@ diff -urNp linux-2.6.32.24/fs/smbfs/symlink.c linux-2.6.32.24/fs/smbfs/symlink.c
35463 if (!IS_ERR(s)) 34174 if (!IS_ERR(s))
35464 __putname(s); 34175 __putname(s);
35465 } 34176 }
35466diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c 34177diff -urNp linux-2.6.35.7/fs/splice.c linux-2.6.35.7/fs/splice.c
35467--- linux-2.6.32.24/fs/splice.c 2010-08-13 16:24:37.000000000 -0400 34178--- linux-2.6.35.7/fs/splice.c 2010-08-26 19:47:12.000000000 -0400
35468+++ linux-2.6.32.24/fs/splice.c 2010-10-23 19:59:20.000000000 -0400 34179+++ linux-2.6.35.7/fs/splice.c 2010-09-17 20:12:09.000000000 -0400
35469@@ -185,7 +185,7 @@ ssize_t splice_to_pipe(struct pipe_inode 34180@@ -186,7 +186,7 @@ ssize_t splice_to_pipe(struct pipe_inode
35470 pipe_lock(pipe); 34181 pipe_lock(pipe);
35471 34182
35472 for (;;) { 34183 for (;;) {
@@ -35475,7 +34186,7 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35475 send_sig(SIGPIPE, current, 0); 34186 send_sig(SIGPIPE, current, 0);
35476 if (!ret) 34187 if (!ret)
35477 ret = -EPIPE; 34188 ret = -EPIPE;
35478@@ -239,9 +239,9 @@ ssize_t splice_to_pipe(struct pipe_inode 34189@@ -240,9 +240,9 @@ ssize_t splice_to_pipe(struct pipe_inode
35479 do_wakeup = 0; 34190 do_wakeup = 0;
35480 } 34191 }
35481 34192
@@ -35487,7 +34198,7 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35487 } 34198 }
35488 34199
35489 pipe_unlock(pipe); 34200 pipe_unlock(pipe);
35490@@ -521,7 +521,7 @@ static ssize_t kernel_readv(struct file 34201@@ -566,7 +566,7 @@ static ssize_t kernel_readv(struct file
35491 old_fs = get_fs(); 34202 old_fs = get_fs();
35492 set_fs(get_ds()); 34203 set_fs(get_ds());
35493 /* The cast to a user pointer is valid due to the set_fs() */ 34204 /* The cast to a user pointer is valid due to the set_fs() */
@@ -35496,7 +34207,7 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35496 set_fs(old_fs); 34207 set_fs(old_fs);
35497 34208
35498 return res; 34209 return res;
35499@@ -536,7 +536,7 @@ static ssize_t kernel_write(struct file 34210@@ -581,7 +581,7 @@ static ssize_t kernel_write(struct file
35500 old_fs = get_fs(); 34211 old_fs = get_fs();
35501 set_fs(get_ds()); 34212 set_fs(get_ds());
35502 /* The cast to a user pointer is valid due to the set_fs() */ 34213 /* The cast to a user pointer is valid due to the set_fs() */
@@ -35505,16 +34216,16 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35505 set_fs(old_fs); 34216 set_fs(old_fs);
35506 34217
35507 return res; 34218 return res;
35508@@ -578,7 +578,7 @@ ssize_t default_file_splice_read(struct 34219@@ -634,7 +634,7 @@ ssize_t default_file_splice_read(struct
35509 goto err; 34220 goto err;
35510 34221
35511 this_len = min_t(size_t, len, PAGE_CACHE_SIZE - offset); 34222 this_len = min_t(size_t, len, PAGE_CACHE_SIZE - offset);
35512- vec[i].iov_base = (void __user *) page_address(page); 34223- vec[i].iov_base = (void __user *) page_address(page);
35513+ vec[i].iov_base = (__force void __user *) page_address(page); 34224+ vec[i].iov_base = (__force void __user *) page_address(page);
35514 vec[i].iov_len = this_len; 34225 vec[i].iov_len = this_len;
35515 pages[i] = page; 34226 spd.pages[i] = page;
35516 spd.nr_pages++; 34227 spd.nr_pages++;
35517@@ -798,10 +798,10 @@ EXPORT_SYMBOL(splice_from_pipe_feed); 34228@@ -861,10 +861,10 @@ EXPORT_SYMBOL(splice_from_pipe_feed);
35518 int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd) 34229 int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd)
35519 { 34230 {
35520 while (!pipe->nrbufs) { 34231 while (!pipe->nrbufs) {
@@ -35527,7 +34238,7 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35527 return 0; 34238 return 0;
35528 34239
35529 if (sd->flags & SPLICE_F_NONBLOCK) 34240 if (sd->flags & SPLICE_F_NONBLOCK)
35530@@ -1136,7 +1136,7 @@ ssize_t splice_direct_to_actor(struct fi 34241@@ -1201,7 +1201,7 @@ ssize_t splice_direct_to_actor(struct fi
35531 * out of the pipe right after the splice_to_pipe(). So set 34242 * out of the pipe right after the splice_to_pipe(). So set
35532 * PIPE_READERS appropriately. 34243 * PIPE_READERS appropriately.
35533 */ 34244 */
@@ -35536,7 +34247,7 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35536 34247
35537 current->splice_pipe = pipe; 34248 current->splice_pipe = pipe;
35538 } 34249 }
35539@@ -1694,9 +1694,9 @@ static int ipipe_prep(struct pipe_inode_ 34250@@ -1769,9 +1769,9 @@ static int ipipe_prep(struct pipe_inode_
35540 ret = -ERESTARTSYS; 34251 ret = -ERESTARTSYS;
35541 break; 34252 break;
35542 } 34253 }
@@ -35548,16 +34259,16 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35548 if (flags & SPLICE_F_NONBLOCK) { 34259 if (flags & SPLICE_F_NONBLOCK) {
35549 ret = -EAGAIN; 34260 ret = -EAGAIN;
35550 break; 34261 break;
35551@@ -1728,7 +1728,7 @@ static int opipe_prep(struct pipe_inode_ 34262@@ -1803,7 +1803,7 @@ static int opipe_prep(struct pipe_inode_
35552 pipe_lock(pipe); 34263 pipe_lock(pipe);
35553 34264
35554 while (pipe->nrbufs >= PIPE_BUFFERS) { 34265 while (pipe->nrbufs >= pipe->buffers) {
35555- if (!pipe->readers) { 34266- if (!pipe->readers) {
35556+ if (!atomic_read(&pipe->readers)) { 34267+ if (!atomic_read(&pipe->readers)) {
35557 send_sig(SIGPIPE, current, 0); 34268 send_sig(SIGPIPE, current, 0);
35558 ret = -EPIPE; 34269 ret = -EPIPE;
35559 break; 34270 break;
35560@@ -1741,9 +1741,9 @@ static int opipe_prep(struct pipe_inode_ 34271@@ -1816,9 +1816,9 @@ static int opipe_prep(struct pipe_inode_
35561 ret = -ERESTARTSYS; 34272 ret = -ERESTARTSYS;
35562 break; 34273 break;
35563 } 34274 }
@@ -35569,7 +34280,7 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35569 } 34280 }
35570 34281
35571 pipe_unlock(pipe); 34282 pipe_unlock(pipe);
35572@@ -1779,14 +1779,14 @@ retry: 34283@@ -1854,14 +1854,14 @@ retry:
35573 pipe_double_lock(ipipe, opipe); 34284 pipe_double_lock(ipipe, opipe);
35574 34285
35575 do { 34286 do {
@@ -35586,7 +34297,7 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35586 break; 34297 break;
35587 34298
35588 /* 34299 /*
35589@@ -1886,7 +1886,7 @@ static int link_pipe(struct pipe_inode_i 34300@@ -1961,7 +1961,7 @@ static int link_pipe(struct pipe_inode_i
35590 pipe_double_lock(ipipe, opipe); 34301 pipe_double_lock(ipipe, opipe);
35591 34302
35592 do { 34303 do {
@@ -35595,7 +34306,7 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35595 send_sig(SIGPIPE, current, 0); 34306 send_sig(SIGPIPE, current, 0);
35596 if (!ret) 34307 if (!ret)
35597 ret = -EPIPE; 34308 ret = -EPIPE;
35598@@ -1931,7 +1931,7 @@ static int link_pipe(struct pipe_inode_i 34309@@ -2006,7 +2006,7 @@ static int link_pipe(struct pipe_inode_i
35599 * return EAGAIN if we have the potential of some data in the 34310 * return EAGAIN if we have the potential of some data in the
35600 * future, otherwise just return 0 34311 * future, otherwise just return 0
35601 */ 34312 */
@@ -35604,49 +34315,10 @@ diff -urNp linux-2.6.32.24/fs/splice.c linux-2.6.32.24/fs/splice.c
35604 ret = -EAGAIN; 34315 ret = -EAGAIN;
35605 34316
35606 pipe_unlock(ipipe); 34317 pipe_unlock(ipipe);
35607diff -urNp linux-2.6.32.24/fs/sysfs/file.c linux-2.6.32.24/fs/sysfs/file.c 34318diff -urNp linux-2.6.35.7/fs/sysfs/symlink.c linux-2.6.35.7/fs/sysfs/symlink.c
35608--- linux-2.6.32.24/fs/sysfs/file.c 2010-09-20 17:26:42.000000000 -0400 34319--- linux-2.6.35.7/fs/sysfs/symlink.c 2010-08-26 19:47:12.000000000 -0400
35609+++ linux-2.6.32.24/fs/sysfs/file.c 2010-10-23 19:59:20.000000000 -0400 34320+++ linux-2.6.35.7/fs/sysfs/symlink.c 2010-09-17 20:12:09.000000000 -0400
35610@@ -53,7 +53,7 @@ struct sysfs_buffer { 34321@@ -286,7 +286,7 @@ static void *sysfs_follow_link(struct de
35611 size_t count;
35612 loff_t pos;
35613 char * page;
35614- struct sysfs_ops * ops;
35615+ const struct sysfs_ops * ops;
35616 struct mutex mutex;
35617 int needs_read_fill;
35618 int event;
35619@@ -75,7 +75,7 @@ static int fill_read_buffer(struct dentr
35620 {
35621 struct sysfs_dirent *attr_sd = dentry->d_fsdata;
35622 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
35623- struct sysfs_ops * ops = buffer->ops;
35624+ const struct sysfs_ops * ops = buffer->ops;
35625 int ret = 0;
35626 ssize_t count;
35627
35628@@ -199,7 +199,7 @@ flush_write_buffer(struct dentry * dentr
35629 {
35630 struct sysfs_dirent *attr_sd = dentry->d_fsdata;
35631 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
35632- struct sysfs_ops * ops = buffer->ops;
35633+ const struct sysfs_ops * ops = buffer->ops;
35634 int rc;
35635
35636 /* need attr_sd for attr and ops, its parent for kobj */
35637@@ -335,7 +335,7 @@ static int sysfs_open_file(struct inode
35638 struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata;
35639 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
35640 struct sysfs_buffer *buffer;
35641- struct sysfs_ops *ops;
35642+ const struct sysfs_ops *ops;
35643 int error = -EACCES;
35644 char *p;
35645
35646diff -urNp linux-2.6.32.24/fs/sysfs/symlink.c linux-2.6.32.24/fs/sysfs/symlink.c
35647--- linux-2.6.32.24/fs/sysfs/symlink.c 2010-08-13 16:24:37.000000000 -0400
35648+++ linux-2.6.32.24/fs/sysfs/symlink.c 2010-10-23 19:59:20.000000000 -0400
35649@@ -204,7 +204,7 @@ static void *sysfs_follow_link(struct de
35650 34322
35651 static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) 34323 static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
35652 { 34324 {
@@ -35655,34 +34327,9 @@ diff -urNp linux-2.6.32.24/fs/sysfs/symlink.c linux-2.6.32.24/fs/sysfs/symlink.c
35655 if (!IS_ERR(page)) 34327 if (!IS_ERR(page))
35656 free_page((unsigned long)page); 34328 free_page((unsigned long)page);
35657 } 34329 }
35658diff -urNp linux-2.6.32.24/fs/udf/balloc.c linux-2.6.32.24/fs/udf/balloc.c 34330diff -urNp linux-2.6.35.7/fs/udf/misc.c linux-2.6.35.7/fs/udf/misc.c
35659--- linux-2.6.32.24/fs/udf/balloc.c 2010-08-13 16:24:37.000000000 -0400 34331--- linux-2.6.35.7/fs/udf/misc.c 2010-08-26 19:47:12.000000000 -0400
35660+++ linux-2.6.32.24/fs/udf/balloc.c 2010-10-23 19:59:20.000000000 -0400 34332+++ linux-2.6.35.7/fs/udf/misc.c 2010-09-17 20:12:09.000000000 -0400
35661@@ -172,9 +172,7 @@ static void udf_bitmap_free_blocks(struc
35662
35663 mutex_lock(&sbi->s_alloc_mutex);
35664 partmap = &sbi->s_partmaps[bloc->partitionReferenceNum];
35665- if (bloc->logicalBlockNum < 0 ||
35666- (bloc->logicalBlockNum + count) >
35667- partmap->s_partition_len) {
35668+ if ((bloc->logicalBlockNum + count) > partmap->s_partition_len) {
35669 udf_debug("%d < %d || %d + %d > %d\n",
35670 bloc->logicalBlockNum, 0, bloc->logicalBlockNum,
35671 count, partmap->s_partition_len);
35672@@ -436,9 +434,7 @@ static void udf_table_free_blocks(struct
35673
35674 mutex_lock(&sbi->s_alloc_mutex);
35675 partmap = &sbi->s_partmaps[bloc->partitionReferenceNum];
35676- if (bloc->logicalBlockNum < 0 ||
35677- (bloc->logicalBlockNum + count) >
35678- partmap->s_partition_len) {
35679+ if ((bloc->logicalBlockNum + count) > partmap->s_partition_len) {
35680 udf_debug("%d < %d || %d + %d > %d\n",
35681 bloc.logicalBlockNum, 0, bloc.logicalBlockNum, count,
35682 partmap->s_partition_len);
35683diff -urNp linux-2.6.32.24/fs/udf/misc.c linux-2.6.32.24/fs/udf/misc.c
35684--- linux-2.6.32.24/fs/udf/misc.c 2010-08-13 16:24:37.000000000 -0400
35685+++ linux-2.6.32.24/fs/udf/misc.c 2010-10-23 19:59:20.000000000 -0400
35686@@ -142,8 +142,8 @@ struct genericFormat *udf_add_extendedat 34333@@ -142,8 +142,8 @@ struct genericFormat *udf_add_extendedat
35687 iinfo->i_lenEAttr += size; 34334 iinfo->i_lenEAttr += size;
35688 return (struct genericFormat *)&ea[offset]; 34335 return (struct genericFormat *)&ea[offset];
@@ -35694,9 +34341,9 @@ diff -urNp linux-2.6.32.24/fs/udf/misc.c linux-2.6.32.24/fs/udf/misc.c
35694 34341
35695 return NULL; 34342 return NULL;
35696 } 34343 }
35697diff -urNp linux-2.6.32.24/fs/udf/udfdecl.h linux-2.6.32.24/fs/udf/udfdecl.h 34344diff -urNp linux-2.6.35.7/fs/udf/udfdecl.h linux-2.6.35.7/fs/udf/udfdecl.h
35698--- linux-2.6.32.24/fs/udf/udfdecl.h 2010-08-13 16:24:37.000000000 -0400 34345--- linux-2.6.35.7/fs/udf/udfdecl.h 2010-08-26 19:47:12.000000000 -0400
35699+++ linux-2.6.32.24/fs/udf/udfdecl.h 2010-10-23 19:59:20.000000000 -0400 34346+++ linux-2.6.35.7/fs/udf/udfdecl.h 2010-09-17 20:12:09.000000000 -0400
35700@@ -26,7 +26,7 @@ do { \ 34347@@ -26,7 +26,7 @@ do { \
35701 printk(f, ##a); \ 34348 printk(f, ##a); \
35702 } while (0) 34349 } while (0)
@@ -35706,9 +34353,9 @@ diff -urNp linux-2.6.32.24/fs/udf/udfdecl.h linux-2.6.32.24/fs/udf/udfdecl.h
35706 #endif 34353 #endif
35707 34354
35708 #define udf_info(f, a...) \ 34355 #define udf_info(f, a...) \
35709diff -urNp linux-2.6.32.24/fs/utimes.c linux-2.6.32.24/fs/utimes.c 34356diff -urNp linux-2.6.35.7/fs/utimes.c linux-2.6.35.7/fs/utimes.c
35710--- linux-2.6.32.24/fs/utimes.c 2010-08-13 16:24:37.000000000 -0400 34357--- linux-2.6.35.7/fs/utimes.c 2010-08-26 19:47:12.000000000 -0400
35711+++ linux-2.6.32.24/fs/utimes.c 2010-10-23 19:59:20.000000000 -0400 34358+++ linux-2.6.35.7/fs/utimes.c 2010-09-17 20:12:37.000000000 -0400
35712@@ -1,6 +1,7 @@ 34359@@ -1,6 +1,7 @@
35713 #include <linux/compiler.h> 34360 #include <linux/compiler.h>
35714 #include <linux/file.h> 34361 #include <linux/file.h>
@@ -35730,22 +34377,22 @@ diff -urNp linux-2.6.32.24/fs/utimes.c linux-2.6.32.24/fs/utimes.c
35730 mutex_lock(&inode->i_mutex); 34377 mutex_lock(&inode->i_mutex);
35731 error = notify_change(path->dentry, &newattrs); 34378 error = notify_change(path->dentry, &newattrs);
35732 mutex_unlock(&inode->i_mutex); 34379 mutex_unlock(&inode->i_mutex);
35733diff -urNp linux-2.6.32.24/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.32.24/fs/xfs/linux-2.6/xfs_ioctl.c 34380diff -urNp linux-2.6.35.7/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.35.7/fs/xfs/linux-2.6/xfs_ioctl.c
35734--- linux-2.6.32.24/fs/xfs/linux-2.6/xfs_ioctl.c 2010-09-26 17:26:05.000000000 -0400 34381--- linux-2.6.35.7/fs/xfs/linux-2.6/xfs_ioctl.c 2010-09-26 17:32:11.000000000 -0400
35735+++ linux-2.6.32.24/fs/xfs/linux-2.6/xfs_ioctl.c 2010-10-23 19:59:20.000000000 -0400 34382+++ linux-2.6.35.7/fs/xfs/linux-2.6/xfs_ioctl.c 2010-09-26 17:32:50.000000000 -0400
35736@@ -134,7 +134,7 @@ xfs_find_handle( 34383@@ -136,7 +136,7 @@ xfs_find_handle(
35737 } 34384 }
35738 34385
35739 error = -EFAULT; 34386 error = -EFAULT;
35740- if (copy_to_user(hreq->ohandle, &handle, hsize) || 34387- if (copy_to_user(hreq->ohandle, &handle, hsize) ||
35741+ if (hsize > sizeof handle || copy_to_user(hreq->ohandle, &handle, hsize) || 34388+ if (hsize > sizeof(handle) || copy_to_user(hreq->ohandle, &handle, hsize) ||
35742 copy_to_user(hreq->ohandlen, &hsize, sizeof(__s32))) 34389 copy_to_user(hreq->ohandlen, &hsize, sizeof(__s32)))
35743 goto out_put; 34390 goto out_put;
35744 34391
35745diff -urNp linux-2.6.32.24/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.32.24/fs/xfs/linux-2.6/xfs_iops.c 34392diff -urNp linux-2.6.35.7/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.35.7/fs/xfs/linux-2.6/xfs_iops.c
35746--- linux-2.6.32.24/fs/xfs/linux-2.6/xfs_iops.c 2010-08-13 16:24:37.000000000 -0400 34393--- linux-2.6.35.7/fs/xfs/linux-2.6/xfs_iops.c 2010-08-26 19:47:12.000000000 -0400
35747+++ linux-2.6.32.24/fs/xfs/linux-2.6/xfs_iops.c 2010-10-23 19:59:20.000000000 -0400 34394+++ linux-2.6.35.7/fs/xfs/linux-2.6/xfs_iops.c 2010-09-17 20:12:09.000000000 -0400
35748@@ -468,7 +468,7 @@ xfs_vn_put_link( 34395@@ -480,7 +480,7 @@ xfs_vn_put_link(
35749 struct nameidata *nd, 34396 struct nameidata *nd,
35750 void *p) 34397 void *p)
35751 { 34398 {
@@ -35754,10 +34401,10 @@ diff -urNp linux-2.6.32.24/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.32.24/fs/xfs/li
35754 34401
35755 if (!IS_ERR(s)) 34402 if (!IS_ERR(s))
35756 kfree(s); 34403 kfree(s);
35757diff -urNp linux-2.6.32.24/fs/xfs/xfs_bmap.c linux-2.6.32.24/fs/xfs/xfs_bmap.c 34404diff -urNp linux-2.6.35.7/fs/xfs/xfs_bmap.c linux-2.6.35.7/fs/xfs/xfs_bmap.c
35758--- linux-2.6.32.24/fs/xfs/xfs_bmap.c 2010-08-13 16:24:37.000000000 -0400 34405--- linux-2.6.35.7/fs/xfs/xfs_bmap.c 2010-08-26 19:47:12.000000000 -0400
35759+++ linux-2.6.32.24/fs/xfs/xfs_bmap.c 2010-10-23 19:59:20.000000000 -0400 34406+++ linux-2.6.35.7/fs/xfs/xfs_bmap.c 2010-09-17 20:12:09.000000000 -0400
35760@@ -360,7 +360,7 @@ xfs_bmap_validate_ret( 34407@@ -296,7 +296,7 @@ xfs_bmap_validate_ret(
35761 int nmap, 34408 int nmap,
35762 int ret_nmap); 34409 int ret_nmap);
35763 #else 34410 #else
@@ -35765,10 +34412,10 @@ diff -urNp linux-2.6.32.24/fs/xfs/xfs_bmap.c linux-2.6.32.24/fs/xfs/xfs_bmap.c
35765+#define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) do {} while (0) 34412+#define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) do {} while (0)
35766 #endif /* DEBUG */ 34413 #endif /* DEBUG */
35767 34414
35768 #if defined(XFS_RW_TRACE) 34415 STATIC int
35769diff -urNp linux-2.6.32.24/grsecurity/gracl_alloc.c linux-2.6.32.24/grsecurity/gracl_alloc.c 34416diff -urNp linux-2.6.35.7/grsecurity/gracl_alloc.c linux-2.6.35.7/grsecurity/gracl_alloc.c
35770--- linux-2.6.32.24/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500 34417--- linux-2.6.35.7/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
35771+++ linux-2.6.32.24/grsecurity/gracl_alloc.c 2010-10-23 19:59:20.000000000 -0400 34418+++ linux-2.6.35.7/grsecurity/gracl_alloc.c 2010-09-17 20:12:37.000000000 -0400
35772@@ -0,0 +1,105 @@ 34419@@ -0,0 +1,105 @@
35773+#include <linux/kernel.h> 34420+#include <linux/kernel.h>
35774+#include <linux/mm.h> 34421+#include <linux/mm.h>
@@ -35875,10 +34522,10 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_alloc.c linux-2.6.32.24/grsecurity/g
35875+ else 34522+ else
35876+ return 1; 34523+ return 1;
35877+} 34524+}
35878diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c 34525diff -urNp linux-2.6.35.7/grsecurity/gracl.c linux-2.6.35.7/grsecurity/gracl.c
35879--- linux-2.6.32.24/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500 34526--- linux-2.6.35.7/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500
35880+++ linux-2.6.32.24/grsecurity/gracl.c 2010-10-23 19:59:20.000000000 -0400 34527+++ linux-2.6.35.7/grsecurity/gracl.c 2010-09-28 19:08:51.000000000 -0400
35881@@ -0,0 +1,3922 @@ 34528@@ -0,0 +1,3925 @@
35882+#include <linux/kernel.h> 34529+#include <linux/kernel.h>
35883+#include <linux/module.h> 34530+#include <linux/module.h>
35884+#include <linux/sched.h> 34531+#include <linux/sched.h>
@@ -35968,6 +34615,8 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
35968+extern void gr_remove_uid(uid_t uid); 34615+extern void gr_remove_uid(uid_t uid);
35969+extern int gr_find_uid(uid_t uid); 34616+extern int gr_find_uid(uid_t uid);
35970+ 34617+
34618+extern spinlock_t vfsmount_lock;
34619+
35971+__inline__ int 34620+__inline__ int
35972+gr_acl_is_enabled(void) 34621+gr_acl_is_enabled(void)
35973+{ 34622+{
@@ -36032,6 +34681,7 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
36032+ char * retval; 34681+ char * retval;
36033+ int namelen; 34682+ int namelen;
36034+ 34683+
34684+ spin_lock(&vfsmount_lock);
36035+ *--end = '\0'; 34685+ *--end = '\0';
36036+ buflen--; 34686+ buflen--;
36037+ 34687+
@@ -36048,14 +34698,11 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
36048+ break; 34698+ break;
36049+ if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) { 34699+ if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
36050+ /* Global root? */ 34700+ /* Global root? */
36051+ spin_lock(&vfsmount_lock);
36052+ if (vfsmnt->mnt_parent == vfsmnt) { 34701+ if (vfsmnt->mnt_parent == vfsmnt) {
36053+ spin_unlock(&vfsmount_lock);
36054+ goto global_root; 34702+ goto global_root;
36055+ } 34703+ }
36056+ dentry = vfsmnt->mnt_mountpoint; 34704+ dentry = vfsmnt->mnt_mountpoint;
36057+ vfsmnt = vfsmnt->mnt_parent; 34705+ vfsmnt = vfsmnt->mnt_parent;
36058+ spin_unlock(&vfsmount_lock);
36059+ continue; 34706+ continue;
36060+ } 34707+ }
36061+ parent = dentry->d_parent; 34708+ parent = dentry->d_parent;
@@ -36071,6 +34718,8 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
36071+ dentry = parent; 34718+ dentry = parent;
36072+ } 34719+ }
36073+ 34720+
34721+out:
34722+ spin_unlock(&vfsmount_lock);
36074+ return retval; 34723+ return retval;
36075+ 34724+
36076+global_root: 34725+global_root:
@@ -36080,9 +34729,10 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
36080+ goto Elong; 34729+ goto Elong;
36081+ retval -= namelen-1; /* hit the slash */ 34730+ retval -= namelen-1; /* hit the slash */
36082+ memcpy(retval, dentry->d_name.name, namelen); 34731+ memcpy(retval, dentry->d_name.name, namelen);
36083+ return retval; 34732+ goto out;
36084+Elong: 34733+Elong:
36085+ return ERR_PTR(-ENAMETOOLONG); 34734+ retval = ERR_PTR(-ENAMETOOLONG);
34735+ goto out;
36086+} 34736+}
36087+ 34737+
36088+static char * 34738+static char *
@@ -39317,7 +37967,7 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
39317+__u32 37967+__u32
39318+gr_handle_sysctl(const struct ctl_table *table, const int op) 37968+gr_handle_sysctl(const struct ctl_table *table, const int op)
39319+{ 37969+{
39320+ ctl_table *tmp; 37970+ struct ctl_table *tmp;
39321+ const char *proc_sys = "/proc/sys"; 37971+ const char *proc_sys = "/proc/sys";
39322+ char *path; 37972+ char *path;
39323+ struct acl_object_label *obj; 37973+ struct acl_object_label *obj;
@@ -39350,7 +38000,7 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
39350+ 38000+
39351+ /* convert the requested sysctl entry into a pathname */ 38001+ /* convert the requested sysctl entry into a pathname */
39352+ 38002+
39353+ for (tmp = (ctl_table *)table; tmp != NULL; tmp = tmp->parent) { 38003+ for (tmp = (struct ctl_table *)table; tmp != NULL; tmp = tmp->parent) {
39354+ len += strlen(tmp->procname); 38004+ len += strlen(tmp->procname);
39355+ len++; 38005+ len++;
39356+ depth++; 38006+ depth++;
@@ -39370,7 +38020,7 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
39370+ for (; depth > 0; depth--) { 38020+ for (; depth > 0; depth--) {
39371+ path[pos] = '/'; 38021+ path[pos] = '/';
39372+ pos++; 38022+ pos++;
39373+ for (i = 1, tmp = (ctl_table *)table; tmp != NULL; tmp = tmp->parent) { 38023+ for (i = 1, tmp = (struct ctl_table *)table; tmp != NULL; tmp = tmp->parent) {
39374+ if (depth == i) { 38024+ if (depth == i) {
39375+ memcpy(path + pos, tmp->procname, 38025+ memcpy(path + pos, tmp->procname,
39376+ strlen(tmp->procname)); 38026+ strlen(tmp->procname));
@@ -39801,9 +38451,9 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl.c linux-2.6.32.24/grsecurity/gracl.c
39801+EXPORT_SYMBOL(gr_check_group_change); 38451+EXPORT_SYMBOL(gr_check_group_change);
39802+#endif 38452+#endif
39803+ 38453+
39804diff -urNp linux-2.6.32.24/grsecurity/gracl_cap.c linux-2.6.32.24/grsecurity/gracl_cap.c 38454diff -urNp linux-2.6.35.7/grsecurity/gracl_cap.c linux-2.6.35.7/grsecurity/gracl_cap.c
39805--- linux-2.6.32.24/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500 38455--- linux-2.6.35.7/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500
39806+++ linux-2.6.32.24/grsecurity/gracl_cap.c 2010-10-23 19:59:20.000000000 -0400 38456+++ linux-2.6.35.7/grsecurity/gracl_cap.c 2010-09-17 20:12:37.000000000 -0400
39807@@ -0,0 +1,138 @@ 38457@@ -0,0 +1,138 @@
39808+#include <linux/kernel.h> 38458+#include <linux/kernel.h>
39809+#include <linux/module.h> 38459+#include <linux/module.h>
@@ -39943,9 +38593,9 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_cap.c linux-2.6.32.24/grsecurity/gra
39943+ return 0; 38593+ return 0;
39944+} 38594+}
39945+ 38595+
39946diff -urNp linux-2.6.32.24/grsecurity/gracl_fs.c linux-2.6.32.24/grsecurity/gracl_fs.c 38596diff -urNp linux-2.6.35.7/grsecurity/gracl_fs.c linux-2.6.35.7/grsecurity/gracl_fs.c
39947--- linux-2.6.32.24/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500 38597--- linux-2.6.35.7/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500
39948+++ linux-2.6.32.24/grsecurity/gracl_fs.c 2010-10-23 19:59:20.000000000 -0400 38598+++ linux-2.6.35.7/grsecurity/gracl_fs.c 2010-09-17 20:12:37.000000000 -0400
39949@@ -0,0 +1,424 @@ 38599@@ -0,0 +1,424 @@
39950+#include <linux/kernel.h> 38600+#include <linux/kernel.h>
39951+#include <linux/sched.h> 38601+#include <linux/sched.h>
@@ -40371,9 +39021,9 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_fs.c linux-2.6.32.24/grsecurity/grac
40371+ 39021+
40372+ return 0; 39022+ return 0;
40373+} 39023+}
40374diff -urNp linux-2.6.32.24/grsecurity/gracl_ip.c linux-2.6.32.24/grsecurity/gracl_ip.c 39024diff -urNp linux-2.6.35.7/grsecurity/gracl_ip.c linux-2.6.35.7/grsecurity/gracl_ip.c
40375--- linux-2.6.32.24/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500 39025--- linux-2.6.35.7/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500
40376+++ linux-2.6.32.24/grsecurity/gracl_ip.c 2010-10-23 19:59:20.000000000 -0400 39026+++ linux-2.6.35.7/grsecurity/gracl_ip.c 2010-09-17 20:12:37.000000000 -0400
40377@@ -0,0 +1,339 @@ 39027@@ -0,0 +1,339 @@
40378+#include <linux/kernel.h> 39028+#include <linux/kernel.h>
40379+#include <asm/uaccess.h> 39029+#include <asm/uaccess.h>
@@ -40559,13 +39209,13 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_ip.c linux-2.6.32.24/grsecurity/grac
40559+ /* INADDR_ANY overriding for binds, inaddr_any_override is already in network order */ 39209+ /* INADDR_ANY overriding for binds, inaddr_any_override is already in network order */
40560+ if ((full_mode & GR_BINDOVERRIDE) && addr->sin_addr.s_addr == htonl(INADDR_ANY) && curr->inaddr_any_override != 0) 39210+ if ((full_mode & GR_BINDOVERRIDE) && addr->sin_addr.s_addr == htonl(INADDR_ANY) && curr->inaddr_any_override != 0)
40561+ addr->sin_addr.s_addr = curr->inaddr_any_override; 39211+ addr->sin_addr.s_addr = curr->inaddr_any_override;
40562+ if ((full_mode & GR_CONNECT) && isk->saddr == htonl(INADDR_ANY) && curr->inaddr_any_override != 0) { 39212+ if ((full_mode & GR_CONNECT) && isk->inet_saddr == htonl(INADDR_ANY) && curr->inaddr_any_override != 0) {
40563+ struct sockaddr_in saddr; 39213+ struct sockaddr_in saddr;
40564+ int err; 39214+ int err;
40565+ 39215+
40566+ saddr.sin_family = AF_INET; 39216+ saddr.sin_family = AF_INET;
40567+ saddr.sin_addr.s_addr = curr->inaddr_any_override; 39217+ saddr.sin_addr.s_addr = curr->inaddr_any_override;
40568+ saddr.sin_port = isk->sport; 39218+ saddr.sin_port = isk->inet_sport;
40569+ 39219+
40570+ err = security_socket_bind(sk->sk_socket, (struct sockaddr *)&saddr, sizeof(struct sockaddr_in)); 39220+ err = security_socket_bind(sk->sk_socket, (struct sockaddr *)&saddr, sizeof(struct sockaddr_in));
40571+ if (err) 39221+ if (err)
@@ -40668,8 +39318,8 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_ip.c linux-2.6.32.24/grsecurity/grac
40668+ struct sock *sk = sock->sk; 39318+ struct sock *sk = sock->sk;
40669+ struct sockaddr_in addr; 39319+ struct sockaddr_in addr;
40670+ 39320+
40671+ addr.sin_addr.s_addr = inet_sk(sk)->saddr; 39321+ addr.sin_addr.s_addr = inet_sk(sk)->inet_saddr;
40672+ addr.sin_port = inet_sk(sk)->sport; 39322+ addr.sin_port = inet_sk(sk)->inet_sport;
40673+ 39323+
40674+ return gr_search_connectbind(GR_BIND | GR_CONNECTOVERRIDE, sock->sk, &addr, sock->type); 39324+ return gr_search_connectbind(GR_BIND | GR_CONNECTOVERRIDE, sock->sk, &addr, sock->type);
40675+} 39325+}
@@ -40679,8 +39329,8 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_ip.c linux-2.6.32.24/grsecurity/grac
40679+ struct sock *sk = sock->sk; 39329+ struct sock *sk = sock->sk;
40680+ struct sockaddr_in addr; 39330+ struct sockaddr_in addr;
40681+ 39331+
40682+ addr.sin_addr.s_addr = inet_sk(sk)->saddr; 39332+ addr.sin_addr.s_addr = inet_sk(sk)->inet_saddr;
40683+ addr.sin_port = inet_sk(sk)->sport; 39333+ addr.sin_port = inet_sk(sk)->inet_sport;
40684+ 39334+
40685+ return gr_search_connectbind(GR_BIND | GR_CONNECTOVERRIDE, sock->sk, &addr, sock->type); 39335+ return gr_search_connectbind(GR_BIND | GR_CONNECTOVERRIDE, sock->sk, &addr, sock->type);
40686+} 39336+}
@@ -40694,8 +39344,8 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_ip.c linux-2.6.32.24/grsecurity/grac
40694+ struct sockaddr_in sin; 39344+ struct sockaddr_in sin;
40695+ const struct inet_sock *inet = inet_sk(sk); 39345+ const struct inet_sock *inet = inet_sk(sk);
40696+ 39346+
40697+ sin.sin_addr.s_addr = inet->daddr; 39347+ sin.sin_addr.s_addr = inet->inet_daddr;
40698+ sin.sin_port = inet->dport; 39348+ sin.sin_port = inet->inet_dport;
40699+ 39349+
40700+ return gr_search_connectbind(GR_CONNECT | GR_CONNECTOVERRIDE, sk, &sin, SOCK_DGRAM); 39350+ return gr_search_connectbind(GR_CONNECT | GR_CONNECTOVERRIDE, sk, &sin, SOCK_DGRAM);
40701+ } 39351+ }
@@ -40714,9 +39364,9 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_ip.c linux-2.6.32.24/grsecurity/grac
40714+ 39364+
40715+ return gr_search_connectbind(GR_CONNECT | GR_CONNECTOVERRIDE, sk, &sin, SOCK_DGRAM); 39365+ return gr_search_connectbind(GR_CONNECT | GR_CONNECTOVERRIDE, sk, &sin, SOCK_DGRAM);
40716+} 39366+}
40717diff -urNp linux-2.6.32.24/grsecurity/gracl_learn.c linux-2.6.32.24/grsecurity/gracl_learn.c 39367diff -urNp linux-2.6.35.7/grsecurity/gracl_learn.c linux-2.6.35.7/grsecurity/gracl_learn.c
40718--- linux-2.6.32.24/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500 39368--- linux-2.6.35.7/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500
40719+++ linux-2.6.32.24/grsecurity/gracl_learn.c 2010-10-23 19:59:20.000000000 -0400 39369+++ linux-2.6.35.7/grsecurity/gracl_learn.c 2010-09-17 20:12:37.000000000 -0400
40720@@ -0,0 +1,211 @@ 39370@@ -0,0 +1,211 @@
40721+#include <linux/kernel.h> 39371+#include <linux/kernel.h>
40722+#include <linux/mm.h> 39372+#include <linux/mm.h>
@@ -40929,10 +39579,10 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_learn.c linux-2.6.32.24/grsecurity/g
40929+ .release = close_learn, 39579+ .release = close_learn,
40930+ .poll = poll_learn, 39580+ .poll = poll_learn,
40931+}; 39581+};
40932diff -urNp linux-2.6.32.24/grsecurity/gracl_res.c linux-2.6.32.24/grsecurity/gracl_res.c 39582diff -urNp linux-2.6.35.7/grsecurity/gracl_res.c linux-2.6.35.7/grsecurity/gracl_res.c
40933--- linux-2.6.32.24/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500 39583--- linux-2.6.35.7/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500
40934+++ linux-2.6.32.24/grsecurity/gracl_res.c 2010-10-23 19:59:20.000000000 -0400 39584+++ linux-2.6.35.7/grsecurity/gracl_res.c 2010-09-17 20:12:37.000000000 -0400
40935@@ -0,0 +1,67 @@ 39585@@ -0,0 +1,68 @@
40936+#include <linux/kernel.h> 39586+#include <linux/kernel.h>
40937+#include <linux/sched.h> 39587+#include <linux/sched.h>
40938+#include <linux/gracl.h> 39588+#include <linux/gracl.h>
@@ -40973,9 +39623,10 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_res.c linux-2.6.32.24/grsecurity/gra
40973+ return; 39623+ return;
40974+ 39624+
40975+ if (res == RLIMIT_CPU || res == RLIMIT_RTTIME) 39625+ if (res == RLIMIT_CPU || res == RLIMIT_RTTIME)
40976+ rlim = task->signal->rlim[res].rlim_max; 39626+ rlim = task_rlimit_max(task, res);
40977+ else 39627+ else
40978+ rlim = task->signal->rlim[res].rlim_cur; 39628+ rlim = task_rlimit(task, res);
39629+
40979+ if (likely((rlim == RLIM_INFINITY) || (gt && wanted <= rlim) || (!gt && wanted < rlim))) 39630+ if (likely((rlim == RLIM_INFINITY) || (gt && wanted <= rlim) || (!gt && wanted < rlim)))
40980+ return; 39631+ return;
40981+ 39632+
@@ -41000,9 +39651,9 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_res.c linux-2.6.32.24/grsecurity/gra
41000+ rcu_read_unlock(); 39651+ rcu_read_unlock();
41001+ return; 39652+ return;
41002+} 39653+}
41003diff -urNp linux-2.6.32.24/grsecurity/gracl_segv.c linux-2.6.32.24/grsecurity/gracl_segv.c 39654diff -urNp linux-2.6.35.7/grsecurity/gracl_segv.c linux-2.6.35.7/grsecurity/gracl_segv.c
41004--- linux-2.6.32.24/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500 39655--- linux-2.6.35.7/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
41005+++ linux-2.6.32.24/grsecurity/gracl_segv.c 2010-10-23 19:59:20.000000000 -0400 39656+++ linux-2.6.35.7/grsecurity/gracl_segv.c 2010-09-17 20:12:37.000000000 -0400
41006@@ -0,0 +1,310 @@ 39657@@ -0,0 +1,310 @@
41007+#include <linux/kernel.h> 39658+#include <linux/kernel.h>
41008+#include <linux/mm.h> 39659+#include <linux/mm.h>
@@ -41314,9 +39965,9 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_segv.c linux-2.6.32.24/grsecurity/gr
41314+ 39965+
41315+ return; 39966+ return;
41316+} 39967+}
41317diff -urNp linux-2.6.32.24/grsecurity/gracl_shm.c linux-2.6.32.24/grsecurity/gracl_shm.c 39968diff -urNp linux-2.6.35.7/grsecurity/gracl_shm.c linux-2.6.35.7/grsecurity/gracl_shm.c
41318--- linux-2.6.32.24/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500 39969--- linux-2.6.35.7/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500
41319+++ linux-2.6.32.24/grsecurity/gracl_shm.c 2010-10-23 19:59:20.000000000 -0400 39970+++ linux-2.6.35.7/grsecurity/gracl_shm.c 2010-09-17 20:12:37.000000000 -0400
41320@@ -0,0 +1,40 @@ 39971@@ -0,0 +1,40 @@
41321+#include <linux/kernel.h> 39972+#include <linux/kernel.h>
41322+#include <linux/mm.h> 39973+#include <linux/mm.h>
@@ -41358,9 +40009,9 @@ diff -urNp linux-2.6.32.24/grsecurity/gracl_shm.c linux-2.6.32.24/grsecurity/gra
41358+ 40009+
41359+ return 1; 40010+ return 1;
41360+} 40011+}
41361diff -urNp linux-2.6.32.24/grsecurity/grsec_chdir.c linux-2.6.32.24/grsecurity/grsec_chdir.c 40012diff -urNp linux-2.6.35.7/grsecurity/grsec_chdir.c linux-2.6.35.7/grsecurity/grsec_chdir.c
41362--- linux-2.6.32.24/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500 40013--- linux-2.6.35.7/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500
41363+++ linux-2.6.32.24/grsecurity/grsec_chdir.c 2010-10-23 19:59:20.000000000 -0400 40014+++ linux-2.6.35.7/grsecurity/grsec_chdir.c 2010-09-17 20:12:37.000000000 -0400
41364@@ -0,0 +1,19 @@ 40015@@ -0,0 +1,19 @@
41365+#include <linux/kernel.h> 40016+#include <linux/kernel.h>
41366+#include <linux/sched.h> 40017+#include <linux/sched.h>
@@ -41381,9 +40032,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_chdir.c linux-2.6.32.24/grsecurity/g
41381+#endif 40032+#endif
41382+ return; 40033+ return;
41383+} 40034+}
41384diff -urNp linux-2.6.32.24/grsecurity/grsec_chroot.c linux-2.6.32.24/grsecurity/grsec_chroot.c 40035diff -urNp linux-2.6.35.7/grsecurity/grsec_chroot.c linux-2.6.35.7/grsecurity/grsec_chroot.c
41385--- linux-2.6.32.24/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500 40036--- linux-2.6.35.7/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500
41386+++ linux-2.6.32.24/grsecurity/grsec_chroot.c 2010-10-23 19:59:20.000000000 -0400 40037+++ linux-2.6.35.7/grsecurity/grsec_chroot.c 2010-09-17 20:12:37.000000000 -0400
41387@@ -0,0 +1,389 @@ 40038@@ -0,0 +1,389 @@
41388+#include <linux/kernel.h> 40039+#include <linux/kernel.h>
41389+#include <linux/module.h> 40040+#include <linux/module.h>
@@ -41739,8 +40390,8 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_chroot.c linux-2.6.32.24/grsecurity/
41739+gr_handle_chroot_sysctl(const int op) 40390+gr_handle_chroot_sysctl(const int op)
41740+{ 40391+{
41741+#ifdef CONFIG_GRKERNSEC_CHROOT_SYSCTL 40392+#ifdef CONFIG_GRKERNSEC_CHROOT_SYSCTL
41742+ if (grsec_enable_chroot_sysctl && proc_is_chrooted(current) 40393+ if (grsec_enable_chroot_sysctl && (op & MAY_WRITE) &&
41743+ && (op & MAY_WRITE)) 40394+ proc_is_chrooted(current))
41744+ return -EACCES; 40395+ return -EACCES;
41745+#endif 40396+#endif
41746+ return 0; 40397+ return 0;
@@ -41774,9 +40425,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_chroot.c linux-2.6.32.24/grsecurity/
41774+#ifdef CONFIG_SECURITY 40425+#ifdef CONFIG_SECURITY
41775+EXPORT_SYMBOL(gr_handle_chroot_caps); 40426+EXPORT_SYMBOL(gr_handle_chroot_caps);
41776+#endif 40427+#endif
41777diff -urNp linux-2.6.32.24/grsecurity/grsec_disabled.c linux-2.6.32.24/grsecurity/grsec_disabled.c 40428diff -urNp linux-2.6.35.7/grsecurity/grsec_disabled.c linux-2.6.35.7/grsecurity/grsec_disabled.c
41778--- linux-2.6.32.24/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500 40429--- linux-2.6.35.7/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500
41779+++ linux-2.6.32.24/grsecurity/grsec_disabled.c 2010-10-23 19:59:20.000000000 -0400 40430+++ linux-2.6.35.7/grsecurity/grsec_disabled.c 2010-09-17 20:12:37.000000000 -0400
41780@@ -0,0 +1,431 @@ 40431@@ -0,0 +1,431 @@
41781+#include <linux/kernel.h> 40432+#include <linux/kernel.h>
41782+#include <linux/module.h> 40433+#include <linux/module.h>
@@ -42209,10 +40860,10 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_disabled.c linux-2.6.32.24/grsecurit
42209+EXPORT_SYMBOL(gr_check_user_change); 40860+EXPORT_SYMBOL(gr_check_user_change);
42210+EXPORT_SYMBOL(gr_check_group_change); 40861+EXPORT_SYMBOL(gr_check_group_change);
42211+#endif 40862+#endif
42212diff -urNp linux-2.6.32.24/grsecurity/grsec_exec.c linux-2.6.32.24/grsecurity/grsec_exec.c 40863diff -urNp linux-2.6.35.7/grsecurity/grsec_exec.c linux-2.6.35.7/grsecurity/grsec_exec.c
42213--- linux-2.6.32.24/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500 40864--- linux-2.6.35.7/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500
42214+++ linux-2.6.32.24/grsecurity/grsec_exec.c 2010-10-23 19:59:20.000000000 -0400 40865+++ linux-2.6.35.7/grsecurity/grsec_exec.c 2010-09-17 20:12:37.000000000 -0400
42215@@ -0,0 +1,89 @@ 40866@@ -0,0 +1,88 @@
42216+#include <linux/kernel.h> 40867+#include <linux/kernel.h>
42217+#include <linux/sched.h> 40868+#include <linux/sched.h>
42218+#include <linux/file.h> 40869+#include <linux/file.h>
@@ -42237,8 +40888,7 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_exec.c linux-2.6.32.24/grsecurity/gr
42237+#ifdef CONFIG_GRKERNSEC_EXECVE 40888+#ifdef CONFIG_GRKERNSEC_EXECVE
42238+ const struct cred *cred = current_cred(); 40889+ const struct cred *cred = current_cred();
42239+ if (grsec_enable_execve && cred->user && 40890+ if (grsec_enable_execve && cred->user &&
42240+ (atomic_read(&cred->user->processes) > 40891+ (atomic_read(&cred->user->processes) > rlimit(RLIMIT_NPROC)) &&
42241+ current->signal->rlim[RLIMIT_NPROC].rlim_cur) &&
42242+ !capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE)) { 40892+ !capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE)) {
42243+ gr_log_noargs(GR_DONT_AUDIT, GR_NPROC_MSG); 40893+ gr_log_noargs(GR_DONT_AUDIT, GR_NPROC_MSG);
42244+ return -EAGAIN; 40894+ return -EAGAIN;
@@ -42302,9 +40952,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_exec.c linux-2.6.32.24/grsecurity/gr
42302+#endif 40952+#endif
42303+ return; 40953+ return;
42304+} 40954+}
42305diff -urNp linux-2.6.32.24/grsecurity/grsec_fifo.c linux-2.6.32.24/grsecurity/grsec_fifo.c 40955diff -urNp linux-2.6.35.7/grsecurity/grsec_fifo.c linux-2.6.35.7/grsecurity/grsec_fifo.c
42306--- linux-2.6.32.24/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500 40956--- linux-2.6.35.7/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500
42307+++ linux-2.6.32.24/grsecurity/grsec_fifo.c 2010-10-23 19:59:20.000000000 -0400 40957+++ linux-2.6.35.7/grsecurity/grsec_fifo.c 2010-09-17 20:12:37.000000000 -0400
42308@@ -0,0 +1,24 @@ 40958@@ -0,0 +1,24 @@
42309+#include <linux/kernel.h> 40959+#include <linux/kernel.h>
42310+#include <linux/sched.h> 40960+#include <linux/sched.h>
@@ -42330,9 +40980,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_fifo.c linux-2.6.32.24/grsecurity/gr
42330+#endif 40980+#endif
42331+ return 0; 40981+ return 0;
42332+} 40982+}
42333diff -urNp linux-2.6.32.24/grsecurity/grsec_fork.c linux-2.6.32.24/grsecurity/grsec_fork.c 40983diff -urNp linux-2.6.35.7/grsecurity/grsec_fork.c linux-2.6.35.7/grsecurity/grsec_fork.c
42334--- linux-2.6.32.24/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500 40984--- linux-2.6.35.7/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500
42335+++ linux-2.6.32.24/grsecurity/grsec_fork.c 2010-10-23 19:59:20.000000000 -0400 40985+++ linux-2.6.35.7/grsecurity/grsec_fork.c 2010-09-23 20:39:19.000000000 -0400
42336@@ -0,0 +1,23 @@ 40986@@ -0,0 +1,23 @@
42337+#include <linux/kernel.h> 40987+#include <linux/kernel.h>
42338+#include <linux/sched.h> 40988+#include <linux/sched.h>
@@ -42357,9 +41007,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_fork.c linux-2.6.32.24/grsecurity/gr
42357+#endif 41007+#endif
42358+ return; 41008+ return;
42359+} 41009+}
42360diff -urNp linux-2.6.32.24/grsecurity/grsec_init.c linux-2.6.32.24/grsecurity/grsec_init.c 41010diff -urNp linux-2.6.35.7/grsecurity/grsec_init.c linux-2.6.35.7/grsecurity/grsec_init.c
42361--- linux-2.6.32.24/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500 41011--- linux-2.6.35.7/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500
42362+++ linux-2.6.32.24/grsecurity/grsec_init.c 2010-10-23 19:59:20.000000000 -0400 41012+++ linux-2.6.35.7/grsecurity/grsec_init.c 2010-10-18 21:01:30.000000000 -0400
42363@@ -0,0 +1,270 @@ 41013@@ -0,0 +1,270 @@
42364+#include <linux/kernel.h> 41014+#include <linux/kernel.h>
42365+#include <linux/sched.h> 41015+#include <linux/sched.h>
@@ -42631,9 +41281,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_init.c linux-2.6.32.24/grsecurity/gr
42631+ 41281+
42632+ return; 41282+ return;
42633+} 41283+}
42634diff -urNp linux-2.6.32.24/grsecurity/grsec_link.c linux-2.6.32.24/grsecurity/grsec_link.c 41284diff -urNp linux-2.6.35.7/grsecurity/grsec_link.c linux-2.6.35.7/grsecurity/grsec_link.c
42635--- linux-2.6.32.24/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500 41285--- linux-2.6.35.7/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500
42636+++ linux-2.6.32.24/grsecurity/grsec_link.c 2010-10-23 19:59:20.000000000 -0400 41286+++ linux-2.6.35.7/grsecurity/grsec_link.c 2010-09-17 20:12:37.000000000 -0400
42637@@ -0,0 +1,43 @@ 41287@@ -0,0 +1,43 @@
42638+#include <linux/kernel.h> 41288+#include <linux/kernel.h>
42639+#include <linux/sched.h> 41289+#include <linux/sched.h>
@@ -42678,9 +41328,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_link.c linux-2.6.32.24/grsecurity/gr
42678+#endif 41328+#endif
42679+ return 0; 41329+ return 0;
42680+} 41330+}
42681diff -urNp linux-2.6.32.24/grsecurity/grsec_log.c linux-2.6.32.24/grsecurity/grsec_log.c 41331diff -urNp linux-2.6.35.7/grsecurity/grsec_log.c linux-2.6.35.7/grsecurity/grsec_log.c
42682--- linux-2.6.32.24/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500 41332--- linux-2.6.35.7/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500
42683+++ linux-2.6.32.24/grsecurity/grsec_log.c 2010-10-23 19:59:20.000000000 -0400 41333+++ linux-2.6.35.7/grsecurity/grsec_log.c 2010-10-18 21:01:30.000000000 -0400
42684@@ -0,0 +1,310 @@ 41334@@ -0,0 +1,310 @@
42685+#include <linux/kernel.h> 41335+#include <linux/kernel.h>
42686+#include <linux/sched.h> 41336+#include <linux/sched.h>
@@ -42992,9 +41642,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_log.c linux-2.6.32.24/grsecurity/grs
42992+ gr_log_end(audit); 41642+ gr_log_end(audit);
42993+ END_LOCKS(audit); 41643+ END_LOCKS(audit);
42994+} 41644+}
42995diff -urNp linux-2.6.32.24/grsecurity/grsec_mem.c linux-2.6.32.24/grsecurity/grsec_mem.c 41645diff -urNp linux-2.6.35.7/grsecurity/grsec_mem.c linux-2.6.35.7/grsecurity/grsec_mem.c
42996--- linux-2.6.32.24/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500 41646--- linux-2.6.35.7/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500
42997+++ linux-2.6.32.24/grsecurity/grsec_mem.c 2010-10-23 19:59:20.000000000 -0400 41647+++ linux-2.6.35.7/grsecurity/grsec_mem.c 2010-09-17 20:12:37.000000000 -0400
42998@@ -0,0 +1,85 @@ 41648@@ -0,0 +1,85 @@
42999+#include <linux/kernel.h> 41649+#include <linux/kernel.h>
43000+#include <linux/sched.h> 41650+#include <linux/sched.h>
@@ -43081,9 +41731,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_mem.c linux-2.6.32.24/grsecurity/grs
43081+ gr_log_noargs(GR_DONT_AUDIT, GR_VM86_MSG); 41731+ gr_log_noargs(GR_DONT_AUDIT, GR_VM86_MSG);
43082+ return; 41732+ return;
43083+} 41733+}
43084diff -urNp linux-2.6.32.24/grsecurity/grsec_mount.c linux-2.6.32.24/grsecurity/grsec_mount.c 41734diff -urNp linux-2.6.35.7/grsecurity/grsec_mount.c linux-2.6.35.7/grsecurity/grsec_mount.c
43085--- linux-2.6.32.24/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500 41735--- linux-2.6.35.7/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500
43086+++ linux-2.6.32.24/grsecurity/grsec_mount.c 2010-10-23 19:59:20.000000000 -0400 41736+++ linux-2.6.35.7/grsecurity/grsec_mount.c 2010-09-17 20:12:37.000000000 -0400
43087@@ -0,0 +1,62 @@ 41737@@ -0,0 +1,62 @@
43088+#include <linux/kernel.h> 41738+#include <linux/kernel.h>
43089+#include <linux/sched.h> 41739+#include <linux/sched.h>
@@ -43147,9 +41797,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_mount.c linux-2.6.32.24/grsecurity/g
43147+#endif 41797+#endif
43148+ return 0; 41798+ return 0;
43149+} 41799+}
43150diff -urNp linux-2.6.32.24/grsecurity/grsec_pax.c linux-2.6.32.24/grsecurity/grsec_pax.c 41800diff -urNp linux-2.6.35.7/grsecurity/grsec_pax.c linux-2.6.35.7/grsecurity/grsec_pax.c
43151--- linux-2.6.32.24/grsecurity/grsec_pax.c 1969-12-31 19:00:00.000000000 -0500 41801--- linux-2.6.35.7/grsecurity/grsec_pax.c 1969-12-31 19:00:00.000000000 -0500
43152+++ linux-2.6.32.24/grsecurity/grsec_pax.c 2010-10-23 19:59:20.000000000 -0400 41802+++ linux-2.6.35.7/grsecurity/grsec_pax.c 2010-10-18 21:01:30.000000000 -0400
43153@@ -0,0 +1,36 @@ 41803@@ -0,0 +1,36 @@
43154+#include <linux/kernel.h> 41804+#include <linux/kernel.h>
43155+#include <linux/sched.h> 41805+#include <linux/sched.h>
@@ -43187,9 +41837,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_pax.c linux-2.6.32.24/grsecurity/grs
43187+#endif 41837+#endif
43188+ return; 41838+ return;
43189+} 41839+}
43190diff -urNp linux-2.6.32.24/grsecurity/grsec_ptrace.c linux-2.6.32.24/grsecurity/grsec_ptrace.c 41840diff -urNp linux-2.6.35.7/grsecurity/grsec_ptrace.c linux-2.6.35.7/grsecurity/grsec_ptrace.c
43191--- linux-2.6.32.24/grsecurity/grsec_ptrace.c 1969-12-31 19:00:00.000000000 -0500 41841--- linux-2.6.35.7/grsecurity/grsec_ptrace.c 1969-12-31 19:00:00.000000000 -0500
43192+++ linux-2.6.32.24/grsecurity/grsec_ptrace.c 2010-10-23 19:59:20.000000000 -0400 41842+++ linux-2.6.35.7/grsecurity/grsec_ptrace.c 2010-09-17 20:12:37.000000000 -0400
43193@@ -0,0 +1,14 @@ 41843@@ -0,0 +1,14 @@
43194+#include <linux/kernel.h> 41844+#include <linux/kernel.h>
43195+#include <linux/sched.h> 41845+#include <linux/sched.h>
@@ -43205,9 +41855,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_ptrace.c linux-2.6.32.24/grsecurity/
43205+#endif 41855+#endif
43206+ return; 41856+ return;
43207+} 41857+}
43208diff -urNp linux-2.6.32.24/grsecurity/grsec_sig.c linux-2.6.32.24/grsecurity/grsec_sig.c 41858diff -urNp linux-2.6.35.7/grsecurity/grsec_sig.c linux-2.6.35.7/grsecurity/grsec_sig.c
43209--- linux-2.6.32.24/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500 41859--- linux-2.6.35.7/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500
43210+++ linux-2.6.32.24/grsecurity/grsec_sig.c 2010-10-23 19:59:20.000000000 -0400 41860+++ linux-2.6.35.7/grsecurity/grsec_sig.c 2010-09-28 19:09:19.000000000 -0400
43211@@ -0,0 +1,65 @@ 41861@@ -0,0 +1,65 @@
43212+#include <linux/kernel.h> 41862+#include <linux/kernel.h>
43213+#include <linux/sched.h> 41863+#include <linux/sched.h>
@@ -43274,9 +41924,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sig.c linux-2.6.32.24/grsecurity/grs
43274+ return; 41924+ return;
43275+} 41925+}
43276+ 41926+
43277diff -urNp linux-2.6.32.24/grsecurity/grsec_sock.c linux-2.6.32.24/grsecurity/grsec_sock.c 41927diff -urNp linux-2.6.35.7/grsecurity/grsec_sock.c linux-2.6.35.7/grsecurity/grsec_sock.c
43278--- linux-2.6.32.24/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500 41928--- linux-2.6.35.7/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500
43279+++ linux-2.6.32.24/grsecurity/grsec_sock.c 2010-10-23 19:59:20.000000000 -0400 41929+++ linux-2.6.35.7/grsecurity/grsec_sock.c 2010-09-17 20:12:37.000000000 -0400
43280@@ -0,0 +1,271 @@ 41930@@ -0,0 +1,271 @@
43281+#include <linux/kernel.h> 41931+#include <linux/kernel.h>
43282+#include <linux/module.h> 41932+#include <linux/module.h>
@@ -43415,10 +42065,10 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sock.c linux-2.6.32.24/grsecurity/gr
43415+ /* no bh lock needed since we are called with bh disabled */ 42065+ /* no bh lock needed since we are called with bh disabled */
43416+ spin_lock(&gr_conn_table_lock); 42066+ spin_lock(&gr_conn_table_lock);
43417+ gr_del_task_from_ip_table_nolock(sig); 42067+ gr_del_task_from_ip_table_nolock(sig);
43418+ sig->gr_saddr = inet->rcv_saddr; 42068+ sig->gr_saddr = inet->inet_rcv_saddr;
43419+ sig->gr_daddr = inet->daddr; 42069+ sig->gr_daddr = inet->inet_daddr;
43420+ sig->gr_sport = inet->sport; 42070+ sig->gr_sport = inet->inet_sport;
43421+ sig->gr_dport = inet->dport; 42071+ sig->gr_dport = inet->inet_dport;
43422+ gr_add_to_task_ip_table_nolock(sig, newent); 42072+ gr_add_to_task_ip_table_nolock(sig, newent);
43423+ spin_unlock(&gr_conn_table_lock); 42073+ spin_unlock(&gr_conn_table_lock);
43424+#endif 42074+#endif
@@ -43448,8 +42098,8 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sock.c linux-2.6.32.24/grsecurity/gr
43448+ set = current->signal; 42098+ set = current->signal;
43449+ 42099+
43450+ spin_lock_bh(&gr_conn_table_lock); 42100+ spin_lock_bh(&gr_conn_table_lock);
43451+ p = gr_lookup_task_ip_table(inet->daddr, inet->rcv_saddr, 42101+ p = gr_lookup_task_ip_table(inet->inet_daddr, inet->inet_rcv_saddr,
43452+ inet->dport, inet->sport); 42102+ inet->inet_dport, inet->inet_sport);
43453+ if (unlikely(p != NULL)) { 42103+ if (unlikely(p != NULL)) {
43454+ set->curr_ip = p->curr_ip; 42104+ set->curr_ip = p->curr_ip;
43455+ set->used_accept = 1; 42105+ set->used_accept = 1;
@@ -43459,7 +42109,7 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sock.c linux-2.6.32.24/grsecurity/gr
43459+ } 42109+ }
43460+ spin_unlock_bh(&gr_conn_table_lock); 42110+ spin_unlock_bh(&gr_conn_table_lock);
43461+ 42111+
43462+ set->curr_ip = inet->daddr; 42112+ set->curr_ip = inet->inet_daddr;
43463+ set->used_accept = 1; 42113+ set->used_accept = 1;
43464+#endif 42114+#endif
43465+ return; 42115+ return;
@@ -43549,10 +42199,10 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sock.c linux-2.6.32.24/grsecurity/gr
43549+ return current_cap(); 42199+ return current_cap();
43550+#endif 42200+#endif
43551+} 42201+}
43552diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/grsec_sysctl.c 42202diff -urNp linux-2.6.35.7/grsecurity/grsec_sysctl.c linux-2.6.35.7/grsecurity/grsec_sysctl.c
43553--- linux-2.6.32.24/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500 42203--- linux-2.6.35.7/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500
43554+++ linux-2.6.32.24/grsecurity/grsec_sysctl.c 2010-10-23 19:59:20.000000000 -0400 42204+++ linux-2.6.35.7/grsecurity/grsec_sysctl.c 2010-10-18 21:02:33.000000000 -0400
43555@@ -0,0 +1,479 @@ 42205@@ -0,0 +1,433 @@
43556+#include <linux/kernel.h> 42206+#include <linux/kernel.h>
43557+#include <linux/sched.h> 42207+#include <linux/sched.h>
43558+#include <linux/sysctl.h> 42208+#include <linux/sysctl.h>
@@ -43576,12 +42226,11 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43576+#endif 42226+#endif
43577+ 42227+
43578+#if defined(CONFIG_GRKERNSEC_SYSCTL) || defined(CONFIG_GRKERNSEC_ROFS) 42228+#if defined(CONFIG_GRKERNSEC_SYSCTL) || defined(CONFIG_GRKERNSEC_ROFS)
43579+ctl_table grsecurity_table[] = { 42229+struct ctl_table grsecurity_table[] = {
43580+#ifdef CONFIG_GRKERNSEC_SYSCTL 42230+#ifdef CONFIG_GRKERNSEC_SYSCTL
43581+#ifdef CONFIG_GRKERNSEC_SYSCTL_DISTRO 42231+#ifdef CONFIG_GRKERNSEC_SYSCTL_DISTRO
43582+#ifdef CONFIG_GRKERNSEC_IO 42232+#ifdef CONFIG_GRKERNSEC_IO
43583+ { 42233+ {
43584+ .ctl_name = CTL_UNNUMBERED,
43585+ .procname = "disable_priv_io", 42234+ .procname = "disable_priv_io",
43586+ .data = &grsec_disable_privio, 42235+ .data = &grsec_disable_privio,
43587+ .maxlen = sizeof(int), 42236+ .maxlen = sizeof(int),
@@ -43592,7 +42241,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43592+#endif 42241+#endif
43593+#ifdef CONFIG_GRKERNSEC_LINK 42242+#ifdef CONFIG_GRKERNSEC_LINK
43594+ { 42243+ {
43595+ .ctl_name = CTL_UNNUMBERED,
43596+ .procname = "linking_restrictions", 42244+ .procname = "linking_restrictions",
43597+ .data = &grsec_enable_link, 42245+ .data = &grsec_enable_link,
43598+ .maxlen = sizeof(int), 42246+ .maxlen = sizeof(int),
@@ -43602,7 +42250,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43602+#endif 42250+#endif
43603+#ifdef CONFIG_GRKERNSEC_FIFO 42251+#ifdef CONFIG_GRKERNSEC_FIFO
43604+ { 42252+ {
43605+ .ctl_name = CTL_UNNUMBERED,
43606+ .procname = "fifo_restrictions", 42253+ .procname = "fifo_restrictions",
43607+ .data = &grsec_enable_fifo, 42254+ .data = &grsec_enable_fifo,
43608+ .maxlen = sizeof(int), 42255+ .maxlen = sizeof(int),
@@ -43612,7 +42259,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43612+#endif 42259+#endif
43613+#ifdef CONFIG_GRKERNSEC_EXECVE 42260+#ifdef CONFIG_GRKERNSEC_EXECVE
43614+ { 42261+ {
43615+ .ctl_name = CTL_UNNUMBERED,
43616+ .procname = "execve_limiting", 42262+ .procname = "execve_limiting",
43617+ .data = &grsec_enable_execve, 42263+ .data = &grsec_enable_execve,
43618+ .maxlen = sizeof(int), 42264+ .maxlen = sizeof(int),
@@ -43622,7 +42268,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43622+#endif 42268+#endif
43623+#ifdef CONFIG_GRKERNSEC_BLACKHOLE 42269+#ifdef CONFIG_GRKERNSEC_BLACKHOLE
43624+ { 42270+ {
43625+ .ctl_name = CTL_UNNUMBERED,
43626+ .procname = "ip_blackhole", 42271+ .procname = "ip_blackhole",
43627+ .data = &grsec_enable_blackhole, 42272+ .data = &grsec_enable_blackhole,
43628+ .maxlen = sizeof(int), 42273+ .maxlen = sizeof(int),
@@ -43630,7 +42275,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43630+ .proc_handler = &proc_dointvec, 42275+ .proc_handler = &proc_dointvec,
43631+ }, 42276+ },
43632+ { 42277+ {
43633+ .ctl_name = CTL_UNNUMBERED,
43634+ .procname = "lastack_retries", 42278+ .procname = "lastack_retries",
43635+ .data = &grsec_lastack_retries, 42279+ .data = &grsec_lastack_retries,
43636+ .maxlen = sizeof(int), 42280+ .maxlen = sizeof(int),
@@ -43640,7 +42284,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43640+#endif 42284+#endif
43641+#ifdef CONFIG_GRKERNSEC_EXECLOG 42285+#ifdef CONFIG_GRKERNSEC_EXECLOG
43642+ { 42286+ {
43643+ .ctl_name = CTL_UNNUMBERED,
43644+ .procname = "exec_logging", 42287+ .procname = "exec_logging",
43645+ .data = &grsec_enable_execlog, 42288+ .data = &grsec_enable_execlog,
43646+ .maxlen = sizeof(int), 42289+ .maxlen = sizeof(int),
@@ -43650,7 +42293,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43650+#endif 42293+#endif
43651+#ifdef CONFIG_GRKERNSEC_RWXMAP_LOG 42294+#ifdef CONFIG_GRKERNSEC_RWXMAP_LOG
43652+ { 42295+ {
43653+ .ctl_name = CTL_UNNUMBERED,
43654+ .procname = "rwxmap_logging", 42296+ .procname = "rwxmap_logging",
43655+ .data = &grsec_enable_log_rwxmaps, 42297+ .data = &grsec_enable_log_rwxmaps,
43656+ .maxlen = sizeof(int), 42298+ .maxlen = sizeof(int),
@@ -43660,7 +42302,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43660+#endif 42302+#endif
43661+#ifdef CONFIG_GRKERNSEC_SIGNAL 42303+#ifdef CONFIG_GRKERNSEC_SIGNAL
43662+ { 42304+ {
43663+ .ctl_name = CTL_UNNUMBERED,
43664+ .procname = "signal_logging", 42305+ .procname = "signal_logging",
43665+ .data = &grsec_enable_signal, 42306+ .data = &grsec_enable_signal,
43666+ .maxlen = sizeof(int), 42307+ .maxlen = sizeof(int),
@@ -43670,7 +42311,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43670+#endif 42311+#endif
43671+#ifdef CONFIG_GRKERNSEC_FORKFAIL 42312+#ifdef CONFIG_GRKERNSEC_FORKFAIL
43672+ { 42313+ {
43673+ .ctl_name = CTL_UNNUMBERED,
43674+ .procname = "forkfail_logging", 42314+ .procname = "forkfail_logging",
43675+ .data = &grsec_enable_forkfail, 42315+ .data = &grsec_enable_forkfail,
43676+ .maxlen = sizeof(int), 42316+ .maxlen = sizeof(int),
@@ -43680,7 +42320,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43680+#endif 42320+#endif
43681+#ifdef CONFIG_GRKERNSEC_TIME 42321+#ifdef CONFIG_GRKERNSEC_TIME
43682+ { 42322+ {
43683+ .ctl_name = CTL_UNNUMBERED,
43684+ .procname = "timechange_logging", 42323+ .procname = "timechange_logging",
43685+ .data = &grsec_enable_time, 42324+ .data = &grsec_enable_time,
43686+ .maxlen = sizeof(int), 42325+ .maxlen = sizeof(int),
@@ -43690,7 +42329,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43690+#endif 42329+#endif
43691+#ifdef CONFIG_GRKERNSEC_CHROOT_SHMAT 42330+#ifdef CONFIG_GRKERNSEC_CHROOT_SHMAT
43692+ { 42331+ {
43693+ .ctl_name = CTL_UNNUMBERED,
43694+ .procname = "chroot_deny_shmat", 42332+ .procname = "chroot_deny_shmat",
43695+ .data = &grsec_enable_chroot_shmat, 42333+ .data = &grsec_enable_chroot_shmat,
43696+ .maxlen = sizeof(int), 42334+ .maxlen = sizeof(int),
@@ -43700,7 +42338,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43700+#endif 42338+#endif
43701+#ifdef CONFIG_GRKERNSEC_CHROOT_UNIX 42339+#ifdef CONFIG_GRKERNSEC_CHROOT_UNIX
43702+ { 42340+ {
43703+ .ctl_name = CTL_UNNUMBERED,
43704+ .procname = "chroot_deny_unix", 42341+ .procname = "chroot_deny_unix",
43705+ .data = &grsec_enable_chroot_unix, 42342+ .data = &grsec_enable_chroot_unix,
43706+ .maxlen = sizeof(int), 42343+ .maxlen = sizeof(int),
@@ -43710,7 +42347,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43710+#endif 42347+#endif
43711+#ifdef CONFIG_GRKERNSEC_CHROOT_MOUNT 42348+#ifdef CONFIG_GRKERNSEC_CHROOT_MOUNT
43712+ { 42349+ {
43713+ .ctl_name = CTL_UNNUMBERED,
43714+ .procname = "chroot_deny_mount", 42350+ .procname = "chroot_deny_mount",
43715+ .data = &grsec_enable_chroot_mount, 42351+ .data = &grsec_enable_chroot_mount,
43716+ .maxlen = sizeof(int), 42352+ .maxlen = sizeof(int),
@@ -43720,7 +42356,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43720+#endif 42356+#endif
43721+#ifdef CONFIG_GRKERNSEC_CHROOT_FCHDIR 42357+#ifdef CONFIG_GRKERNSEC_CHROOT_FCHDIR
43722+ { 42358+ {
43723+ .ctl_name = CTL_UNNUMBERED,
43724+ .procname = "chroot_deny_fchdir", 42359+ .procname = "chroot_deny_fchdir",
43725+ .data = &grsec_enable_chroot_fchdir, 42360+ .data = &grsec_enable_chroot_fchdir,
43726+ .maxlen = sizeof(int), 42361+ .maxlen = sizeof(int),
@@ -43730,7 +42365,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43730+#endif 42365+#endif
43731+#ifdef CONFIG_GRKERNSEC_CHROOT_DOUBLE 42366+#ifdef CONFIG_GRKERNSEC_CHROOT_DOUBLE
43732+ { 42367+ {
43733+ .ctl_name = CTL_UNNUMBERED,
43734+ .procname = "chroot_deny_chroot", 42368+ .procname = "chroot_deny_chroot",
43735+ .data = &grsec_enable_chroot_double, 42369+ .data = &grsec_enable_chroot_double,
43736+ .maxlen = sizeof(int), 42370+ .maxlen = sizeof(int),
@@ -43740,7 +42374,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43740+#endif 42374+#endif
43741+#ifdef CONFIG_GRKERNSEC_CHROOT_PIVOT 42375+#ifdef CONFIG_GRKERNSEC_CHROOT_PIVOT
43742+ { 42376+ {
43743+ .ctl_name = CTL_UNNUMBERED,
43744+ .procname = "chroot_deny_pivot", 42377+ .procname = "chroot_deny_pivot",
43745+ .data = &grsec_enable_chroot_pivot, 42378+ .data = &grsec_enable_chroot_pivot,
43746+ .maxlen = sizeof(int), 42379+ .maxlen = sizeof(int),
@@ -43750,7 +42383,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43750+#endif 42383+#endif
43751+#ifdef CONFIG_GRKERNSEC_CHROOT_CHDIR 42384+#ifdef CONFIG_GRKERNSEC_CHROOT_CHDIR
43752+ { 42385+ {
43753+ .ctl_name = CTL_UNNUMBERED,
43754+ .procname = "chroot_enforce_chdir", 42386+ .procname = "chroot_enforce_chdir",
43755+ .data = &grsec_enable_chroot_chdir, 42387+ .data = &grsec_enable_chroot_chdir,
43756+ .maxlen = sizeof(int), 42388+ .maxlen = sizeof(int),
@@ -43760,7 +42392,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43760+#endif 42392+#endif
43761+#ifdef CONFIG_GRKERNSEC_CHROOT_CHMOD 42393+#ifdef CONFIG_GRKERNSEC_CHROOT_CHMOD
43762+ { 42394+ {
43763+ .ctl_name = CTL_UNNUMBERED,
43764+ .procname = "chroot_deny_chmod", 42395+ .procname = "chroot_deny_chmod",
43765+ .data = &grsec_enable_chroot_chmod, 42396+ .data = &grsec_enable_chroot_chmod,
43766+ .maxlen = sizeof(int), 42397+ .maxlen = sizeof(int),
@@ -43770,7 +42401,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43770+#endif 42401+#endif
43771+#ifdef CONFIG_GRKERNSEC_CHROOT_MKNOD 42402+#ifdef CONFIG_GRKERNSEC_CHROOT_MKNOD
43772+ { 42403+ {
43773+ .ctl_name = CTL_UNNUMBERED,
43774+ .procname = "chroot_deny_mknod", 42404+ .procname = "chroot_deny_mknod",
43775+ .data = &grsec_enable_chroot_mknod, 42405+ .data = &grsec_enable_chroot_mknod,
43776+ .maxlen = sizeof(int), 42406+ .maxlen = sizeof(int),
@@ -43780,7 +42410,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43780+#endif 42410+#endif
43781+#ifdef CONFIG_GRKERNSEC_CHROOT_NICE 42411+#ifdef CONFIG_GRKERNSEC_CHROOT_NICE
43782+ { 42412+ {
43783+ .ctl_name = CTL_UNNUMBERED,
43784+ .procname = "chroot_restrict_nice", 42413+ .procname = "chroot_restrict_nice",
43785+ .data = &grsec_enable_chroot_nice, 42414+ .data = &grsec_enable_chroot_nice,
43786+ .maxlen = sizeof(int), 42415+ .maxlen = sizeof(int),
@@ -43790,7 +42419,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43790+#endif 42419+#endif
43791+#ifdef CONFIG_GRKERNSEC_CHROOT_EXECLOG 42420+#ifdef CONFIG_GRKERNSEC_CHROOT_EXECLOG
43792+ { 42421+ {
43793+ .ctl_name = CTL_UNNUMBERED,
43794+ .procname = "chroot_execlog", 42422+ .procname = "chroot_execlog",
43795+ .data = &grsec_enable_chroot_execlog, 42423+ .data = &grsec_enable_chroot_execlog,
43796+ .maxlen = sizeof(int), 42424+ .maxlen = sizeof(int),
@@ -43800,7 +42428,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43800+#endif 42428+#endif
43801+#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS 42429+#ifdef CONFIG_GRKERNSEC_CHROOT_CAPS
43802+ { 42430+ {
43803+ .ctl_name = CTL_UNNUMBERED,
43804+ .procname = "chroot_caps", 42431+ .procname = "chroot_caps",
43805+ .data = &grsec_enable_chroot_caps, 42432+ .data = &grsec_enable_chroot_caps,
43806+ .maxlen = sizeof(int), 42433+ .maxlen = sizeof(int),
@@ -43810,7 +42437,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43810+#endif 42437+#endif
43811+#ifdef CONFIG_GRKERNSEC_CHROOT_SYSCTL 42438+#ifdef CONFIG_GRKERNSEC_CHROOT_SYSCTL
43812+ { 42439+ {
43813+ .ctl_name = CTL_UNNUMBERED,
43814+ .procname = "chroot_deny_sysctl", 42440+ .procname = "chroot_deny_sysctl",
43815+ .data = &grsec_enable_chroot_sysctl, 42441+ .data = &grsec_enable_chroot_sysctl,
43816+ .maxlen = sizeof(int), 42442+ .maxlen = sizeof(int),
@@ -43820,7 +42446,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43820+#endif 42446+#endif
43821+#ifdef CONFIG_GRKERNSEC_TPE 42447+#ifdef CONFIG_GRKERNSEC_TPE
43822+ { 42448+ {
43823+ .ctl_name = CTL_UNNUMBERED,
43824+ .procname = "tpe", 42449+ .procname = "tpe",
43825+ .data = &grsec_enable_tpe, 42450+ .data = &grsec_enable_tpe,
43826+ .maxlen = sizeof(int), 42451+ .maxlen = sizeof(int),
@@ -43828,7 +42453,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43828+ .proc_handler = &proc_dointvec, 42453+ .proc_handler = &proc_dointvec,
43829+ }, 42454+ },
43830+ { 42455+ {
43831+ .ctl_name = CTL_UNNUMBERED,
43832+ .procname = "tpe_gid", 42456+ .procname = "tpe_gid",
43833+ .data = &grsec_tpe_gid, 42457+ .data = &grsec_tpe_gid,
43834+ .maxlen = sizeof(int), 42458+ .maxlen = sizeof(int),
@@ -43838,7 +42462,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43838+#endif 42462+#endif
43839+#ifdef CONFIG_GRKERNSEC_TPE_INVERT 42463+#ifdef CONFIG_GRKERNSEC_TPE_INVERT
43840+ { 42464+ {
43841+ .ctl_name = CTL_UNNUMBERED,
43842+ .procname = "tpe_invert", 42465+ .procname = "tpe_invert",
43843+ .data = &grsec_enable_tpe_invert, 42466+ .data = &grsec_enable_tpe_invert,
43844+ .maxlen = sizeof(int), 42467+ .maxlen = sizeof(int),
@@ -43848,7 +42471,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43848+#endif 42471+#endif
43849+#ifdef CONFIG_GRKERNSEC_TPE_ALL 42472+#ifdef CONFIG_GRKERNSEC_TPE_ALL
43850+ { 42473+ {
43851+ .ctl_name = CTL_UNNUMBERED,
43852+ .procname = "tpe_restrict_all", 42474+ .procname = "tpe_restrict_all",
43853+ .data = &grsec_enable_tpe_all, 42475+ .data = &grsec_enable_tpe_all,
43854+ .maxlen = sizeof(int), 42476+ .maxlen = sizeof(int),
@@ -43858,7 +42480,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43858+#endif 42480+#endif
43859+#ifdef CONFIG_GRKERNSEC_SOCKET_ALL 42481+#ifdef CONFIG_GRKERNSEC_SOCKET_ALL
43860+ { 42482+ {
43861+ .ctl_name = CTL_UNNUMBERED,
43862+ .procname = "socket_all", 42483+ .procname = "socket_all",
43863+ .data = &grsec_enable_socket_all, 42484+ .data = &grsec_enable_socket_all,
43864+ .maxlen = sizeof(int), 42485+ .maxlen = sizeof(int),
@@ -43866,7 +42487,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43866+ .proc_handler = &proc_dointvec, 42487+ .proc_handler = &proc_dointvec,
43867+ }, 42488+ },
43868+ { 42489+ {
43869+ .ctl_name = CTL_UNNUMBERED,
43870+ .procname = "socket_all_gid", 42490+ .procname = "socket_all_gid",
43871+ .data = &grsec_socket_all_gid, 42491+ .data = &grsec_socket_all_gid,
43872+ .maxlen = sizeof(int), 42492+ .maxlen = sizeof(int),
@@ -43876,7 +42496,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43876+#endif 42496+#endif
43877+#ifdef CONFIG_GRKERNSEC_SOCKET_CLIENT 42497+#ifdef CONFIG_GRKERNSEC_SOCKET_CLIENT
43878+ { 42498+ {
43879+ .ctl_name = CTL_UNNUMBERED,
43880+ .procname = "socket_client", 42499+ .procname = "socket_client",
43881+ .data = &grsec_enable_socket_client, 42500+ .data = &grsec_enable_socket_client,
43882+ .maxlen = sizeof(int), 42501+ .maxlen = sizeof(int),
@@ -43884,7 +42503,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43884+ .proc_handler = &proc_dointvec, 42503+ .proc_handler = &proc_dointvec,
43885+ }, 42504+ },
43886+ { 42505+ {
43887+ .ctl_name = CTL_UNNUMBERED,
43888+ .procname = "socket_client_gid", 42506+ .procname = "socket_client_gid",
43889+ .data = &grsec_socket_client_gid, 42507+ .data = &grsec_socket_client_gid,
43890+ .maxlen = sizeof(int), 42508+ .maxlen = sizeof(int),
@@ -43894,7 +42512,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43894+#endif 42512+#endif
43895+#ifdef CONFIG_GRKERNSEC_SOCKET_SERVER 42513+#ifdef CONFIG_GRKERNSEC_SOCKET_SERVER
43896+ { 42514+ {
43897+ .ctl_name = CTL_UNNUMBERED,
43898+ .procname = "socket_server", 42515+ .procname = "socket_server",
43899+ .data = &grsec_enable_socket_server, 42516+ .data = &grsec_enable_socket_server,
43900+ .maxlen = sizeof(int), 42517+ .maxlen = sizeof(int),
@@ -43902,7 +42519,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43902+ .proc_handler = &proc_dointvec, 42519+ .proc_handler = &proc_dointvec,
43903+ }, 42520+ },
43904+ { 42521+ {
43905+ .ctl_name = CTL_UNNUMBERED,
43906+ .procname = "socket_server_gid", 42522+ .procname = "socket_server_gid",
43907+ .data = &grsec_socket_server_gid, 42523+ .data = &grsec_socket_server_gid,
43908+ .maxlen = sizeof(int), 42524+ .maxlen = sizeof(int),
@@ -43912,7 +42528,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43912+#endif 42528+#endif
43913+#ifdef CONFIG_GRKERNSEC_AUDIT_GROUP 42529+#ifdef CONFIG_GRKERNSEC_AUDIT_GROUP
43914+ { 42530+ {
43915+ .ctl_name = CTL_UNNUMBERED,
43916+ .procname = "audit_group", 42531+ .procname = "audit_group",
43917+ .data = &grsec_enable_group, 42532+ .data = &grsec_enable_group,
43918+ .maxlen = sizeof(int), 42533+ .maxlen = sizeof(int),
@@ -43920,7 +42535,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43920+ .proc_handler = &proc_dointvec, 42535+ .proc_handler = &proc_dointvec,
43921+ }, 42536+ },
43922+ { 42537+ {
43923+ .ctl_name = CTL_UNNUMBERED,
43924+ .procname = "audit_gid", 42538+ .procname = "audit_gid",
43925+ .data = &grsec_audit_gid, 42539+ .data = &grsec_audit_gid,
43926+ .maxlen = sizeof(int), 42540+ .maxlen = sizeof(int),
@@ -43930,7 +42544,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43930+#endif 42544+#endif
43931+#ifdef CONFIG_GRKERNSEC_AUDIT_CHDIR 42545+#ifdef CONFIG_GRKERNSEC_AUDIT_CHDIR
43932+ { 42546+ {
43933+ .ctl_name = CTL_UNNUMBERED,
43934+ .procname = "audit_chdir", 42547+ .procname = "audit_chdir",
43935+ .data = &grsec_enable_chdir, 42548+ .data = &grsec_enable_chdir,
43936+ .maxlen = sizeof(int), 42549+ .maxlen = sizeof(int),
@@ -43940,7 +42553,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43940+#endif 42553+#endif
43941+#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT 42554+#ifdef CONFIG_GRKERNSEC_AUDIT_MOUNT
43942+ { 42555+ {
43943+ .ctl_name = CTL_UNNUMBERED,
43944+ .procname = "audit_mount", 42556+ .procname = "audit_mount",
43945+ .data = &grsec_enable_mount, 42557+ .data = &grsec_enable_mount,
43946+ .maxlen = sizeof(int), 42558+ .maxlen = sizeof(int),
@@ -43950,7 +42562,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43950+#endif 42562+#endif
43951+#ifdef CONFIG_GRKERNSEC_AUDIT_TEXTREL 42563+#ifdef CONFIG_GRKERNSEC_AUDIT_TEXTREL
43952+ { 42564+ {
43953+ .ctl_name = CTL_UNNUMBERED,
43954+ .procname = "audit_textrel", 42565+ .procname = "audit_textrel",
43955+ .data = &grsec_enable_audit_textrel, 42566+ .data = &grsec_enable_audit_textrel,
43956+ .maxlen = sizeof(int), 42567+ .maxlen = sizeof(int),
@@ -43960,7 +42571,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43960+#endif 42571+#endif
43961+#ifdef CONFIG_GRKERNSEC_DMESG 42572+#ifdef CONFIG_GRKERNSEC_DMESG
43962+ { 42573+ {
43963+ .ctl_name = CTL_UNNUMBERED,
43964+ .procname = "dmesg", 42574+ .procname = "dmesg",
43965+ .data = &grsec_enable_dmesg, 42575+ .data = &grsec_enable_dmesg,
43966+ .maxlen = sizeof(int), 42576+ .maxlen = sizeof(int),
@@ -43970,7 +42580,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43970+#endif 42580+#endif
43971+#ifdef CONFIG_GRKERNSEC_CHROOT_FINDTASK 42581+#ifdef CONFIG_GRKERNSEC_CHROOT_FINDTASK
43972+ { 42582+ {
43973+ .ctl_name = CTL_UNNUMBERED,
43974+ .procname = "chroot_findtask", 42583+ .procname = "chroot_findtask",
43975+ .data = &grsec_enable_chroot_findtask, 42584+ .data = &grsec_enable_chroot_findtask,
43976+ .maxlen = sizeof(int), 42585+ .maxlen = sizeof(int),
@@ -43980,7 +42589,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43980+#endif 42589+#endif
43981+#ifdef CONFIG_GRKERNSEC_RESLOG 42590+#ifdef CONFIG_GRKERNSEC_RESLOG
43982+ { 42591+ {
43983+ .ctl_name = CTL_UNNUMBERED,
43984+ .procname = "resource_logging", 42592+ .procname = "resource_logging",
43985+ .data = &grsec_resource_logging, 42593+ .data = &grsec_resource_logging,
43986+ .maxlen = sizeof(int), 42594+ .maxlen = sizeof(int),
@@ -43990,7 +42598,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
43990+#endif 42598+#endif
43991+#ifdef CONFIG_GRKERNSEC_AUDIT_PTRACE 42599+#ifdef CONFIG_GRKERNSEC_AUDIT_PTRACE
43992+ { 42600+ {
43993+ .ctl_name = CTL_UNNUMBERED,
43994+ .procname = "audit_ptrace", 42601+ .procname = "audit_ptrace",
43995+ .data = &grsec_enable_audit_ptrace, 42602+ .data = &grsec_enable_audit_ptrace,
43996+ .maxlen = sizeof(int), 42603+ .maxlen = sizeof(int),
@@ -44000,7 +42607,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
44000+#endif 42607+#endif
44001+#ifdef CONFIG_GRKERNSEC_HARDEN_PTRACE 42608+#ifdef CONFIG_GRKERNSEC_HARDEN_PTRACE
44002+ { 42609+ {
44003+ .ctl_name = CTL_UNNUMBERED,
44004+ .procname = "harden_ptrace", 42610+ .procname = "harden_ptrace",
44005+ .data = &grsec_enable_harden_ptrace, 42611+ .data = &grsec_enable_harden_ptrace,
44006+ .maxlen = sizeof(int), 42612+ .maxlen = sizeof(int),
@@ -44009,7 +42615,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
44009+ }, 42615+ },
44010+#endif 42616+#endif
44011+ { 42617+ {
44012+ .ctl_name = CTL_UNNUMBERED,
44013+ .procname = "grsec_lock", 42618+ .procname = "grsec_lock",
44014+ .data = &grsec_lock, 42619+ .data = &grsec_lock,
44015+ .maxlen = sizeof(int), 42620+ .maxlen = sizeof(int),
@@ -44019,7 +42624,6 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
44019+#endif 42624+#endif
44020+#ifdef CONFIG_GRKERNSEC_ROFS 42625+#ifdef CONFIG_GRKERNSEC_ROFS
44021+ { 42626+ {
44022+ .ctl_name = CTL_UNNUMBERED,
44023+ .procname = "romount_protect", 42627+ .procname = "romount_protect",
44024+ .data = &grsec_enable_rofs, 42628+ .data = &grsec_enable_rofs,
44025+ .maxlen = sizeof(int), 42629+ .maxlen = sizeof(int),
@@ -44029,12 +42633,12 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_sysctl.c linux-2.6.32.24/grsecurity/
44029+ .extra2 = &one, 42633+ .extra2 = &one,
44030+ }, 42634+ },
44031+#endif 42635+#endif
44032+ { .ctl_name = 0 } 42636+ { }
44033+}; 42637+};
44034+#endif 42638+#endif
44035diff -urNp linux-2.6.32.24/grsecurity/grsec_time.c linux-2.6.32.24/grsecurity/grsec_time.c 42639diff -urNp linux-2.6.35.7/grsecurity/grsec_time.c linux-2.6.35.7/grsecurity/grsec_time.c
44036--- linux-2.6.32.24/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500 42640--- linux-2.6.35.7/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500
44037+++ linux-2.6.32.24/grsecurity/grsec_time.c 2010-10-23 19:59:20.000000000 -0400 42641+++ linux-2.6.35.7/grsecurity/grsec_time.c 2010-09-17 20:12:37.000000000 -0400
44038@@ -0,0 +1,13 @@ 42642@@ -0,0 +1,13 @@
44039+#include <linux/kernel.h> 42643+#include <linux/kernel.h>
44040+#include <linux/sched.h> 42644+#include <linux/sched.h>
@@ -44049,9 +42653,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_time.c linux-2.6.32.24/grsecurity/gr
44049+#endif 42653+#endif
44050+ return; 42654+ return;
44051+} 42655+}
44052diff -urNp linux-2.6.32.24/grsecurity/grsec_tpe.c linux-2.6.32.24/grsecurity/grsec_tpe.c 42656diff -urNp linux-2.6.35.7/grsecurity/grsec_tpe.c linux-2.6.35.7/grsecurity/grsec_tpe.c
44053--- linux-2.6.32.24/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500 42657--- linux-2.6.35.7/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500
44054+++ linux-2.6.32.24/grsecurity/grsec_tpe.c 2010-10-23 19:59:20.000000000 -0400 42658+++ linux-2.6.35.7/grsecurity/grsec_tpe.c 2010-09-17 20:12:37.000000000 -0400
44055@@ -0,0 +1,39 @@ 42659@@ -0,0 +1,39 @@
44056+#include <linux/kernel.h> 42660+#include <linux/kernel.h>
44057+#include <linux/sched.h> 42661+#include <linux/sched.h>
@@ -44092,9 +42696,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsec_tpe.c linux-2.6.32.24/grsecurity/grs
44092+#endif 42696+#endif
44093+ return 1; 42697+ return 1;
44094+} 42698+}
44095diff -urNp linux-2.6.32.24/grsecurity/grsum.c linux-2.6.32.24/grsecurity/grsum.c 42699diff -urNp linux-2.6.35.7/grsecurity/grsum.c linux-2.6.35.7/grsecurity/grsum.c
44096--- linux-2.6.32.24/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500 42700--- linux-2.6.35.7/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500
44097+++ linux-2.6.32.24/grsecurity/grsum.c 2010-10-23 19:59:20.000000000 -0400 42701+++ linux-2.6.35.7/grsecurity/grsum.c 2010-09-17 20:12:37.000000000 -0400
44098@@ -0,0 +1,61 @@ 42702@@ -0,0 +1,61 @@
44099+#include <linux/err.h> 42703+#include <linux/err.h>
44100+#include <linux/kernel.h> 42704+#include <linux/kernel.h>
@@ -44157,9 +42761,9 @@ diff -urNp linux-2.6.32.24/grsecurity/grsum.c linux-2.6.32.24/grsecurity/grsum.c
44157+ 42761+
44158+ return retval; 42762+ return retval;
44159+} 42763+}
44160diff -urNp linux-2.6.32.24/grsecurity/Kconfig linux-2.6.32.24/grsecurity/Kconfig 42764diff -urNp linux-2.6.35.7/grsecurity/Kconfig linux-2.6.35.7/grsecurity/Kconfig
44161--- linux-2.6.32.24/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500 42765--- linux-2.6.35.7/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500
44162+++ linux-2.6.32.24/grsecurity/Kconfig 2010-10-23 19:59:20.000000000 -0400 42766+++ linux-2.6.35.7/grsecurity/Kconfig 2010-10-18 21:01:30.000000000 -0400
44163@@ -0,0 +1,995 @@ 42767@@ -0,0 +1,995 @@
44164+# 42768+#
44165+# grecurity configuration 42769+# grecurity configuration
@@ -45156,9 +43760,9 @@ diff -urNp linux-2.6.32.24/grsecurity/Kconfig linux-2.6.32.24/grsecurity/Kconfig
45156+endmenu 43760+endmenu
45157+ 43761+
45158+endmenu 43762+endmenu
45159diff -urNp linux-2.6.32.24/grsecurity/Makefile linux-2.6.32.24/grsecurity/Makefile 43763diff -urNp linux-2.6.35.7/grsecurity/Makefile linux-2.6.35.7/grsecurity/Makefile
45160--- linux-2.6.32.24/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500 43764--- linux-2.6.35.7/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500
45161+++ linux-2.6.32.24/grsecurity/Makefile 2010-10-23 19:59:20.000000000 -0400 43765+++ linux-2.6.35.7/grsecurity/Makefile 2010-10-18 21:01:30.000000000 -0400
45162@@ -0,0 +1,29 @@ 43766@@ -0,0 +1,29 @@
45163+# grsecurity's ACL system was originally written in 2001 by Michael Dalton 43767+# grsecurity's ACL system was originally written in 2001 by Michael Dalton
45164+# during 2001-2009 it has been completely redesigned by Brad Spengler 43768+# during 2001-2009 it has been completely redesigned by Brad Spengler
@@ -45189,10 +43793,10 @@ diff -urNp linux-2.6.32.24/grsecurity/Makefile linux-2.6.32.24/grsecurity/Makefi
45189+ @-chmod -f 700 . 43793+ @-chmod -f 700 .
45190+ @echo ' grsec: protected kernel image paths' 43794+ @echo ' grsec: protected kernel image paths'
45191+endif 43795+endif
45192diff -urNp linux-2.6.32.24/include/acpi/acoutput.h linux-2.6.32.24/include/acpi/acoutput.h 43796diff -urNp linux-2.6.35.7/include/acpi/acoutput.h linux-2.6.35.7/include/acpi/acoutput.h
45193--- linux-2.6.32.24/include/acpi/acoutput.h 2010-08-13 16:24:37.000000000 -0400 43797--- linux-2.6.35.7/include/acpi/acoutput.h 2010-08-26 19:47:12.000000000 -0400
45194+++ linux-2.6.32.24/include/acpi/acoutput.h 2010-10-23 19:59:20.000000000 -0400 43798+++ linux-2.6.35.7/include/acpi/acoutput.h 2010-09-17 20:12:09.000000000 -0400
45195@@ -264,8 +264,8 @@ 43799@@ -268,8 +268,8 @@
45196 * leaving no executable debug code! 43800 * leaving no executable debug code!
45197 */ 43801 */
45198 #define ACPI_FUNCTION_NAME(a) 43802 #define ACPI_FUNCTION_NAME(a)
@@ -45203,10 +43807,10 @@ diff -urNp linux-2.6.32.24/include/acpi/acoutput.h linux-2.6.32.24/include/acpi/
45203 43807
45204 #endif /* ACPI_DEBUG_OUTPUT */ 43808 #endif /* ACPI_DEBUG_OUTPUT */
45205 43809
45206diff -urNp linux-2.6.32.24/include/acpi/acpi_drivers.h linux-2.6.32.24/include/acpi/acpi_drivers.h 43810diff -urNp linux-2.6.35.7/include/acpi/acpi_drivers.h linux-2.6.35.7/include/acpi/acpi_drivers.h
45207--- linux-2.6.32.24/include/acpi/acpi_drivers.h 2010-08-13 16:24:37.000000000 -0400 43811--- linux-2.6.35.7/include/acpi/acpi_drivers.h 2010-08-26 19:47:12.000000000 -0400
45208+++ linux-2.6.32.24/include/acpi/acpi_drivers.h 2010-10-23 19:59:20.000000000 -0400 43812+++ linux-2.6.35.7/include/acpi/acpi_drivers.h 2010-09-17 20:12:09.000000000 -0400
45209@@ -119,8 +119,8 @@ int acpi_processor_set_thermal_limit(acp 43813@@ -121,8 +121,8 @@ int acpi_processor_set_thermal_limit(acp
45210 Dock Station 43814 Dock Station
45211 -------------------------------------------------------------------------- */ 43815 -------------------------------------------------------------------------- */
45212 struct acpi_dock_ops { 43816 struct acpi_dock_ops {
@@ -45217,7 +43821,7 @@ diff -urNp linux-2.6.32.24/include/acpi/acpi_drivers.h linux-2.6.32.24/include/a
45217 }; 43821 };
45218 43822
45219 #if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE) 43823 #if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
45220@@ -128,7 +128,7 @@ extern int is_dock_device(acpi_handle ha 43824@@ -130,7 +130,7 @@ extern int is_dock_device(acpi_handle ha
45221 extern int register_dock_notifier(struct notifier_block *nb); 43825 extern int register_dock_notifier(struct notifier_block *nb);
45222 extern void unregister_dock_notifier(struct notifier_block *nb); 43826 extern void unregister_dock_notifier(struct notifier_block *nb);
45223 extern int register_hotplug_dock_device(acpi_handle handle, 43827 extern int register_hotplug_dock_device(acpi_handle handle,
@@ -45226,7 +43830,7 @@ diff -urNp linux-2.6.32.24/include/acpi/acpi_drivers.h linux-2.6.32.24/include/a
45226 void *context); 43830 void *context);
45227 extern void unregister_hotplug_dock_device(acpi_handle handle); 43831 extern void unregister_hotplug_dock_device(acpi_handle handle);
45228 #else 43832 #else
45229@@ -144,7 +144,7 @@ static inline void unregister_dock_notif 43833@@ -146,7 +146,7 @@ static inline void unregister_dock_notif
45230 { 43834 {
45231 } 43835 }
45232 static inline int register_hotplug_dock_device(acpi_handle handle, 43836 static inline int register_hotplug_dock_device(acpi_handle handle,
@@ -45235,9 +43839,9 @@ diff -urNp linux-2.6.32.24/include/acpi/acpi_drivers.h linux-2.6.32.24/include/a
45235 void *context) 43839 void *context)
45236 { 43840 {
45237 return -ENODEV; 43841 return -ENODEV;
45238diff -urNp linux-2.6.32.24/include/asm-generic/atomic-long.h linux-2.6.32.24/include/asm-generic/atomic-long.h 43842diff -urNp linux-2.6.35.7/include/asm-generic/atomic-long.h linux-2.6.35.7/include/asm-generic/atomic-long.h
45239--- linux-2.6.32.24/include/asm-generic/atomic-long.h 2010-08-13 16:24:37.000000000 -0400 43843--- linux-2.6.35.7/include/asm-generic/atomic-long.h 2010-08-26 19:47:12.000000000 -0400
45240+++ linux-2.6.32.24/include/asm-generic/atomic-long.h 2010-10-23 19:59:20.000000000 -0400 43844+++ linux-2.6.35.7/include/asm-generic/atomic-long.h 2010-10-12 10:19:29.000000000 -0400
45241@@ -22,6 +22,12 @@ 43845@@ -22,6 +22,12 @@
45242 43846
45243 typedef atomic64_t atomic_long_t; 43847 typedef atomic64_t atomic_long_t;
@@ -45456,7 +44060,7 @@ diff -urNp linux-2.6.32.24/include/asm-generic/atomic-long.h linux-2.6.32.24/inc
45456 static inline long atomic_long_dec_return(atomic_long_t *l) 44060 static inline long atomic_long_dec_return(atomic_long_t *l)
45457 { 44061 {
45458 atomic_t *v = (atomic_t *)l; 44062 atomic_t *v = (atomic_t *)l;
45459@@ -255,4 +375,37 @@ static inline long atomic_long_add_unles 44063@@ -255,4 +375,39 @@ static inline long atomic_long_add_unles
45460 44064
45461 #endif /* BITS_PER_LONG == 64 */ 44065 #endif /* BITS_PER_LONG == 64 */
45462 44066
@@ -45469,6 +44073,7 @@ diff -urNp linux-2.6.32.24/include/asm-generic/atomic-long.h linux-2.6.32.24/inc
45469+ atomic_sub_unchecked(0, (atomic_unchecked_t *)NULL); 44073+ atomic_sub_unchecked(0, (atomic_unchecked_t *)NULL);
45470+ atomic_inc_unchecked((atomic_unchecked_t *)NULL); 44074+ atomic_inc_unchecked((atomic_unchecked_t *)NULL);
45471+ atomic_inc_return_unchecked((atomic_unchecked_t *)NULL); 44075+ atomic_inc_return_unchecked((atomic_unchecked_t *)NULL);
44076+ atomic_add_return_unchecked(0, (atomic_unchecked_t *)NULL);
45472+ 44077+
45473+ atomic_long_read_unchecked((atomic_long_unchecked_t *)NULL); 44078+ atomic_long_read_unchecked((atomic_long_unchecked_t *)NULL);
45474+ atomic_long_set_unchecked((atomic_long_unchecked_t *)NULL, 0); 44079+ atomic_long_set_unchecked((atomic_long_unchecked_t *)NULL, 0);
@@ -45484,6 +44089,7 @@ diff -urNp linux-2.6.32.24/include/asm-generic/atomic-long.h linux-2.6.32.24/inc
45484+#define atomic_sub_unchecked(i, v) atomic_sub((i), (v)) 44089+#define atomic_sub_unchecked(i, v) atomic_sub((i), (v))
45485+#define atomic_inc_unchecked(v) atomic_inc(v) 44090+#define atomic_inc_unchecked(v) atomic_inc(v)
45486+#define atomic_inc_return_unchecked(v) atomic_inc_return(v) 44091+#define atomic_inc_return_unchecked(v) atomic_inc_return(v)
44092+#define atomic_add_return_unchecked(i, v) atomic_add_return((i), (v))
45487+ 44093+
45488+#define atomic_long_read_unchecked(v) atomic_long_read(v) 44094+#define atomic_long_read_unchecked(v) atomic_long_read(v)
45489+#define atomic_long_set_unchecked(v, i) atomic_long_set((v), (i)) 44095+#define atomic_long_set_unchecked(v, i) atomic_long_set((v), (i))
@@ -45494,9 +44100,9 @@ diff -urNp linux-2.6.32.24/include/asm-generic/atomic-long.h linux-2.6.32.24/inc
45494+#endif 44100+#endif
45495+ 44101+
45496 #endif /* _ASM_GENERIC_ATOMIC_LONG_H */ 44102 #endif /* _ASM_GENERIC_ATOMIC_LONG_H */
45497diff -urNp linux-2.6.32.24/include/asm-generic/dma-mapping-common.h linux-2.6.32.24/include/asm-generic/dma-mapping-common.h 44103diff -urNp linux-2.6.35.7/include/asm-generic/dma-mapping-common.h linux-2.6.35.7/include/asm-generic/dma-mapping-common.h
45498--- linux-2.6.32.24/include/asm-generic/dma-mapping-common.h 2010-08-13 16:24:37.000000000 -0400 44104--- linux-2.6.35.7/include/asm-generic/dma-mapping-common.h 2010-08-26 19:47:12.000000000 -0400
45499+++ linux-2.6.32.24/include/asm-generic/dma-mapping-common.h 2010-10-23 19:59:20.000000000 -0400 44105+++ linux-2.6.35.7/include/asm-generic/dma-mapping-common.h 2010-09-17 20:12:09.000000000 -0400
45500@@ -11,7 +11,7 @@ static inline dma_addr_t dma_map_single_ 44106@@ -11,7 +11,7 @@ static inline dma_addr_t dma_map_single_
45501 enum dma_data_direction dir, 44107 enum dma_data_direction dir,
45502 struct dma_attrs *attrs) 44108 struct dma_attrs *attrs)
@@ -45569,25 +44175,7 @@ diff -urNp linux-2.6.32.24/include/asm-generic/dma-mapping-common.h linux-2.6.32
45569 44175
45570 BUG_ON(!valid_dma_direction(dir)); 44176 BUG_ON(!valid_dma_direction(dir));
45571 if (ops->sync_single_for_device) 44177 if (ops->sync_single_for_device)
45572@@ -123,7 +123,7 @@ static inline void dma_sync_single_range 44178@@ -139,7 +139,7 @@ static inline void
45573 size_t size,
45574 enum dma_data_direction dir)
45575 {
45576- struct dma_map_ops *ops = get_dma_ops(dev);
45577+ const struct dma_map_ops *ops = get_dma_ops(dev);
45578
45579 BUG_ON(!valid_dma_direction(dir));
45580 if (ops->sync_single_range_for_cpu) {
45581@@ -140,7 +140,7 @@ static inline void dma_sync_single_range
45582 size_t size,
45583 enum dma_data_direction dir)
45584 {
45585- struct dma_map_ops *ops = get_dma_ops(dev);
45586+ const struct dma_map_ops *ops = get_dma_ops(dev);
45587
45588 BUG_ON(!valid_dma_direction(dir));
45589 if (ops->sync_single_range_for_device) {
45590@@ -155,7 +155,7 @@ static inline void
45591 dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, 44179 dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
45592 int nelems, enum dma_data_direction dir) 44180 int nelems, enum dma_data_direction dir)
45593 { 44181 {
@@ -45596,7 +44184,7 @@ diff -urNp linux-2.6.32.24/include/asm-generic/dma-mapping-common.h linux-2.6.32
45596 44184
45597 BUG_ON(!valid_dma_direction(dir)); 44185 BUG_ON(!valid_dma_direction(dir));
45598 if (ops->sync_sg_for_cpu) 44186 if (ops->sync_sg_for_cpu)
45599@@ -167,7 +167,7 @@ static inline void 44187@@ -151,7 +151,7 @@ static inline void
45600 dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, 44188 dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
45601 int nelems, enum dma_data_direction dir) 44189 int nelems, enum dma_data_direction dir)
45602 { 44190 {
@@ -45605,9 +44193,9 @@ diff -urNp linux-2.6.32.24/include/asm-generic/dma-mapping-common.h linux-2.6.32
45605 44193
45606 BUG_ON(!valid_dma_direction(dir)); 44194 BUG_ON(!valid_dma_direction(dir));
45607 if (ops->sync_sg_for_device) 44195 if (ops->sync_sg_for_device)
45608diff -urNp linux-2.6.32.24/include/asm-generic/futex.h linux-2.6.32.24/include/asm-generic/futex.h 44196diff -urNp linux-2.6.35.7/include/asm-generic/futex.h linux-2.6.35.7/include/asm-generic/futex.h
45609--- linux-2.6.32.24/include/asm-generic/futex.h 2010-08-13 16:24:37.000000000 -0400 44197--- linux-2.6.35.7/include/asm-generic/futex.h 2010-08-26 19:47:12.000000000 -0400
45610+++ linux-2.6.32.24/include/asm-generic/futex.h 2010-10-23 19:59:20.000000000 -0400 44198+++ linux-2.6.35.7/include/asm-generic/futex.h 2010-09-17 20:12:09.000000000 -0400
45611@@ -6,7 +6,7 @@ 44199@@ -6,7 +6,7 @@
45612 #include <asm/errno.h> 44200 #include <asm/errno.h>
45613 44201
@@ -45626,9 +44214,9 @@ diff -urNp linux-2.6.32.24/include/asm-generic/futex.h linux-2.6.32.24/include/a
45626 { 44214 {
45627 return -ENOSYS; 44215 return -ENOSYS;
45628 } 44216 }
45629diff -urNp linux-2.6.32.24/include/asm-generic/int-l64.h linux-2.6.32.24/include/asm-generic/int-l64.h 44217diff -urNp linux-2.6.35.7/include/asm-generic/int-l64.h linux-2.6.35.7/include/asm-generic/int-l64.h
45630--- linux-2.6.32.24/include/asm-generic/int-l64.h 2010-08-13 16:24:37.000000000 -0400 44218--- linux-2.6.35.7/include/asm-generic/int-l64.h 2010-08-26 19:47:12.000000000 -0400
45631+++ linux-2.6.32.24/include/asm-generic/int-l64.h 2010-10-23 19:59:20.000000000 -0400 44219+++ linux-2.6.35.7/include/asm-generic/int-l64.h 2010-09-17 20:12:09.000000000 -0400
45632@@ -46,6 +46,8 @@ typedef unsigned int u32; 44220@@ -46,6 +46,8 @@ typedef unsigned int u32;
45633 typedef signed long s64; 44221 typedef signed long s64;
45634 typedef unsigned long u64; 44222 typedef unsigned long u64;
@@ -45638,9 +44226,9 @@ diff -urNp linux-2.6.32.24/include/asm-generic/int-l64.h linux-2.6.32.24/include
45638 #define S8_C(x) x 44226 #define S8_C(x) x
45639 #define U8_C(x) x ## U 44227 #define U8_C(x) x ## U
45640 #define S16_C(x) x 44228 #define S16_C(x) x
45641diff -urNp linux-2.6.32.24/include/asm-generic/int-ll64.h linux-2.6.32.24/include/asm-generic/int-ll64.h 44229diff -urNp linux-2.6.35.7/include/asm-generic/int-ll64.h linux-2.6.35.7/include/asm-generic/int-ll64.h
45642--- linux-2.6.32.24/include/asm-generic/int-ll64.h 2010-08-13 16:24:37.000000000 -0400 44230--- linux-2.6.35.7/include/asm-generic/int-ll64.h 2010-08-26 19:47:12.000000000 -0400
45643+++ linux-2.6.32.24/include/asm-generic/int-ll64.h 2010-10-23 19:59:20.000000000 -0400 44231+++ linux-2.6.35.7/include/asm-generic/int-ll64.h 2010-09-17 20:12:09.000000000 -0400
45644@@ -51,6 +51,8 @@ typedef unsigned int u32; 44232@@ -51,6 +51,8 @@ typedef unsigned int u32;
45645 typedef signed long long s64; 44233 typedef signed long long s64;
45646 typedef unsigned long long u64; 44234 typedef unsigned long long u64;
@@ -45650,22 +44238,25 @@ diff -urNp linux-2.6.32.24/include/asm-generic/int-ll64.h linux-2.6.32.24/includ
45650 #define S8_C(x) x 44238 #define S8_C(x) x
45651 #define U8_C(x) x ## U 44239 #define U8_C(x) x ## U
45652 #define S16_C(x) x 44240 #define S16_C(x) x
45653diff -urNp linux-2.6.32.24/include/asm-generic/kmap_types.h linux-2.6.32.24/include/asm-generic/kmap_types.h 44241diff -urNp linux-2.6.35.7/include/asm-generic/kmap_types.h linux-2.6.35.7/include/asm-generic/kmap_types.h
45654--- linux-2.6.32.24/include/asm-generic/kmap_types.h 2010-08-13 16:24:37.000000000 -0400 44242--- linux-2.6.35.7/include/asm-generic/kmap_types.h 2010-08-26 19:47:12.000000000 -0400
45655+++ linux-2.6.32.24/include/asm-generic/kmap_types.h 2010-10-23 19:59:20.000000000 -0400 44243+++ linux-2.6.35.7/include/asm-generic/kmap_types.h 2010-09-17 20:12:09.000000000 -0400
45656@@ -28,7 +28,8 @@ KMAP_D(15) KM_UML_USERCOPY, 44244@@ -29,10 +29,11 @@ KMAP_D(16) KM_IRQ_PTE,
45657 KMAP_D(16) KM_IRQ_PTE,
45658 KMAP_D(17) KM_NMI, 44245 KMAP_D(17) KM_NMI,
45659 KMAP_D(18) KM_NMI_PTE, 44246 KMAP_D(18) KM_NMI_PTE,
45660-KMAP_D(19) KM_TYPE_NR 44247 KMAP_D(19) KM_KDB,
45661+KMAP_D(19) KM_CLEARPAGE, 44248+KMAP_D(20) KM_CLEARPAGE,
45662+KMAP_D(20) KM_TYPE_NR 44249 /*
44250 * Remember to update debug_kmap_atomic() when adding new kmap types!
44251 */
44252-KMAP_D(20) KM_TYPE_NR
44253+KMAP_D(21) KM_TYPE_NR
45663 }; 44254 };
45664 44255
45665 #undef KMAP_D 44256 #undef KMAP_D
45666diff -urNp linux-2.6.32.24/include/asm-generic/pgtable.h linux-2.6.32.24/include/asm-generic/pgtable.h 44257diff -urNp linux-2.6.35.7/include/asm-generic/pgtable.h linux-2.6.35.7/include/asm-generic/pgtable.h
45667--- linux-2.6.32.24/include/asm-generic/pgtable.h 2010-08-13 16:24:37.000000000 -0400 44258--- linux-2.6.35.7/include/asm-generic/pgtable.h 2010-08-26 19:47:12.000000000 -0400
45668+++ linux-2.6.32.24/include/asm-generic/pgtable.h 2010-10-23 19:59:20.000000000 -0400 44259+++ linux-2.6.35.7/include/asm-generic/pgtable.h 2010-09-17 20:12:09.000000000 -0400
45669@@ -344,6 +344,14 @@ extern void untrack_pfn_vma(struct vm_ar 44260@@ -344,6 +344,14 @@ extern void untrack_pfn_vma(struct vm_ar
45670 unsigned long size); 44261 unsigned long size);
45671 #endif 44262 #endif
@@ -45681,9 +44272,9 @@ diff -urNp linux-2.6.32.24/include/asm-generic/pgtable.h linux-2.6.32.24/include
45681 #endif /* !__ASSEMBLY__ */ 44272 #endif /* !__ASSEMBLY__ */
45682 44273
45683 #endif /* _ASM_GENERIC_PGTABLE_H */ 44274 #endif /* _ASM_GENERIC_PGTABLE_H */
45684diff -urNp linux-2.6.32.24/include/asm-generic/pgtable-nopmd.h linux-2.6.32.24/include/asm-generic/pgtable-nopmd.h 44275diff -urNp linux-2.6.35.7/include/asm-generic/pgtable-nopmd.h linux-2.6.35.7/include/asm-generic/pgtable-nopmd.h
45685--- linux-2.6.32.24/include/asm-generic/pgtable-nopmd.h 2010-08-13 16:24:37.000000000 -0400 44276--- linux-2.6.35.7/include/asm-generic/pgtable-nopmd.h 2010-08-26 19:47:12.000000000 -0400
45686+++ linux-2.6.32.24/include/asm-generic/pgtable-nopmd.h 2010-10-23 19:59:20.000000000 -0400 44277+++ linux-2.6.35.7/include/asm-generic/pgtable-nopmd.h 2010-09-17 20:12:09.000000000 -0400
45687@@ -1,14 +1,19 @@ 44278@@ -1,14 +1,19 @@
45688 #ifndef _PGTABLE_NOPMD_H 44279 #ifndef _PGTABLE_NOPMD_H
45689 #define _PGTABLE_NOPMD_H 44280 #define _PGTABLE_NOPMD_H
@@ -45720,9 +44311,9 @@ diff -urNp linux-2.6.32.24/include/asm-generic/pgtable-nopmd.h linux-2.6.32.24/i
45720 /* 44311 /*
45721 * The "pud_xxx()" functions here are trivial for a folded two-level 44312 * The "pud_xxx()" functions here are trivial for a folded two-level
45722 * setup: the pmd is never bad, and a pmd always exists (as it's folded 44313 * setup: the pmd is never bad, and a pmd always exists (as it's folded
45723diff -urNp linux-2.6.32.24/include/asm-generic/pgtable-nopud.h linux-2.6.32.24/include/asm-generic/pgtable-nopud.h 44314diff -urNp linux-2.6.35.7/include/asm-generic/pgtable-nopud.h linux-2.6.35.7/include/asm-generic/pgtable-nopud.h
45724--- linux-2.6.32.24/include/asm-generic/pgtable-nopud.h 2010-08-13 16:24:37.000000000 -0400 44315--- linux-2.6.35.7/include/asm-generic/pgtable-nopud.h 2010-08-26 19:47:12.000000000 -0400
45725+++ linux-2.6.32.24/include/asm-generic/pgtable-nopud.h 2010-10-23 19:59:20.000000000 -0400 44316+++ linux-2.6.35.7/include/asm-generic/pgtable-nopud.h 2010-09-17 20:12:09.000000000 -0400
45726@@ -1,10 +1,15 @@ 44317@@ -1,10 +1,15 @@
45727 #ifndef _PGTABLE_NOPUD_H 44318 #ifndef _PGTABLE_NOPUD_H
45728 #define _PGTABLE_NOPUD_H 44319 #define _PGTABLE_NOPUD_H
@@ -45753,18 +44344,18 @@ diff -urNp linux-2.6.32.24/include/asm-generic/pgtable-nopud.h linux-2.6.32.24/i
45753 /* 44344 /*
45754 * The "pgd_xxx()" functions here are trivial for a folded two-level 44345 * The "pgd_xxx()" functions here are trivial for a folded two-level
45755 * setup: the pud is never bad, and a pud always exists (as it's folded 44346 * setup: the pud is never bad, and a pud always exists (as it's folded
45756diff -urNp linux-2.6.32.24/include/asm-generic/vmlinux.lds.h linux-2.6.32.24/include/asm-generic/vmlinux.lds.h 44347diff -urNp linux-2.6.35.7/include/asm-generic/vmlinux.lds.h linux-2.6.35.7/include/asm-generic/vmlinux.lds.h
45757--- linux-2.6.32.24/include/asm-generic/vmlinux.lds.h 2010-08-13 16:24:37.000000000 -0400 44348--- linux-2.6.35.7/include/asm-generic/vmlinux.lds.h 2010-08-26 19:47:12.000000000 -0400
45758+++ linux-2.6.32.24/include/asm-generic/vmlinux.lds.h 2010-10-23 19:59:20.000000000 -0400 44349+++ linux-2.6.35.7/include/asm-generic/vmlinux.lds.h 2010-09-17 20:12:09.000000000 -0400
45759@@ -199,6 +199,7 @@ 44350@@ -213,6 +213,7 @@
45760 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ 44351 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
45761 VMLINUX_SYMBOL(__start_rodata) = .; \ 44352 VMLINUX_SYMBOL(__start_rodata) = .; \
45762 *(.rodata) *(.rodata.*) \ 44353 *(.rodata) *(.rodata.*) \
45763+ *(.data.read_only) \ 44354+ *(.data..read_only) \
45764 *(__vermagic) /* Kernel version magic */ \ 44355 *(__vermagic) /* Kernel version magic */ \
45765 *(__markers_strings) /* Markers: strings */ \ 44356 *(__markers_strings) /* Markers: strings */ \
45766 *(__tracepoints_strings)/* Tracepoints: strings */ \ 44357 *(__tracepoints_strings)/* Tracepoints: strings */ \
45767@@ -656,22 +657,24 @@ 44358@@ -670,22 +671,24 @@
45768 * section in the linker script will go there too. @phdr should have 44359 * section in the linker script will go there too. @phdr should have
45769 * a leading colon. 44360 * a leading colon.
45770 * 44361 *
@@ -45775,29 +44366,29 @@ diff -urNp linux-2.6.32.24/include/asm-generic/vmlinux.lds.h linux-2.6.32.24/inc
45775 */ 44366 */
45776 #define PERCPU_VADDR(vaddr, phdr) \ 44367 #define PERCPU_VADDR(vaddr, phdr) \
45777- VMLINUX_SYMBOL(__per_cpu_load) = .; \ 44368- VMLINUX_SYMBOL(__per_cpu_load) = .; \
45778- .data.percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ 44369- .data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
45779+ per_cpu_load = .; \ 44370+ per_cpu_load = .; \
45780+ .data.percpu vaddr : AT(VMLINUX_SYMBOL(per_cpu_load) \ 44371+ .data..percpu vaddr : AT(VMLINUX_SYMBOL(per_cpu_load) \
45781 - LOAD_OFFSET) { \ 44372 - LOAD_OFFSET) { \
45782+ VMLINUX_SYMBOL(__per_cpu_load) = . + per_cpu_load; \ 44373+ VMLINUX_SYMBOL(__per_cpu_load) = . + per_cpu_load; \
45783 VMLINUX_SYMBOL(__per_cpu_start) = .; \ 44374 VMLINUX_SYMBOL(__per_cpu_start) = .; \
45784 *(.data.percpu.first) \ 44375 *(.data..percpu..first) \
45785- *(.data.percpu.page_aligned) \ 44376- *(.data..percpu..page_aligned) \
45786 *(.data.percpu) \ 44377 *(.data..percpu) \
45787+ . = ALIGN(PAGE_SIZE); \ 44378+ . = ALIGN(PAGE_SIZE); \
45788+ *(.data.percpu.page_aligned) \ 44379+ *(.data..percpu..page_aligned) \
45789 *(.data.percpu.shared_aligned) \ 44380 *(.data..percpu..shared_aligned) \
45790 VMLINUX_SYMBOL(__per_cpu_end) = .; \ 44381 VMLINUX_SYMBOL(__per_cpu_end) = .; \
45791 } phdr \ 44382 } phdr \
45792- . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data.percpu); 44383- . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu);
45793+ . = VMLINUX_SYMBOL(per_cpu_load) + SIZEOF(.data.percpu); 44384+ . = VMLINUX_SYMBOL(per_cpu_load) + SIZEOF(.data..percpu);
45794 44385
45795 /** 44386 /**
45796 * PERCPU - define output section for percpu area, simple version 44387 * PERCPU - define output section for percpu area, simple version
45797diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/drm_pciids.h 44388diff -urNp linux-2.6.35.7/include/drm/drm_pciids.h linux-2.6.35.7/include/drm/drm_pciids.h
45798--- linux-2.6.32.24/include/drm/drm_pciids.h 2010-08-13 16:24:37.000000000 -0400 44389--- linux-2.6.35.7/include/drm/drm_pciids.h 2010-08-26 19:47:12.000000000 -0400
45799+++ linux-2.6.32.24/include/drm/drm_pciids.h 2010-10-23 19:59:20.000000000 -0400 44390+++ linux-2.6.35.7/include/drm/drm_pciids.h 2010-09-17 20:12:09.000000000 -0400
45800@@ -377,7 +377,7 @@ 44391@@ -419,7 +419,7 @@
45801 {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 44392 {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
45802 {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 44393 {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
45803 {0x1002, 0x9715, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 44394 {0x1002, 0x9715, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
@@ -45806,7 +44397,7 @@ diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/
45806 44397
45807 #define r128_PCI_IDS \ 44398 #define r128_PCI_IDS \
45808 {0x1002, 0x4c45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44399 {0x1002, 0x4c45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45809@@ -417,14 +417,14 @@ 44400@@ -459,14 +459,14 @@
45810 {0x1002, 0x5446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44401 {0x1002, 0x5446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45811 {0x1002, 0x544C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44402 {0x1002, 0x544C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45812 {0x1002, 0x5452, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44403 {0x1002, 0x5452, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -45823,7 +44414,7 @@ diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/
45823 44414
45824 #define mach64_PCI_IDS \ 44415 #define mach64_PCI_IDS \
45825 {0x1002, 0x4749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44416 {0x1002, 0x4749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45826@@ -447,7 +447,7 @@ 44417@@ -489,7 +489,7 @@
45827 {0x1002, 0x4c53, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44418 {0x1002, 0x4c53, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45828 {0x1002, 0x4c4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44419 {0x1002, 0x4c4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45829 {0x1002, 0x4c4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44420 {0x1002, 0x4c4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -45832,7 +44423,7 @@ diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/
45832 44423
45833 #define sisdrv_PCI_IDS \ 44424 #define sisdrv_PCI_IDS \
45834 {0x1039, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44425 {0x1039, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45835@@ -458,7 +458,7 @@ 44426@@ -500,7 +500,7 @@
45836 {0x1039, 0x7300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44427 {0x1039, 0x7300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45837 {0x18CA, 0x0040, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \ 44428 {0x18CA, 0x0040, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \
45838 {0x18CA, 0x0042, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \ 44429 {0x18CA, 0x0042, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \
@@ -45841,7 +44432,7 @@ diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/
45841 44432
45842 #define tdfx_PCI_IDS \ 44433 #define tdfx_PCI_IDS \
45843 {0x121a, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44434 {0x121a, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45844@@ -467,7 +467,7 @@ 44435@@ -509,7 +509,7 @@
45845 {0x121a, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44436 {0x121a, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45846 {0x121a, 0x0009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44437 {0x121a, 0x0009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45847 {0x121a, 0x000b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44438 {0x121a, 0x000b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -45850,7 +44441,7 @@ diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/
45850 44441
45851 #define viadrv_PCI_IDS \ 44442 #define viadrv_PCI_IDS \
45852 {0x1106, 0x3022, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44443 {0x1106, 0x3022, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45853@@ -479,14 +479,14 @@ 44444@@ -521,14 +521,14 @@
45854 {0x1106, 0x3343, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44445 {0x1106, 0x3343, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45855 {0x1106, 0x3230, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VIA_DX9_0}, \ 44446 {0x1106, 0x3230, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VIA_DX9_0}, \
45856 {0x1106, 0x3157, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VIA_PRO_GROUP_A}, \ 44447 {0x1106, 0x3157, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VIA_PRO_GROUP_A}, \
@@ -45867,7 +44458,7 @@ diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/
45867 44458
45868 #define i830_PCI_IDS \ 44459 #define i830_PCI_IDS \
45869 {0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44460 {0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45870@@ -494,11 +494,11 @@ 44461@@ -536,11 +536,11 @@
45871 {0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44462 {0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45872 {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44463 {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
45873 {0x8086, 0x358e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 44464 {0x8086, 0x358e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -45881,7 +44472,7 @@ diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/
45881 44472
45882 #define savage_PCI_IDS \ 44473 #define savage_PCI_IDS \
45883 {0x5333, 0x8a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_SAVAGE3D}, \ 44474 {0x5333, 0x8a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_SAVAGE3D}, \
45884@@ -524,10 +524,10 @@ 44475@@ -566,10 +566,10 @@
45885 {0x5333, 0x8d02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_TWISTER}, \ 44476 {0x5333, 0x8d02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_TWISTER}, \
45886 {0x5333, 0x8d03, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \ 44477 {0x5333, 0x8d03, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \
45887 {0x5333, 0x8d04, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \ 44478 {0x5333, 0x8d04, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \
@@ -45894,16 +44485,16 @@ diff -urNp linux-2.6.32.24/include/drm/drm_pciids.h linux-2.6.32.24/include/drm/
45894 44485
45895 #define i915_PCI_IDS \ 44486 #define i915_PCI_IDS \
45896 {0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 44487 {0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
45897@@ -560,4 +560,4 @@ 44488@@ -603,4 +603,4 @@
45898 {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
45899 {0x8086, 0x0042, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 44489 {0x8086, 0x0042, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
45900 {0x8086, 0x0046, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 44490 {0x8086, 0x0046, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
44491 {0x8086, 0x0102, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
45901- {0, 0, 0} 44492- {0, 0, 0}
45902+ {0, 0, 0, 0, 0, 0} 44493+ {0, 0, 0, 0, 0, 0}
45903diff -urNp linux-2.6.32.24/include/drm/drmP.h linux-2.6.32.24/include/drm/drmP.h 44494diff -urNp linux-2.6.35.7/include/drm/drmP.h linux-2.6.35.7/include/drm/drmP.h
45904--- linux-2.6.32.24/include/drm/drmP.h 2010-08-13 16:24:37.000000000 -0400 44495--- linux-2.6.35.7/include/drm/drmP.h 2010-08-26 19:47:12.000000000 -0400
45905+++ linux-2.6.32.24/include/drm/drmP.h 2010-10-23 19:59:20.000000000 -0400 44496+++ linux-2.6.35.7/include/drm/drmP.h 2010-09-17 20:12:09.000000000 -0400
45906@@ -814,7 +814,7 @@ struct drm_driver { 44497@@ -808,7 +808,7 @@ struct drm_driver {
45907 void (*vgaarb_irq)(struct drm_device *dev, bool state); 44498 void (*vgaarb_irq)(struct drm_device *dev, bool state);
45908 44499
45909 /* Driver private ops for this object */ 44500 /* Driver private ops for this object */
@@ -45930,9 +44521,9 @@ diff -urNp linux-2.6.32.24/include/drm/drmP.h linux-2.6.32.24/include/drm/drmP.h
45930 /*@} */ 44521 /*@} */
45931 44522
45932 struct list_head filelist; 44523 struct list_head filelist;
45933diff -urNp linux-2.6.32.24/include/linux/a.out.h linux-2.6.32.24/include/linux/a.out.h 44524diff -urNp linux-2.6.35.7/include/linux/a.out.h linux-2.6.35.7/include/linux/a.out.h
45934--- linux-2.6.32.24/include/linux/a.out.h 2010-08-13 16:24:37.000000000 -0400 44525--- linux-2.6.35.7/include/linux/a.out.h 2010-08-26 19:47:12.000000000 -0400
45935+++ linux-2.6.32.24/include/linux/a.out.h 2010-10-23 19:59:20.000000000 -0400 44526+++ linux-2.6.35.7/include/linux/a.out.h 2010-09-17 20:12:09.000000000 -0400
45936@@ -39,6 +39,14 @@ enum machine_type { 44527@@ -39,6 +39,14 @@ enum machine_type {
45937 M_MIPS2 = 152 /* MIPS R6000/R4000 binary */ 44528 M_MIPS2 = 152 /* MIPS R6000/R4000 binary */
45938 }; 44529 };
@@ -45948,9 +44539,9 @@ diff -urNp linux-2.6.32.24/include/linux/a.out.h linux-2.6.32.24/include/linux/a
45948 #if !defined (N_MAGIC) 44539 #if !defined (N_MAGIC)
45949 #define N_MAGIC(exec) ((exec).a_info & 0xffff) 44540 #define N_MAGIC(exec) ((exec).a_info & 0xffff)
45950 #endif 44541 #endif
45951diff -urNp linux-2.6.32.24/include/linux/atmdev.h linux-2.6.32.24/include/linux/atmdev.h 44542diff -urNp linux-2.6.35.7/include/linux/atmdev.h linux-2.6.35.7/include/linux/atmdev.h
45952--- linux-2.6.32.24/include/linux/atmdev.h 2010-08-13 16:24:37.000000000 -0400 44543--- linux-2.6.35.7/include/linux/atmdev.h 2010-08-26 19:47:12.000000000 -0400
45953+++ linux-2.6.32.24/include/linux/atmdev.h 2010-10-23 19:59:20.000000000 -0400 44544+++ linux-2.6.35.7/include/linux/atmdev.h 2010-09-17 20:12:09.000000000 -0400
45954@@ -237,7 +237,7 @@ struct compat_atm_iobuf { 44545@@ -237,7 +237,7 @@ struct compat_atm_iobuf {
45955 #endif 44546 #endif
45956 44547
@@ -45960,65 +44551,21 @@ diff -urNp linux-2.6.32.24/include/linux/atmdev.h linux-2.6.32.24/include/linux/
45960 __AAL_STAT_ITEMS 44551 __AAL_STAT_ITEMS
45961 #undef __HANDLE_ITEM 44552 #undef __HANDLE_ITEM
45962 }; 44553 };
45963diff -urNp linux-2.6.32.24/include/linux/backlight.h linux-2.6.32.24/include/linux/backlight.h 44554diff -urNp linux-2.6.35.7/include/linux/binfmts.h linux-2.6.35.7/include/linux/binfmts.h
45964--- linux-2.6.32.24/include/linux/backlight.h 2010-08-13 16:24:37.000000000 -0400 44555--- linux-2.6.35.7/include/linux/binfmts.h 2010-08-26 19:47:12.000000000 -0400
45965+++ linux-2.6.32.24/include/linux/backlight.h 2010-10-23 19:59:20.000000000 -0400 44556+++ linux-2.6.35.7/include/linux/binfmts.h 2010-09-17 20:12:09.000000000 -0400
45966@@ -36,18 +36,18 @@ struct backlight_device; 44557@@ -87,6 +87,7 @@ struct linux_binfmt {
45967 struct fb_info;
45968
45969 struct backlight_ops {
45970- unsigned int options;
45971+ const unsigned int options;
45972
45973 #define BL_CORE_SUSPENDRESUME (1 << 0)
45974
45975 /* Notify the backlight driver some property has changed */
45976- int (*update_status)(struct backlight_device *);
45977+ int (* const update_status)(struct backlight_device *);
45978 /* Return the current backlight brightness (accounting for power,
45979 fb_blank etc.) */
45980- int (*get_brightness)(struct backlight_device *);
45981+ int (* const get_brightness)(struct backlight_device *);
45982 /* Check if given framebuffer device is the one bound to this backlight;
45983 return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */
45984- int (*check_fb)(struct fb_info *);
45985+ int (* const check_fb)(struct fb_info *);
45986 };
45987
45988 /* This structure defines all the properties of a backlight */
45989@@ -86,7 +86,7 @@ struct backlight_device {
45990 registered this device has been unloaded, and if class_get_devdata()
45991 points to something in the body of that driver, it is also invalid. */
45992 struct mutex ops_lock;
45993- struct backlight_ops *ops;
45994+ const struct backlight_ops *ops;
45995
45996 /* The framebuffer notifier block */
45997 struct notifier_block fb_notif;
45998@@ -103,7 +103,7 @@ static inline void backlight_update_stat
45999 }
46000
46001 extern struct backlight_device *backlight_device_register(const char *name,
46002- struct device *dev, void *devdata, struct backlight_ops *ops);
46003+ struct device *dev, void *devdata, const struct backlight_ops *ops);
46004 extern void backlight_device_unregister(struct backlight_device *bd);
46005 extern void backlight_force_update(struct backlight_device *bd,
46006 enum backlight_update_reason reason);
46007diff -urNp linux-2.6.32.24/include/linux/binfmts.h linux-2.6.32.24/include/linux/binfmts.h
46008--- linux-2.6.32.24/include/linux/binfmts.h 2010-08-13 16:24:37.000000000 -0400
46009+++ linux-2.6.32.24/include/linux/binfmts.h 2010-10-23 19:59:20.000000000 -0400
46010@@ -78,6 +78,7 @@ struct linux_binfmt {
46011 int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); 44558 int (*load_binary)(struct linux_binprm *, struct pt_regs * regs);
46012 int (*load_shlib)(struct file *); 44559 int (*load_shlib)(struct file *);
46013 int (*core_dump)(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); 44560 int (*core_dump)(struct coredump_params *cprm);
46014+ void (*handle_mprotect)(struct vm_area_struct *vma, unsigned long newflags); 44561+ void (*handle_mprotect)(struct vm_area_struct *vma, unsigned long newflags);
46015 unsigned long min_coredump; /* minimal dump size */ 44562 unsigned long min_coredump; /* minimal dump size */
46016 int hasvdso; 44563 int hasvdso;
46017 }; 44564 };
46018diff -urNp linux-2.6.32.24/include/linux/blkdev.h linux-2.6.32.24/include/linux/blkdev.h 44565diff -urNp linux-2.6.35.7/include/linux/blkdev.h linux-2.6.35.7/include/linux/blkdev.h
46019--- linux-2.6.32.24/include/linux/blkdev.h 2010-08-13 16:24:37.000000000 -0400 44566--- linux-2.6.35.7/include/linux/blkdev.h 2010-08-26 19:47:12.000000000 -0400
46020+++ linux-2.6.32.24/include/linux/blkdev.h 2010-10-23 19:59:20.000000000 -0400 44567+++ linux-2.6.35.7/include/linux/blkdev.h 2010-09-17 20:12:09.000000000 -0400
46021@@ -1262,19 +1262,19 @@ static inline int blk_integrity_rq(struc 44568@@ -1331,20 +1331,20 @@ static inline int blk_integrity_rq(struc
46022 #endif /* CONFIG_BLK_DEV_INTEGRITY */ 44569 #endif /* CONFIG_BLK_DEV_INTEGRITY */
46023 44570
46024 struct block_device_operations { 44571 struct block_device_operations {
@@ -46036,22 +44583,24 @@ diff -urNp linux-2.6.32.24/include/linux/blkdev.h linux-2.6.32.24/include/linux/
46036+ int (* const direct_access) (struct block_device *, sector_t, 44583+ int (* const direct_access) (struct block_device *, sector_t,
46037 void **, unsigned long *); 44584 void **, unsigned long *);
46038- int (*media_changed) (struct gendisk *); 44585- int (*media_changed) (struct gendisk *);
46039- unsigned long long (*set_capacity) (struct gendisk *, 44586- void (*unlock_native_capacity) (struct gendisk *);
46040+ int (* const media_changed) (struct gendisk *);
46041+ unsigned long long (* const set_capacity) (struct gendisk *,
46042 unsigned long long);
46043- int (*revalidate_disk) (struct gendisk *); 44587- int (*revalidate_disk) (struct gendisk *);
46044- int (*getgeo)(struct block_device *, struct hd_geometry *); 44588- int (*getgeo)(struct block_device *, struct hd_geometry *);
46045- struct module *owner; 44589+ int (* const media_changed) (struct gendisk *);
44590+ void (* const unlock_native_capacity) (struct gendisk *);
46046+ int (* const revalidate_disk) (struct gendisk *); 44591+ int (* const revalidate_disk) (struct gendisk *);
46047+ int (*const getgeo)(struct block_device *, struct hd_geometry *); 44592+ int (*const getgeo)(struct block_device *, struct hd_geometry *);
44593 /* this callback is with swap_lock and sometimes page table lock held */
44594- void (*swap_slot_free_notify) (struct block_device *, unsigned long);
44595- struct module *owner;
44596+ void (* const swap_slot_free_notify) (struct block_device *, unsigned long);
46048+ struct module * const owner; 44597+ struct module * const owner;
46049 }; 44598 };
46050 44599
46051 extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int, 44600 extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int,
46052diff -urNp linux-2.6.32.24/include/linux/cache.h linux-2.6.32.24/include/linux/cache.h 44601diff -urNp linux-2.6.35.7/include/linux/cache.h linux-2.6.35.7/include/linux/cache.h
46053--- linux-2.6.32.24/include/linux/cache.h 2010-08-13 16:24:37.000000000 -0400 44602--- linux-2.6.35.7/include/linux/cache.h 2010-08-26 19:47:12.000000000 -0400
46054+++ linux-2.6.32.24/include/linux/cache.h 2010-10-23 19:59:20.000000000 -0400 44603+++ linux-2.6.35.7/include/linux/cache.h 2010-09-17 20:12:09.000000000 -0400
46055@@ -16,6 +16,10 @@ 44604@@ -16,6 +16,10 @@
46056 #define __read_mostly 44605 #define __read_mostly
46057 #endif 44606 #endif
@@ -46063,10 +44612,10 @@ diff -urNp linux-2.6.32.24/include/linux/cache.h linux-2.6.32.24/include/linux/c
46063 #ifndef ____cacheline_aligned 44612 #ifndef ____cacheline_aligned
46064 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) 44613 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
46065 #endif 44614 #endif
46066diff -urNp linux-2.6.32.24/include/linux/capability.h linux-2.6.32.24/include/linux/capability.h 44615diff -urNp linux-2.6.35.7/include/linux/capability.h linux-2.6.35.7/include/linux/capability.h
46067--- linux-2.6.32.24/include/linux/capability.h 2010-08-13 16:24:37.000000000 -0400 44616--- linux-2.6.35.7/include/linux/capability.h 2010-08-26 19:47:12.000000000 -0400
46068+++ linux-2.6.32.24/include/linux/capability.h 2010-10-23 19:59:20.000000000 -0400 44617+++ linux-2.6.35.7/include/linux/capability.h 2010-09-17 20:12:37.000000000 -0400
46069@@ -563,6 +563,7 @@ extern const kernel_cap_t __cap_init_eff 44618@@ -561,6 +561,7 @@ extern const kernel_cap_t __cap_init_eff
46070 (security_real_capable_noaudit((t), (cap)) == 0) 44619 (security_real_capable_noaudit((t), (cap)) == 0)
46071 44620
46072 extern int capable(int cap); 44621 extern int capable(int cap);
@@ -46074,22 +44623,24 @@ diff -urNp linux-2.6.32.24/include/linux/capability.h linux-2.6.32.24/include/li
46074 44623
46075 /* audit system wants to get cap info from files as well */ 44624 /* audit system wants to get cap info from files as well */
46076 struct dentry; 44625 struct dentry;
46077diff -urNp linux-2.6.32.24/include/linux/compiler-gcc4.h linux-2.6.32.24/include/linux/compiler-gcc4.h 44626diff -urNp linux-2.6.35.7/include/linux/compiler-gcc4.h linux-2.6.35.7/include/linux/compiler-gcc4.h
46078--- linux-2.6.32.24/include/linux/compiler-gcc4.h 2010-08-13 16:24:37.000000000 -0400 44627--- linux-2.6.35.7/include/linux/compiler-gcc4.h 2010-08-26 19:47:12.000000000 -0400
46079+++ linux-2.6.32.24/include/linux/compiler-gcc4.h 2010-10-23 19:59:20.000000000 -0400 44628+++ linux-2.6.35.7/include/linux/compiler-gcc4.h 2010-09-17 20:12:09.000000000 -0400
46080@@ -36,4 +36,8 @@ 44629@@ -54,6 +54,10 @@
46081 the kernel context */ 44630
46082 #define __cold __attribute__((__cold__)) 44631 #endif
46083 44632
46084+#define __alloc_size(...) __attribute((alloc_size(__VA_ARGS__))) 44633+#define __alloc_size(...) __attribute((alloc_size(__VA_ARGS__)))
46085+#define __bos(ptr, arg) __builtin_object_size((ptr), (arg)) 44634+#define __bos(ptr, arg) __builtin_object_size((ptr), (arg))
46086+#define __bos0(ptr) __bos((ptr), 0) 44635+#define __bos0(ptr) __bos((ptr), 0)
46087+#define __bos1(ptr) __bos((ptr), 1) 44636+#define __bos1(ptr) __bos((ptr), 1)
46088 #endif 44637 #endif
46089diff -urNp linux-2.6.32.24/include/linux/compiler.h linux-2.6.32.24/include/linux/compiler.h 44638
46090--- linux-2.6.32.24/include/linux/compiler.h 2010-08-13 16:24:37.000000000 -0400 44639 #if __GNUC_MINOR__ > 0
46091+++ linux-2.6.32.24/include/linux/compiler.h 2010-10-23 19:59:20.000000000 -0400 44640diff -urNp linux-2.6.35.7/include/linux/compiler.h linux-2.6.35.7/include/linux/compiler.h
46092@@ -256,6 +256,22 @@ void ftrace_likely_update(struct ftrace_ 44641--- linux-2.6.35.7/include/linux/compiler.h 2010-08-26 19:47:12.000000000 -0400
44642+++ linux-2.6.35.7/include/linux/compiler.h 2010-09-17 20:12:09.000000000 -0400
44643@@ -267,6 +267,22 @@ void ftrace_likely_update(struct ftrace_
46093 #define __cold 44644 #define __cold
46094 #endif 44645 #endif
46095 44646
@@ -46112,9 +44663,9 @@ diff -urNp linux-2.6.32.24/include/linux/compiler.h linux-2.6.32.24/include/linu
46112 /* Simple shorthand for a section definition */ 44663 /* Simple shorthand for a section definition */
46113 #ifndef __section 44664 #ifndef __section
46114 # define __section(S) __attribute__ ((__section__(#S))) 44665 # define __section(S) __attribute__ ((__section__(#S)))
46115diff -urNp linux-2.6.32.24/include/linux/decompress/mm.h linux-2.6.32.24/include/linux/decompress/mm.h 44666diff -urNp linux-2.6.35.7/include/linux/decompress/mm.h linux-2.6.35.7/include/linux/decompress/mm.h
46116--- linux-2.6.32.24/include/linux/decompress/mm.h 2010-08-13 16:24:37.000000000 -0400 44667--- linux-2.6.35.7/include/linux/decompress/mm.h 2010-08-26 19:47:12.000000000 -0400
46117+++ linux-2.6.32.24/include/linux/decompress/mm.h 2010-10-23 19:59:20.000000000 -0400 44668+++ linux-2.6.35.7/include/linux/decompress/mm.h 2010-09-17 20:12:09.000000000 -0400
46118@@ -78,7 +78,7 @@ static void free(void *where) 44669@@ -78,7 +78,7 @@ static void free(void *where)
46119 * warnings when not needed (indeed large_malloc / large_free are not 44670 * warnings when not needed (indeed large_malloc / large_free are not
46120 * needed by inflate */ 44671 * needed by inflate */
@@ -46124,10 +44675,10 @@ diff -urNp linux-2.6.32.24/include/linux/decompress/mm.h linux-2.6.32.24/include
46124 #define free(a) kfree(a) 44675 #define free(a) kfree(a)
46125 44676
46126 #define large_malloc(a) vmalloc(a) 44677 #define large_malloc(a) vmalloc(a)
46127diff -urNp linux-2.6.32.24/include/linux/dma-mapping.h linux-2.6.32.24/include/linux/dma-mapping.h 44678diff -urNp linux-2.6.35.7/include/linux/dma-mapping.h linux-2.6.35.7/include/linux/dma-mapping.h
46128--- linux-2.6.32.24/include/linux/dma-mapping.h 2010-08-13 16:24:37.000000000 -0400 44679--- linux-2.6.35.7/include/linux/dma-mapping.h 2010-08-26 19:47:12.000000000 -0400
46129+++ linux-2.6.32.24/include/linux/dma-mapping.h 2010-10-23 19:59:20.000000000 -0400 44680+++ linux-2.6.35.7/include/linux/dma-mapping.h 2010-09-17 20:12:09.000000000 -0400
46130@@ -16,50 +16,50 @@ enum dma_data_direction { 44681@@ -16,40 +16,40 @@ enum dma_data_direction {
46131 }; 44682 };
46132 44683
46133 struct dma_map_ops { 44684 struct dma_map_ops {
@@ -46163,18 +44714,6 @@ diff -urNp linux-2.6.32.24/include/linux/dma-mapping.h linux-2.6.32.24/include/l
46163+ void (* const sync_single_for_device)(struct device *dev, 44714+ void (* const sync_single_for_device)(struct device *dev,
46164 dma_addr_t dma_handle, size_t size, 44715 dma_addr_t dma_handle, size_t size,
46165 enum dma_data_direction dir); 44716 enum dma_data_direction dir);
46166- void (*sync_single_range_for_cpu)(struct device *dev,
46167+ void (* const sync_single_range_for_cpu)(struct device *dev,
46168 dma_addr_t dma_handle,
46169 unsigned long offset,
46170 size_t size,
46171 enum dma_data_direction dir);
46172- void (*sync_single_range_for_device)(struct device *dev,
46173+ void (* const sync_single_range_for_device)(struct device *dev,
46174 dma_addr_t dma_handle,
46175 unsigned long offset,
46176 size_t size,
46177 enum dma_data_direction dir);
46178- void (*sync_sg_for_cpu)(struct device *dev, 44717- void (*sync_sg_for_cpu)(struct device *dev,
46179+ void (* const sync_sg_for_cpu)(struct device *dev, 44718+ void (* const sync_sg_for_cpu)(struct device *dev,
46180 struct scatterlist *sg, int nents, 44719 struct scatterlist *sg, int nents,
@@ -46185,29 +44724,18 @@ diff -urNp linux-2.6.32.24/include/linux/dma-mapping.h linux-2.6.32.24/include/l
46185 enum dma_data_direction dir); 44724 enum dma_data_direction dir);
46186- int (*mapping_error)(struct device *dev, dma_addr_t dma_addr); 44725- int (*mapping_error)(struct device *dev, dma_addr_t dma_addr);
46187- int (*dma_supported)(struct device *dev, u64 mask); 44726- int (*dma_supported)(struct device *dev, u64 mask);
44727- int (*set_dma_mask)(struct device *dev, u64 mask);
44728- int is_phys;
46188+ int (* const mapping_error)(struct device *dev, dma_addr_t dma_addr); 44729+ int (* const mapping_error)(struct device *dev, dma_addr_t dma_addr);
46189+ int (* const dma_supported)(struct device *dev, u64 mask); 44730+ int (* const dma_supported)(struct device *dev, u64 mask);
46190 int (*set_dma_mask)(struct device *dev, u64 mask); 44731+ int (* set_dma_mask)(struct device *dev, u64 mask);
46191- int is_phys;
46192+ const int is_phys; 44732+ const int is_phys;
46193 }; 44733 };
46194 44734
46195 #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) 44735 #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
46196diff -urNp linux-2.6.32.24/include/linux/dst.h linux-2.6.32.24/include/linux/dst.h 44736diff -urNp linux-2.6.35.7/include/linux/elf.h linux-2.6.35.7/include/linux/elf.h
46197--- linux-2.6.32.24/include/linux/dst.h 2010-08-13 16:24:37.000000000 -0400 44737--- linux-2.6.35.7/include/linux/elf.h 2010-08-26 19:47:12.000000000 -0400
46198+++ linux-2.6.32.24/include/linux/dst.h 2010-10-23 19:59:20.000000000 -0400 44738+++ linux-2.6.35.7/include/linux/elf.h 2010-09-17 20:12:09.000000000 -0400
46199@@ -380,7 +380,7 @@ struct dst_node
46200 struct thread_pool *pool;
46201
46202 /* Transaction IDs live here */
46203- atomic_long_t gen;
46204+ atomic_long_unchecked_t gen;
46205
46206 /*
46207 * How frequently and how many times transaction
46208diff -urNp linux-2.6.32.24/include/linux/elf.h linux-2.6.32.24/include/linux/elf.h
46209--- linux-2.6.32.24/include/linux/elf.h 2010-08-13 16:24:37.000000000 -0400
46210+++ linux-2.6.32.24/include/linux/elf.h 2010-10-23 19:59:20.000000000 -0400
46211@@ -49,6 +49,17 @@ typedef __s64 Elf64_Sxword; 44739@@ -49,6 +49,17 @@ typedef __s64 Elf64_Sxword;
46212 #define PT_GNU_EH_FRAME 0x6474e550 44740 #define PT_GNU_EH_FRAME 0x6474e550
46213 44741
@@ -46224,9 +44752,9 @@ diff -urNp linux-2.6.32.24/include/linux/elf.h linux-2.6.32.24/include/linux/elf
46224+/*#define EF_PAX_RANDEXEC 16*/ /* Randomize ET_EXEC base */ 44752+/*#define EF_PAX_RANDEXEC 16*/ /* Randomize ET_EXEC base */
46225+#define EF_PAX_SEGMEXEC 32 /* Segmentation based non-executable pages */ 44753+#define EF_PAX_SEGMEXEC 32 /* Segmentation based non-executable pages */
46226 44754
46227 /* These constants define the different elf file types */ 44755 /*
46228 #define ET_NONE 0 44756 * Extended Numbering
46229@@ -84,6 +95,8 @@ typedef __s64 Elf64_Sxword; 44757@@ -106,6 +117,8 @@ typedef __s64 Elf64_Sxword;
46230 #define DT_DEBUG 21 44758 #define DT_DEBUG 21
46231 #define DT_TEXTREL 22 44759 #define DT_TEXTREL 22
46232 #define DT_JMPREL 23 44760 #define DT_JMPREL 23
@@ -46235,7 +44763,7 @@ diff -urNp linux-2.6.32.24/include/linux/elf.h linux-2.6.32.24/include/linux/elf
46235 #define DT_ENCODING 32 44763 #define DT_ENCODING 32
46236 #define OLD_DT_LOOS 0x60000000 44764 #define OLD_DT_LOOS 0x60000000
46237 #define DT_LOOS 0x6000000d 44765 #define DT_LOOS 0x6000000d
46238@@ -230,6 +243,19 @@ typedef struct elf64_hdr { 44766@@ -252,6 +265,19 @@ typedef struct elf64_hdr {
46239 #define PF_W 0x2 44767 #define PF_W 0x2
46240 #define PF_X 0x1 44768 #define PF_X 0x1
46241 44769
@@ -46255,7 +44783,7 @@ diff -urNp linux-2.6.32.24/include/linux/elf.h linux-2.6.32.24/include/linux/elf
46255 typedef struct elf32_phdr{ 44783 typedef struct elf32_phdr{
46256 Elf32_Word p_type; 44784 Elf32_Word p_type;
46257 Elf32_Off p_offset; 44785 Elf32_Off p_offset;
46258@@ -322,6 +348,8 @@ typedef struct elf64_shdr { 44786@@ -344,6 +370,8 @@ typedef struct elf64_shdr {
46259 #define EI_OSABI 7 44787 #define EI_OSABI 7
46260 #define EI_PAD 8 44788 #define EI_PAD 8
46261 44789
@@ -46264,38 +44792,38 @@ diff -urNp linux-2.6.32.24/include/linux/elf.h linux-2.6.32.24/include/linux/elf
46264 #define ELFMAG0 0x7f /* EI_MAG */ 44792 #define ELFMAG0 0x7f /* EI_MAG */
46265 #define ELFMAG1 'E' 44793 #define ELFMAG1 'E'
46266 #define ELFMAG2 'L' 44794 #define ELFMAG2 'L'
46267@@ -386,6 +414,7 @@ extern Elf32_Dyn _DYNAMIC []; 44795@@ -421,6 +449,7 @@ extern Elf32_Dyn _DYNAMIC [];
46268 #define elf_phdr elf32_phdr
46269 #define elf_note elf32_note 44796 #define elf_note elf32_note
46270 #define elf_addr_t Elf32_Off 44797 #define elf_addr_t Elf32_Off
44798 #define Elf_Half Elf32_Half
46271+#define elf_dyn Elf32_Dyn 44799+#define elf_dyn Elf32_Dyn
46272 44800
46273 #else 44801 #else
46274 44802
46275@@ -394,6 +423,7 @@ extern Elf64_Dyn _DYNAMIC []; 44803@@ -431,6 +460,7 @@ extern Elf64_Dyn _DYNAMIC [];
46276 #define elf_phdr elf64_phdr
46277 #define elf_note elf64_note 44804 #define elf_note elf64_note
46278 #define elf_addr_t Elf64_Off 44805 #define elf_addr_t Elf64_Off
44806 #define Elf_Half Elf64_Half
46279+#define elf_dyn Elf64_Dyn 44807+#define elf_dyn Elf64_Dyn
46280 44808
46281 #endif 44809 #endif
46282 44810
46283diff -urNp linux-2.6.32.24/include/linux/fs.h linux-2.6.32.24/include/linux/fs.h 44811diff -urNp linux-2.6.35.7/include/linux/fs.h linux-2.6.35.7/include/linux/fs.h
46284--- linux-2.6.32.24/include/linux/fs.h 2010-08-13 16:24:37.000000000 -0400 44812--- linux-2.6.35.7/include/linux/fs.h 2010-09-20 17:33:09.000000000 -0400
46285+++ linux-2.6.32.24/include/linux/fs.h 2010-10-23 19:59:20.000000000 -0400 44813+++ linux-2.6.35.7/include/linux/fs.h 2010-09-20 17:33:35.000000000 -0400
46286@@ -90,6 +90,11 @@ struct inodes_stat_t { 44814@@ -90,6 +90,11 @@ struct inodes_stat_t {
46287 /* Expect random access pattern */ 44815 /* Expect random access pattern */
46288 #define FMODE_RANDOM ((__force fmode_t)4096) 44816 #define FMODE_RANDOM ((__force fmode_t)0x1000)
46289 44817
46290+/* Hack for grsec so as not to require read permission simply to execute 44818+/* Hack for grsec so as not to require read permission simply to execute
46291+ * a binary 44819+ * a binary
46292+ */ 44820+ */
46293+#define FMODE_GREXEC ((__force fmode_t)8192) 44821+#define FMODE_GREXEC ((__force fmode_t)0x2000)
46294+ 44822+
46295 /* 44823 /*
46296 * The below are the various read and write types that we support. Some of 44824 * The below are the various read and write types that we support. Some of
46297 * them include behavioral modifiers that send information down to the 44825 * them include behavioral modifiers that send information down to the
46298@@ -568,41 +573,41 @@ typedef int (*read_actor_t)(read_descrip 44826@@ -572,41 +577,41 @@ typedef int (*read_actor_t)(read_descrip
46299 unsigned long, unsigned long); 44827 unsigned long, unsigned long);
46300 44828
46301 struct address_space_operations { 44829 struct address_space_operations {
@@ -46354,7 +44882,7 @@ diff -urNp linux-2.6.32.24/include/linux/fs.h linux-2.6.32.24/include/linux/fs.h
46354 }; 44882 };
46355 44883
46356 /* 44884 /*
46357@@ -1030,19 +1035,19 @@ static inline int file_check_writeable(s 44885@@ -1036,19 +1041,19 @@ static inline int file_check_writeable(s
46358 typedef struct files_struct *fl_owner_t; 44886 typedef struct files_struct *fl_owner_t;
46359 44887
46360 struct file_lock_operations { 44888 struct file_lock_operations {
@@ -46403,7 +44931,7 @@ diff -urNp linux-2.6.32.24/include/linux/fs.h linux-2.6.32.24/include/linux/fs.h
46403+ void (* const destroy_inode)(struct inode *); 44931+ void (* const destroy_inode)(struct inode *);
46404 44932
46405- void (*dirty_inode) (struct inode *); 44933- void (*dirty_inode) (struct inode *);
46406- int (*write_inode) (struct inode *, int); 44934- int (*write_inode) (struct inode *, struct writeback_control *wbc);
46407- void (*drop_inode) (struct inode *); 44935- void (*drop_inode) (struct inode *);
46408- void (*delete_inode) (struct inode *); 44936- void (*delete_inode) (struct inode *);
46409- void (*put_super) (struct super_block *); 44937- void (*put_super) (struct super_block *);
@@ -46416,7 +44944,7 @@ diff -urNp linux-2.6.32.24/include/linux/fs.h linux-2.6.32.24/include/linux/fs.h
46416- void (*clear_inode) (struct inode *); 44944- void (*clear_inode) (struct inode *);
46417- void (*umount_begin) (struct super_block *); 44945- void (*umount_begin) (struct super_block *);
46418+ void (* const dirty_inode) (struct inode *); 44946+ void (* const dirty_inode) (struct inode *);
46419+ int (* const write_inode) (struct inode *, int); 44947+ int (* const write_inode) (struct inode *, struct writeback_control *wbc);
46420+ void (* const drop_inode) (struct inode *); 44948+ void (* const drop_inode) (struct inode *);
46421+ void (* const delete_inode) (struct inode *); 44949+ void (* const delete_inode) (struct inode *);
46422+ void (* const put_super) (struct super_block *); 44950+ void (* const put_super) (struct super_block *);
@@ -46444,9 +44972,9 @@ diff -urNp linux-2.6.32.24/include/linux/fs.h linux-2.6.32.24/include/linux/fs.h
46444 }; 44972 };
46445 44973
46446 /* 44974 /*
46447diff -urNp linux-2.6.32.24/include/linux/fs_struct.h linux-2.6.32.24/include/linux/fs_struct.h 44975diff -urNp linux-2.6.35.7/include/linux/fs_struct.h linux-2.6.35.7/include/linux/fs_struct.h
46448--- linux-2.6.32.24/include/linux/fs_struct.h 2010-08-13 16:24:37.000000000 -0400 44976--- linux-2.6.35.7/include/linux/fs_struct.h 2010-08-26 19:47:12.000000000 -0400
46449+++ linux-2.6.32.24/include/linux/fs_struct.h 2010-10-23 19:59:20.000000000 -0400 44977+++ linux-2.6.35.7/include/linux/fs_struct.h 2010-09-17 20:12:09.000000000 -0400
46450@@ -4,7 +4,7 @@ 44978@@ -4,7 +4,7 @@
46451 #include <linux/path.h> 44979 #include <linux/path.h>
46452 44980
@@ -46456,10 +44984,10 @@ diff -urNp linux-2.6.32.24/include/linux/fs_struct.h linux-2.6.32.24/include/lin
46456 rwlock_t lock; 44984 rwlock_t lock;
46457 int umask; 44985 int umask;
46458 int in_exec; 44986 int in_exec;
46459diff -urNp linux-2.6.32.24/include/linux/genhd.h linux-2.6.32.24/include/linux/genhd.h 44987diff -urNp linux-2.6.35.7/include/linux/genhd.h linux-2.6.35.7/include/linux/genhd.h
46460--- linux-2.6.32.24/include/linux/genhd.h 2010-08-13 16:24:37.000000000 -0400 44988--- linux-2.6.35.7/include/linux/genhd.h 2010-08-26 19:47:12.000000000 -0400
46461+++ linux-2.6.32.24/include/linux/genhd.h 2010-10-23 19:59:20.000000000 -0400 44989+++ linux-2.6.35.7/include/linux/genhd.h 2010-09-17 20:12:09.000000000 -0400
46462@@ -161,7 +161,7 @@ struct gendisk { 44990@@ -162,7 +162,7 @@ struct gendisk {
46463 44991
46464 struct timer_rand_state *random; 44992 struct timer_rand_state *random;
46465 44993
@@ -46468,9 +44996,9 @@ diff -urNp linux-2.6.32.24/include/linux/genhd.h linux-2.6.32.24/include/linux/g
46468 struct work_struct async_notify; 44996 struct work_struct async_notify;
46469 #ifdef CONFIG_BLK_DEV_INTEGRITY 44997 #ifdef CONFIG_BLK_DEV_INTEGRITY
46470 struct blk_integrity *integrity; 44998 struct blk_integrity *integrity;
46471diff -urNp linux-2.6.32.24/include/linux/gracl.h linux-2.6.32.24/include/linux/gracl.h 44999diff -urNp linux-2.6.35.7/include/linux/gracl.h linux-2.6.35.7/include/linux/gracl.h
46472--- linux-2.6.32.24/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500 45000--- linux-2.6.35.7/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500
46473+++ linux-2.6.32.24/include/linux/gracl.h 2010-10-23 19:59:20.000000000 -0400 45001+++ linux-2.6.35.7/include/linux/gracl.h 2010-09-17 20:12:37.000000000 -0400
46474@@ -0,0 +1,310 @@ 45002@@ -0,0 +1,310 @@
46475+#ifndef GR_ACL_H 45003+#ifndef GR_ACL_H
46476+#define GR_ACL_H 45004+#define GR_ACL_H
@@ -46782,9 +45310,9 @@ diff -urNp linux-2.6.32.24/include/linux/gracl.h linux-2.6.32.24/include/linux/g
46782+ 45310+
46783+#endif 45311+#endif
46784+ 45312+
46785diff -urNp linux-2.6.32.24/include/linux/gralloc.h linux-2.6.32.24/include/linux/gralloc.h 45313diff -urNp linux-2.6.35.7/include/linux/gralloc.h linux-2.6.35.7/include/linux/gralloc.h
46786--- linux-2.6.32.24/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500 45314--- linux-2.6.35.7/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500
46787+++ linux-2.6.32.24/include/linux/gralloc.h 2010-10-23 19:59:20.000000000 -0400 45315+++ linux-2.6.35.7/include/linux/gralloc.h 2010-09-17 20:12:37.000000000 -0400
46788@@ -0,0 +1,9 @@ 45316@@ -0,0 +1,9 @@
46789+#ifndef __GRALLOC_H 45317+#ifndef __GRALLOC_H
46790+#define __GRALLOC_H 45318+#define __GRALLOC_H
@@ -46795,9 +45323,9 @@ diff -urNp linux-2.6.32.24/include/linux/gralloc.h linux-2.6.32.24/include/linux
46795+void *acl_alloc_num(unsigned long num, unsigned long len); 45323+void *acl_alloc_num(unsigned long num, unsigned long len);
46796+ 45324+
46797+#endif 45325+#endif
46798diff -urNp linux-2.6.32.24/include/linux/grdefs.h linux-2.6.32.24/include/linux/grdefs.h 45326diff -urNp linux-2.6.35.7/include/linux/grdefs.h linux-2.6.35.7/include/linux/grdefs.h
46799--- linux-2.6.32.24/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500 45327--- linux-2.6.35.7/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500
46800+++ linux-2.6.32.24/include/linux/grdefs.h 2010-10-23 19:59:20.000000000 -0400 45328+++ linux-2.6.35.7/include/linux/grdefs.h 2010-09-17 20:12:37.000000000 -0400
46801@@ -0,0 +1,136 @@ 45329@@ -0,0 +1,136 @@
46802+#ifndef GRDEFS_H 45330+#ifndef GRDEFS_H
46803+#define GRDEFS_H 45331+#define GRDEFS_H
@@ -46935,9 +45463,9 @@ diff -urNp linux-2.6.32.24/include/linux/grdefs.h linux-2.6.32.24/include/linux/
46935+}; 45463+};
46936+ 45464+
46937+#endif 45465+#endif
46938diff -urNp linux-2.6.32.24/include/linux/grinternal.h linux-2.6.32.24/include/linux/grinternal.h 45466diff -urNp linux-2.6.35.7/include/linux/grinternal.h linux-2.6.35.7/include/linux/grinternal.h
46939--- linux-2.6.32.24/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500 45467--- linux-2.6.35.7/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500
46940+++ linux-2.6.32.24/include/linux/grinternal.h 2010-10-23 19:59:20.000000000 -0400 45468+++ linux-2.6.35.7/include/linux/grinternal.h 2010-10-18 21:05:08.000000000 -0400
46941@@ -0,0 +1,214 @@ 45469@@ -0,0 +1,214 @@
46942+#ifndef __GRINTERNAL_H 45470+#ifndef __GRINTERNAL_H
46943+#define __GRINTERNAL_H 45471+#define __GRINTERNAL_H
@@ -47153,9 +45681,9 @@ diff -urNp linux-2.6.32.24/include/linux/grinternal.h linux-2.6.32.24/include/li
47153+#endif 45681+#endif
47154+ 45682+
47155+#endif 45683+#endif
47156diff -urNp linux-2.6.32.24/include/linux/grmsg.h linux-2.6.32.24/include/linux/grmsg.h 45684diff -urNp linux-2.6.35.7/include/linux/grmsg.h linux-2.6.35.7/include/linux/grmsg.h
47157--- linux-2.6.32.24/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500 45685--- linux-2.6.35.7/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500
47158+++ linux-2.6.32.24/include/linux/grmsg.h 2010-10-23 19:59:20.000000000 -0400 45686+++ linux-2.6.35.7/include/linux/grmsg.h 2010-10-18 21:01:30.000000000 -0400
47159@@ -0,0 +1,110 @@ 45687@@ -0,0 +1,110 @@
47160+#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" 45688+#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"
47161+#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" 45689+#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"
@@ -47267,9 +45795,9 @@ diff -urNp linux-2.6.32.24/include/linux/grmsg.h linux-2.6.32.24/include/linux/g
47267+#define GR_NONROOT_MODLOAD_MSG "denied kernel module auto-load of %.64s by " 45795+#define GR_NONROOT_MODLOAD_MSG "denied kernel module auto-load of %.64s by "
47268+#define GR_VM86_MSG "denied use of vm86 by " 45796+#define GR_VM86_MSG "denied use of vm86 by "
47269+#define GR_PTRACE_AUDIT_MSG "process %.950s(%.16s:%d) attached to via ptrace by " 45797+#define GR_PTRACE_AUDIT_MSG "process %.950s(%.16s:%d) attached to via ptrace by "
47270diff -urNp linux-2.6.32.24/include/linux/grsecurity.h linux-2.6.32.24/include/linux/grsecurity.h 45798diff -urNp linux-2.6.35.7/include/linux/grsecurity.h linux-2.6.35.7/include/linux/grsecurity.h
47271--- linux-2.6.32.24/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500 45799--- linux-2.6.35.7/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500
47272+++ linux-2.6.32.24/include/linux/grsecurity.h 2010-10-23 19:59:20.000000000 -0400 45800+++ linux-2.6.35.7/include/linux/grsecurity.h 2010-10-18 21:01:30.000000000 -0400
47273@@ -0,0 +1,205 @@ 45801@@ -0,0 +1,205 @@
47274+#ifndef GR_SECURITY_H 45802+#ifndef GR_SECURITY_H
47275+#define GR_SECURITY_H 45803+#define GR_SECURITY_H
@@ -47476,22 +46004,33 @@ diff -urNp linux-2.6.32.24/include/linux/grsecurity.h linux-2.6.32.24/include/li
47476+#endif 46004+#endif
47477+ 46005+
47478+#endif 46006+#endif
47479diff -urNp linux-2.6.32.24/include/linux/hdpu_features.h linux-2.6.32.24/include/linux/hdpu_features.h 46007diff -urNp linux-2.6.35.7/include/linux/grsock.h linux-2.6.35.7/include/linux/grsock.h
47480--- linux-2.6.32.24/include/linux/hdpu_features.h 2010-08-13 16:24:37.000000000 -0400 46008--- linux-2.6.35.7/include/linux/grsock.h 1969-12-31 19:00:00.000000000 -0500
47481+++ linux-2.6.32.24/include/linux/hdpu_features.h 2010-10-23 19:59:20.000000000 -0400 46009+++ linux-2.6.35.7/include/linux/grsock.h 2010-09-17 20:12:37.000000000 -0400
47482@@ -3,7 +3,7 @@ 46010@@ -0,0 +1,19 @@
47483 struct cpustate_t { 46011+#ifndef __GRSOCK_H
47484 spinlock_t lock; 46012+#define __GRSOCK_H
47485 int excl; 46013+
47486- int open_count; 46014+extern void gr_attach_curr_ip(const struct sock *sk);
47487+ atomic_t open_count; 46015+extern int gr_handle_sock_all(const int family, const int type,
47488 unsigned char cached_val; 46016+ const int protocol);
47489 int inited; 46017+extern int gr_handle_sock_server(const struct sockaddr *sck);
47490 unsigned long *set_addr; 46018+extern int gr_handle_sock_server_other(const struct sock *sck);
47491diff -urNp linux-2.6.32.24/include/linux/highmem.h linux-2.6.32.24/include/linux/highmem.h 46019+extern int gr_handle_sock_client(const struct sockaddr *sck);
47492--- linux-2.6.32.24/include/linux/highmem.h 2010-08-13 16:24:37.000000000 -0400 46020+extern int gr_search_connect(struct socket * sock,
47493+++ linux-2.6.32.24/include/linux/highmem.h 2010-10-23 19:59:20.000000000 -0400 46021+ struct sockaddr_in * addr);
47494@@ -137,6 +137,18 @@ static inline void clear_highpage(struct 46022+extern int gr_search_bind(struct socket * sock,
46023+ struct sockaddr_in * addr);
46024+extern int gr_search_listen(struct socket * sock);
46025+extern int gr_search_accept(struct socket * sock);
46026+extern int gr_search_socket(const int domain, const int type,
46027+ const int protocol);
46028+
46029+#endif
46030diff -urNp linux-2.6.35.7/include/linux/highmem.h linux-2.6.35.7/include/linux/highmem.h
46031--- linux-2.6.35.7/include/linux/highmem.h 2010-08-26 19:47:12.000000000 -0400
46032+++ linux-2.6.35.7/include/linux/highmem.h 2010-09-17 20:12:09.000000000 -0400
46033@@ -143,6 +143,18 @@ static inline void clear_highpage(struct
47495 kunmap_atomic(kaddr, KM_USER0); 46034 kunmap_atomic(kaddr, KM_USER0);
47496 } 46035 }
47497 46036
@@ -47510,10 +46049,10 @@ diff -urNp linux-2.6.32.24/include/linux/highmem.h linux-2.6.32.24/include/linux
47510 static inline void zero_user_segments(struct page *page, 46049 static inline void zero_user_segments(struct page *page,
47511 unsigned start1, unsigned end1, 46050 unsigned start1, unsigned end1,
47512 unsigned start2, unsigned end2) 46051 unsigned start2, unsigned end2)
47513diff -urNp linux-2.6.32.24/include/linux/interrupt.h linux-2.6.32.24/include/linux/interrupt.h 46052diff -urNp linux-2.6.35.7/include/linux/interrupt.h linux-2.6.35.7/include/linux/interrupt.h
47514--- linux-2.6.32.24/include/linux/interrupt.h 2010-08-13 16:24:37.000000000 -0400 46053--- linux-2.6.35.7/include/linux/interrupt.h 2010-08-26 19:47:12.000000000 -0400
47515+++ linux-2.6.32.24/include/linux/interrupt.h 2010-10-23 19:59:20.000000000 -0400 46054+++ linux-2.6.35.7/include/linux/interrupt.h 2010-09-17 20:12:09.000000000 -0400
47516@@ -362,7 +362,7 @@ enum 46055@@ -392,7 +392,7 @@ enum
47517 /* map softirq index to softirq name. update 'softirq_to_name' in 46056 /* map softirq index to softirq name. update 'softirq_to_name' in
47518 * kernel/softirq.c when adding a new softirq. 46057 * kernel/softirq.c when adding a new softirq.
47519 */ 46058 */
@@ -47522,7 +46061,7 @@ diff -urNp linux-2.6.32.24/include/linux/interrupt.h linux-2.6.32.24/include/lin
47522 46061
47523 /* softirq mask and active fields moved to irq_cpustat_t in 46062 /* softirq mask and active fields moved to irq_cpustat_t in
47524 * asm/hardirq.h to get better cache usage. KAO 46063 * asm/hardirq.h to get better cache usage. KAO
47525@@ -370,12 +370,12 @@ extern char *softirq_to_name[NR_SOFTIRQS 46064@@ -400,12 +400,12 @@ extern char *softirq_to_name[NR_SOFTIRQS
47526 46065
47527 struct softirq_action 46066 struct softirq_action
47528 { 46067 {
@@ -47537,10 +46076,10 @@ diff -urNp linux-2.6.32.24/include/linux/interrupt.h linux-2.6.32.24/include/lin
47537 extern void softirq_init(void); 46076 extern void softirq_init(void);
47538 #define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0) 46077 #define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0)
47539 extern void raise_softirq_irqoff(unsigned int nr); 46078 extern void raise_softirq_irqoff(unsigned int nr);
47540diff -urNp linux-2.6.32.24/include/linux/jbd2.h linux-2.6.32.24/include/linux/jbd2.h 46079diff -urNp linux-2.6.35.7/include/linux/jbd2.h linux-2.6.35.7/include/linux/jbd2.h
47541--- linux-2.6.32.24/include/linux/jbd2.h 2010-08-13 16:24:37.000000000 -0400 46080--- linux-2.6.35.7/include/linux/jbd2.h 2010-08-26 19:47:12.000000000 -0400
47542+++ linux-2.6.32.24/include/linux/jbd2.h 2010-10-23 19:59:20.000000000 -0400 46081+++ linux-2.6.35.7/include/linux/jbd2.h 2010-09-17 20:12:09.000000000 -0400
47543@@ -66,7 +66,7 @@ extern u8 jbd2_journal_enable_debug; 46082@@ -67,7 +67,7 @@ extern u8 jbd2_journal_enable_debug;
47544 } \ 46083 } \
47545 } while (0) 46084 } while (0)
47546 #else 46085 #else
@@ -47548,11 +46087,11 @@ diff -urNp linux-2.6.32.24/include/linux/jbd2.h linux-2.6.32.24/include/linux/jb
47548+#define jbd_debug(f, a...) do {} while (0) 46087+#define jbd_debug(f, a...) do {} while (0)
47549 #endif 46088 #endif
47550 46089
47551 static inline void *jbd2_alloc(size_t size, gfp_t flags) 46090 extern void *jbd2_alloc(size_t size, gfp_t flags);
47552diff -urNp linux-2.6.32.24/include/linux/jbd.h linux-2.6.32.24/include/linux/jbd.h 46091diff -urNp linux-2.6.35.7/include/linux/jbd.h linux-2.6.35.7/include/linux/jbd.h
47553--- linux-2.6.32.24/include/linux/jbd.h 2010-08-13 16:24:37.000000000 -0400 46092--- linux-2.6.35.7/include/linux/jbd.h 2010-08-26 19:47:12.000000000 -0400
47554+++ linux-2.6.32.24/include/linux/jbd.h 2010-10-23 19:59:20.000000000 -0400 46093+++ linux-2.6.35.7/include/linux/jbd.h 2010-09-17 20:12:09.000000000 -0400
47555@@ -66,7 +66,7 @@ extern u8 journal_enable_debug; 46094@@ -67,7 +67,7 @@ extern u8 journal_enable_debug;
47556 } \ 46095 } \
47557 } while (0) 46096 } while (0)
47558 #else 46097 #else
@@ -47561,9 +46100,9 @@ diff -urNp linux-2.6.32.24/include/linux/jbd.h linux-2.6.32.24/include/linux/jbd
47561 #endif 46100 #endif
47562 46101
47563 static inline void *jbd_alloc(size_t size, gfp_t flags) 46102 static inline void *jbd_alloc(size_t size, gfp_t flags)
47564diff -urNp linux-2.6.32.24/include/linux/kallsyms.h linux-2.6.32.24/include/linux/kallsyms.h 46103diff -urNp linux-2.6.35.7/include/linux/kallsyms.h linux-2.6.35.7/include/linux/kallsyms.h
47565--- linux-2.6.32.24/include/linux/kallsyms.h 2010-08-13 16:24:37.000000000 -0400 46104--- linux-2.6.35.7/include/linux/kallsyms.h 2010-08-26 19:47:12.000000000 -0400
47566+++ linux-2.6.32.24/include/linux/kallsyms.h 2010-10-23 19:59:20.000000000 -0400 46105+++ linux-2.6.35.7/include/linux/kallsyms.h 2010-09-17 20:12:37.000000000 -0400
47567@@ -15,7 +15,8 @@ 46106@@ -15,7 +15,8 @@
47568 46107
47569 struct module; 46108 struct module;
@@ -47584,10 +46123,10 @@ diff -urNp linux-2.6.32.24/include/linux/kallsyms.h linux-2.6.32.24/include/linu
47584 46123
47585 /* This macro allows us to keep printk typechecking */ 46124 /* This macro allows us to keep printk typechecking */
47586 static void __check_printsym_format(const char *fmt, ...) 46125 static void __check_printsym_format(const char *fmt, ...)
47587diff -urNp linux-2.6.32.24/include/linux/kgdb.h linux-2.6.32.24/include/linux/kgdb.h 46126diff -urNp linux-2.6.35.7/include/linux/kgdb.h linux-2.6.35.7/include/linux/kgdb.h
47588--- linux-2.6.32.24/include/linux/kgdb.h 2010-08-13 16:24:37.000000000 -0400 46127--- linux-2.6.35.7/include/linux/kgdb.h 2010-08-26 19:47:12.000000000 -0400
47589+++ linux-2.6.32.24/include/linux/kgdb.h 2010-10-23 19:59:20.000000000 -0400 46128+++ linux-2.6.35.7/include/linux/kgdb.h 2010-09-17 20:12:09.000000000 -0400
47590@@ -251,20 +251,20 @@ struct kgdb_arch { 46129@@ -263,22 +263,22 @@ struct kgdb_arch {
47591 */ 46130 */
47592 struct kgdb_io { 46131 struct kgdb_io {
47593 const char *name; 46132 const char *name;
@@ -47603,6 +46142,7 @@ diff -urNp linux-2.6.32.24/include/linux/kgdb.h linux-2.6.32.24/include/linux/kg
47603+ int (* const init) (void); 46142+ int (* const init) (void);
47604+ void (* const pre_exception) (void); 46143+ void (* const pre_exception) (void);
47605+ void (* const post_exception) (void); 46144+ void (* const post_exception) (void);
46145 int is_console;
47606 }; 46146 };
47607 46147
47608-extern struct kgdb_arch arch_kgdb_ops; 46148-extern struct kgdb_arch arch_kgdb_ops;
@@ -47612,75 +46152,26 @@ diff -urNp linux-2.6.32.24/include/linux/kgdb.h linux-2.6.32.24/include/linux/kg
47612 46152
47613-extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); 46153-extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
47614-extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); 46154-extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops);
46155-extern struct kgdb_io *dbg_io_ops;
47615+extern int kgdb_register_io_module(const struct kgdb_io *local_kgdb_io_ops); 46156+extern int kgdb_register_io_module(const struct kgdb_io *local_kgdb_io_ops);
47616+extern void kgdb_unregister_io_module(const struct kgdb_io *local_kgdb_io_ops); 46157+extern void kgdb_unregister_io_module(const struct kgdb_io *local_kgdb_io_ops);
46158+extern const struct kgdb_io *dbg_io_ops;
47617 46159
47618 extern int kgdb_hex2long(char **ptr, unsigned long *long_val); 46160 extern int kgdb_hex2long(char **ptr, unsigned long *long_val);
47619 extern int kgdb_mem2hex(char *mem, char *buf, int count); 46161 extern int kgdb_mem2hex(char *mem, char *buf, int count);
47620diff -urNp linux-2.6.32.24/include/linux/kobject.h linux-2.6.32.24/include/linux/kobject.h 46162diff -urNp linux-2.6.35.7/include/linux/kvm_host.h linux-2.6.35.7/include/linux/kvm_host.h
47621--- linux-2.6.32.24/include/linux/kobject.h 2010-08-13 16:24:37.000000000 -0400 46163--- linux-2.6.35.7/include/linux/kvm_host.h 2010-09-26 17:32:11.000000000 -0400
47622+++ linux-2.6.32.24/include/linux/kobject.h 2010-10-23 19:59:20.000000000 -0400 46164+++ linux-2.6.35.7/include/linux/kvm_host.h 2010-09-26 17:32:50.000000000 -0400
47623@@ -106,7 +106,7 @@ extern char *kobject_get_path(struct kob 46165@@ -244,7 +244,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vc
47624
47625 struct kobj_type {
47626 void (*release)(struct kobject *kobj);
47627- struct sysfs_ops *sysfs_ops;
47628+ const struct sysfs_ops *sysfs_ops;
47629 struct attribute **default_attrs;
47630 };
47631
47632@@ -118,9 +118,9 @@ struct kobj_uevent_env {
47633 };
47634
47635 struct kset_uevent_ops {
47636- int (*filter)(struct kset *kset, struct kobject *kobj);
47637- const char *(*name)(struct kset *kset, struct kobject *kobj);
47638- int (*uevent)(struct kset *kset, struct kobject *kobj,
47639+ int (* const filter)(struct kset *kset, struct kobject *kobj);
47640+ const char *(* const name)(struct kset *kset, struct kobject *kobj);
47641+ int (* const uevent)(struct kset *kset, struct kobject *kobj,
47642 struct kobj_uevent_env *env);
47643 };
47644
47645@@ -132,7 +132,7 @@ struct kobj_attribute {
47646 const char *buf, size_t count);
47647 };
47648
47649-extern struct sysfs_ops kobj_sysfs_ops;
47650+extern const struct sysfs_ops kobj_sysfs_ops;
47651
47652 /**
47653 * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem.
47654@@ -155,14 +155,14 @@ struct kset {
47655 struct list_head list;
47656 spinlock_t list_lock;
47657 struct kobject kobj;
47658- struct kset_uevent_ops *uevent_ops;
47659+ const struct kset_uevent_ops *uevent_ops;
47660 };
47661
47662 extern void kset_init(struct kset *kset);
47663 extern int __must_check kset_register(struct kset *kset);
47664 extern void kset_unregister(struct kset *kset);
47665 extern struct kset * __must_check kset_create_and_add(const char *name,
47666- struct kset_uevent_ops *u,
47667+ const struct kset_uevent_ops *u,
47668 struct kobject *parent_kobj);
47669
47670 static inline struct kset *to_kset(struct kobject *kobj)
47671diff -urNp linux-2.6.32.24/include/linux/kvm_host.h linux-2.6.32.24/include/linux/kvm_host.h
47672--- linux-2.6.32.24/include/linux/kvm_host.h 2010-08-13 16:24:37.000000000 -0400
47673+++ linux-2.6.32.24/include/linux/kvm_host.h 2010-10-23 19:59:20.000000000 -0400
47674@@ -210,7 +210,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vc
47675 void vcpu_load(struct kvm_vcpu *vcpu); 46166 void vcpu_load(struct kvm_vcpu *vcpu);
47676 void vcpu_put(struct kvm_vcpu *vcpu); 46167 void vcpu_put(struct kvm_vcpu *vcpu);
47677 46168
47678-int kvm_init(void *opaque, unsigned int vcpu_size, 46169-int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
47679+int kvm_init(const void *opaque, unsigned int vcpu_size, 46170+int kvm_init(const void *opaque, unsigned vcpu_size, unsigned vcpu_align,
47680 struct module *module); 46171 struct module *module);
47681 void kvm_exit(void); 46172 void kvm_exit(void);
47682 46173
47683@@ -316,7 +316,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug( 46174@@ -368,7 +368,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(
47684 struct kvm_guest_debug *dbg); 46175 struct kvm_guest_debug *dbg);
47685 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run); 46176 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run);
47686 46177
@@ -47689,9 +46180,9 @@ diff -urNp linux-2.6.32.24/include/linux/kvm_host.h linux-2.6.32.24/include/linu
47689 void kvm_arch_exit(void); 46180 void kvm_arch_exit(void);
47690 46181
47691 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu); 46182 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
47692diff -urNp linux-2.6.32.24/include/linux/libata.h linux-2.6.32.24/include/linux/libata.h 46183diff -urNp linux-2.6.35.7/include/linux/libata.h linux-2.6.35.7/include/linux/libata.h
47693--- linux-2.6.32.24/include/linux/libata.h 2010-09-20 17:26:42.000000000 -0400 46184--- linux-2.6.35.7/include/linux/libata.h 2010-09-20 17:33:09.000000000 -0400
47694+++ linux-2.6.32.24/include/linux/libata.h 2010-10-23 19:59:20.000000000 -0400 46185+++ linux-2.6.35.7/include/linux/libata.h 2010-09-20 17:33:35.000000000 -0400
47695@@ -64,11 +64,11 @@ 46186@@ -64,11 +64,11 @@
47696 #ifdef ATA_VERBOSE_DEBUG 46187 #ifdef ATA_VERBOSE_DEBUG
47697 #define VPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) 46188 #define VPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
@@ -47707,7 +46198,7 @@ diff -urNp linux-2.6.32.24/include/linux/libata.h linux-2.6.32.24/include/linux/
47707 #endif /* ATA_DEBUG */ 46198 #endif /* ATA_DEBUG */
47708 46199
47709 #define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __func__, ## args) 46200 #define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __func__, ## args)
47710@@ -525,11 +525,11 @@ struct ata_ioports { 46201@@ -524,11 +524,11 @@ struct ata_ioports {
47711 46202
47712 struct ata_host { 46203 struct ata_host {
47713 spinlock_t lock; 46204 spinlock_t lock;
@@ -47730,7 +46221,7 @@ diff -urNp linux-2.6.32.24/include/linux/libata.h linux-2.6.32.24/include/linux/
47730 spinlock_t *lock; 46221 spinlock_t *lock;
47731 /* Flags owned by the EH context. Only EH should touch these once the 46222 /* Flags owned by the EH context. Only EH should touch these once the
47732 port is active */ 46223 port is active */
47733@@ -892,7 +892,7 @@ struct ata_port_info { 46224@@ -895,7 +895,7 @@ struct ata_port_info {
47734 unsigned long pio_mask; 46225 unsigned long pio_mask;
47735 unsigned long mwdma_mask; 46226 unsigned long mwdma_mask;
47736 unsigned long udma_mask; 46227 unsigned long udma_mask;
@@ -47739,7 +46230,7 @@ diff -urNp linux-2.6.32.24/include/linux/libata.h linux-2.6.32.24/include/linux/
47739 void *private_data; 46230 void *private_data;
47740 }; 46231 };
47741 46232
47742@@ -916,7 +916,7 @@ extern const unsigned long sata_deb_timi 46233@@ -919,7 +919,7 @@ extern const unsigned long sata_deb_timi
47743 extern const unsigned long sata_deb_timing_hotplug[]; 46234 extern const unsigned long sata_deb_timing_hotplug[];
47744 extern const unsigned long sata_deb_timing_long[]; 46235 extern const unsigned long sata_deb_timing_long[];
47745 46236
@@ -47748,7 +46239,7 @@ diff -urNp linux-2.6.32.24/include/linux/libata.h linux-2.6.32.24/include/linux/
47748 extern const struct ata_port_info ata_dummy_port_info; 46239 extern const struct ata_port_info ata_dummy_port_info;
47749 46240
47750 static inline const unsigned long * 46241 static inline const unsigned long *
47751@@ -962,7 +962,7 @@ extern int ata_host_activate(struct ata_ 46242@@ -963,7 +963,7 @@ extern int ata_host_activate(struct ata_
47752 struct scsi_host_template *sht); 46243 struct scsi_host_template *sht);
47753 extern void ata_host_detach(struct ata_host *host); 46244 extern void ata_host_detach(struct ata_host *host);
47754 extern void ata_host_init(struct ata_host *, struct device *, 46245 extern void ata_host_init(struct ata_host *, struct device *,
@@ -47757,9 +46248,9 @@ diff -urNp linux-2.6.32.24/include/linux/libata.h linux-2.6.32.24/include/linux/
47757 extern int ata_scsi_detect(struct scsi_host_template *sht); 46248 extern int ata_scsi_detect(struct scsi_host_template *sht);
47758 extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); 46249 extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
47759 extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); 46250 extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
47760diff -urNp linux-2.6.32.24/include/linux/lockd/bind.h linux-2.6.32.24/include/linux/lockd/bind.h 46251diff -urNp linux-2.6.35.7/include/linux/lockd/bind.h linux-2.6.35.7/include/linux/lockd/bind.h
47761--- linux-2.6.32.24/include/linux/lockd/bind.h 2010-08-13 16:24:37.000000000 -0400 46252--- linux-2.6.35.7/include/linux/lockd/bind.h 2010-08-26 19:47:12.000000000 -0400
47762+++ linux-2.6.32.24/include/linux/lockd/bind.h 2010-10-23 19:59:20.000000000 -0400 46253+++ linux-2.6.35.7/include/linux/lockd/bind.h 2010-09-17 20:12:09.000000000 -0400
47763@@ -23,13 +23,13 @@ struct svc_rqst; 46254@@ -23,13 +23,13 @@ struct svc_rqst;
47764 * This is the set of functions for lockd->nfsd communication 46255 * This is the set of functions for lockd->nfsd communication
47765 */ 46256 */
@@ -47777,10 +46268,10 @@ diff -urNp linux-2.6.32.24/include/linux/lockd/bind.h linux-2.6.32.24/include/li
47777 46268
47778 /* 46269 /*
47779 * Similar to nfs_client_initdata, but without the NFS-specific 46270 * Similar to nfs_client_initdata, but without the NFS-specific
47780diff -urNp linux-2.6.32.24/include/linux/mm.h linux-2.6.32.24/include/linux/mm.h 46271diff -urNp linux-2.6.35.7/include/linux/mm.h linux-2.6.35.7/include/linux/mm.h
47781--- linux-2.6.32.24/include/linux/mm.h 2010-09-26 17:26:05.000000000 -0400 46272--- linux-2.6.35.7/include/linux/mm.h 2010-09-26 17:32:11.000000000 -0400
47782+++ linux-2.6.32.24/include/linux/mm.h 2010-10-23 19:59:20.000000000 -0400 46273+++ linux-2.6.35.7/include/linux/mm.h 2010-09-26 17:32:50.000000000 -0400
47783@@ -106,7 +106,14 @@ extern unsigned int kobjsize(const void 46274@@ -107,7 +107,14 @@ extern unsigned int kobjsize(const void
47784 46275
47785 #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ 46276 #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
47786 #define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ 46277 #define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
@@ -47795,7 +46286,7 @@ diff -urNp linux-2.6.32.24/include/linux/mm.h linux-2.6.32.24/include/linux/mm.h
47795 #define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */ 46286 #define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */
47796 #define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */ 46287 #define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */
47797 46288
47798@@ -884,6 +891,8 @@ struct shrinker { 46289@@ -1014,6 +1021,8 @@ struct shrinker {
47799 extern void register_shrinker(struct shrinker *); 46290 extern void register_shrinker(struct shrinker *);
47800 extern void unregister_shrinker(struct shrinker *); 46291 extern void unregister_shrinker(struct shrinker *);
47801 46292
@@ -47804,7 +46295,7 @@ diff -urNp linux-2.6.32.24/include/linux/mm.h linux-2.6.32.24/include/linux/mm.h
47804 int vma_wants_writenotify(struct vm_area_struct *vma); 46295 int vma_wants_writenotify(struct vm_area_struct *vma);
47805 46296
47806 extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl); 46297 extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl);
47807@@ -1156,6 +1165,7 @@ out: 46298@@ -1290,6 +1299,7 @@ out:
47808 } 46299 }
47809 46300
47810 extern int do_munmap(struct mm_struct *, unsigned long, size_t); 46301 extern int do_munmap(struct mm_struct *, unsigned long, size_t);
@@ -47812,18 +46303,18 @@ diff -urNp linux-2.6.32.24/include/linux/mm.h linux-2.6.32.24/include/linux/mm.h
47812 46303
47813 extern unsigned long do_brk(unsigned long, unsigned long); 46304 extern unsigned long do_brk(unsigned long, unsigned long);
47814 46305
47815@@ -1212,6 +1222,10 @@ extern struct vm_area_struct * find_vma( 46306@@ -1346,6 +1356,10 @@ extern struct vm_area_struct * find_vma(
47816 extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr, 46307 extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
47817 struct vm_area_struct **pprev); 46308 struct vm_area_struct **pprev);
47818 46309
47819+extern struct vm_area_struct *pax_find_mirror_vma(struct vm_area_struct *vma); 46310+extern struct vm_area_struct *pax_find_mirror_vma(struct vm_area_struct *vma);
47820+extern void pax_mirror_vma(struct vm_area_struct *vma_m, struct vm_area_struct *vma); 46311+extern __must_check long pax_mirror_vma(struct vm_area_struct *vma_m, struct vm_area_struct *vma);
47821+extern void pax_mirror_file_pte(struct vm_area_struct *vma, unsigned long address, struct page *page_m, spinlock_t *ptl); 46312+extern void pax_mirror_file_pte(struct vm_area_struct *vma, unsigned long address, struct page *page_m, spinlock_t *ptl);
47822+ 46313+
47823 /* Look up the first VMA which intersects the interval start_addr..end_addr-1, 46314 /* Look up the first VMA which intersects the interval start_addr..end_addr-1,
47824 NULL if none. Assume start_addr < end_addr. */ 46315 NULL if none. Assume start_addr < end_addr. */
47825 static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr) 46316 static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
47826@@ -1228,7 +1242,6 @@ static inline unsigned long vma_pages(st 46317@@ -1362,7 +1376,6 @@ static inline unsigned long vma_pages(st
47827 return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 46318 return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
47828 } 46319 }
47829 46320
@@ -47831,25 +46322,28 @@ diff -urNp linux-2.6.32.24/include/linux/mm.h linux-2.6.32.24/include/linux/mm.h
47831 struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); 46322 struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
47832 int remap_pfn_range(struct vm_area_struct *, unsigned long addr, 46323 int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
47833 unsigned long pfn, unsigned long size, pgprot_t); 46324 unsigned long pfn, unsigned long size, pgprot_t);
47834@@ -1326,7 +1339,13 @@ extern void memory_failure(unsigned long 46325@@ -1469,10 +1482,16 @@ extern int unpoison_memory(unsigned long
47835 extern int __memory_failure(unsigned long pfn, int trapno, int ref);
47836 extern int sysctl_memory_failure_early_kill; 46326 extern int sysctl_memory_failure_early_kill;
47837 extern int sysctl_memory_failure_recovery; 46327 extern int sysctl_memory_failure_recovery;
46328 extern void shake_page(struct page *p, int access);
47838-extern atomic_long_t mce_bad_pages; 46329-extern atomic_long_t mce_bad_pages;
47839+extern atomic_long_unchecked_t mce_bad_pages; 46330+extern atomic_long_unchecked_t mce_bad_pages;
47840+ 46331 extern int soft_offline_page(struct page *page, int flags);
46332
46333 extern void dump_page(struct page *page);
46334
47841+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT 46335+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
47842+extern void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot); 46336+extern void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot);
47843+#else 46337+#else
47844+static inline void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot) {} 46338+static inline void track_exec_limit(struct mm_struct *mm, unsigned long start, unsigned long end, unsigned long prot) {}
47845+#endif 46339+#endif
47846 46340+
47847 #endif /* __KERNEL__ */ 46341 #endif /* __KERNEL__ */
47848 #endif /* _LINUX_MM_H */ 46342 #endif /* _LINUX_MM_H */
47849diff -urNp linux-2.6.32.24/include/linux/mm_types.h linux-2.6.32.24/include/linux/mm_types.h 46343diff -urNp linux-2.6.35.7/include/linux/mm_types.h linux-2.6.35.7/include/linux/mm_types.h
47850--- linux-2.6.32.24/include/linux/mm_types.h 2010-08-29 21:08:20.000000000 -0400 46344--- linux-2.6.35.7/include/linux/mm_types.h 2010-08-26 19:47:12.000000000 -0400
47851+++ linux-2.6.32.24/include/linux/mm_types.h 2010-10-23 19:59:20.000000000 -0400 46345+++ linux-2.6.35.7/include/linux/mm_types.h 2010-09-17 20:12:09.000000000 -0400
47852@@ -186,6 +186,8 @@ struct vm_area_struct { 46346@@ -183,6 +183,8 @@ struct vm_area_struct {
47853 #ifdef CONFIG_NUMA 46347 #ifdef CONFIG_NUMA
47854 struct mempolicy *vm_policy; /* NUMA policy for the VMA */ 46348 struct mempolicy *vm_policy; /* NUMA policy for the VMA */
47855 #endif 46349 #endif
@@ -47858,7 +46352,7 @@ diff -urNp linux-2.6.32.24/include/linux/mm_types.h linux-2.6.32.24/include/linu
47858 }; 46352 };
47859 46353
47860 struct core_thread { 46354 struct core_thread {
47861@@ -287,6 +289,24 @@ struct mm_struct { 46355@@ -310,6 +312,24 @@ struct mm_struct {
47862 #ifdef CONFIG_MMU_NOTIFIER 46356 #ifdef CONFIG_MMU_NOTIFIER
47863 struct mmu_notifier_mm *mmu_notifier_mm; 46357 struct mmu_notifier_mm *mmu_notifier_mm;
47864 #endif 46358 #endif
@@ -47883,9 +46377,9 @@ diff -urNp linux-2.6.32.24/include/linux/mm_types.h linux-2.6.32.24/include/linu
47883 }; 46377 };
47884 46378
47885 /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ 46379 /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
47886diff -urNp linux-2.6.32.24/include/linux/mmu_notifier.h linux-2.6.32.24/include/linux/mmu_notifier.h 46380diff -urNp linux-2.6.35.7/include/linux/mmu_notifier.h linux-2.6.35.7/include/linux/mmu_notifier.h
47887--- linux-2.6.32.24/include/linux/mmu_notifier.h 2010-08-13 16:24:37.000000000 -0400 46381--- linux-2.6.35.7/include/linux/mmu_notifier.h 2010-08-26 19:47:12.000000000 -0400
47888+++ linux-2.6.32.24/include/linux/mmu_notifier.h 2010-10-23 19:59:20.000000000 -0400 46382+++ linux-2.6.35.7/include/linux/mmu_notifier.h 2010-09-17 20:12:09.000000000 -0400
47889@@ -235,12 +235,12 @@ static inline void mmu_notifier_mm_destr 46383@@ -235,12 +235,12 @@ static inline void mmu_notifier_mm_destr
47890 */ 46384 */
47891 #define ptep_clear_flush_notify(__vma, __address, __ptep) \ 46385 #define ptep_clear_flush_notify(__vma, __address, __ptep) \
@@ -47902,10 +46396,10 @@ diff -urNp linux-2.6.32.24/include/linux/mmu_notifier.h linux-2.6.32.24/include/
47902 }) 46396 })
47903 46397
47904 #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ 46398 #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \
47905diff -urNp linux-2.6.32.24/include/linux/mmzone.h linux-2.6.32.24/include/linux/mmzone.h 46399diff -urNp linux-2.6.35.7/include/linux/mmzone.h linux-2.6.35.7/include/linux/mmzone.h
47906--- linux-2.6.32.24/include/linux/mmzone.h 2010-09-26 17:26:05.000000000 -0400 46400--- linux-2.6.35.7/include/linux/mmzone.h 2010-09-26 17:32:11.000000000 -0400
47907+++ linux-2.6.32.24/include/linux/mmzone.h 2010-10-23 19:59:20.000000000 -0400 46401+++ linux-2.6.35.7/include/linux/mmzone.h 2010-09-26 17:32:50.000000000 -0400
47908@@ -350,7 +350,7 @@ struct zone { 46402@@ -352,7 +352,7 @@ struct zone {
47909 unsigned long flags; /* zone flags, see below */ 46403 unsigned long flags; /* zone flags, see below */
47910 46404
47911 /* Zone statistics */ 46405 /* Zone statistics */
@@ -47914,9 +46408,9 @@ diff -urNp linux-2.6.32.24/include/linux/mmzone.h linux-2.6.32.24/include/linux/
47914 46408
47915 /* 46409 /*
47916 * prev_priority holds the scanning priority for this zone. It is 46410 * prev_priority holds the scanning priority for this zone. It is
47917diff -urNp linux-2.6.32.24/include/linux/mod_devicetable.h linux-2.6.32.24/include/linux/mod_devicetable.h 46411diff -urNp linux-2.6.35.7/include/linux/mod_devicetable.h linux-2.6.35.7/include/linux/mod_devicetable.h
47918--- linux-2.6.32.24/include/linux/mod_devicetable.h 2010-08-13 16:24:37.000000000 -0400 46412--- linux-2.6.35.7/include/linux/mod_devicetable.h 2010-08-26 19:47:12.000000000 -0400
47919+++ linux-2.6.32.24/include/linux/mod_devicetable.h 2010-10-23 19:59:20.000000000 -0400 46413+++ linux-2.6.35.7/include/linux/mod_devicetable.h 2010-09-17 20:12:09.000000000 -0400
47920@@ -12,7 +12,7 @@ 46414@@ -12,7 +12,7 @@
47921 typedef unsigned long kernel_ulong_t; 46415 typedef unsigned long kernel_ulong_t;
47922 #endif 46416 #endif
@@ -47935,10 +46429,10 @@ diff -urNp linux-2.6.32.24/include/linux/mod_devicetable.h linux-2.6.32.24/inclu
47935 46429
47936 struct hid_device_id { 46430 struct hid_device_id {
47937 __u16 bus; 46431 __u16 bus;
47938diff -urNp linux-2.6.32.24/include/linux/module.h linux-2.6.32.24/include/linux/module.h 46432diff -urNp linux-2.6.35.7/include/linux/module.h linux-2.6.35.7/include/linux/module.h
47939--- linux-2.6.32.24/include/linux/module.h 2010-08-13 16:24:37.000000000 -0400 46433--- linux-2.6.35.7/include/linux/module.h 2010-08-26 19:47:12.000000000 -0400
47940+++ linux-2.6.32.24/include/linux/module.h 2010-10-23 19:59:20.000000000 -0400 46434+++ linux-2.6.35.7/include/linux/module.h 2010-09-17 20:12:09.000000000 -0400
47941@@ -287,16 +287,16 @@ struct module 46435@@ -297,16 +297,16 @@ struct module
47942 int (*init)(void); 46436 int (*init)(void);
47943 46437
47944 /* If this is non-NULL, vfree after init() returns */ 46438 /* If this is non-NULL, vfree after init() returns */
@@ -47959,8 +46453,8 @@ diff -urNp linux-2.6.32.24/include/linux/module.h linux-2.6.32.24/include/linux/
47959 46453
47960 /* Arch-specific module values */ 46454 /* Arch-specific module values */
47961 struct mod_arch_specific arch; 46455 struct mod_arch_specific arch;
47962@@ -393,16 +393,46 @@ struct module *__module_address(unsigned 46456@@ -408,16 +408,46 @@ bool is_module_address(unsigned long add
47963 bool is_module_address(unsigned long addr); 46457 bool is_module_percpu_address(unsigned long addr);
47964 bool is_module_text_address(unsigned long addr); 46458 bool is_module_text_address(unsigned long addr);
47965 46459
47966+static inline int within_module_range(unsigned long addr, void *start, unsigned long size) 46460+static inline int within_module_range(unsigned long addr, void *start, unsigned long size)
@@ -48010,9 +46504,9 @@ diff -urNp linux-2.6.32.24/include/linux/module.h linux-2.6.32.24/include/linux/
48010 } 46504 }
48011 46505
48012 /* Search for module by name: must hold module_mutex. */ 46506 /* Search for module by name: must hold module_mutex. */
48013diff -urNp linux-2.6.32.24/include/linux/moduleloader.h linux-2.6.32.24/include/linux/moduleloader.h 46507diff -urNp linux-2.6.35.7/include/linux/moduleloader.h linux-2.6.35.7/include/linux/moduleloader.h
48014--- linux-2.6.32.24/include/linux/moduleloader.h 2010-08-13 16:24:37.000000000 -0400 46508--- linux-2.6.35.7/include/linux/moduleloader.h 2010-08-26 19:47:12.000000000 -0400
48015+++ linux-2.6.32.24/include/linux/moduleloader.h 2010-10-23 19:59:20.000000000 -0400 46509+++ linux-2.6.35.7/include/linux/moduleloader.h 2010-09-17 20:12:09.000000000 -0400
48016@@ -20,9 +20,21 @@ unsigned int arch_mod_section_prepend(st 46510@@ -20,9 +20,21 @@ unsigned int arch_mod_section_prepend(st
48017 sections. Returns NULL on failure. */ 46511 sections. Returns NULL on failure. */
48018 void *module_alloc(unsigned long size); 46512 void *module_alloc(unsigned long size);
@@ -48035,9 +46529,9 @@ diff -urNp linux-2.6.32.24/include/linux/moduleloader.h linux-2.6.32.24/include/
48035 /* Apply the given relocation to the (simplified) ELF. Return -error 46529 /* Apply the given relocation to the (simplified) ELF. Return -error
48036 or 0. */ 46530 or 0. */
48037 int apply_relocate(Elf_Shdr *sechdrs, 46531 int apply_relocate(Elf_Shdr *sechdrs,
48038diff -urNp linux-2.6.32.24/include/linux/moduleparam.h linux-2.6.32.24/include/linux/moduleparam.h 46532diff -urNp linux-2.6.35.7/include/linux/moduleparam.h linux-2.6.35.7/include/linux/moduleparam.h
48039--- linux-2.6.32.24/include/linux/moduleparam.h 2010-08-13 16:24:37.000000000 -0400 46533--- linux-2.6.35.7/include/linux/moduleparam.h 2010-08-26 19:47:12.000000000 -0400
48040+++ linux-2.6.32.24/include/linux/moduleparam.h 2010-10-23 19:59:24.000000000 -0400 46534+++ linux-2.6.35.7/include/linux/moduleparam.h 2010-10-11 22:41:44.000000000 -0400
48041@@ -132,7 +132,7 @@ struct kparam_array 46535@@ -132,7 +132,7 @@ struct kparam_array
48042 46536
48043 /* Actually copy string: maxlen param is usually sizeof(string). */ 46537 /* Actually copy string: maxlen param is usually sizeof(string). */
@@ -48056,9 +46550,9 @@ diff -urNp linux-2.6.32.24/include/linux/moduleparam.h linux-2.6.32.24/include/l
48056 = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\ 46550 = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\
48057 sizeof(array[0]), array }; \ 46551 sizeof(array[0]), array }; \
48058 __module_param_call(MODULE_PARAM_PREFIX, name, \ 46552 __module_param_call(MODULE_PARAM_PREFIX, name, \
48059diff -urNp linux-2.6.32.24/include/linux/namei.h linux-2.6.32.24/include/linux/namei.h 46553diff -urNp linux-2.6.35.7/include/linux/namei.h linux-2.6.35.7/include/linux/namei.h
48060--- linux-2.6.32.24/include/linux/namei.h 2010-08-13 16:24:37.000000000 -0400 46554--- linux-2.6.35.7/include/linux/namei.h 2010-08-26 19:47:12.000000000 -0400
48061+++ linux-2.6.32.24/include/linux/namei.h 2010-10-23 19:59:20.000000000 -0400 46555+++ linux-2.6.35.7/include/linux/namei.h 2010-09-17 20:12:09.000000000 -0400
48062@@ -22,7 +22,7 @@ struct nameidata { 46556@@ -22,7 +22,7 @@ struct nameidata {
48063 unsigned int flags; 46557 unsigned int flags;
48064 int last_type; 46558 int last_type;
@@ -48068,7 +46562,7 @@ diff -urNp linux-2.6.32.24/include/linux/namei.h linux-2.6.32.24/include/linux/n
48068 46562
48069 /* Intent data */ 46563 /* Intent data */
48070 union { 46564 union {
48071@@ -84,12 +84,12 @@ extern int follow_up(struct path *); 46565@@ -81,12 +81,12 @@ extern int follow_up(struct path *);
48072 extern struct dentry *lock_rename(struct dentry *, struct dentry *); 46566 extern struct dentry *lock_rename(struct dentry *, struct dentry *);
48073 extern void unlock_rename(struct dentry *, struct dentry *); 46567 extern void unlock_rename(struct dentry *, struct dentry *);
48074 46568
@@ -48083,9 +46577,9 @@ diff -urNp linux-2.6.32.24/include/linux/namei.h linux-2.6.32.24/include/linux/n
48083 { 46577 {
48084 return nd->saved_names[nd->depth]; 46578 return nd->saved_names[nd->depth];
48085 } 46579 }
48086diff -urNp linux-2.6.32.24/include/linux/netfilter/xt_gradm.h linux-2.6.32.24/include/linux/netfilter/xt_gradm.h 46580diff -urNp linux-2.6.35.7/include/linux/netfilter/xt_gradm.h linux-2.6.35.7/include/linux/netfilter/xt_gradm.h
48087--- linux-2.6.32.24/include/linux/netfilter/xt_gradm.h 1969-12-31 19:00:00.000000000 -0500 46581--- linux-2.6.35.7/include/linux/netfilter/xt_gradm.h 1969-12-31 19:00:00.000000000 -0500
48088+++ linux-2.6.32.24/include/linux/netfilter/xt_gradm.h 2010-10-23 19:59:20.000000000 -0400 46582+++ linux-2.6.35.7/include/linux/netfilter/xt_gradm.h 2010-09-28 18:05:52.000000000 -0400
48089@@ -0,0 +1,9 @@ 46583@@ -0,0 +1,9 @@
48090+#ifndef _LINUX_NETFILTER_XT_GRADM_H 46584+#ifndef _LINUX_NETFILTER_XT_GRADM_H
48091+#define _LINUX_NETFILTER_XT_GRADM_H 1 46585+#define _LINUX_NETFILTER_XT_GRADM_H 1
@@ -48096,28 +46590,9 @@ diff -urNp linux-2.6.32.24/include/linux/netfilter/xt_gradm.h linux-2.6.32.24/in
48096+}; 46590+};
48097+ 46591+
48098+#endif 46592+#endif
48099diff -urNp linux-2.6.32.24/include/linux/nodemask.h linux-2.6.32.24/include/linux/nodemask.h 46593diff -urNp linux-2.6.35.7/include/linux/oprofile.h linux-2.6.35.7/include/linux/oprofile.h
48100--- linux-2.6.32.24/include/linux/nodemask.h 2010-08-13 16:24:37.000000000 -0400 46594--- linux-2.6.35.7/include/linux/oprofile.h 2010-08-26 19:47:12.000000000 -0400
48101+++ linux-2.6.32.24/include/linux/nodemask.h 2010-10-23 19:59:20.000000000 -0400 46595+++ linux-2.6.35.7/include/linux/oprofile.h 2010-09-17 20:12:09.000000000 -0400
48102@@ -464,11 +464,11 @@ static inline int num_node_state(enum no
48103
48104 #define any_online_node(mask) \
48105 ({ \
48106- int node; \
48107- for_each_node_mask(node, (mask)) \
48108- if (node_online(node)) \
48109+ int __node; \
48110+ for_each_node_mask(__node, (mask)) \
48111+ if (node_online(__node)) \
48112 break; \
48113- node; \
48114+ __node; \
48115 })
48116
48117 #define num_online_nodes() num_node_state(N_ONLINE)
48118diff -urNp linux-2.6.32.24/include/linux/oprofile.h linux-2.6.32.24/include/linux/oprofile.h
48119--- linux-2.6.32.24/include/linux/oprofile.h 2010-08-13 16:24:37.000000000 -0400
48120+++ linux-2.6.32.24/include/linux/oprofile.h 2010-10-23 19:59:20.000000000 -0400
48121@@ -129,9 +129,9 @@ int oprofilefs_create_ulong(struct super 46596@@ -129,9 +129,9 @@ int oprofilefs_create_ulong(struct super
48122 int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root, 46597 int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root,
48123 char const * name, ulong * val); 46598 char const * name, ulong * val);
@@ -48130,13 +46605,13 @@ diff -urNp linux-2.6.32.24/include/linux/oprofile.h linux-2.6.32.24/include/linu
48130 46605
48131 /** create a directory */ 46606 /** create a directory */
48132 struct dentry * oprofilefs_mkdir(struct super_block * sb, struct dentry * root, 46607 struct dentry * oprofilefs_mkdir(struct super_block * sb, struct dentry * root,
48133diff -urNp linux-2.6.32.24/include/linux/pipe_fs_i.h linux-2.6.32.24/include/linux/pipe_fs_i.h 46608diff -urNp linux-2.6.35.7/include/linux/pipe_fs_i.h linux-2.6.35.7/include/linux/pipe_fs_i.h
48134--- linux-2.6.32.24/include/linux/pipe_fs_i.h 2010-08-13 16:24:37.000000000 -0400 46609--- linux-2.6.35.7/include/linux/pipe_fs_i.h 2010-08-26 19:47:12.000000000 -0400
48135+++ linux-2.6.32.24/include/linux/pipe_fs_i.h 2010-10-23 19:59:20.000000000 -0400 46610+++ linux-2.6.35.7/include/linux/pipe_fs_i.h 2010-09-17 20:12:09.000000000 -0400
48136@@ -46,9 +46,9 @@ struct pipe_inode_info { 46611@@ -45,9 +45,9 @@ struct pipe_buffer {
46612 struct pipe_inode_info {
48137 wait_queue_head_t wait; 46613 wait_queue_head_t wait;
48138 unsigned int nrbufs, curbuf; 46614 unsigned int nrbufs, curbuf, buffers;
48139 struct page *tmp_page;
48140- unsigned int readers; 46615- unsigned int readers;
48141- unsigned int writers; 46616- unsigned int writers;
48142- unsigned int waiting_writers; 46617- unsigned int waiting_writers;
@@ -48145,10 +46620,10 @@ diff -urNp linux-2.6.32.24/include/linux/pipe_fs_i.h linux-2.6.32.24/include/lin
48145+ atomic_t waiting_writers; 46620+ atomic_t waiting_writers;
48146 unsigned int r_counter; 46621 unsigned int r_counter;
48147 unsigned int w_counter; 46622 unsigned int w_counter;
48148 struct fasync_struct *fasync_readers; 46623 struct page *tmp_page;
48149diff -urNp linux-2.6.32.24/include/linux/poison.h linux-2.6.32.24/include/linux/poison.h 46624diff -urNp linux-2.6.35.7/include/linux/poison.h linux-2.6.35.7/include/linux/poison.h
48150--- linux-2.6.32.24/include/linux/poison.h 2010-08-13 16:24:37.000000000 -0400 46625--- linux-2.6.35.7/include/linux/poison.h 2010-08-26 19:47:12.000000000 -0400
48151+++ linux-2.6.32.24/include/linux/poison.h 2010-10-23 19:59:20.000000000 -0400 46626+++ linux-2.6.35.7/include/linux/poison.h 2010-09-17 20:12:09.000000000 -0400
48152@@ -19,8 +19,8 @@ 46627@@ -19,8 +19,8 @@
48153 * under normal circumstances, used to verify that nobody uses 46628 * under normal circumstances, used to verify that nobody uses
48154 * non-initialized list entries. 46629 * non-initialized list entries.
@@ -48160,9 +46635,9 @@ diff -urNp linux-2.6.32.24/include/linux/poison.h linux-2.6.32.24/include/linux/
48160 46635
48161 /********** include/linux/timer.h **********/ 46636 /********** include/linux/timer.h **********/
48162 /* 46637 /*
48163diff -urNp linux-2.6.32.24/include/linux/proc_fs.h linux-2.6.32.24/include/linux/proc_fs.h 46638diff -urNp linux-2.6.35.7/include/linux/proc_fs.h linux-2.6.35.7/include/linux/proc_fs.h
48164--- linux-2.6.32.24/include/linux/proc_fs.h 2010-08-13 16:24:37.000000000 -0400 46639--- linux-2.6.35.7/include/linux/proc_fs.h 2010-08-26 19:47:12.000000000 -0400
48165+++ linux-2.6.32.24/include/linux/proc_fs.h 2010-10-23 19:59:20.000000000 -0400 46640+++ linux-2.6.35.7/include/linux/proc_fs.h 2010-09-17 20:12:37.000000000 -0400
48166@@ -155,6 +155,19 @@ static inline struct proc_dir_entry *pro 46641@@ -155,6 +155,19 @@ static inline struct proc_dir_entry *pro
48167 return proc_create_data(name, mode, parent, proc_fops, NULL); 46642 return proc_create_data(name, mode, parent, proc_fops, NULL);
48168 } 46643 }
@@ -48183,25 +46658,32 @@ diff -urNp linux-2.6.32.24/include/linux/proc_fs.h linux-2.6.32.24/include/linux
48183 static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 46658 static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
48184 mode_t mode, struct proc_dir_entry *base, 46659 mode_t mode, struct proc_dir_entry *base,
48185 read_proc_t *read_proc, void * data) 46660 read_proc_t *read_proc, void * data)
48186diff -urNp linux-2.6.32.24/include/linux/random.h linux-2.6.32.24/include/linux/random.h 46661diff -urNp linux-2.6.35.7/include/linux/random.h linux-2.6.35.7/include/linux/random.h
48187--- linux-2.6.32.24/include/linux/random.h 2010-08-13 16:24:37.000000000 -0400 46662--- linux-2.6.35.7/include/linux/random.h 2010-08-26 19:47:12.000000000 -0400
48188+++ linux-2.6.32.24/include/linux/random.h 2010-10-23 19:59:20.000000000 -0400 46663+++ linux-2.6.35.7/include/linux/random.h 2010-09-17 20:12:09.000000000 -0400
48189@@ -74,6 +74,11 @@ unsigned long randomize_range(unsigned l 46664@@ -80,12 +80,17 @@ void srandom32(u32 seed);
48190 u32 random32(void); 46665
48191 void srandom32(u32 seed); 46666 u32 prandom32(struct rnd_state *);
48192 46667
48193+static inline unsigned long pax_get_random_long(void) 46668+static inline unsigned long pax_get_random_long(void)
48194+{ 46669+{
48195+ return random32() + (sizeof(long) > 4 ? (unsigned long)random32() << 32 : 0); 46670+ return random32() + (sizeof(long) > 4 ? (unsigned long)random32() << 32 : 0);
48196+} 46671+}
48197+ 46672+
48198 #endif /* __KERNEL___ */ 46673 /*
46674 * Handle minimum values for seeds
46675 */
46676 static inline u32 __seed(u32 x, u32 m)
46677 {
46678- return (x < m) ? x + m : x;
46679+ return (x <= m) ? x + m + 1 : x;
46680 }
48199 46681
48200 #endif /* _LINUX_RANDOM_H */ 46682 /**
48201diff -urNp linux-2.6.32.24/include/linux/reiserfs_fs.h linux-2.6.32.24/include/linux/reiserfs_fs.h 46683diff -urNp linux-2.6.35.7/include/linux/reiserfs_fs.h linux-2.6.35.7/include/linux/reiserfs_fs.h
48202--- linux-2.6.32.24/include/linux/reiserfs_fs.h 2010-08-13 16:24:37.000000000 -0400 46684--- linux-2.6.35.7/include/linux/reiserfs_fs.h 2010-08-26 19:47:12.000000000 -0400
48203+++ linux-2.6.32.24/include/linux/reiserfs_fs.h 2010-10-23 19:59:20.000000000 -0400 46685+++ linux-2.6.35.7/include/linux/reiserfs_fs.h 2010-09-17 20:12:09.000000000 -0400
48204@@ -1326,7 +1326,7 @@ static inline loff_t max_reiserfs_offset 46686@@ -1404,7 +1404,7 @@ static inline loff_t max_reiserfs_offset
48205 #define REISERFS_USER_MEM 1 /* reiserfs user memory mode */ 46687 #define REISERFS_USER_MEM 1 /* reiserfs user memory mode */
48206 46688
48207 #define fs_generation(s) (REISERFS_SB(s)->s_generation_counter) 46689 #define fs_generation(s) (REISERFS_SB(s)->s_generation_counter)
@@ -48209,8 +46691,8 @@ diff -urNp linux-2.6.32.24/include/linux/reiserfs_fs.h linux-2.6.32.24/include/l
48209+#define get_generation(s) atomic_read_unchecked (&fs_generation(s)) 46691+#define get_generation(s) atomic_read_unchecked (&fs_generation(s))
48210 #define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen) 46692 #define FILESYSTEM_CHANGED_TB(tb) (get_generation((tb)->tb_sb) != (tb)->fs_gen)
48211 #define __fs_changed(gen,s) (gen != get_generation (s)) 46693 #define __fs_changed(gen,s) (gen != get_generation (s))
48212 #define fs_changed(gen,s) ({cond_resched(); __fs_changed(gen, s);}) 46694 #define fs_changed(gen,s) \
48213@@ -1534,24 +1534,24 @@ static inline struct super_block *sb_fro 46695@@ -1616,24 +1616,24 @@ static inline struct super_block *sb_fro
48214 */ 46696 */
48215 46697
48216 struct item_operations { 46698 struct item_operations {
@@ -48247,10 +46729,10 @@ diff -urNp linux-2.6.32.24/include/linux/reiserfs_fs.h linux-2.6.32.24/include/l
48247 46729
48248 #define op_bytes_number(ih,bsize) item_ops[le_ih_k_type (ih)]->bytes_number (ih, bsize) 46730 #define op_bytes_number(ih,bsize) item_ops[le_ih_k_type (ih)]->bytes_number (ih, bsize)
48249 #define op_is_left_mergeable(key,bsize) item_ops[le_key_k_type (le_key_version (key), key)]->is_left_mergeable (key, bsize) 46731 #define op_is_left_mergeable(key,bsize) item_ops[le_key_k_type (le_key_version (key), key)]->is_left_mergeable (key, bsize)
48250diff -urNp linux-2.6.32.24/include/linux/reiserfs_fs_sb.h linux-2.6.32.24/include/linux/reiserfs_fs_sb.h 46732diff -urNp linux-2.6.35.7/include/linux/reiserfs_fs_sb.h linux-2.6.35.7/include/linux/reiserfs_fs_sb.h
48251--- linux-2.6.32.24/include/linux/reiserfs_fs_sb.h 2010-08-13 16:24:37.000000000 -0400 46733--- linux-2.6.35.7/include/linux/reiserfs_fs_sb.h 2010-08-26 19:47:12.000000000 -0400
48252+++ linux-2.6.32.24/include/linux/reiserfs_fs_sb.h 2010-10-23 19:59:20.000000000 -0400 46734+++ linux-2.6.35.7/include/linux/reiserfs_fs_sb.h 2010-09-17 20:12:09.000000000 -0400
48253@@ -377,7 +377,7 @@ struct reiserfs_sb_info { 46735@@ -386,7 +386,7 @@ struct reiserfs_sb_info {
48254 /* Comment? -Hans */ 46736 /* Comment? -Hans */
48255 wait_queue_head_t s_wait; 46737 wait_queue_head_t s_wait;
48256 /* To be obsoleted soon by per buffer seals.. -Hans */ 46738 /* To be obsoleted soon by per buffer seals.. -Hans */
@@ -48259,30 +46741,45 @@ diff -urNp linux-2.6.32.24/include/linux/reiserfs_fs_sb.h linux-2.6.32.24/includ
48259 // tree gets re-balanced 46741 // tree gets re-balanced
48260 unsigned long s_properties; /* File system properties. Currently holds 46742 unsigned long s_properties; /* File system properties. Currently holds
48261 on-disk FS format */ 46743 on-disk FS format */
48262diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/sched.h 46744diff -urNp linux-2.6.35.7/include/linux/rmap.h linux-2.6.35.7/include/linux/rmap.h
48263--- linux-2.6.32.24/include/linux/sched.h 2010-09-20 17:26:42.000000000 -0400 46745--- linux-2.6.35.7/include/linux/rmap.h 2010-08-26 19:47:12.000000000 -0400
48264+++ linux-2.6.32.24/include/linux/sched.h 2010-10-23 19:59:20.000000000 -0400 46746+++ linux-2.6.35.7/include/linux/rmap.h 2010-09-17 20:12:09.000000000 -0400
48265@@ -101,6 +101,7 @@ struct bio; 46747@@ -119,8 +119,8 @@ static inline void anon_vma_unlock(struc
46748 void anon_vma_init(void); /* create anon_vma_cachep */
46749 int anon_vma_prepare(struct vm_area_struct *);
46750 void unlink_anon_vmas(struct vm_area_struct *);
46751-int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *);
46752-int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *);
46753+int anon_vma_clone(struct vm_area_struct *, const struct vm_area_struct *);
46754+int anon_vma_fork(struct vm_area_struct *, const struct vm_area_struct *);
46755 void __anon_vma_link(struct vm_area_struct *);
46756 void anon_vma_free(struct anon_vma *);
46757
46758diff -urNp linux-2.6.35.7/include/linux/sched.h linux-2.6.35.7/include/linux/sched.h
46759--- linux-2.6.35.7/include/linux/sched.h 2010-08-26 19:47:12.000000000 -0400
46760+++ linux-2.6.35.7/include/linux/sched.h 2010-09-17 20:12:37.000000000 -0400
46761@@ -100,6 +100,7 @@ struct robust_list_head;
46762 struct bio_list;
48266 struct fs_struct; 46763 struct fs_struct;
48267 struct bts_context;
48268 struct perf_event_context; 46764 struct perf_event_context;
48269+struct linux_binprm; 46765+struct linux_binprm;
48270 46766
48271 /* 46767 /*
48272 * List of flags we want to share for kernel threads, 46768 * List of flags we want to share for kernel threads,
48273@@ -371,9 +372,11 @@ struct user_namespace; 46769@@ -381,10 +382,12 @@ struct user_namespace;
48274 #define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN) 46770 #define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
48275 46771
48276 extern int sysctl_max_map_count; 46772 extern int sysctl_max_map_count;
48277+extern unsigned long sysctl_heap_stack_gap; 46773+extern unsigned long sysctl_heap_stack_gap;
48278 46774
48279 #include <linux/aio.h> 46775 #include <linux/aio.h>
48280 46776
46777 #ifdef CONFIG_MMU
48281+extern bool check_heap_stack_gap(struct vm_area_struct *vma, unsigned long addr, unsigned long len); 46778+extern bool check_heap_stack_gap(struct vm_area_struct *vma, unsigned long addr, unsigned long len);
46779 extern void arch_pick_mmap_layout(struct mm_struct *mm);
48282 extern unsigned long 46780 extern unsigned long
48283 arch_get_unmapped_area(struct file *, unsigned long, unsigned long, 46781 arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
48284 unsigned long, unsigned long); 46782@@ -628,6 +631,15 @@ struct signal_struct {
48285@@ -666,6 +669,15 @@ struct signal_struct {
48286 struct tty_audit_buf *tty_audit_buf; 46783 struct tty_audit_buf *tty_audit_buf;
48287 #endif 46784 #endif
48288 46785
@@ -48298,7 +46795,7 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48298 int oom_adj; /* OOM kill score adjustment (bit shift) */ 46795 int oom_adj; /* OOM kill score adjustment (bit shift) */
48299 }; 46796 };
48300 46797
48301@@ -1223,7 +1235,7 @@ struct rcu_node; 46798@@ -1166,7 +1178,7 @@ struct rcu_node;
48302 46799
48303 struct task_struct { 46800 struct task_struct {
48304 volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ 46801 volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
@@ -48307,7 +46804,7 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48307 atomic_t usage; 46804 atomic_t usage;
48308 unsigned int flags; /* per process flags, defined below */ 46805 unsigned int flags; /* per process flags, defined below */
48309 unsigned int ptrace; 46806 unsigned int ptrace;
48310@@ -1335,8 +1347,8 @@ struct task_struct { 46807@@ -1274,8 +1286,8 @@ struct task_struct {
48311 struct list_head thread_group; 46808 struct list_head thread_group;
48312 46809
48313 struct completion *vfork_done; /* for vfork() */ 46810 struct completion *vfork_done; /* for vfork() */
@@ -48318,7 +46815,7 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48318 46815
48319 cputime_t utime, stime, utimescaled, stimescaled; 46816 cputime_t utime, stime, utimescaled, stimescaled;
48320 cputime_t gtime; 46817 cputime_t gtime;
48321@@ -1350,16 +1362,6 @@ struct task_struct { 46818@@ -1291,16 +1303,6 @@ struct task_struct {
48322 struct task_cputime cputime_expires; 46819 struct task_cputime cputime_expires;
48323 struct list_head cpu_timers[3]; 46820 struct list_head cpu_timers[3];
48324 46821
@@ -48335,8 +46832,8 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48335 char comm[TASK_COMM_LEN]; /* executable name excluding path 46832 char comm[TASK_COMM_LEN]; /* executable name excluding path
48336 - access with [gs]et_task_comm (which lock 46833 - access with [gs]et_task_comm (which lock
48337 it with task_lock()) 46834 it with task_lock())
48338@@ -1443,6 +1445,15 @@ struct task_struct { 46835@@ -1384,6 +1386,15 @@ struct task_struct {
48339 int hardirq_context; 46836 int softirqs_enabled;
48340 int softirq_context; 46837 int softirq_context;
48341 #endif 46838 #endif
48342+ 46839+
@@ -48351,7 +46848,7 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48351 #ifdef CONFIG_LOCKDEP 46848 #ifdef CONFIG_LOCKDEP
48352 # define MAX_LOCK_DEPTH 48UL 46849 # define MAX_LOCK_DEPTH 48UL
48353 u64 curr_chain_key; 46850 u64 curr_chain_key;
48354@@ -1463,6 +1474,9 @@ struct task_struct { 46851@@ -1404,6 +1415,9 @@ struct task_struct {
48355 46852
48356 struct backing_dev_info *backing_dev_info; 46853 struct backing_dev_info *backing_dev_info;
48357 46854
@@ -48361,7 +46858,7 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48361 struct io_context *io_context; 46858 struct io_context *io_context;
48362 46859
48363 unsigned long ptrace_message; 46860 unsigned long ptrace_message;
48364@@ -1526,6 +1540,20 @@ struct task_struct { 46861@@ -1469,6 +1483,20 @@ struct task_struct {
48365 unsigned long default_timer_slack_ns; 46862 unsigned long default_timer_slack_ns;
48366 46863
48367 struct list_head *scm_work_list; 46864 struct list_head *scm_work_list;
@@ -48380,10 +46877,10 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48380+#endif 46877+#endif
48381+ 46878+
48382 #ifdef CONFIG_FUNCTION_GRAPH_TRACER 46879 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
48383 /* Index of current stored adress in ret_stack */ 46880 /* Index of current stored address in ret_stack */
48384 int curr_ret_stack; 46881 int curr_ret_stack;
48385@@ -1549,6 +1577,52 @@ struct task_struct { 46882@@ -1500,6 +1528,52 @@ struct task_struct {
48386 #endif /* CONFIG_TRACING */ 46883 #endif
48387 }; 46884 };
48388 46885
48389+#define MF_PAX_PAGEEXEC 0x01000000 /* Paging based non-executable pages */ 46886+#define MF_PAX_PAGEEXEC 0x01000000 /* Paging based non-executable pages */
@@ -48433,9 +46930,9 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48433+void pax_report_overflow_from_user(const void *ptr, unsigned long len); 46930+void pax_report_overflow_from_user(const void *ptr, unsigned long len);
48434+ 46931+
48435 /* Future-safe accessor for struct task_struct's cpus_allowed. */ 46932 /* Future-safe accessor for struct task_struct's cpus_allowed. */
48436 #define tsk_cpumask(tsk) (&(tsk)->cpus_allowed) 46933 #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
48437 46934
48438@@ -2150,7 +2224,7 @@ extern void __cleanup_sighand(struct sig 46935@@ -2101,7 +2175,7 @@ extern void __cleanup_sighand(struct sig
48439 extern void exit_itimers(struct signal_struct *); 46936 extern void exit_itimers(struct signal_struct *);
48440 extern void flush_itimer_signals(void); 46937 extern void flush_itimer_signals(void);
48441 46938
@@ -48444,7 +46941,7 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48444 46941
48445 extern void daemonize(const char *, ...); 46942 extern void daemonize(const char *, ...);
48446 extern int allow_signal(int); 46943 extern int allow_signal(int);
48447@@ -2263,8 +2337,8 @@ static inline void unlock_task_sighand(s 46944@@ -2217,8 +2291,8 @@ static inline void unlock_task_sighand(s
48448 46945
48449 #ifndef __HAVE_THREAD_FUNCTIONS 46946 #ifndef __HAVE_THREAD_FUNCTIONS
48450 46947
@@ -48455,7 +46952,7 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48455 46952
48456 static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) 46953 static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
48457 { 46954 {
48458@@ -2279,13 +2353,17 @@ static inline unsigned long *end_of_stac 46955@@ -2233,13 +2307,17 @@ static inline unsigned long *end_of_stac
48459 46956
48460 #endif 46957 #endif
48461 46958
@@ -48475,10 +46972,10 @@ diff -urNp linux-2.6.32.24/include/linux/sched.h linux-2.6.32.24/include/linux/s
48475 extern void thread_info_cache_init(void); 46972 extern void thread_info_cache_init(void);
48476 46973
48477 #ifdef CONFIG_DEBUG_STACK_USAGE 46974 #ifdef CONFIG_DEBUG_STACK_USAGE
48478diff -urNp linux-2.6.32.24/include/linux/screen_info.h linux-2.6.32.24/include/linux/screen_info.h 46975diff -urNp linux-2.6.35.7/include/linux/screen_info.h linux-2.6.35.7/include/linux/screen_info.h
48479--- linux-2.6.32.24/include/linux/screen_info.h 2010-08-13 16:24:37.000000000 -0400 46976--- linux-2.6.35.7/include/linux/screen_info.h 2010-08-26 19:47:12.000000000 -0400
48480+++ linux-2.6.32.24/include/linux/screen_info.h 2010-10-23 19:59:20.000000000 -0400 46977+++ linux-2.6.35.7/include/linux/screen_info.h 2010-09-17 20:12:09.000000000 -0400
48481@@ -42,7 +42,8 @@ struct screen_info { 46978@@ -43,7 +43,8 @@ struct screen_info {
48482 __u16 pages; /* 0x32 */ 46979 __u16 pages; /* 0x32 */
48483 __u16 vesa_attributes; /* 0x34 */ 46980 __u16 vesa_attributes; /* 0x34 */
48484 __u32 capabilities; /* 0x36 */ 46981 __u32 capabilities; /* 0x36 */
@@ -48488,20 +46985,20 @@ diff -urNp linux-2.6.32.24/include/linux/screen_info.h linux-2.6.32.24/include/l
48488 } __attribute__((packed)); 46985 } __attribute__((packed));
48489 46986
48490 #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ 46987 #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */
48491diff -urNp linux-2.6.32.24/include/linux/security.h linux-2.6.32.24/include/linux/security.h 46988diff -urNp linux-2.6.35.7/include/linux/security.h linux-2.6.35.7/include/linux/security.h
48492--- linux-2.6.32.24/include/linux/security.h 2010-08-13 16:24:37.000000000 -0400 46989--- linux-2.6.35.7/include/linux/security.h 2010-08-26 19:47:12.000000000 -0400
48493+++ linux-2.6.32.24/include/linux/security.h 2010-10-23 19:59:20.000000000 -0400 46990+++ linux-2.6.35.7/include/linux/security.h 2010-09-17 20:12:37.000000000 -0400
48494@@ -34,6 +34,7 @@ 46991@@ -34,6 +34,7 @@
48495 #include <linux/key.h> 46992 #include <linux/key.h>
48496 #include <linux/xfrm.h> 46993 #include <linux/xfrm.h>
48497 #include <linux/gfp.h> 46994 #include <linux/slab.h>
48498+#include <linux/grsecurity.h> 46995+#include <linux/grsecurity.h>
48499 #include <net/flow.h> 46996 #include <net/flow.h>
48500 46997
48501 /* Maximum number of letters for an LSM name string */ 46998 /* Maximum number of letters for an LSM name string */
48502diff -urNp linux-2.6.32.24/include/linux/shm.h linux-2.6.32.24/include/linux/shm.h 46999diff -urNp linux-2.6.35.7/include/linux/shm.h linux-2.6.35.7/include/linux/shm.h
48503--- linux-2.6.32.24/include/linux/shm.h 2010-08-13 16:24:37.000000000 -0400 47000--- linux-2.6.35.7/include/linux/shm.h 2010-08-26 19:47:12.000000000 -0400
48504+++ linux-2.6.32.24/include/linux/shm.h 2010-10-23 19:59:20.000000000 -0400 47001+++ linux-2.6.35.7/include/linux/shm.h 2010-09-17 20:12:37.000000000 -0400
48505@@ -95,6 +95,10 @@ struct shmid_kernel /* private to the ke 47002@@ -95,6 +95,10 @@ struct shmid_kernel /* private to the ke
48506 pid_t shm_cprid; 47003 pid_t shm_cprid;
48507 pid_t shm_lprid; 47004 pid_t shm_lprid;
@@ -48513,9 +47010,9 @@ diff -urNp linux-2.6.32.24/include/linux/shm.h linux-2.6.32.24/include/linux/shm
48513 }; 47010 };
48514 47011
48515 /* shm_mode upper byte flags */ 47012 /* shm_mode upper byte flags */
48516diff -urNp linux-2.6.32.24/include/linux/slab.h linux-2.6.32.24/include/linux/slab.h 47013diff -urNp linux-2.6.35.7/include/linux/slab.h linux-2.6.35.7/include/linux/slab.h
48517--- linux-2.6.32.24/include/linux/slab.h 2010-08-13 16:24:37.000000000 -0400 47014--- linux-2.6.35.7/include/linux/slab.h 2010-08-26 19:47:12.000000000 -0400
48518+++ linux-2.6.32.24/include/linux/slab.h 2010-10-23 19:59:20.000000000 -0400 47015+++ linux-2.6.35.7/include/linux/slab.h 2010-09-17 20:12:09.000000000 -0400
48519@@ -11,6 +11,7 @@ 47016@@ -11,6 +11,7 @@
48520 47017
48521 #include <linux/gfp.h> 47018 #include <linux/gfp.h>
@@ -48524,7 +47021,7 @@ diff -urNp linux-2.6.32.24/include/linux/slab.h linux-2.6.32.24/include/linux/sl
48524 47021
48525 /* 47022 /*
48526 * Flags to pass to kmem_cache_create(). 47023 * Flags to pass to kmem_cache_create().
48527@@ -82,10 +83,13 @@ 47024@@ -87,10 +88,13 @@
48528 * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can. 47025 * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.
48529 * Both make kfree a no-op. 47026 * Both make kfree a no-op.
48530 */ 47027 */
@@ -48541,7 +47038,7 @@ diff -urNp linux-2.6.32.24/include/linux/slab.h linux-2.6.32.24/include/linux/sl
48541 47038
48542 /* 47039 /*
48543 * struct kmem_cache related prototypes 47040 * struct kmem_cache related prototypes
48544@@ -138,6 +142,7 @@ void * __must_check krealloc(const void 47041@@ -144,6 +148,7 @@ void * __must_check krealloc(const void
48545 void kfree(const void *); 47042 void kfree(const void *);
48546 void kzfree(const void *); 47043 void kzfree(const void *);
48547 size_t ksize(const void *); 47044 size_t ksize(const void *);
@@ -48549,7 +47046,7 @@ diff -urNp linux-2.6.32.24/include/linux/slab.h linux-2.6.32.24/include/linux/sl
48549 47046
48550 /* 47047 /*
48551 * Allocator specific definitions. These are mainly used to establish optimized 47048 * Allocator specific definitions. These are mainly used to establish optimized
48552@@ -328,4 +333,37 @@ static inline void *kzalloc_node(size_t 47049@@ -334,4 +339,37 @@ static inline void *kzalloc_node(size_t
48553 47050
48554 void __init kmem_cache_init_late(void); 47051 void __init kmem_cache_init_late(void);
48555 47052
@@ -48587,10 +47084,10 @@ diff -urNp linux-2.6.32.24/include/linux/slab.h linux-2.6.32.24/include/linux/sl
48587+}) 47084+})
48588+ 47085+
48589 #endif /* _LINUX_SLAB_H */ 47086 #endif /* _LINUX_SLAB_H */
48590diff -urNp linux-2.6.32.24/include/linux/slub_def.h linux-2.6.32.24/include/linux/slub_def.h 47087diff -urNp linux-2.6.35.7/include/linux/slub_def.h linux-2.6.35.7/include/linux/slub_def.h
48591--- linux-2.6.32.24/include/linux/slub_def.h 2010-08-13 16:24:37.000000000 -0400 47088--- linux-2.6.35.7/include/linux/slub_def.h 2010-08-26 19:47:12.000000000 -0400
48592+++ linux-2.6.32.24/include/linux/slub_def.h 2010-10-23 19:59:20.000000000 -0400 47089+++ linux-2.6.35.7/include/linux/slub_def.h 2010-09-17 20:12:09.000000000 -0400
48593@@ -86,7 +86,7 @@ struct kmem_cache { 47090@@ -79,7 +79,7 @@ struct kmem_cache {
48594 struct kmem_cache_order_objects max; 47091 struct kmem_cache_order_objects max;
48595 struct kmem_cache_order_objects min; 47092 struct kmem_cache_order_objects min;
48596 gfp_t allocflags; /* gfp flags to use on each alloc */ 47093 gfp_t allocflags; /* gfp flags to use on each alloc */
@@ -48599,9 +47096,9 @@ diff -urNp linux-2.6.32.24/include/linux/slub_def.h linux-2.6.32.24/include/linu
48599 void (*ctor)(void *); 47096 void (*ctor)(void *);
48600 int inuse; /* Offset to metadata */ 47097 int inuse; /* Offset to metadata */
48601 int align; /* Alignment */ 47098 int align; /* Alignment */
48602diff -urNp linux-2.6.32.24/include/linux/sonet.h linux-2.6.32.24/include/linux/sonet.h 47099diff -urNp linux-2.6.35.7/include/linux/sonet.h linux-2.6.35.7/include/linux/sonet.h
48603--- linux-2.6.32.24/include/linux/sonet.h 2010-08-13 16:24:37.000000000 -0400 47100--- linux-2.6.35.7/include/linux/sonet.h 2010-08-26 19:47:12.000000000 -0400
48604+++ linux-2.6.32.24/include/linux/sonet.h 2010-10-23 19:59:20.000000000 -0400 47101+++ linux-2.6.35.7/include/linux/sonet.h 2010-09-17 20:12:09.000000000 -0400
48605@@ -61,7 +61,7 @@ struct sonet_stats { 47102@@ -61,7 +61,7 @@ struct sonet_stats {
48606 #include <asm/atomic.h> 47103 #include <asm/atomic.h>
48607 47104
@@ -48611,9 +47108,9 @@ diff -urNp linux-2.6.32.24/include/linux/sonet.h linux-2.6.32.24/include/linux/s
48611 __SONET_ITEMS 47108 __SONET_ITEMS
48612 #undef __HANDLE_ITEM 47109 #undef __HANDLE_ITEM
48613 }; 47110 };
48614diff -urNp linux-2.6.32.24/include/linux/suspend.h linux-2.6.32.24/include/linux/suspend.h 47111diff -urNp linux-2.6.35.7/include/linux/suspend.h linux-2.6.35.7/include/linux/suspend.h
48615--- linux-2.6.32.24/include/linux/suspend.h 2010-08-13 16:24:37.000000000 -0400 47112--- linux-2.6.35.7/include/linux/suspend.h 2010-08-26 19:47:12.000000000 -0400
48616+++ linux-2.6.32.24/include/linux/suspend.h 2010-10-23 19:59:20.000000000 -0400 47113+++ linux-2.6.35.7/include/linux/suspend.h 2010-09-17 20:12:09.000000000 -0400
48617@@ -104,15 +104,15 @@ typedef int __bitwise suspend_state_t; 47114@@ -104,15 +104,15 @@ typedef int __bitwise suspend_state_t;
48618 * which require special recovery actions in that situation. 47115 * which require special recovery actions in that situation.
48619 */ 47116 */
@@ -48702,10 +47199,10 @@ diff -urNp linux-2.6.32.24/include/linux/suspend.h linux-2.6.32.24/include/linux
48702 static inline int hibernate(void) { return -ENOSYS; } 47199 static inline int hibernate(void) { return -ENOSYS; }
48703 static inline bool system_entering_hibernation(void) { return false; } 47200 static inline bool system_entering_hibernation(void) { return false; }
48704 #endif /* CONFIG_HIBERNATION */ 47201 #endif /* CONFIG_HIBERNATION */
48705diff -urNp linux-2.6.32.24/include/linux/sysctl.h linux-2.6.32.24/include/linux/sysctl.h 47202diff -urNp linux-2.6.35.7/include/linux/sysctl.h linux-2.6.35.7/include/linux/sysctl.h
48706--- linux-2.6.32.24/include/linux/sysctl.h 2010-08-13 16:24:37.000000000 -0400 47203--- linux-2.6.35.7/include/linux/sysctl.h 2010-08-26 19:47:12.000000000 -0400
48707+++ linux-2.6.32.24/include/linux/sysctl.h 2010-10-23 19:59:20.000000000 -0400 47204+++ linux-2.6.35.7/include/linux/sysctl.h 2010-09-17 20:12:09.000000000 -0400
48708@@ -164,7 +164,11 @@ enum 47205@@ -155,7 +155,11 @@ enum
48709 KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */ 47206 KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
48710 }; 47207 };
48711 47208
@@ -48718,11 +47215,11 @@ diff -urNp linux-2.6.32.24/include/linux/sysctl.h linux-2.6.32.24/include/linux/
48718 47215
48719 /* CTL_VM names: */ 47216 /* CTL_VM names: */
48720 enum 47217 enum
48721diff -urNp linux-2.6.32.24/include/linux/sysfs.h linux-2.6.32.24/include/linux/sysfs.h 47218diff -urNp linux-2.6.35.7/include/linux/sysfs.h linux-2.6.35.7/include/linux/sysfs.h
48722--- linux-2.6.32.24/include/linux/sysfs.h 2010-08-13 16:24:37.000000000 -0400 47219--- linux-2.6.35.7/include/linux/sysfs.h 2010-08-26 19:47:12.000000000 -0400
48723+++ linux-2.6.32.24/include/linux/sysfs.h 2010-10-23 19:59:20.000000000 -0400 47220+++ linux-2.6.35.7/include/linux/sysfs.h 2010-09-17 20:12:09.000000000 -0400
48724@@ -75,8 +75,8 @@ struct bin_attribute { 47221@@ -115,8 +115,8 @@ struct bin_attribute {
48725 }; 47222 #define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr)
48726 47223
48727 struct sysfs_ops { 47224 struct sysfs_ops {
48728- ssize_t (*show)(struct kobject *, struct attribute *,char *); 47225- ssize_t (*show)(struct kobject *, struct attribute *,char *);
@@ -48732,9 +47229,9 @@ diff -urNp linux-2.6.32.24/include/linux/sysfs.h linux-2.6.32.24/include/linux/s
48732 }; 47229 };
48733 47230
48734 struct sysfs_dirent; 47231 struct sysfs_dirent;
48735diff -urNp linux-2.6.32.24/include/linux/thread_info.h linux-2.6.32.24/include/linux/thread_info.h 47232diff -urNp linux-2.6.35.7/include/linux/thread_info.h linux-2.6.35.7/include/linux/thread_info.h
48736--- linux-2.6.32.24/include/linux/thread_info.h 2010-08-13 16:24:37.000000000 -0400 47233--- linux-2.6.35.7/include/linux/thread_info.h 2010-08-26 19:47:12.000000000 -0400
48737+++ linux-2.6.32.24/include/linux/thread_info.h 2010-10-23 19:59:20.000000000 -0400 47234+++ linux-2.6.35.7/include/linux/thread_info.h 2010-09-17 20:12:09.000000000 -0400
48738@@ -23,7 +23,7 @@ struct restart_block { 47235@@ -23,7 +23,7 @@ struct restart_block {
48739 }; 47236 };
48740 /* For futex_wait and futex_wait_requeue_pi */ 47237 /* For futex_wait and futex_wait_requeue_pi */
@@ -48744,9 +47241,9 @@ diff -urNp linux-2.6.32.24/include/linux/thread_info.h linux-2.6.32.24/include/l
48744 u32 val; 47241 u32 val;
48745 u32 flags; 47242 u32 flags;
48746 u32 bitset; 47243 u32 bitset;
48747diff -urNp linux-2.6.32.24/include/linux/tty.h linux-2.6.32.24/include/linux/tty.h 47244diff -urNp linux-2.6.35.7/include/linux/tty.h linux-2.6.35.7/include/linux/tty.h
48748--- linux-2.6.32.24/include/linux/tty.h 2010-08-13 16:24:37.000000000 -0400 47245--- linux-2.6.35.7/include/linux/tty.h 2010-08-26 19:47:12.000000000 -0400
48749+++ linux-2.6.32.24/include/linux/tty.h 2010-10-23 19:59:20.000000000 -0400 47246+++ linux-2.6.35.7/include/linux/tty.h 2010-09-17 20:12:09.000000000 -0400
48750@@ -13,6 +13,7 @@ 47247@@ -13,6 +13,7 @@
48751 #include <linux/tty_driver.h> 47248 #include <linux/tty_driver.h>
48752 #include <linux/tty_ldisc.h> 47249 #include <linux/tty_ldisc.h>
@@ -48755,7 +47252,7 @@ diff -urNp linux-2.6.32.24/include/linux/tty.h linux-2.6.32.24/include/linux/tty
48755 47252
48756 #include <asm/system.h> 47253 #include <asm/system.h>
48757 47254
48758@@ -443,7 +444,6 @@ extern int tty_perform_flush(struct tty_ 47255@@ -453,7 +454,6 @@ extern int tty_perform_flush(struct tty_
48759 extern dev_t tty_devnum(struct tty_struct *tty); 47256 extern dev_t tty_devnum(struct tty_struct *tty);
48760 extern void proc_clear_tty(struct task_struct *p); 47257 extern void proc_clear_tty(struct task_struct *p);
48761 extern struct tty_struct *get_current_tty(void); 47258 extern struct tty_struct *get_current_tty(void);
@@ -48763,7 +47260,7 @@ diff -urNp linux-2.6.32.24/include/linux/tty.h linux-2.6.32.24/include/linux/tty
48763 extern struct tty_struct *alloc_tty_struct(void); 47260 extern struct tty_struct *alloc_tty_struct(void);
48764 extern void free_tty_struct(struct tty_struct *tty); 47261 extern void free_tty_struct(struct tty_struct *tty);
48765 extern void initialize_tty_struct(struct tty_struct *tty, 47262 extern void initialize_tty_struct(struct tty_struct *tty,
48766@@ -493,6 +493,18 @@ extern void tty_ldisc_begin(void); 47263@@ -514,6 +514,18 @@ extern void tty_ldisc_begin(void);
48767 /* This last one is just for the tty layer internals and shouldn't be used elsewhere */ 47264 /* This last one is just for the tty layer internals and shouldn't be used elsewhere */
48768 extern void tty_ldisc_enable(struct tty_struct *tty); 47265 extern void tty_ldisc_enable(struct tty_struct *tty);
48769 47266
@@ -48782,10 +47279,10 @@ diff -urNp linux-2.6.32.24/include/linux/tty.h linux-2.6.32.24/include/linux/tty
48782 47279
48783 /* n_tty.c */ 47280 /* n_tty.c */
48784 extern struct tty_ldisc_ops tty_ldisc_N_TTY; 47281 extern struct tty_ldisc_ops tty_ldisc_N_TTY;
48785diff -urNp linux-2.6.32.24/include/linux/tty_ldisc.h linux-2.6.32.24/include/linux/tty_ldisc.h 47282diff -urNp linux-2.6.35.7/include/linux/tty_ldisc.h linux-2.6.35.7/include/linux/tty_ldisc.h
48786--- linux-2.6.32.24/include/linux/tty_ldisc.h 2010-08-13 16:24:37.000000000 -0400 47283--- linux-2.6.35.7/include/linux/tty_ldisc.h 2010-08-26 19:47:12.000000000 -0400
48787+++ linux-2.6.32.24/include/linux/tty_ldisc.h 2010-10-23 19:59:20.000000000 -0400 47284+++ linux-2.6.35.7/include/linux/tty_ldisc.h 2010-09-17 20:12:09.000000000 -0400
48788@@ -139,7 +139,7 @@ struct tty_ldisc_ops { 47285@@ -147,7 +147,7 @@ struct tty_ldisc_ops {
48789 47286
48790 struct module *owner; 47287 struct module *owner;
48791 47288
@@ -48794,16 +47291,16 @@ diff -urNp linux-2.6.32.24/include/linux/tty_ldisc.h linux-2.6.32.24/include/lin
48794 }; 47291 };
48795 47292
48796 struct tty_ldisc { 47293 struct tty_ldisc {
48797diff -urNp linux-2.6.32.24/include/linux/types.h linux-2.6.32.24/include/linux/types.h 47294diff -urNp linux-2.6.35.7/include/linux/types.h linux-2.6.35.7/include/linux/types.h
48798--- linux-2.6.32.24/include/linux/types.h 2010-08-13 16:24:37.000000000 -0400 47295--- linux-2.6.35.7/include/linux/types.h 2010-08-26 19:47:12.000000000 -0400
48799+++ linux-2.6.32.24/include/linux/types.h 2010-10-23 19:59:20.000000000 -0400 47296+++ linux-2.6.35.7/include/linux/types.h 2010-09-17 20:12:09.000000000 -0400
48800@@ -191,10 +191,26 @@ typedef struct { 47297@@ -191,10 +191,26 @@ typedef struct {
48801 volatile int counter; 47298 int counter;
48802 } atomic_t; 47299 } atomic_t;
48803 47300
48804+#ifdef CONFIG_PAX_REFCOUNT 47301+#ifdef CONFIG_PAX_REFCOUNT
48805+typedef struct { 47302+typedef struct {
48806+ volatile int counter; 47303+ int counter;
48807+} atomic_unchecked_t; 47304+} atomic_unchecked_t;
48808+#else 47305+#else
48809+typedef atomic_t atomic_unchecked_t; 47306+typedef atomic_t atomic_unchecked_t;
@@ -48811,12 +47308,12 @@ diff -urNp linux-2.6.32.24/include/linux/types.h linux-2.6.32.24/include/linux/t
48811+ 47308+
48812 #ifdef CONFIG_64BIT 47309 #ifdef CONFIG_64BIT
48813 typedef struct { 47310 typedef struct {
48814 volatile long counter; 47311 long counter;
48815 } atomic64_t; 47312 } atomic64_t;
48816+ 47313+
48817+#ifdef CONFIG_PAX_REFCOUNT 47314+#ifdef CONFIG_PAX_REFCOUNT
48818+typedef struct { 47315+typedef struct {
48819+ volatile long counter; 47316+ long counter;
48820+} atomic64_unchecked_t; 47317+} atomic64_unchecked_t;
48821+#else 47318+#else
48822+typedef atomic64_t atomic64_unchecked_t; 47319+typedef atomic64_t atomic64_unchecked_t;
@@ -48824,9 +47321,9 @@ diff -urNp linux-2.6.32.24/include/linux/types.h linux-2.6.32.24/include/linux/t
48824 #endif 47321 #endif
48825 47322
48826 struct ustat { 47323 struct ustat {
48827diff -urNp linux-2.6.32.24/include/linux/uaccess.h linux-2.6.32.24/include/linux/uaccess.h 47324diff -urNp linux-2.6.35.7/include/linux/uaccess.h linux-2.6.35.7/include/linux/uaccess.h
48828--- linux-2.6.32.24/include/linux/uaccess.h 2010-08-13 16:24:37.000000000 -0400 47325--- linux-2.6.35.7/include/linux/uaccess.h 2010-08-26 19:47:12.000000000 -0400
48829+++ linux-2.6.32.24/include/linux/uaccess.h 2010-10-23 19:59:20.000000000 -0400 47326+++ linux-2.6.35.7/include/linux/uaccess.h 2010-09-17 20:12:09.000000000 -0400
48830@@ -76,11 +76,11 @@ static inline unsigned long __copy_from_ 47327@@ -76,11 +76,11 @@ static inline unsigned long __copy_from_
48831 long ret; \ 47328 long ret; \
48832 mm_segment_t old_fs = get_fs(); \ 47329 mm_segment_t old_fs = get_fs(); \
@@ -48841,26 +47338,51 @@ diff -urNp linux-2.6.32.24/include/linux/uaccess.h linux-2.6.32.24/include/linux
48841 ret; \ 47338 ret; \
48842 }) 47339 })
48843 47340
48844@@ -93,7 +93,7 @@ static inline unsigned long __copy_from_ 47341@@ -93,8 +93,8 @@ static inline unsigned long __copy_from_
48845 * Safely read from address @src to the buffer at @dst. If a kernel fault 47342 * Safely read from address @src to the buffer at @dst. If a kernel fault
48846 * happens, handle that and return -EFAULT. 47343 * happens, handle that and return -EFAULT.
48847 */ 47344 */
48848-extern long probe_kernel_read(void *dst, void *src, size_t size); 47345-extern long probe_kernel_read(void *dst, void *src, size_t size);
47346-extern long __probe_kernel_read(void *dst, void *src, size_t size);
48849+extern long probe_kernel_read(void *dst, const void *src, size_t size); 47347+extern long probe_kernel_read(void *dst, const void *src, size_t size);
47348+extern long __probe_kernel_read(void *dst, const void *src, size_t size);
48850 47349
48851 /* 47350 /*
48852 * probe_kernel_write(): safely attempt to write to a location 47351 * probe_kernel_write(): safely attempt to write to a location
48853@@ -104,6 +104,6 @@ extern long probe_kernel_read(void *dst, 47352@@ -105,7 +105,7 @@ extern long __probe_kernel_read(void *ds
48854 * Safely write to address @dst from the buffer at @src. If a kernel fault 47353 * Safely write to address @dst from the buffer at @src. If a kernel fault
48855 * happens, handle that and return -EFAULT. 47354 * happens, handle that and return -EFAULT.
48856 */ 47355 */
48857-extern long probe_kernel_write(void *dst, void *src, size_t size); 47356-extern long notrace probe_kernel_write(void *dst, void *src, size_t size);
48858+extern long probe_kernel_write(void *dst, const void *src, size_t size); 47357-extern long notrace __probe_kernel_write(void *dst, void *src, size_t size);
47358+extern long notrace probe_kernel_write(void *dst, const void *src, size_t size);
47359+extern long notrace __probe_kernel_write(void *dst, const void *src, size_t size);
48859 47360
48860 #endif /* __LINUX_UACCESS_H__ */ 47361 #endif /* __LINUX_UACCESS_H__ */
48861diff -urNp linux-2.6.32.24/include/linux/vmalloc.h linux-2.6.32.24/include/linux/vmalloc.h 47362diff -urNp linux-2.6.35.7/include/linux/usb/hcd.h linux-2.6.35.7/include/linux/usb/hcd.h
48862--- linux-2.6.32.24/include/linux/vmalloc.h 2010-08-13 16:24:37.000000000 -0400 47363--- linux-2.6.35.7/include/linux/usb/hcd.h 2010-08-26 19:47:12.000000000 -0400
48863+++ linux-2.6.32.24/include/linux/vmalloc.h 2010-10-23 19:59:20.000000000 -0400 47364+++ linux-2.6.35.7/include/linux/usb/hcd.h 2010-09-17 20:12:09.000000000 -0400
47365@@ -559,7 +559,7 @@ struct usb_mon_operations {
47366 /* void (*urb_unlink)(struct usb_bus *bus, struct urb *urb); */
47367 };
47368
47369-extern struct usb_mon_operations *mon_ops;
47370+extern const struct usb_mon_operations *mon_ops;
47371
47372 static inline void usbmon_urb_submit(struct usb_bus *bus, struct urb *urb)
47373 {
47374@@ -581,7 +581,7 @@ static inline void usbmon_urb_complete(s
47375 (*mon_ops->urb_complete)(bus, urb, status);
47376 }
47377
47378-int usb_mon_register(struct usb_mon_operations *ops);
47379+int usb_mon_register(const struct usb_mon_operations *ops);
47380 void usb_mon_deregister(void);
47381
47382 #else
47383diff -urNp linux-2.6.35.7/include/linux/vmalloc.h linux-2.6.35.7/include/linux/vmalloc.h
47384--- linux-2.6.35.7/include/linux/vmalloc.h 2010-08-26 19:47:12.000000000 -0400
47385+++ linux-2.6.35.7/include/linux/vmalloc.h 2010-09-17 20:12:09.000000000 -0400
48864@@ -13,6 +13,11 @@ struct vm_area_struct; /* vma defining 47386@@ -13,6 +13,11 @@ struct vm_area_struct; /* vma defining
48865 #define VM_MAP 0x00000004 /* vmap()ed pages */ 47387 #define VM_MAP 0x00000004 /* vmap()ed pages */
48866 #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ 47388 #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
@@ -48873,7 +47395,7 @@ diff -urNp linux-2.6.32.24/include/linux/vmalloc.h linux-2.6.32.24/include/linux
48873 /* bits [20..32] reserved for arch specific ioremap internals */ 47395 /* bits [20..32] reserved for arch specific ioremap internals */
48874 47396
48875 /* 47397 /*
48876@@ -123,4 +128,81 @@ struct vm_struct **pcpu_get_vm_areas(con 47398@@ -121,4 +126,81 @@ struct vm_struct **pcpu_get_vm_areas(con
48877 47399
48878 void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); 47400 void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms);
48879 47401
@@ -48955,10 +47477,10 @@ diff -urNp linux-2.6.32.24/include/linux/vmalloc.h linux-2.6.32.24/include/linux
48955+}) 47477+})
48956+ 47478+
48957 #endif /* _LINUX_VMALLOC_H */ 47479 #endif /* _LINUX_VMALLOC_H */
48958diff -urNp linux-2.6.32.24/include/linux/vmstat.h linux-2.6.32.24/include/linux/vmstat.h 47480diff -urNp linux-2.6.35.7/include/linux/vmstat.h linux-2.6.35.7/include/linux/vmstat.h
48959--- linux-2.6.32.24/include/linux/vmstat.h 2010-09-26 17:26:05.000000000 -0400 47481--- linux-2.6.35.7/include/linux/vmstat.h 2010-09-26 17:32:11.000000000 -0400
48960+++ linux-2.6.32.24/include/linux/vmstat.h 2010-10-23 19:59:20.000000000 -0400 47482+++ linux-2.6.35.7/include/linux/vmstat.h 2010-09-26 22:02:02.000000000 -0400
48961@@ -136,18 +136,18 @@ static inline void vm_events_fold_cpu(in 47483@@ -140,18 +140,18 @@ static inline void vm_events_fold_cpu(in
48962 /* 47484 /*
48963 * Zone based page accounting with per cpu differentials. 47485 * Zone based page accounting with per cpu differentials.
48964 */ 47486 */
@@ -48981,7 +47503,7 @@ diff -urNp linux-2.6.32.24/include/linux/vmstat.h linux-2.6.32.24/include/linux/
48981 #ifdef CONFIG_SMP 47503 #ifdef CONFIG_SMP
48982 if (x < 0) 47504 if (x < 0)
48983 x = 0; 47505 x = 0;
48984@@ -158,7 +158,7 @@ static inline unsigned long global_page_ 47506@@ -162,7 +162,7 @@ static inline unsigned long global_page_
48985 static inline unsigned long zone_page_state(struct zone *zone, 47507 static inline unsigned long zone_page_state(struct zone *zone,
48986 enum zone_stat_item item) 47508 enum zone_stat_item item)
48987 { 47509 {
@@ -48990,7 +47512,7 @@ diff -urNp linux-2.6.32.24/include/linux/vmstat.h linux-2.6.32.24/include/linux/
48990 #ifdef CONFIG_SMP 47512 #ifdef CONFIG_SMP
48991 if (x < 0) 47513 if (x < 0)
48992 x = 0; 47514 x = 0;
48993@@ -175,7 +175,7 @@ static inline unsigned long zone_page_st 47515@@ -179,7 +179,7 @@ static inline unsigned long zone_page_st
48994 static inline unsigned long zone_page_state_snapshot(struct zone *zone, 47516 static inline unsigned long zone_page_state_snapshot(struct zone *zone,
48995 enum zone_stat_item item) 47517 enum zone_stat_item item)
48996 { 47518 {
@@ -48999,7 +47521,7 @@ diff -urNp linux-2.6.32.24/include/linux/vmstat.h linux-2.6.32.24/include/linux/
48999 47521
49000 #ifdef CONFIG_SMP 47522 #ifdef CONFIG_SMP
49001 int cpu; 47523 int cpu;
49002@@ -264,8 +264,8 @@ static inline void __mod_zone_page_state 47524@@ -268,8 +268,8 @@ static inline void __mod_zone_page_state
49003 47525
49004 static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item) 47526 static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
49005 { 47527 {
@@ -49010,7 +47532,7 @@ diff -urNp linux-2.6.32.24/include/linux/vmstat.h linux-2.6.32.24/include/linux/
49010 } 47532 }
49011 47533
49012 static inline void __inc_zone_page_state(struct page *page, 47534 static inline void __inc_zone_page_state(struct page *page,
49013@@ -276,8 +276,8 @@ static inline void __inc_zone_page_state 47535@@ -280,8 +280,8 @@ static inline void __inc_zone_page_state
49014 47536
49015 static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item) 47537 static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
49016 { 47538 {
@@ -49021,21 +47543,32 @@ diff -urNp linux-2.6.32.24/include/linux/vmstat.h linux-2.6.32.24/include/linux/
49021 } 47543 }
49022 47544
49023 static inline void __dec_zone_page_state(struct page *page, 47545 static inline void __dec_zone_page_state(struct page *page,
49024diff -urNp linux-2.6.32.24/include/net/inetpeer.h linux-2.6.32.24/include/net/inetpeer.h 47546diff -urNp linux-2.6.35.7/include/net/inetpeer.h linux-2.6.35.7/include/net/inetpeer.h
49025--- linux-2.6.32.24/include/net/inetpeer.h 2010-08-13 16:24:37.000000000 -0400 47547--- linux-2.6.35.7/include/net/inetpeer.h 2010-08-26 19:47:12.000000000 -0400
49026+++ linux-2.6.32.24/include/net/inetpeer.h 2010-10-23 19:59:24.000000000 -0400 47548+++ linux-2.6.35.7/include/net/inetpeer.h 2010-10-11 22:41:44.000000000 -0400
49027@@ -24,7 +24,7 @@ struct inet_peer 47549@@ -22,8 +22,8 @@ struct inet_peer {
49028 __u32 dtime; /* the time of last use of not 47550 __u32 dtime; /* the time of last use of not
49029 * referenced entries */ 47551 * referenced entries */
49030 atomic_t refcnt; 47552 atomic_t refcnt;
49031- atomic_t rid; /* Frag reception counter */ 47553- atomic_t rid; /* Frag reception counter */
47554- atomic_t ip_id_count; /* IP ID for the next packet */
49032+ atomic_unchecked_t rid; /* Frag reception counter */ 47555+ atomic_unchecked_t rid; /* Frag reception counter */
47556+ atomic_unchecked_t ip_id_count; /* IP ID for the next packet */
49033 __u32 tcp_ts; 47557 __u32 tcp_ts;
49034 unsigned long tcp_ts_stamp; 47558 __u32 tcp_ts_stamp;
49035 }; 47559 };
49036diff -urNp linux-2.6.32.24/include/net/irda/ircomm_tty.h linux-2.6.32.24/include/net/irda/ircomm_tty.h 47560@@ -40,7 +40,7 @@ extern void inet_putpeer(struct inet_pee
49037--- linux-2.6.32.24/include/net/irda/ircomm_tty.h 2010-08-13 16:24:37.000000000 -0400 47561 static inline __u16 inet_getid(struct inet_peer *p, int more)
49038+++ linux-2.6.32.24/include/net/irda/ircomm_tty.h 2010-10-23 19:59:20.000000000 -0400 47562 {
47563 more++;
47564- return atomic_add_return(more, &p->ip_id_count) - more;
47565+ return atomic_add_return_unchecked(more, &p->ip_id_count) - more;
47566 }
47567
47568 #endif /* _NET_INETPEER_H */
47569diff -urNp linux-2.6.35.7/include/net/irda/ircomm_tty.h linux-2.6.35.7/include/net/irda/ircomm_tty.h
47570--- linux-2.6.35.7/include/net/irda/ircomm_tty.h 2010-08-26 19:47:12.000000000 -0400
47571+++ linux-2.6.35.7/include/net/irda/ircomm_tty.h 2010-09-17 20:12:09.000000000 -0400
49039@@ -105,8 +105,8 @@ struct ircomm_tty_cb { 47572@@ -105,8 +105,8 @@ struct ircomm_tty_cb {
49040 unsigned short close_delay; 47573 unsigned short close_delay;
49041 unsigned short closing_wait; /* time to wait before closing */ 47574 unsigned short closing_wait; /* time to wait before closing */
@@ -49047,12 +47580,12 @@ diff -urNp linux-2.6.32.24/include/net/irda/ircomm_tty.h linux-2.6.32.24/include
49047 47580
49048 /* Protect concurent access to : 47581 /* Protect concurent access to :
49049 * o self->open_count 47582 * o self->open_count
49050diff -urNp linux-2.6.32.24/include/net/neighbour.h linux-2.6.32.24/include/net/neighbour.h 47583diff -urNp linux-2.6.35.7/include/net/neighbour.h linux-2.6.35.7/include/net/neighbour.h
49051--- linux-2.6.32.24/include/net/neighbour.h 2010-08-13 16:24:37.000000000 -0400 47584--- linux-2.6.35.7/include/net/neighbour.h 2010-08-26 19:47:12.000000000 -0400
49052+++ linux-2.6.32.24/include/net/neighbour.h 2010-10-23 19:59:20.000000000 -0400 47585+++ linux-2.6.35.7/include/net/neighbour.h 2010-09-17 20:12:09.000000000 -0400
49053@@ -125,12 +125,12 @@ struct neighbour 47586@@ -116,12 +116,12 @@ struct neighbour {
49054 struct neigh_ops 47587
49055 { 47588 struct neigh_ops {
49056 int family; 47589 int family;
49057- void (*solicit)(struct neighbour *, struct sk_buff*); 47590- void (*solicit)(struct neighbour *, struct sk_buff*);
49058- void (*error_report)(struct neighbour *, struct sk_buff*); 47591- void (*error_report)(struct neighbour *, struct sk_buff*);
@@ -49068,10 +47601,10 @@ diff -urNp linux-2.6.32.24/include/net/neighbour.h linux-2.6.32.24/include/net/n
49068+ int (* const queue_xmit)(struct sk_buff*); 47601+ int (* const queue_xmit)(struct sk_buff*);
49069 }; 47602 };
49070 47603
49071 struct pneigh_entry 47604 struct pneigh_entry {
49072diff -urNp linux-2.6.32.24/include/net/sctp/sctp.h linux-2.6.32.24/include/net/sctp/sctp.h 47605diff -urNp linux-2.6.35.7/include/net/sctp/sctp.h linux-2.6.35.7/include/net/sctp/sctp.h
49073--- linux-2.6.32.24/include/net/sctp/sctp.h 2010-08-13 16:24:37.000000000 -0400 47606--- linux-2.6.35.7/include/net/sctp/sctp.h 2010-08-26 19:47:12.000000000 -0400
49074+++ linux-2.6.32.24/include/net/sctp/sctp.h 2010-10-23 19:59:20.000000000 -0400 47607+++ linux-2.6.35.7/include/net/sctp/sctp.h 2010-09-17 20:12:09.000000000 -0400
49075@@ -305,8 +305,8 @@ extern int sctp_debug_flag; 47608@@ -305,8 +305,8 @@ extern int sctp_debug_flag;
49076 47609
49077 #else /* SCTP_DEBUG */ 47610 #else /* SCTP_DEBUG */
@@ -49083,10 +47616,10 @@ diff -urNp linux-2.6.32.24/include/net/sctp/sctp.h linux-2.6.32.24/include/net/s
49083 #define SCTP_ENABLE_DEBUG 47616 #define SCTP_ENABLE_DEBUG
49084 #define SCTP_DISABLE_DEBUG 47617 #define SCTP_DISABLE_DEBUG
49085 #define SCTP_ASSERT(expr, str, func) 47618 #define SCTP_ASSERT(expr, str, func)
49086diff -urNp linux-2.6.32.24/include/net/tcp.h linux-2.6.32.24/include/net/tcp.h 47619diff -urNp linux-2.6.35.7/include/net/tcp.h linux-2.6.35.7/include/net/tcp.h
49087--- linux-2.6.32.24/include/net/tcp.h 2010-09-26 17:26:05.000000000 -0400 47620--- linux-2.6.35.7/include/net/tcp.h 2010-09-26 17:32:11.000000000 -0400
49088+++ linux-2.6.32.24/include/net/tcp.h 2010-10-23 19:59:20.000000000 -0400 47621+++ linux-2.6.35.7/include/net/tcp.h 2010-09-26 17:32:50.000000000 -0400
49089@@ -1444,6 +1444,7 @@ enum tcp_seq_states { 47622@@ -1428,6 +1428,7 @@ enum tcp_seq_states {
49090 struct tcp_seq_afinfo { 47623 struct tcp_seq_afinfo {
49091 char *name; 47624 char *name;
49092 sa_family_t family; 47625 sa_family_t family;
@@ -49094,10 +47627,10 @@ diff -urNp linux-2.6.32.24/include/net/tcp.h linux-2.6.32.24/include/net/tcp.h
49094 struct file_operations seq_fops; 47627 struct file_operations seq_fops;
49095 struct seq_operations seq_ops; 47628 struct seq_operations seq_ops;
49096 }; 47629 };
49097diff -urNp linux-2.6.32.24/include/net/udp.h linux-2.6.32.24/include/net/udp.h 47630diff -urNp linux-2.6.35.7/include/net/udp.h linux-2.6.35.7/include/net/udp.h
49098--- linux-2.6.32.24/include/net/udp.h 2010-08-13 16:24:37.000000000 -0400 47631--- linux-2.6.35.7/include/net/udp.h 2010-09-26 17:32:11.000000000 -0400
49099+++ linux-2.6.32.24/include/net/udp.h 2010-10-23 19:59:20.000000000 -0400 47632+++ linux-2.6.35.7/include/net/udp.h 2010-09-26 17:32:50.000000000 -0400
49100@@ -187,6 +187,7 @@ struct udp_seq_afinfo { 47633@@ -222,6 +222,7 @@ struct udp_seq_afinfo {
49101 char *name; 47634 char *name;
49102 sa_family_t family; 47635 sa_family_t family;
49103 struct udp_table *udp_table; 47636 struct udp_table *udp_table;
@@ -49105,9 +47638,9 @@ diff -urNp linux-2.6.32.24/include/net/udp.h linux-2.6.32.24/include/net/udp.h
49105 struct file_operations seq_fops; 47638 struct file_operations seq_fops;
49106 struct seq_operations seq_ops; 47639 struct seq_operations seq_ops;
49107 }; 47640 };
49108diff -urNp linux-2.6.32.24/include/sound/ac97_codec.h linux-2.6.32.24/include/sound/ac97_codec.h 47641diff -urNp linux-2.6.35.7/include/sound/ac97_codec.h linux-2.6.35.7/include/sound/ac97_codec.h
49109--- linux-2.6.32.24/include/sound/ac97_codec.h 2010-08-13 16:24:37.000000000 -0400 47642--- linux-2.6.35.7/include/sound/ac97_codec.h 2010-08-26 19:47:12.000000000 -0400
49110+++ linux-2.6.32.24/include/sound/ac97_codec.h 2010-10-23 19:59:20.000000000 -0400 47643+++ linux-2.6.35.7/include/sound/ac97_codec.h 2010-09-17 20:12:09.000000000 -0400
49111@@ -419,15 +419,15 @@ 47644@@ -419,15 +419,15 @@
49112 struct snd_ac97; 47645 struct snd_ac97;
49113 47646
@@ -49140,9 +47673,9 @@ diff -urNp linux-2.6.32.24/include/sound/ac97_codec.h linux-2.6.32.24/include/so
49140 void *private_data; 47673 void *private_data;
49141 void (*private_free) (struct snd_ac97 *ac97); 47674 void (*private_free) (struct snd_ac97 *ac97);
49142 /* --- */ 47675 /* --- */
49143diff -urNp linux-2.6.32.24/include/trace/events/irq.h linux-2.6.32.24/include/trace/events/irq.h 47676diff -urNp linux-2.6.35.7/include/trace/events/irq.h linux-2.6.35.7/include/trace/events/irq.h
49144--- linux-2.6.32.24/include/trace/events/irq.h 2010-08-13 16:24:37.000000000 -0400 47677--- linux-2.6.35.7/include/trace/events/irq.h 2010-08-26 19:47:12.000000000 -0400
49145+++ linux-2.6.32.24/include/trace/events/irq.h 2010-10-23 19:59:20.000000000 -0400 47678+++ linux-2.6.35.7/include/trace/events/irq.h 2010-09-17 20:12:09.000000000 -0400
49146@@ -34,7 +34,7 @@ 47679@@ -34,7 +34,7 @@
49147 */ 47680 */
49148 TRACE_EVENT(irq_handler_entry, 47681 TRACE_EVENT(irq_handler_entry,
@@ -49161,27 +47694,36 @@ diff -urNp linux-2.6.32.24/include/trace/events/irq.h linux-2.6.32.24/include/tr
49161 47694
49162 TP_ARGS(irq, action, ret), 47695 TP_ARGS(irq, action, ret),
49163 47696
49164@@ -95,7 +95,7 @@ TRACE_EVENT(irq_handler_exit, 47697@@ -84,7 +84,7 @@ TRACE_EVENT(irq_handler_exit,
49165 */ 47698
49166 TRACE_EVENT(softirq_entry, 47699 DECLARE_EVENT_CLASS(softirq,
49167 47700
49168- TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 47701- TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
49169+ TP_PROTO(const struct softirq_action *h, const struct softirq_action *vec), 47702+ TP_PROTO(const struct softirq_action *h, const struct softirq_action *vec),
49170 47703
49171 TP_ARGS(h, vec), 47704 TP_ARGS(h, vec),
49172 47705
49173@@ -124,7 +124,7 @@ TRACE_EVENT(softirq_entry, 47706@@ -113,7 +113,7 @@ DECLARE_EVENT_CLASS(softirq,
49174 */ 47707 */
49175 TRACE_EVENT(softirq_exit, 47708 DEFINE_EVENT(softirq, softirq_entry,
49176 47709
49177- TP_PROTO(struct softirq_action *h, struct softirq_action *vec), 47710- TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
49178+ TP_PROTO(const struct softirq_action *h, const struct softirq_action *vec), 47711+ TP_PROTO(const struct softirq_action *h, const struct softirq_action *vec),
49179 47712
49180 TP_ARGS(h, vec), 47713 TP_ARGS(h, vec)
47714 );
47715@@ -131,7 +131,7 @@ DEFINE_EVENT(softirq, softirq_entry,
47716 */
47717 DEFINE_EVENT(softirq, softirq_exit,
47718
47719- TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
47720+ TP_PROTO(const struct softirq_action *h, const struct softirq_action *vec),
49181 47721
49182diff -urNp linux-2.6.32.24/include/video/uvesafb.h linux-2.6.32.24/include/video/uvesafb.h 47722 TP_ARGS(h, vec)
49183--- linux-2.6.32.24/include/video/uvesafb.h 2010-08-13 16:24:37.000000000 -0400 47723 );
49184+++ linux-2.6.32.24/include/video/uvesafb.h 2010-10-23 19:59:20.000000000 -0400 47724diff -urNp linux-2.6.35.7/include/video/uvesafb.h linux-2.6.35.7/include/video/uvesafb.h
47725--- linux-2.6.35.7/include/video/uvesafb.h 2010-08-26 19:47:12.000000000 -0400
47726+++ linux-2.6.35.7/include/video/uvesafb.h 2010-09-17 20:12:09.000000000 -0400
49185@@ -177,6 +177,7 @@ struct uvesafb_par { 47727@@ -177,6 +177,7 @@ struct uvesafb_par {
49186 u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */ 47728 u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */
49187 u8 pmi_setpal; /* PMI for palette changes */ 47729 u8 pmi_setpal; /* PMI for palette changes */
@@ -49190,10 +47732,10 @@ diff -urNp linux-2.6.32.24/include/video/uvesafb.h linux-2.6.32.24/include/video
49190 void *pmi_start; 47732 void *pmi_start;
49191 void *pmi_pal; 47733 void *pmi_pal;
49192 u8 *vbe_state_orig; /* 47734 u8 *vbe_state_orig; /*
49193diff -urNp linux-2.6.32.24/init/do_mounts.c linux-2.6.32.24/init/do_mounts.c 47735diff -urNp linux-2.6.35.7/init/do_mounts.c linux-2.6.35.7/init/do_mounts.c
49194--- linux-2.6.32.24/init/do_mounts.c 2010-08-13 16:24:37.000000000 -0400 47736--- linux-2.6.35.7/init/do_mounts.c 2010-08-26 19:47:12.000000000 -0400
49195+++ linux-2.6.32.24/init/do_mounts.c 2010-10-23 19:59:20.000000000 -0400 47737+++ linux-2.6.35.7/init/do_mounts.c 2010-09-17 20:12:09.000000000 -0400
49196@@ -216,11 +216,11 @@ static void __init get_fs_names(char *pa 47738@@ -217,11 +217,11 @@ static void __init get_fs_names(char *pa
49197 47739
49198 static int __init do_mount_root(char *name, char *fs, int flags, void *data) 47740 static int __init do_mount_root(char *name, char *fs, int flags, void *data)
49199 { 47741 {
@@ -49207,7 +47749,7 @@ diff -urNp linux-2.6.32.24/init/do_mounts.c linux-2.6.32.24/init/do_mounts.c
49207 ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev; 47749 ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
49208 printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n", 47750 printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
49209 current->fs->pwd.mnt->mnt_sb->s_type->name, 47751 current->fs->pwd.mnt->mnt_sb->s_type->name,
49210@@ -311,18 +311,18 @@ void __init change_floppy(char *fmt, ... 47752@@ -312,18 +312,18 @@ void __init change_floppy(char *fmt, ...
49211 va_start(args, fmt); 47753 va_start(args, fmt);
49212 vsprintf(buf, fmt, args); 47754 vsprintf(buf, fmt, args);
49213 va_end(args); 47755 va_end(args);
@@ -49219,7 +47761,7 @@ diff -urNp linux-2.6.32.24/init/do_mounts.c linux-2.6.32.24/init/do_mounts.c
49219 } 47761 }
49220 printk(KERN_NOTICE "VFS: Insert %s and press ENTER\n", buf); 47762 printk(KERN_NOTICE "VFS: Insert %s and press ENTER\n", buf);
49221- fd = sys_open("/dev/console", O_RDWR, 0); 47763- fd = sys_open("/dev/console", O_RDWR, 0);
49222+ fd = sys_open((char __user *)"/dev/console", O_RDWR, 0); 47764+ fd = sys_open((__force const char __user *)"/dev/console", O_RDWR, 0);
49223 if (fd >= 0) { 47765 if (fd >= 0) {
49224 sys_ioctl(fd, TCGETS, (long)&termios); 47766 sys_ioctl(fd, TCGETS, (long)&termios);
49225 termios.c_lflag &= ~ICANON; 47767 termios.c_lflag &= ~ICANON;
@@ -49229,7 +47771,7 @@ diff -urNp linux-2.6.32.24/init/do_mounts.c linux-2.6.32.24/init/do_mounts.c
49229 termios.c_lflag |= ICANON; 47771 termios.c_lflag |= ICANON;
49230 sys_ioctl(fd, TCSETSF, (long)&termios); 47772 sys_ioctl(fd, TCSETSF, (long)&termios);
49231 sys_close(fd); 47773 sys_close(fd);
49232@@ -416,6 +416,6 @@ void __init prepare_namespace(void) 47774@@ -417,6 +417,6 @@ void __init prepare_namespace(void)
49233 mount_root(); 47775 mount_root();
49234 out: 47776 out:
49235 devtmpfs_mount("dev"); 47777 devtmpfs_mount("dev");
@@ -49238,9 +47780,9 @@ diff -urNp linux-2.6.32.24/init/do_mounts.c linux-2.6.32.24/init/do_mounts.c
49238+ sys_mount((__force char __user *)".", (__force char __user *)"/", NULL, MS_MOVE, NULL); 47780+ sys_mount((__force char __user *)".", (__force char __user *)"/", NULL, MS_MOVE, NULL);
49239+ sys_chroot((__force char __user *)"."); 47781+ sys_chroot((__force char __user *)".");
49240 } 47782 }
49241diff -urNp linux-2.6.32.24/init/do_mounts.h linux-2.6.32.24/init/do_mounts.h 47783diff -urNp linux-2.6.35.7/init/do_mounts.h linux-2.6.35.7/init/do_mounts.h
49242--- linux-2.6.32.24/init/do_mounts.h 2010-08-13 16:24:37.000000000 -0400 47784--- linux-2.6.35.7/init/do_mounts.h 2010-08-26 19:47:12.000000000 -0400
49243+++ linux-2.6.32.24/init/do_mounts.h 2010-10-23 19:59:20.000000000 -0400 47785+++ linux-2.6.35.7/init/do_mounts.h 2010-09-17 20:12:09.000000000 -0400
49244@@ -15,15 +15,15 @@ extern int root_mountflags; 47786@@ -15,15 +15,15 @@ extern int root_mountflags;
49245 47787
49246 static inline int create_dev(char *name, dev_t dev) 47788 static inline int create_dev(char *name, dev_t dev)
@@ -49260,19 +47802,10 @@ diff -urNp linux-2.6.32.24/init/do_mounts.h linux-2.6.32.24/init/do_mounts.h
49260 return 0; 47802 return 0;
49261 if (!S_ISBLK(stat.st_mode)) 47803 if (!S_ISBLK(stat.st_mode))
49262 return 0; 47804 return 0;
49263diff -urNp linux-2.6.32.24/init/do_mounts_initrd.c linux-2.6.32.24/init/do_mounts_initrd.c 47805diff -urNp linux-2.6.35.7/init/do_mounts_initrd.c linux-2.6.35.7/init/do_mounts_initrd.c
49264--- linux-2.6.32.24/init/do_mounts_initrd.c 2010-08-13 16:24:37.000000000 -0400 47806--- linux-2.6.35.7/init/do_mounts_initrd.c 2010-08-26 19:47:12.000000000 -0400
49265+++ linux-2.6.32.24/init/do_mounts_initrd.c 2010-10-23 19:59:20.000000000 -0400 47807+++ linux-2.6.35.7/init/do_mounts_initrd.c 2010-09-17 20:12:09.000000000 -0400
49266@@ -32,7 +32,7 @@ static int __init do_linuxrc(void * shel 47808@@ -43,13 +43,13 @@ static void __init handle_initrd(void)
49267 sys_close(old_fd);sys_close(root_fd);
49268 sys_close(0);sys_close(1);sys_close(2);
49269 sys_setsid();
49270- (void) sys_open("/dev/console",O_RDWR,0);
49271+ (void) sys_open((__force const char __user *)"/dev/console",O_RDWR,0);
49272 (void) sys_dup(0);
49273 (void) sys_dup(0);
49274 return kernel_execve(shell, argv, envp_init);
49275@@ -47,13 +47,13 @@ static void __init handle_initrd(void)
49276 create_dev("/dev/root.old", Root_RAM0); 47809 create_dev("/dev/root.old", Root_RAM0);
49277 /* mount initrd on rootfs' /root */ 47810 /* mount initrd on rootfs' /root */
49278 mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY); 47811 mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY);
@@ -49292,7 +47825,7 @@ diff -urNp linux-2.6.32.24/init/do_mounts_initrd.c linux-2.6.32.24/init/do_mount
49292 47825
49293 /* 47826 /*
49294 * In case that a resume from disk is carried out by linuxrc or one of 47827 * In case that a resume from disk is carried out by linuxrc or one of
49295@@ -70,15 +70,15 @@ static void __init handle_initrd(void) 47828@@ -66,15 +66,15 @@ static void __init handle_initrd(void)
49296 47829
49297 /* move initrd to rootfs' /old */ 47830 /* move initrd to rootfs' /old */
49298 sys_fchdir(old_fd); 47831 sys_fchdir(old_fd);
@@ -49311,7 +47844,7 @@ diff -urNp linux-2.6.32.24/init/do_mounts_initrd.c linux-2.6.32.24/init/do_mount
49311 return; 47844 return;
49312 } 47845 }
49313 47846
49314@@ -86,17 +86,17 @@ static void __init handle_initrd(void) 47847@@ -82,17 +82,17 @@ static void __init handle_initrd(void)
49315 mount_root(); 47848 mount_root();
49316 47849
49317 printk(KERN_NOTICE "Trying to move old root to /initrd ... "); 47850 printk(KERN_NOTICE "Trying to move old root to /initrd ... ");
@@ -49332,7 +47865,7 @@ diff -urNp linux-2.6.32.24/init/do_mounts_initrd.c linux-2.6.32.24/init/do_mount
49332 printk(KERN_NOTICE "Trying to free ramdisk memory ... "); 47865 printk(KERN_NOTICE "Trying to free ramdisk memory ... ");
49333 if (fd < 0) { 47866 if (fd < 0) {
49334 error = fd; 47867 error = fd;
49335@@ -119,11 +119,11 @@ int __init initrd_load(void) 47868@@ -115,11 +115,11 @@ int __init initrd_load(void)
49336 * mounted in the normal path. 47869 * mounted in the normal path.
49337 */ 47870 */
49338 if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) { 47871 if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
@@ -49346,9 +47879,9 @@ diff -urNp linux-2.6.32.24/init/do_mounts_initrd.c linux-2.6.32.24/init/do_mount
49346+ sys_unlink((__force const char __user *)"/initrd.image"); 47879+ sys_unlink((__force const char __user *)"/initrd.image");
49347 return 0; 47880 return 0;
49348 } 47881 }
49349diff -urNp linux-2.6.32.24/init/do_mounts_md.c linux-2.6.32.24/init/do_mounts_md.c 47882diff -urNp linux-2.6.35.7/init/do_mounts_md.c linux-2.6.35.7/init/do_mounts_md.c
49350--- linux-2.6.32.24/init/do_mounts_md.c 2010-08-13 16:24:37.000000000 -0400 47883--- linux-2.6.35.7/init/do_mounts_md.c 2010-08-26 19:47:12.000000000 -0400
49351+++ linux-2.6.32.24/init/do_mounts_md.c 2010-10-23 19:59:20.000000000 -0400 47884+++ linux-2.6.35.7/init/do_mounts_md.c 2010-09-17 20:12:09.000000000 -0400
49352@@ -170,7 +170,7 @@ static void __init md_setup_drive(void) 47885@@ -170,7 +170,7 @@ static void __init md_setup_drive(void)
49353 partitioned ? "_d" : "", minor, 47886 partitioned ? "_d" : "", minor,
49354 md_setup_args[ent].device_names); 47887 md_setup_args[ent].device_names);
@@ -49376,9 +47909,9 @@ diff -urNp linux-2.6.32.24/init/do_mounts_md.c linux-2.6.32.24/init/do_mounts_md
49376 if (fd >= 0) { 47909 if (fd >= 0) {
49377 sys_ioctl(fd, RAID_AUTORUN, raid_autopart); 47910 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
49378 sys_close(fd); 47911 sys_close(fd);
49379diff -urNp linux-2.6.32.24/init/initramfs.c linux-2.6.32.24/init/initramfs.c 47912diff -urNp linux-2.6.35.7/init/initramfs.c linux-2.6.35.7/init/initramfs.c
49380--- linux-2.6.32.24/init/initramfs.c 2010-08-13 16:24:37.000000000 -0400 47913--- linux-2.6.35.7/init/initramfs.c 2010-08-26 19:47:12.000000000 -0400
49381+++ linux-2.6.32.24/init/initramfs.c 2010-10-23 19:59:20.000000000 -0400 47914+++ linux-2.6.35.7/init/initramfs.c 2010-09-17 20:12:09.000000000 -0400
49382@@ -74,7 +74,7 @@ static void __init free_hash(void) 47915@@ -74,7 +74,7 @@ static void __init free_hash(void)
49383 } 47916 }
49384 } 47917 }
@@ -49487,10 +48020,10 @@ diff -urNp linux-2.6.32.24/init/initramfs.c linux-2.6.32.24/init/initramfs.c
49487 state = SkipIt; 48020 state = SkipIt;
49488 next_state = Reset; 48021 next_state = Reset;
49489 return 0; 48022 return 0;
49490diff -urNp linux-2.6.32.24/init/Kconfig linux-2.6.32.24/init/Kconfig 48023diff -urNp linux-2.6.35.7/init/Kconfig linux-2.6.35.7/init/Kconfig
49491--- linux-2.6.32.24/init/Kconfig 2010-08-13 16:24:37.000000000 -0400 48024--- linux-2.6.35.7/init/Kconfig 2010-08-26 19:47:12.000000000 -0400
49492+++ linux-2.6.32.24/init/Kconfig 2010-10-23 19:59:20.000000000 -0400 48025+++ linux-2.6.35.7/init/Kconfig 2010-09-17 20:12:09.000000000 -0400
49493@@ -1026,7 +1026,7 @@ config SLUB_DEBUG 48026@@ -1063,7 +1063,7 @@ config SLUB_DEBUG
49494 48027
49495 config COMPAT_BRK 48028 config COMPAT_BRK
49496 bool "Disable heap randomization" 48029 bool "Disable heap randomization"
@@ -49499,10 +48032,10 @@ diff -urNp linux-2.6.32.24/init/Kconfig linux-2.6.32.24/init/Kconfig
49499 help 48032 help
49500 Randomizing heap placement makes heap exploits harder, but it 48033 Randomizing heap placement makes heap exploits harder, but it
49501 also breaks ancient binaries (including anything libc5 based). 48034 also breaks ancient binaries (including anything libc5 based).
49502diff -urNp linux-2.6.32.24/init/main.c linux-2.6.32.24/init/main.c 48035diff -urNp linux-2.6.35.7/init/main.c linux-2.6.35.7/init/main.c
49503--- linux-2.6.32.24/init/main.c 2010-08-13 16:24:37.000000000 -0400 48036--- linux-2.6.35.7/init/main.c 2010-08-26 19:47:12.000000000 -0400
49504+++ linux-2.6.32.24/init/main.c 2010-10-23 19:59:24.000000000 -0400 48037+++ linux-2.6.35.7/init/main.c 2010-10-11 22:41:44.000000000 -0400
49505@@ -97,6 +97,7 @@ static inline void mark_rodata_ro(void) 48038@@ -98,6 +98,7 @@ static inline void mark_rodata_ro(void)
49506 #ifdef CONFIG_TC 48039 #ifdef CONFIG_TC
49507 extern void tc_init(void); 48040 extern void tc_init(void);
49508 #endif 48041 #endif
@@ -49510,7 +48043,7 @@ diff -urNp linux-2.6.32.24/init/main.c linux-2.6.32.24/init/main.c
49510 48043
49511 enum system_states system_state __read_mostly; 48044 enum system_states system_state __read_mostly;
49512 EXPORT_SYMBOL(system_state); 48045 EXPORT_SYMBOL(system_state);
49513@@ -183,6 +184,47 @@ static int __init set_reset_devices(char 48046@@ -200,6 +201,47 @@ static int __init set_reset_devices(char
49514 48047
49515 __setup("reset_devices", set_reset_devices); 48048 __setup("reset_devices", set_reset_devices);
49516 48049
@@ -49558,7 +48091,7 @@ diff -urNp linux-2.6.32.24/init/main.c linux-2.6.32.24/init/main.c
49558 static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; 48091 static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
49559 char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; 48092 char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
49560 static const char *panic_later, *panic_param; 48093 static const char *panic_later, *panic_param;
49561@@ -697,52 +739,53 @@ int initcall_debug; 48094@@ -725,52 +767,53 @@ int initcall_debug;
49562 core_param(initcall_debug, initcall_debug, bool, 0644); 48095 core_param(initcall_debug, initcall_debug, bool, 0644);
49563 48096
49564 static char msgbuf[64]; 48097 static char msgbuf[64];
@@ -49628,7 +48161,16 @@ diff -urNp linux-2.6.32.24/init/main.c linux-2.6.32.24/init/main.c
49628 } 48161 }
49629 48162
49630 48163
49631@@ -881,11 +924,13 @@ static int __init kernel_init(void * unu 48164@@ -902,7 +945,7 @@ static int __init kernel_init(void * unu
48165 do_basic_setup();
48166
48167 /* Open the /dev/console on the rootfs, this should never fail */
48168- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
48169+ if (sys_open((__force const char __user *) "/dev/console", O_RDWR, 0) < 0)
48170 printk(KERN_WARNING "Warning: unable to open an initial console.\n");
48171
48172 (void) sys_dup(0);
48173@@ -915,11 +958,13 @@ static int __init kernel_init(void * unu
49632 if (!ramdisk_execute_command) 48174 if (!ramdisk_execute_command)
49633 ramdisk_execute_command = "/init"; 48175 ramdisk_execute_command = "/init";
49634 48176
@@ -49643,10 +48185,10 @@ diff -urNp linux-2.6.32.24/init/main.c linux-2.6.32.24/init/main.c
49643 /* 48185 /*
49644 * Ok, we have completed the initial bootup, and 48186 * Ok, we have completed the initial bootup, and
49645 * we're essentially up and running. Get rid of the 48187 * we're essentially up and running. Get rid of the
49646diff -urNp linux-2.6.32.24/init/noinitramfs.c linux-2.6.32.24/init/noinitramfs.c 48188diff -urNp linux-2.6.35.7/init/noinitramfs.c linux-2.6.35.7/init/noinitramfs.c
49647--- linux-2.6.32.24/init/noinitramfs.c 2010-08-13 16:24:37.000000000 -0400 48189--- linux-2.6.35.7/init/noinitramfs.c 2010-08-26 19:47:12.000000000 -0400
49648+++ linux-2.6.32.24/init/noinitramfs.c 2010-10-23 19:59:20.000000000 -0400 48190+++ linux-2.6.35.7/init/noinitramfs.c 2010-09-17 20:12:09.000000000 -0400
49649@@ -29,7 +29,7 @@ static int __init default_rootfs(void) 48191@@ -29,17 +29,17 @@ static int __init default_rootfs(void)
49650 { 48192 {
49651 int err; 48193 int err;
49652 48194
@@ -49655,7 +48197,10 @@ diff -urNp linux-2.6.32.24/init/noinitramfs.c linux-2.6.32.24/init/noinitramfs.c
49655 if (err < 0) 48197 if (err < 0)
49656 goto out; 48198 goto out;
49657 48199
49658@@ -39,7 +39,7 @@ static int __init default_rootfs(void) 48200- err = sys_mknod((const char __user *) "/dev/console",
48201+ err = sys_mknod((__force const char __user *) "/dev/console",
48202 S_IFCHR | S_IRUSR | S_IWUSR,
48203 new_encode_dev(MKDEV(5, 1)));
49659 if (err < 0) 48204 if (err < 0)
49660 goto out; 48205 goto out;
49661 48206
@@ -49664,10 +48209,10 @@ diff -urNp linux-2.6.32.24/init/noinitramfs.c linux-2.6.32.24/init/noinitramfs.c
49664 if (err < 0) 48209 if (err < 0)
49665 goto out; 48210 goto out;
49666 48211
49667diff -urNp linux-2.6.32.24/ipc/compat.c linux-2.6.32.24/ipc/compat.c 48212diff -urNp linux-2.6.35.7/ipc/compat.c linux-2.6.35.7/ipc/compat.c
49668--- linux-2.6.32.24/ipc/compat.c 2010-08-13 16:24:37.000000000 -0400 48213--- linux-2.6.35.7/ipc/compat.c 2010-08-26 19:47:12.000000000 -0400
49669+++ linux-2.6.32.24/ipc/compat.c 2010-10-23 19:59:20.000000000 -0400 48214+++ linux-2.6.35.7/ipc/compat.c 2010-10-10 16:03:15.000000000 -0400
49670@@ -242,6 +242,8 @@ long compat_sys_semctl(int first, int se 48215@@ -241,6 +241,8 @@ long compat_sys_semctl(int first, int se
49671 struct semid64_ds __user *up64; 48216 struct semid64_ds __user *up64;
49672 int version = compat_ipc_parse_version(&third); 48217 int version = compat_ipc_parse_version(&third);
49673 48218
@@ -49676,7 +48221,7 @@ diff -urNp linux-2.6.32.24/ipc/compat.c linux-2.6.32.24/ipc/compat.c
49676 if (!uptr) 48221 if (!uptr)
49677 return -EINVAL; 48222 return -EINVAL;
49678 if (get_user(pad, (u32 __user *) uptr)) 48223 if (get_user(pad, (u32 __user *) uptr))
49679@@ -422,6 +424,8 @@ long compat_sys_msgctl(int first, int se 48224@@ -421,6 +423,8 @@ long compat_sys_msgctl(int first, int se
49680 int version = compat_ipc_parse_version(&second); 48225 int version = compat_ipc_parse_version(&second);
49681 void __user *p; 48226 void __user *p;
49682 48227
@@ -49685,7 +48230,7 @@ diff -urNp linux-2.6.32.24/ipc/compat.c linux-2.6.32.24/ipc/compat.c
49685 switch (second & (~IPC_64)) { 48230 switch (second & (~IPC_64)) {
49686 case IPC_INFO: 48231 case IPC_INFO:
49687 case IPC_RMID: 48232 case IPC_RMID:
49688@@ -595,6 +599,8 @@ long compat_sys_shmctl(int first, int se 48233@@ -594,6 +598,8 @@ long compat_sys_shmctl(int first, int se
49689 int err, err2; 48234 int err, err2;
49690 int version = compat_ipc_parse_version(&second); 48235 int version = compat_ipc_parse_version(&second);
49691 48236
@@ -49694,9 +48239,9 @@ diff -urNp linux-2.6.32.24/ipc/compat.c linux-2.6.32.24/ipc/compat.c
49694 switch (second & (~IPC_64)) { 48239 switch (second & (~IPC_64)) {
49695 case IPC_RMID: 48240 case IPC_RMID:
49696 case SHM_LOCK: 48241 case SHM_LOCK:
49697diff -urNp linux-2.6.32.24/ipc/compat_mq.c linux-2.6.32.24/ipc/compat_mq.c 48242diff -urNp linux-2.6.35.7/ipc/compat_mq.c linux-2.6.35.7/ipc/compat_mq.c
49698--- linux-2.6.32.24/ipc/compat_mq.c 2010-08-13 16:24:37.000000000 -0400 48243--- linux-2.6.35.7/ipc/compat_mq.c 2010-08-26 19:47:12.000000000 -0400
49699+++ linux-2.6.32.24/ipc/compat_mq.c 2010-10-23 19:59:20.000000000 -0400 48244+++ linux-2.6.35.7/ipc/compat_mq.c 2010-10-10 16:04:10.000000000 -0400
49700@@ -53,6 +53,9 @@ asmlinkage long compat_sys_mq_open(const 48245@@ -53,6 +53,9 @@ asmlinkage long compat_sys_mq_open(const
49701 void __user *p = NULL; 48246 void __user *p = NULL;
49702 if (u_attr && oflag & O_CREAT) { 48247 if (u_attr && oflag & O_CREAT) {
@@ -49716,31 +48261,10 @@ diff -urNp linux-2.6.32.24/ipc/compat_mq.c linux-2.6.32.24/ipc/compat_mq.c
49716 if (u_mqstat) { 48261 if (u_mqstat) {
49717 if (get_compat_mq_attr(&mqstat, u_mqstat) || 48262 if (get_compat_mq_attr(&mqstat, u_mqstat) ||
49718 copy_to_user(p, &mqstat, sizeof(mqstat))) 48263 copy_to_user(p, &mqstat, sizeof(mqstat)))
49719diff -urNp linux-2.6.32.24/ipc/ipc_sysctl.c linux-2.6.32.24/ipc/ipc_sysctl.c 48264diff -urNp linux-2.6.35.7/ipc/mqueue.c linux-2.6.35.7/ipc/mqueue.c
49720--- linux-2.6.32.24/ipc/ipc_sysctl.c 2010-08-13 16:24:37.000000000 -0400 48265--- linux-2.6.35.7/ipc/mqueue.c 2010-08-26 19:47:12.000000000 -0400
49721+++ linux-2.6.32.24/ipc/ipc_sysctl.c 2010-10-23 19:59:20.000000000 -0400 48266+++ linux-2.6.35.7/ipc/mqueue.c 2010-09-17 20:12:37.000000000 -0400
49722@@ -267,7 +267,7 @@ static struct ctl_table ipc_kern_table[] 48267@@ -153,6 +153,7 @@ static struct inode *mqueue_get_inode(st
49723 .extra1 = &zero,
49724 .extra2 = &one,
49725 },
49726- {}
49727+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
49728 };
49729
49730 static struct ctl_table ipc_root_table[] = {
49731@@ -277,7 +277,7 @@ static struct ctl_table ipc_root_table[]
49732 .mode = 0555,
49733 .child = ipc_kern_table,
49734 },
49735- {}
49736+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
49737 };
49738
49739 static int __init ipc_sysctl_init(void)
49740diff -urNp linux-2.6.32.24/ipc/mqueue.c linux-2.6.32.24/ipc/mqueue.c
49741--- linux-2.6.32.24/ipc/mqueue.c 2010-08-13 16:24:37.000000000 -0400
49742+++ linux-2.6.32.24/ipc/mqueue.c 2010-10-23 19:59:20.000000000 -0400
49743@@ -150,6 +150,7 @@ static struct inode *mqueue_get_inode(st
49744 mq_bytes = (mq_msg_tblsz + 48268 mq_bytes = (mq_msg_tblsz +
49745 (info->attr.mq_maxmsg * info->attr.mq_msgsize)); 48269 (info->attr.mq_maxmsg * info->attr.mq_msgsize));
49746 48270
@@ -49748,10 +48272,10 @@ diff -urNp linux-2.6.32.24/ipc/mqueue.c linux-2.6.32.24/ipc/mqueue.c
49748 spin_lock(&mq_lock); 48272 spin_lock(&mq_lock);
49749 if (u->mq_bytes + mq_bytes < u->mq_bytes || 48273 if (u->mq_bytes + mq_bytes < u->mq_bytes ||
49750 u->mq_bytes + mq_bytes > 48274 u->mq_bytes + mq_bytes >
49751diff -urNp linux-2.6.32.24/ipc/sem.c linux-2.6.32.24/ipc/sem.c 48275diff -urNp linux-2.6.35.7/ipc/sem.c linux-2.6.35.7/ipc/sem.c
49752--- linux-2.6.32.24/ipc/sem.c 2010-08-13 16:24:37.000000000 -0400 48276--- linux-2.6.35.7/ipc/sem.c 2010-08-26 19:47:12.000000000 -0400
49753+++ linux-2.6.32.24/ipc/sem.c 2010-10-23 19:59:20.000000000 -0400 48277+++ linux-2.6.35.7/ipc/sem.c 2010-09-28 18:50:22.000000000 -0400
49754@@ -560,6 +560,8 @@ static unsigned long copy_semid_to_user( 48278@@ -743,6 +743,8 @@ static unsigned long copy_semid_to_user(
49755 { 48279 {
49756 struct semid_ds out; 48280 struct semid_ds out;
49757 48281
@@ -49760,10 +48284,10 @@ diff -urNp linux-2.6.32.24/ipc/sem.c linux-2.6.32.24/ipc/sem.c
49760 ipc64_perm_to_ipc_perm(&in->sem_perm, &out.sem_perm); 48284 ipc64_perm_to_ipc_perm(&in->sem_perm, &out.sem_perm);
49761 48285
49762 out.sem_otime = in->sem_otime; 48286 out.sem_otime = in->sem_otime;
49763diff -urNp linux-2.6.32.24/ipc/shm.c linux-2.6.32.24/ipc/shm.c 48287diff -urNp linux-2.6.35.7/ipc/shm.c linux-2.6.35.7/ipc/shm.c
49764--- linux-2.6.32.24/ipc/shm.c 2010-08-13 16:24:37.000000000 -0400 48288--- linux-2.6.35.7/ipc/shm.c 2010-08-26 19:47:12.000000000 -0400
49765+++ linux-2.6.32.24/ipc/shm.c 2010-10-23 19:59:20.000000000 -0400 48289+++ linux-2.6.35.7/ipc/shm.c 2010-10-10 16:01:41.000000000 -0400
49766@@ -70,6 +70,14 @@ static void shm_destroy (struct ipc_name 48290@@ -69,6 +69,14 @@ static void shm_destroy (struct ipc_name
49767 static int sysvipc_shm_proc_show(struct seq_file *s, void *it); 48291 static int sysvipc_shm_proc_show(struct seq_file *s, void *it);
49768 #endif 48292 #endif
49769 48293
@@ -49778,7 +48302,7 @@ diff -urNp linux-2.6.32.24/ipc/shm.c linux-2.6.32.24/ipc/shm.c
49778 void shm_init_ns(struct ipc_namespace *ns) 48302 void shm_init_ns(struct ipc_namespace *ns)
49779 { 48303 {
49780 ns->shm_ctlmax = SHMMAX; 48304 ns->shm_ctlmax = SHMMAX;
49781@@ -396,6 +404,14 @@ static int newseg(struct ipc_namespace * 48305@@ -395,6 +403,14 @@ static int newseg(struct ipc_namespace *
49782 shp->shm_lprid = 0; 48306 shp->shm_lprid = 0;
49783 shp->shm_atim = shp->shm_dtim = 0; 48307 shp->shm_atim = shp->shm_dtim = 0;
49784 shp->shm_ctim = get_seconds(); 48308 shp->shm_ctim = get_seconds();
@@ -49793,7 +48317,7 @@ diff -urNp linux-2.6.32.24/ipc/shm.c linux-2.6.32.24/ipc/shm.c
49793 shp->shm_segsz = size; 48317 shp->shm_segsz = size;
49794 shp->shm_nattch = 0; 48318 shp->shm_nattch = 0;
49795 shp->shm_file = file; 48319 shp->shm_file = file;
49796@@ -474,6 +490,8 @@ static inline unsigned long copy_shmid_t 48320@@ -473,6 +489,8 @@ static inline unsigned long copy_shmid_t
49797 { 48321 {
49798 struct shmid_ds out; 48322 struct shmid_ds out;
49799 48323
@@ -49802,7 +48326,7 @@ diff -urNp linux-2.6.32.24/ipc/shm.c linux-2.6.32.24/ipc/shm.c
49802 ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm); 48326 ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm);
49803 out.shm_segsz = in->shm_segsz; 48327 out.shm_segsz = in->shm_segsz;
49804 out.shm_atime = in->shm_atime; 48328 out.shm_atime = in->shm_atime;
49805@@ -879,9 +897,21 @@ long do_shmat(int shmid, char __user *sh 48329@@ -877,9 +895,21 @@ long do_shmat(int shmid, char __user *sh
49806 if (err) 48330 if (err)
49807 goto out_unlock; 48331 goto out_unlock;
49808 48332
@@ -49815,8 +48339,8 @@ diff -urNp linux-2.6.32.24/ipc/shm.c linux-2.6.32.24/ipc/shm.c
49815+ } 48339+ }
49816+#endif 48340+#endif
49817+ 48341+
49818 path.dentry = dget(shp->shm_file->f_path.dentry); 48342 path = shp->shm_file->f_path;
49819 path.mnt = shp->shm_file->f_path.mnt; 48343 path_get(&path);
49820 shp->shm_nattch++; 48344 shp->shm_nattch++;
49821+#ifdef CONFIG_GRKERNSEC 48345+#ifdef CONFIG_GRKERNSEC
49822+ shp->shm_lapid = current->pid; 48346+ shp->shm_lapid = current->pid;
@@ -49824,10 +48348,10 @@ diff -urNp linux-2.6.32.24/ipc/shm.c linux-2.6.32.24/ipc/shm.c
49824 size = i_size_read(path.dentry->d_inode); 48348 size = i_size_read(path.dentry->d_inode);
49825 shm_unlock(shp); 48349 shm_unlock(shp);
49826 48350
49827diff -urNp linux-2.6.32.24/kernel/acct.c linux-2.6.32.24/kernel/acct.c 48351diff -urNp linux-2.6.35.7/kernel/acct.c linux-2.6.35.7/kernel/acct.c
49828--- linux-2.6.32.24/kernel/acct.c 2010-08-13 16:24:37.000000000 -0400 48352--- linux-2.6.35.7/kernel/acct.c 2010-08-26 19:47:12.000000000 -0400
49829+++ linux-2.6.32.24/kernel/acct.c 2010-10-23 19:59:20.000000000 -0400 48353+++ linux-2.6.35.7/kernel/acct.c 2010-09-17 20:12:09.000000000 -0400
49830@@ -579,7 +579,7 @@ static void do_acct_process(struct bsd_a 48354@@ -570,7 +570,7 @@ static void do_acct_process(struct bsd_a
49831 */ 48355 */
49832 flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur; 48356 flim = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
49833 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; 48357 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
@@ -49836,35 +48360,56 @@ diff -urNp linux-2.6.32.24/kernel/acct.c linux-2.6.32.24/kernel/acct.c
49836 sizeof(acct_t), &file->f_pos); 48360 sizeof(acct_t), &file->f_pos);
49837 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; 48361 current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim;
49838 set_fs(fs); 48362 set_fs(fs);
49839diff -urNp linux-2.6.32.24/kernel/capability.c linux-2.6.32.24/kernel/capability.c 48363diff -urNp linux-2.6.35.7/kernel/capability.c linux-2.6.35.7/kernel/capability.c
49840--- linux-2.6.32.24/kernel/capability.c 2010-08-13 16:24:37.000000000 -0400 48364--- linux-2.6.35.7/kernel/capability.c 2010-08-26 19:47:12.000000000 -0400
49841+++ linux-2.6.32.24/kernel/capability.c 2010-10-23 19:59:20.000000000 -0400 48365+++ linux-2.6.35.7/kernel/capability.c 2010-09-17 20:12:37.000000000 -0400
49842@@ -306,10 +306,21 @@ int capable(int cap) 48366@@ -205,6 +205,9 @@ SYSCALL_DEFINE2(capget, cap_user_header_
48367 * before modification is attempted and the application
48368 * fails.
48369 */
48370+ if (tocopy > ARRAY_SIZE(kdata))
48371+ return -EFAULT;
48372+
48373 if (copy_to_user(dataptr, kdata, tocopy
48374 * sizeof(struct __user_cap_data_struct))) {
48375 return -EFAULT;
48376@@ -306,10 +309,21 @@ int capable(int cap)
49843 BUG(); 48377 BUG();
49844 } 48378 }
49845 48379
49846- if (security_capable(cap) == 0) { 48380- if (security_capable(cap) == 0) {
49847+ if (security_capable(cap) == 0 && gr_is_capable(cap)) { 48381+ if (security_capable(cap) == 0 && gr_is_capable(cap)) {
49848 current->flags |= PF_SUPERPRIV;
49849 return 1;
49850 }
49851 return 0;
49852 }
49853+
49854+int capable_nolog(int cap)
49855+{
49856+ if (security_capable(cap) == 0 && gr_is_capable_nolog(cap)) {
49857+ current->flags |= PF_SUPERPRIV; 48382+ current->flags |= PF_SUPERPRIV;
49858+ return 1; 48383+ return 1;
49859+ } 48384+ }
49860+ return 0; 48385+ return 0;
49861+} 48386+}
49862+ 48387+
48388+int capable_nolog(int cap)
48389+{
48390+ if (security_capable(cap) == 0 && gr_is_capable_nolog(cap)) {
48391 current->flags |= PF_SUPERPRIV;
48392 return 1;
48393 }
48394 return 0;
48395 }
48396+
49863 EXPORT_SYMBOL(capable); 48397 EXPORT_SYMBOL(capable);
49864+EXPORT_SYMBOL(capable_nolog); 48398+EXPORT_SYMBOL(capable_nolog);
49865diff -urNp linux-2.6.32.24/kernel/configs.c linux-2.6.32.24/kernel/configs.c 48399diff -urNp linux-2.6.35.7/kernel/compat.c linux-2.6.35.7/kernel/compat.c
49866--- linux-2.6.32.24/kernel/configs.c 2010-08-13 16:24:37.000000000 -0400 48400--- linux-2.6.35.7/kernel/compat.c 2010-09-20 17:33:09.000000000 -0400
49867+++ linux-2.6.32.24/kernel/configs.c 2010-10-23 19:59:20.000000000 -0400 48401+++ linux-2.6.35.7/kernel/compat.c 2010-09-17 20:12:37.000000000 -0400
48402@@ -13,6 +13,7 @@
48403
48404 #include <linux/linkage.h>
48405 #include <linux/compat.h>
48406+#include <linux/module.h>
48407 #include <linux/errno.h>
48408 #include <linux/time.h>
48409 #include <linux/signal.h>
48410diff -urNp linux-2.6.35.7/kernel/configs.c linux-2.6.35.7/kernel/configs.c
48411--- linux-2.6.35.7/kernel/configs.c 2010-08-26 19:47:12.000000000 -0400
48412+++ linux-2.6.35.7/kernel/configs.c 2010-09-17 20:12:37.000000000 -0400
49868@@ -73,8 +73,19 @@ static int __init ikconfig_init(void) 48413@@ -73,8 +73,19 @@ static int __init ikconfig_init(void)
49869 struct proc_dir_entry *entry; 48414 struct proc_dir_entry *entry;
49870 48415
@@ -49885,22 +48430,10 @@ diff -urNp linux-2.6.32.24/kernel/configs.c linux-2.6.32.24/kernel/configs.c
49885 if (!entry) 48430 if (!entry)
49886 return -ENOMEM; 48431 return -ENOMEM;
49887 48432
49888diff -urNp linux-2.6.32.24/kernel/cpu.c linux-2.6.32.24/kernel/cpu.c 48433diff -urNp linux-2.6.35.7/kernel/cred.c linux-2.6.35.7/kernel/cred.c
49889--- linux-2.6.32.24/kernel/cpu.c 2010-09-20 17:26:42.000000000 -0400 48434--- linux-2.6.35.7/kernel/cred.c 2010-08-26 19:47:12.000000000 -0400
49890+++ linux-2.6.32.24/kernel/cpu.c 2010-10-23 19:59:20.000000000 -0400 48435+++ linux-2.6.35.7/kernel/cred.c 2010-09-17 20:12:37.000000000 -0400
49891@@ -19,7 +19,7 @@ 48436@@ -489,6 +489,8 @@ int commit_creds(struct cred *new)
49892 /* Serializes the updates to cpu_online_mask, cpu_present_mask */
49893 static DEFINE_MUTEX(cpu_add_remove_lock);
49894
49895-static __cpuinitdata RAW_NOTIFIER_HEAD(cpu_chain);
49896+static RAW_NOTIFIER_HEAD(cpu_chain);
49897
49898 /* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
49899 * Should always be manipulated under cpu_add_remove_lock
49900diff -urNp linux-2.6.32.24/kernel/cred.c linux-2.6.32.24/kernel/cred.c
49901--- linux-2.6.32.24/kernel/cred.c 2010-08-13 16:24:37.000000000 -0400
49902+++ linux-2.6.32.24/kernel/cred.c 2010-10-23 19:59:20.000000000 -0400
49903@@ -520,6 +520,8 @@ int commit_creds(struct cred *new)
49904 48437
49905 get_cred(new); /* we will require a ref for the subj creds too */ 48438 get_cred(new); /* we will require a ref for the subj creds too */
49906 48439
@@ -49909,12 +48442,63 @@ diff -urNp linux-2.6.32.24/kernel/cred.c linux-2.6.32.24/kernel/cred.c
49909 /* dumpability changes */ 48442 /* dumpability changes */
49910 if (old->euid != new->euid || 48443 if (old->euid != new->euid ||
49911 old->egid != new->egid || 48444 old->egid != new->egid ||
49912diff -urNp linux-2.6.32.24/kernel/exit.c linux-2.6.32.24/kernel/exit.c 48445diff -urNp linux-2.6.35.7/kernel/debug/debug_core.c linux-2.6.35.7/kernel/debug/debug_core.c
49913--- linux-2.6.32.24/kernel/exit.c 2010-09-26 17:26:05.000000000 -0400 48446--- linux-2.6.35.7/kernel/debug/debug_core.c 2010-08-26 19:47:12.000000000 -0400
49914+++ linux-2.6.32.24/kernel/exit.c 2010-10-23 19:59:20.000000000 -0400 48447+++ linux-2.6.35.7/kernel/debug/debug_core.c 2010-09-17 20:12:09.000000000 -0400
48448@@ -71,7 +71,7 @@ int kgdb_io_module_registered;
48449 /* Guard for recursive entry */
48450 static int exception_level;
48451
48452-struct kgdb_io *dbg_io_ops;
48453+const struct kgdb_io *dbg_io_ops;
48454 static DEFINE_SPINLOCK(kgdb_registration_lock);
48455
48456 /* kgdb console driver is loaded */
48457@@ -871,7 +871,7 @@ static void kgdb_initial_breakpoint(void
48458 *
48459 * Register it with the KGDB core.
48460 */
48461-int kgdb_register_io_module(struct kgdb_io *new_dbg_io_ops)
48462+int kgdb_register_io_module(const struct kgdb_io *new_dbg_io_ops)
48463 {
48464 int err;
48465
48466@@ -916,7 +916,7 @@ EXPORT_SYMBOL_GPL(kgdb_register_io_modul
48467 *
48468 * Unregister it with the KGDB core.
48469 */
48470-void kgdb_unregister_io_module(struct kgdb_io *old_dbg_io_ops)
48471+void kgdb_unregister_io_module(const struct kgdb_io *old_dbg_io_ops)
48472 {
48473 BUG_ON(kgdb_connected);
48474
48475diff -urNp linux-2.6.35.7/kernel/debug/kdb/kdb_main.c linux-2.6.35.7/kernel/debug/kdb/kdb_main.c
48476--- linux-2.6.35.7/kernel/debug/kdb/kdb_main.c 2010-08-26 19:47:12.000000000 -0400
48477+++ linux-2.6.35.7/kernel/debug/kdb/kdb_main.c 2010-09-17 20:12:09.000000000 -0400
48478@@ -1872,7 +1872,7 @@ static int kdb_lsmod(int argc, const cha
48479 list_for_each_entry(mod, kdb_modules, list) {
48480
48481 kdb_printf("%-20s%8u 0x%p ", mod->name,
48482- mod->core_size, (void *)mod);
48483+ mod->core_size_rx + mod->core_size_rw, (void *)mod);
48484 #ifdef CONFIG_MODULE_UNLOAD
48485 kdb_printf("%4d ", module_refcount(mod));
48486 #endif
48487@@ -1882,7 +1882,7 @@ static int kdb_lsmod(int argc, const cha
48488 kdb_printf(" (Loading)");
48489 else
48490 kdb_printf(" (Live)");
48491- kdb_printf(" 0x%p", mod->module_core);
48492+ kdb_printf(" 0x%p 0x%p", mod->module_core_rx, mod->module_core_rw);
48493
48494 #ifdef CONFIG_MODULE_UNLOAD
48495 {
48496diff -urNp linux-2.6.35.7/kernel/exit.c linux-2.6.35.7/kernel/exit.c
48497--- linux-2.6.35.7/kernel/exit.c 2010-09-26 17:32:11.000000000 -0400
48498+++ linux-2.6.35.7/kernel/exit.c 2010-09-26 17:32:50.000000000 -0400
49915@@ -56,6 +56,10 @@ 48499@@ -56,6 +56,10 @@
48500 #include <asm/pgtable.h>
49916 #include <asm/mmu_context.h> 48501 #include <asm/mmu_context.h>
49917 #include "cred-internals.h"
49918 48502
49919+#ifdef CONFIG_GRKERNSEC 48503+#ifdef CONFIG_GRKERNSEC
49920+extern rwlock_t grsec_exec_file_lock; 48504+extern rwlock_t grsec_exec_file_lock;
@@ -49922,8 +48506,8 @@ diff -urNp linux-2.6.32.24/kernel/exit.c linux-2.6.32.24/kernel/exit.c
49922+ 48506+
49923 static void exit_mm(struct task_struct * tsk); 48507 static void exit_mm(struct task_struct * tsk);
49924 48508
49925 static void __unhash_process(struct task_struct *p) 48509 static void __unhash_process(struct task_struct *p, bool group_dead)
49926@@ -167,6 +171,8 @@ void release_task(struct task_struct * p 48510@@ -162,6 +166,8 @@ void release_task(struct task_struct * p
49927 struct task_struct *leader; 48511 struct task_struct *leader;
49928 int zap_leader; 48512 int zap_leader;
49929 repeat: 48513 repeat:
@@ -49931,8 +48515,8 @@ diff -urNp linux-2.6.32.24/kernel/exit.c linux-2.6.32.24/kernel/exit.c
49931+ 48515+
49932 tracehook_prepare_release_task(p); 48516 tracehook_prepare_release_task(p);
49933 /* don't need to get the RCU readlock here - the process is dead and 48517 /* don't need to get the RCU readlock here - the process is dead and
49934 * can't be modifying its own credentials */ 48518 * can't be modifying its own credentials. But shut RCU-lockdep up */
49935@@ -334,11 +340,22 @@ static void reparent_to_kthreadd(void) 48519@@ -331,11 +337,22 @@ static void reparent_to_kthreadd(void)
49936 { 48520 {
49937 write_lock_irq(&tasklist_lock); 48521 write_lock_irq(&tasklist_lock);
49938 48522
@@ -49955,7 +48539,7 @@ diff -urNp linux-2.6.32.24/kernel/exit.c linux-2.6.32.24/kernel/exit.c
49955 /* Set the exit signal to SIGCHLD so we signal init on exit */ 48539 /* Set the exit signal to SIGCHLD so we signal init on exit */
49956 current->exit_signal = SIGCHLD; 48540 current->exit_signal = SIGCHLD;
49957 48541
49958@@ -390,7 +407,7 @@ int allow_signal(int sig) 48542@@ -387,7 +404,7 @@ int allow_signal(int sig)
49959 * know it'll be handled, so that they don't get converted to 48543 * know it'll be handled, so that they don't get converted to
49960 * SIGKILL or just silently dropped. 48544 * SIGKILL or just silently dropped.
49961 */ 48545 */
@@ -49964,7 +48548,7 @@ diff -urNp linux-2.6.32.24/kernel/exit.c linux-2.6.32.24/kernel/exit.c
49964 recalc_sigpending(); 48548 recalc_sigpending();
49965 spin_unlock_irq(&current->sighand->siglock); 48549 spin_unlock_irq(&current->sighand->siglock);
49966 return 0; 48550 return 0;
49967@@ -426,6 +443,17 @@ void daemonize(const char *name, ...) 48551@@ -423,6 +440,17 @@ void daemonize(const char *name, ...)
49968 vsnprintf(current->comm, sizeof(current->comm), name, args); 48552 vsnprintf(current->comm, sizeof(current->comm), name, args);
49969 va_end(args); 48553 va_end(args);
49970 48554
@@ -49982,7 +48566,7 @@ diff -urNp linux-2.6.32.24/kernel/exit.c linux-2.6.32.24/kernel/exit.c
49982 /* 48566 /*
49983 * If we were started as result of loading a module, close all of the 48567 * If we were started as result of loading a module, close all of the
49984 * user space pages. We don't need them, and if we didn't close them 48568 * user space pages. We don't need them, and if we didn't close them
49985@@ -957,6 +985,9 @@ NORET_TYPE void do_exit(long code) 48569@@ -960,6 +988,9 @@ NORET_TYPE void do_exit(long code)
49986 tsk->exit_code = code; 48570 tsk->exit_code = code;
49987 taskstats_exit(tsk, group_dead); 48571 taskstats_exit(tsk, group_dead);
49988 48572
@@ -49992,19 +48576,10 @@ diff -urNp linux-2.6.32.24/kernel/exit.c linux-2.6.32.24/kernel/exit.c
49992 exit_mm(tsk); 48576 exit_mm(tsk);
49993 48577
49994 if (group_dead) 48578 if (group_dead)
49995@@ -1172,7 +1203,7 @@ static int wait_task_zombie(struct wait_ 48579diff -urNp linux-2.6.35.7/kernel/fork.c linux-2.6.35.7/kernel/fork.c
49996 48580--- linux-2.6.35.7/kernel/fork.c 2010-08-26 19:47:12.000000000 -0400
49997 if (unlikely(wo->wo_flags & WNOWAIT)) { 48581+++ linux-2.6.35.7/kernel/fork.c 2010-09-17 20:12:37.000000000 -0400
49998 int exit_code = p->exit_code; 48582@@ -276,7 +276,7 @@ static struct task_struct *dup_task_stru
49999- int why, status;
50000+ int why;
50001
50002 get_task_struct(p);
50003 read_unlock(&tasklist_lock);
50004diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50005--- linux-2.6.32.24/kernel/fork.c 2010-09-20 17:26:42.000000000 -0400
50006+++ linux-2.6.32.24/kernel/fork.c 2010-10-23 19:59:20.000000000 -0400
50007@@ -253,7 +253,7 @@ static struct task_struct *dup_task_stru
50008 *stackend = STACK_END_MAGIC; /* for overflow detection */ 48583 *stackend = STACK_END_MAGIC; /* for overflow detection */
50009 48584
50010 #ifdef CONFIG_CC_STACKPROTECTOR 48585 #ifdef CONFIG_CC_STACKPROTECTOR
@@ -50013,7 +48588,88 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50013 #endif 48588 #endif
50014 48589
50015 /* One for us, one for whoever does the "release_task()" (usually parent) */ 48590 /* One for us, one for whoever does the "release_task()" (usually parent) */
50016@@ -293,8 +293,8 @@ static int dup_mmap(struct mm_struct *mm 48591@@ -298,13 +298,78 @@ out:
48592 }
48593
48594 #ifdef CONFIG_MMU
48595+static struct vm_area_struct *dup_vma(struct mm_struct *mm, struct vm_area_struct *mpnt)
48596+{
48597+ struct vm_area_struct *tmp;
48598+ unsigned long charge;
48599+ struct mempolicy *pol;
48600+ struct file *file;
48601+
48602+ charge = 0;
48603+ if (mpnt->vm_flags & VM_ACCOUNT) {
48604+ unsigned int len = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
48605+ if (security_vm_enough_memory(len))
48606+ goto fail_nomem;
48607+ charge = len;
48608+ }
48609+ tmp = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
48610+ if (!tmp)
48611+ goto fail_nomem;
48612+ *tmp = *mpnt;
48613+ tmp->vm_mm = mm;
48614+ INIT_LIST_HEAD(&tmp->anon_vma_chain);
48615+ pol = mpol_dup(vma_policy(mpnt));
48616+ if (IS_ERR(pol))
48617+ goto fail_nomem_policy;
48618+ vma_set_policy(tmp, pol);
48619+ if (anon_vma_fork(tmp, mpnt))
48620+ goto fail_nomem_anon_vma_fork;
48621+ tmp->vm_flags &= ~VM_LOCKED;
48622+ tmp->vm_next = NULL;
48623+ tmp->vm_mirror = NULL;
48624+ file = tmp->vm_file;
48625+ if (file) {
48626+ struct inode *inode = file->f_path.dentry->d_inode;
48627+ struct address_space *mapping = file->f_mapping;
48628+
48629+ get_file(file);
48630+ if (tmp->vm_flags & VM_DENYWRITE)
48631+ atomic_dec(&inode->i_writecount);
48632+ spin_lock(&mapping->i_mmap_lock);
48633+ if (tmp->vm_flags & VM_SHARED)
48634+ mapping->i_mmap_writable++;
48635+ tmp->vm_truncate_count = mpnt->vm_truncate_count;
48636+ flush_dcache_mmap_lock(mapping);
48637+ /* insert tmp into the share list, just after mpnt */
48638+ vma_prio_tree_add(tmp, mpnt);
48639+ flush_dcache_mmap_unlock(mapping);
48640+ spin_unlock(&mapping->i_mmap_lock);
48641+ }
48642+
48643+ /*
48644+ * Clear hugetlb-related page reserves for children. This only
48645+ * affects MAP_PRIVATE mappings. Faults generated by the child
48646+ * are not guaranteed to succeed, even if read-only
48647+ */
48648+ if (is_vm_hugetlb_page(tmp))
48649+ reset_vma_resv_huge_pages(tmp);
48650+
48651+ return tmp;
48652+
48653+fail_nomem_anon_vma_fork:
48654+ mpol_put(pol);
48655+fail_nomem_policy:
48656+ kmem_cache_free(vm_area_cachep, tmp);
48657+fail_nomem:
48658+ vm_unacct_memory(charge);
48659+ return NULL;
48660+}
48661+
48662 static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
48663 {
48664 struct vm_area_struct *mpnt, *tmp, *prev, **pprev;
48665 struct rb_node **rb_link, *rb_parent;
48666 int retval;
48667- unsigned long charge;
48668- struct mempolicy *pol;
48669
48670 down_write(&oldmm->mmap_sem);
48671 flush_cache_dup_mm(oldmm);
48672@@ -316,8 +381,8 @@ static int dup_mmap(struct mm_struct *mm
50017 mm->locked_vm = 0; 48673 mm->locked_vm = 0;
50018 mm->mmap = NULL; 48674 mm->mmap = NULL;
50019 mm->mmap_cache = NULL; 48675 mm->mmap_cache = NULL;
@@ -50024,15 +48680,77 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50024 mm->map_count = 0; 48680 mm->map_count = 0;
50025 cpumask_clear(mm_cpumask(mm)); 48681 cpumask_clear(mm_cpumask(mm));
50026 mm->mm_rb = RB_ROOT; 48682 mm->mm_rb = RB_ROOT;
50027@@ -335,6 +335,7 @@ static int dup_mmap(struct mm_struct *mm 48683@@ -330,8 +395,6 @@ static int dup_mmap(struct mm_struct *mm
50028 tmp->vm_flags &= ~VM_LOCKED; 48684
50029 tmp->vm_mm = mm; 48685 prev = NULL;
50030 tmp->vm_next = tmp->vm_prev = NULL; 48686 for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
50031+ tmp->vm_mirror = NULL; 48687- struct file *file;
50032 anon_vma_link(tmp); 48688-
50033 file = tmp->vm_file; 48689 if (mpnt->vm_flags & VM_DONTCOPY) {
50034 if (file) { 48690 long pages = vma_pages(mpnt);
50035@@ -384,6 +385,31 @@ static int dup_mmap(struct mm_struct *mm 48691 mm->total_vm -= pages;
48692@@ -339,56 +402,13 @@ static int dup_mmap(struct mm_struct *mm
48693 -pages);
48694 continue;
48695 }
48696- charge = 0;
48697- if (mpnt->vm_flags & VM_ACCOUNT) {
48698- unsigned int len = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
48699- if (security_vm_enough_memory(len))
48700- goto fail_nomem;
48701- charge = len;
48702- }
48703- tmp = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
48704- if (!tmp)
48705- goto fail_nomem;
48706- *tmp = *mpnt;
48707- INIT_LIST_HEAD(&tmp->anon_vma_chain);
48708- pol = mpol_dup(vma_policy(mpnt));
48709- retval = PTR_ERR(pol);
48710- if (IS_ERR(pol))
48711- goto fail_nomem_policy;
48712- vma_set_policy(tmp, pol);
48713- if (anon_vma_fork(tmp, mpnt))
48714- goto fail_nomem_anon_vma_fork;
48715- tmp->vm_flags &= ~VM_LOCKED;
48716- tmp->vm_mm = mm;
48717- tmp->vm_next = tmp->vm_prev = NULL;
48718- file = tmp->vm_file;
48719- if (file) {
48720- struct inode *inode = file->f_path.dentry->d_inode;
48721- struct address_space *mapping = file->f_mapping;
48722-
48723- get_file(file);
48724- if (tmp->vm_flags & VM_DENYWRITE)
48725- atomic_dec(&inode->i_writecount);
48726- spin_lock(&mapping->i_mmap_lock);
48727- if (tmp->vm_flags & VM_SHARED)
48728- mapping->i_mmap_writable++;
48729- tmp->vm_truncate_count = mpnt->vm_truncate_count;
48730- flush_dcache_mmap_lock(mapping);
48731- /* insert tmp into the share list, just after mpnt */
48732- vma_prio_tree_add(tmp, mpnt);
48733- flush_dcache_mmap_unlock(mapping);
48734- spin_unlock(&mapping->i_mmap_lock);
48735+ tmp = dup_vma(mm, mpnt);
48736+ if (!tmp) {
48737+ retval = -ENOMEM;
48738+ goto out;
48739 }
48740
48741 /*
48742- * Clear hugetlb-related page reserves for children. This only
48743- * affects MAP_PRIVATE mappings. Faults generated by the child
48744- * are not guaranteed to succeed, even if read-only
48745- */
48746- if (is_vm_hugetlb_page(tmp))
48747- reset_vma_resv_huge_pages(tmp);
48748-
48749- /*
48750 * Link in the new vma and copy the page table entries.
48751 */
48752 *pprev = tmp;
48753@@ -409,6 +429,31 @@ static int dup_mmap(struct mm_struct *mm
50036 if (retval) 48754 if (retval)
50037 goto out; 48755 goto out;
50038 } 48756 }
@@ -50064,7 +48782,22 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50064 /* a new mm has just been created */ 48782 /* a new mm has just been created */
50065 arch_dup_mmap(oldmm, mm); 48783 arch_dup_mmap(oldmm, mm);
50066 retval = 0; 48784 retval = 0;
50067@@ -734,13 +760,14 @@ static int copy_fs(unsigned long clone_f 48785@@ -417,14 +462,6 @@ out:
48786 flush_tlb_mm(oldmm);
48787 up_write(&oldmm->mmap_sem);
48788 return retval;
48789-fail_nomem_anon_vma_fork:
48790- mpol_put(pol);
48791-fail_nomem_policy:
48792- kmem_cache_free(vm_area_cachep, tmp);
48793-fail_nomem:
48794- retval = -ENOMEM;
48795- vm_unacct_memory(charge);
48796- goto out;
48797 }
48798
48799 static inline int mm_alloc_pgd(struct mm_struct * mm)
48800@@ -760,13 +797,14 @@ static int copy_fs(unsigned long clone_f
50068 write_unlock(&fs->lock); 48801 write_unlock(&fs->lock);
50069 return -EAGAIN; 48802 return -EAGAIN;
50070 } 48803 }
@@ -50080,7 +48813,7 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50080 return 0; 48813 return 0;
50081 } 48814 }
50082 48815
50083@@ -1033,10 +1060,13 @@ static struct task_struct *copy_process( 48816@@ -1019,10 +1057,13 @@ static struct task_struct *copy_process(
50084 DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled); 48817 DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
50085 #endif 48818 #endif
50086 retval = -EAGAIN; 48819 retval = -EAGAIN;
@@ -50088,15 +48821,15 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50088+ gr_learn_resource(p, RLIMIT_NPROC, atomic_read(&p->real_cred->user->processes), 0); 48821+ gr_learn_resource(p, RLIMIT_NPROC, atomic_read(&p->real_cred->user->processes), 0);
50089+ 48822+
50090 if (atomic_read(&p->real_cred->user->processes) >= 48823 if (atomic_read(&p->real_cred->user->processes) >=
50091 p->signal->rlim[RLIMIT_NPROC].rlim_cur) { 48824 task_rlimit(p, RLIMIT_NPROC)) {
50092- if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) && 48825- if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) &&
50093- p->real_cred->user != INIT_USER) 48826- p->real_cred->user != INIT_USER)
50094+ if (p->real_cred->user != INIT_USER && 48827+ if (p->real_cred->user != INIT_USER &&
50095+ !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN)) 48828+ !capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE))
50096 goto bad_fork_free; 48829 goto bad_fork_free;
50097 } 48830 }
50098 48831
50099@@ -1183,6 +1213,8 @@ static struct task_struct *copy_process( 48832@@ -1176,6 +1217,8 @@ static struct task_struct *copy_process(
50100 goto bad_fork_free_pid; 48833 goto bad_fork_free_pid;
50101 } 48834 }
50102 48835
@@ -50105,7 +48838,7 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50105 p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL; 48838 p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;
50106 /* 48839 /*
50107 * Clear TID on mm_release()? 48840 * Clear TID on mm_release()?
50108@@ -1333,6 +1365,8 @@ bad_fork_cleanup_count: 48841@@ -1328,6 +1371,8 @@ bad_fork_cleanup_count:
50109 bad_fork_free: 48842 bad_fork_free:
50110 free_task(p); 48843 free_task(p);
50111 fork_out: 48844 fork_out:
@@ -50114,7 +48847,7 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50114 return ERR_PTR(retval); 48847 return ERR_PTR(retval);
50115 } 48848 }
50116 48849
50117@@ -1426,6 +1460,8 @@ long do_fork(unsigned long clone_flags, 48850@@ -1433,6 +1478,8 @@ long do_fork(unsigned long clone_flags,
50118 if (clone_flags & CLONE_PARENT_SETTID) 48851 if (clone_flags & CLONE_PARENT_SETTID)
50119 put_user(nr, parent_tidptr); 48852 put_user(nr, parent_tidptr);
50120 48853
@@ -50123,7 +48856,7 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50123 if (clone_flags & CLONE_VFORK) { 48856 if (clone_flags & CLONE_VFORK) {
50124 p->vfork_done = &vfork; 48857 p->vfork_done = &vfork;
50125 init_completion(&vfork); 48858 init_completion(&vfork);
50126@@ -1558,7 +1594,7 @@ static int unshare_fs(unsigned long unsh 48859@@ -1557,7 +1604,7 @@ static int unshare_fs(unsigned long unsh
50127 return 0; 48860 return 0;
50128 48861
50129 /* don't need lock here; in the worst case we'll do useless copy */ 48862 /* don't need lock here; in the worst case we'll do useless copy */
@@ -50132,7 +48865,7 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50132 return 0; 48865 return 0;
50133 48866
50134 *new_fsp = copy_fs_struct(fs); 48867 *new_fsp = copy_fs_struct(fs);
50135@@ -1681,7 +1717,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, 48868@@ -1680,7 +1727,8 @@ SYSCALL_DEFINE1(unshare, unsigned long,
50136 fs = current->fs; 48869 fs = current->fs;
50137 write_lock(&fs->lock); 48870 write_lock(&fs->lock);
50138 current->fs = new_fs; 48871 current->fs = new_fs;
@@ -50142,9 +48875,9 @@ diff -urNp linux-2.6.32.24/kernel/fork.c linux-2.6.32.24/kernel/fork.c
50142 new_fs = NULL; 48875 new_fs = NULL;
50143 else 48876 else
50144 new_fs = fs; 48877 new_fs = fs;
50145diff -urNp linux-2.6.32.24/kernel/futex.c linux-2.6.32.24/kernel/futex.c 48878diff -urNp linux-2.6.35.7/kernel/futex.c linux-2.6.35.7/kernel/futex.c
50146--- linux-2.6.32.24/kernel/futex.c 2010-08-13 16:24:37.000000000 -0400 48879--- linux-2.6.35.7/kernel/futex.c 2010-08-26 19:47:12.000000000 -0400
50147+++ linux-2.6.32.24/kernel/futex.c 2010-10-23 19:59:20.000000000 -0400 48880+++ linux-2.6.35.7/kernel/futex.c 2010-09-17 20:12:37.000000000 -0400
50148@@ -54,6 +54,7 @@ 48881@@ -54,6 +54,7 @@
50149 #include <linux/mount.h> 48882 #include <linux/mount.h>
50150 #include <linux/pagemap.h> 48883 #include <linux/pagemap.h>
@@ -50210,9 +48943,9 @@ diff -urNp linux-2.6.32.24/kernel/futex.c linux-2.6.32.24/kernel/futex.c
50210 { 48943 {
50211 unsigned long uentry; 48944 unsigned long uentry;
50212 48945
50213diff -urNp linux-2.6.32.24/kernel/futex_compat.c linux-2.6.32.24/kernel/futex_compat.c 48946diff -urNp linux-2.6.35.7/kernel/futex_compat.c linux-2.6.35.7/kernel/futex_compat.c
50214--- linux-2.6.32.24/kernel/futex_compat.c 2010-08-13 16:24:37.000000000 -0400 48947--- linux-2.6.35.7/kernel/futex_compat.c 2010-08-26 19:47:12.000000000 -0400
50215+++ linux-2.6.32.24/kernel/futex_compat.c 2010-10-23 19:59:20.000000000 -0400 48948+++ linux-2.6.35.7/kernel/futex_compat.c 2010-09-17 20:12:37.000000000 -0400
50216@@ -10,6 +10,7 @@ 48949@@ -10,6 +10,7 @@
50217 #include <linux/compat.h> 48950 #include <linux/compat.h>
50218 #include <linux/nsproxy.h> 48951 #include <linux/nsproxy.h>
@@ -50248,11 +48981,11 @@ diff -urNp linux-2.6.32.24/kernel/futex_compat.c linux-2.6.32.24/kernel/futex_co
50248 goto err_unlock; 48981 goto err_unlock;
50249+#endif 48982+#endif
50250 head = p->compat_robust_list; 48983 head = p->compat_robust_list;
50251 read_unlock(&tasklist_lock); 48984 rcu_read_unlock();
50252 } 48985 }
50253diff -urNp linux-2.6.32.24/kernel/gcov/base.c linux-2.6.32.24/kernel/gcov/base.c 48986diff -urNp linux-2.6.35.7/kernel/gcov/base.c linux-2.6.35.7/kernel/gcov/base.c
50254--- linux-2.6.32.24/kernel/gcov/base.c 2010-08-13 16:24:37.000000000 -0400 48987--- linux-2.6.35.7/kernel/gcov/base.c 2010-08-26 19:47:12.000000000 -0400
50255+++ linux-2.6.32.24/kernel/gcov/base.c 2010-10-23 19:59:20.000000000 -0400 48988+++ linux-2.6.35.7/kernel/gcov/base.c 2010-09-17 20:12:09.000000000 -0400
50256@@ -102,11 +102,6 @@ void gcov_enable_events(void) 48989@@ -102,11 +102,6 @@ void gcov_enable_events(void)
50257 } 48990 }
50258 48991
@@ -50274,10 +49007,10 @@ diff -urNp linux-2.6.32.24/kernel/gcov/base.c linux-2.6.32.24/kernel/gcov/base.c
50274 if (prev) 49007 if (prev)
50275 prev->next = info->next; 49008 prev->next = info->next;
50276 else 49009 else
50277diff -urNp linux-2.6.32.24/kernel/hrtimer.c linux-2.6.32.24/kernel/hrtimer.c 49010diff -urNp linux-2.6.35.7/kernel/hrtimer.c linux-2.6.35.7/kernel/hrtimer.c
50278--- linux-2.6.32.24/kernel/hrtimer.c 2010-08-13 16:24:37.000000000 -0400 49011--- linux-2.6.35.7/kernel/hrtimer.c 2010-08-26 19:47:12.000000000 -0400
50279+++ linux-2.6.32.24/kernel/hrtimer.c 2010-10-23 19:59:20.000000000 -0400 49012+++ linux-2.6.35.7/kernel/hrtimer.c 2010-09-17 20:12:09.000000000 -0400
50280@@ -1382,7 +1382,7 @@ void hrtimer_peek_ahead_timers(void) 49013@@ -1398,7 +1398,7 @@ void hrtimer_peek_ahead_timers(void)
50281 local_irq_restore(flags); 49014 local_irq_restore(flags);
50282 } 49015 }
50283 49016
@@ -50286,9 +49019,9 @@ diff -urNp linux-2.6.32.24/kernel/hrtimer.c linux-2.6.32.24/kernel/hrtimer.c
50286 { 49019 {
50287 hrtimer_peek_ahead_timers(); 49020 hrtimer_peek_ahead_timers();
50288 } 49021 }
50289diff -urNp linux-2.6.32.24/kernel/kallsyms.c linux-2.6.32.24/kernel/kallsyms.c 49022diff -urNp linux-2.6.35.7/kernel/kallsyms.c linux-2.6.35.7/kernel/kallsyms.c
50290--- linux-2.6.32.24/kernel/kallsyms.c 2010-08-13 16:24:37.000000000 -0400 49023--- linux-2.6.35.7/kernel/kallsyms.c 2010-08-26 19:47:12.000000000 -0400
50291+++ linux-2.6.32.24/kernel/kallsyms.c 2010-10-23 19:59:20.000000000 -0400 49024+++ linux-2.6.35.7/kernel/kallsyms.c 2010-09-17 20:12:37.000000000 -0400
50292@@ -11,6 +11,9 @@ 49025@@ -11,6 +11,9 @@
50293 * Changed the compression method from stem compression to "table lookup" 49026 * Changed the compression method from stem compression to "table lookup"
50294 * compression (see scripts/kallsyms.c for a more complete description) 49027 * compression (see scripts/kallsyms.c for a more complete description)
@@ -50299,7 +49032,7 @@ diff -urNp linux-2.6.32.24/kernel/kallsyms.c linux-2.6.32.24/kernel/kallsyms.c
50299 #include <linux/kallsyms.h> 49032 #include <linux/kallsyms.h>
50300 #include <linux/module.h> 49033 #include <linux/module.h>
50301 #include <linux/init.h> 49034 #include <linux/init.h>
50302@@ -51,12 +54,33 @@ extern const unsigned long kallsyms_mark 49035@@ -53,12 +56,33 @@ extern const unsigned long kallsyms_mark
50303 49036
50304 static inline int is_kernel_inittext(unsigned long addr) 49037 static inline int is_kernel_inittext(unsigned long addr)
50305 { 49038 {
@@ -50333,7 +49066,7 @@ diff -urNp linux-2.6.32.24/kernel/kallsyms.c linux-2.6.32.24/kernel/kallsyms.c
50333 static inline int is_kernel_text(unsigned long addr) 49066 static inline int is_kernel_text(unsigned long addr)
50334 { 49067 {
50335 if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) || 49068 if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) ||
50336@@ -67,13 +91,28 @@ static inline int is_kernel_text(unsigne 49069@@ -69,13 +93,28 @@ static inline int is_kernel_text(unsigne
50337 49070
50338 static inline int is_kernel(unsigned long addr) 49071 static inline int is_kernel(unsigned long addr)
50339 { 49072 {
@@ -50362,7 +49095,7 @@ diff -urNp linux-2.6.32.24/kernel/kallsyms.c linux-2.6.32.24/kernel/kallsyms.c
50362 if (all_var) 49095 if (all_var)
50363 return is_kernel(addr); 49096 return is_kernel(addr);
50364 49097
50365@@ -413,7 +452,6 @@ static unsigned long get_ksymbol_core(st 49098@@ -416,7 +455,6 @@ static unsigned long get_ksymbol_core(st
50366 49099
50367 static void reset_iter(struct kallsym_iter *iter, loff_t new_pos) 49100 static void reset_iter(struct kallsym_iter *iter, loff_t new_pos)
50368 { 49101 {
@@ -50370,7 +49103,7 @@ diff -urNp linux-2.6.32.24/kernel/kallsyms.c linux-2.6.32.24/kernel/kallsyms.c
50370 iter->nameoff = get_symbol_offset(new_pos); 49103 iter->nameoff = get_symbol_offset(new_pos);
50371 iter->pos = new_pos; 49104 iter->pos = new_pos;
50372 } 49105 }
50373@@ -461,6 +499,11 @@ static int s_show(struct seq_file *m, vo 49106@@ -464,6 +502,11 @@ static int s_show(struct seq_file *m, vo
50374 { 49107 {
50375 struct kallsym_iter *iter = m->private; 49108 struct kallsym_iter *iter = m->private;
50376 49109
@@ -50382,7 +49115,7 @@ diff -urNp linux-2.6.32.24/kernel/kallsyms.c linux-2.6.32.24/kernel/kallsyms.c
50382 /* Some debugging symbols have no name. Ignore them. */ 49115 /* Some debugging symbols have no name. Ignore them. */
50383 if (!iter->name[0]) 49116 if (!iter->name[0])
50384 return 0; 49117 return 0;
50385@@ -501,7 +544,7 @@ static int kallsyms_open(struct inode *i 49118@@ -504,7 +547,7 @@ static int kallsyms_open(struct inode *i
50386 struct kallsym_iter *iter; 49119 struct kallsym_iter *iter;
50387 int ret; 49120 int ret;
50388 49121
@@ -50391,47 +49124,17 @@ diff -urNp linux-2.6.32.24/kernel/kallsyms.c linux-2.6.32.24/kernel/kallsyms.c
50391 if (!iter) 49124 if (!iter)
50392 return -ENOMEM; 49125 return -ENOMEM;
50393 reset_iter(iter, 0); 49126 reset_iter(iter, 0);
50394diff -urNp linux-2.6.32.24/kernel/kgdb.c linux-2.6.32.24/kernel/kgdb.c 49127diff -urNp linux-2.6.35.7/kernel/kmod.c linux-2.6.35.7/kernel/kmod.c
50395--- linux-2.6.32.24/kernel/kgdb.c 2010-08-13 16:24:37.000000000 -0400 49128--- linux-2.6.35.7/kernel/kmod.c 2010-08-26 19:47:12.000000000 -0400
50396+++ linux-2.6.32.24/kernel/kgdb.c 2010-10-23 19:59:20.000000000 -0400 49129+++ linux-2.6.35.7/kernel/kmod.c 2010-09-17 20:12:37.000000000 -0400
50397@@ -86,7 +86,7 @@ static int kgdb_io_module_registered;
50398 /* Guard for recursive entry */
50399 static int exception_level;
50400
50401-static struct kgdb_io *kgdb_io_ops;
50402+static const struct kgdb_io *kgdb_io_ops;
50403 static DEFINE_SPINLOCK(kgdb_registration_lock);
50404
50405 /* kgdb console driver is loaded */
50406@@ -1637,7 +1637,7 @@ static void kgdb_initial_breakpoint(void
50407 *
50408 * Register it with the KGDB core.
50409 */
50410-int kgdb_register_io_module(struct kgdb_io *new_kgdb_io_ops)
50411+int kgdb_register_io_module(const struct kgdb_io *new_kgdb_io_ops)
50412 {
50413 int err;
50414
50415@@ -1682,7 +1682,7 @@ EXPORT_SYMBOL_GPL(kgdb_register_io_modul
50416 *
50417 * Unregister it with the KGDB core.
50418 */
50419-void kgdb_unregister_io_module(struct kgdb_io *old_kgdb_io_ops)
50420+void kgdb_unregister_io_module(const struct kgdb_io *old_kgdb_io_ops)
50421 {
50422 BUG_ON(kgdb_connected);
50423
50424diff -urNp linux-2.6.32.24/kernel/kmod.c linux-2.6.32.24/kernel/kmod.c
50425--- linux-2.6.32.24/kernel/kmod.c 2010-08-13 16:24:37.000000000 -0400
50426+++ linux-2.6.32.24/kernel/kmod.c 2010-10-23 19:59:20.000000000 -0400
50427@@ -90,6 +90,18 @@ int __request_module(bool wait, const ch 49130@@ -90,6 +90,18 @@ int __request_module(bool wait, const ch
50428 if (ret >= MODULE_NAME_LEN) 49131 if (ret)
50429 return -ENAMETOOLONG; 49132 return ret;
50430 49133
50431+#ifdef CONFIG_GRKERNSEC_MODHARDEN 49134+#ifdef CONFIG_GRKERNSEC_MODHARDEN
50432+ /* we could do a tighter check here, but some distros 49135+ /* we could do a tighter check here, but some distros
50433+ are taking it upon themselves to remove CAP_SYS_MODULE 49136+ are taking it upon themselves to remove CAP_SYS_MODULE
50434+ from even root-running apps which cause modules to be 49137+ from even root-running apps which cause modules to be
50435+ auto-loaded 49138+ auto-loaded
50436+ */ 49139+ */
50437+ if (current_uid()) { 49140+ if (current_uid()) {
@@ -50443,9 +49146,9 @@ diff -urNp linux-2.6.32.24/kernel/kmod.c linux-2.6.32.24/kernel/kmod.c
50443 /* If modprobe needs a service that is in a module, we get a recursive 49146 /* If modprobe needs a service that is in a module, we get a recursive
50444 * loop. Limit the number of running kmod threads to max_threads/2 or 49147 * loop. Limit the number of running kmod threads to max_threads/2 or
50445 * MAX_KMOD_CONCURRENT, whichever is the smaller. A cleaner method 49148 * MAX_KMOD_CONCURRENT, whichever is the smaller. A cleaner method
50446diff -urNp linux-2.6.32.24/kernel/kprobes.c linux-2.6.32.24/kernel/kprobes.c 49149diff -urNp linux-2.6.35.7/kernel/kprobes.c linux-2.6.35.7/kernel/kprobes.c
50447--- linux-2.6.32.24/kernel/kprobes.c 2010-08-13 16:24:37.000000000 -0400 49150--- linux-2.6.35.7/kernel/kprobes.c 2010-08-26 19:47:12.000000000 -0400
50448+++ linux-2.6.32.24/kernel/kprobes.c 2010-10-23 19:59:20.000000000 -0400 49151+++ linux-2.6.35.7/kernel/kprobes.c 2010-09-17 20:12:09.000000000 -0400
50449@@ -183,7 +183,7 @@ static kprobe_opcode_t __kprobes *__get_ 49152@@ -183,7 +183,7 @@ static kprobe_opcode_t __kprobes *__get_
50450 * kernel image and loaded module images reside. This is required 49153 * kernel image and loaded module images reside. This is required
50451 * so x86_64 can correctly handle the %rip-relative fixups. 49154 * so x86_64 can correctly handle the %rip-relative fixups.
@@ -50455,16 +49158,16 @@ diff -urNp linux-2.6.32.24/kernel/kprobes.c linux-2.6.32.24/kernel/kprobes.c
50455 if (!kip->insns) { 49158 if (!kip->insns) {
50456 kfree(kip); 49159 kfree(kip);
50457 return NULL; 49160 return NULL;
50458@@ -220,7 +220,7 @@ static int __kprobes collect_one_slot(st 49161@@ -223,7 +223,7 @@ static int __kprobes collect_one_slot(st
50459 */ 49162 */
50460 if (!list_is_singular(&kprobe_insn_pages)) { 49163 if (!list_is_singular(&kip->list)) {
50461 list_del(&kip->list); 49164 list_del(&kip->list);
50462- module_free(NULL, kip->insns); 49165- module_free(NULL, kip->insns);
50463+ module_free_exec(NULL, kip->insns); 49166+ module_free_exec(NULL, kip->insns);
50464 kfree(kip); 49167 kfree(kip);
50465 } 49168 }
50466 return 1; 49169 return 1;
50467@@ -1189,7 +1189,7 @@ static int __init init_kprobes(void) 49170@@ -1709,7 +1709,7 @@ static int __init init_kprobes(void)
50468 { 49171 {
50469 int i, err = 0; 49172 int i, err = 0;
50470 unsigned long offset = 0, size = 0; 49173 unsigned long offset = 0, size = 0;
@@ -50473,7 +49176,7 @@ diff -urNp linux-2.6.32.24/kernel/kprobes.c linux-2.6.32.24/kernel/kprobes.c
50473 const char *symbol_name; 49176 const char *symbol_name;
50474 void *addr; 49177 void *addr;
50475 struct kprobe_blackpoint *kb; 49178 struct kprobe_blackpoint *kb;
50476@@ -1304,7 +1304,7 @@ static int __kprobes show_kprobe_addr(st 49179@@ -1835,7 +1835,7 @@ static int __kprobes show_kprobe_addr(st
50477 const char *sym = NULL; 49180 const char *sym = NULL;
50478 unsigned int i = *(loff_t *) v; 49181 unsigned int i = *(loff_t *) v;
50479 unsigned long offset = 0; 49182 unsigned long offset = 0;
@@ -50482,12 +49185,12 @@ diff -urNp linux-2.6.32.24/kernel/kprobes.c linux-2.6.32.24/kernel/kprobes.c
50482 49185
50483 head = &kprobe_table[i]; 49186 head = &kprobe_table[i];
50484 preempt_disable(); 49187 preempt_disable();
50485diff -urNp linux-2.6.32.24/kernel/lockdep.c linux-2.6.32.24/kernel/lockdep.c 49188diff -urNp linux-2.6.35.7/kernel/lockdep.c linux-2.6.35.7/kernel/lockdep.c
50486--- linux-2.6.32.24/kernel/lockdep.c 2010-08-13 16:24:37.000000000 -0400 49189--- linux-2.6.35.7/kernel/lockdep.c 2010-08-26 19:47:12.000000000 -0400
50487+++ linux-2.6.32.24/kernel/lockdep.c 2010-10-23 19:59:20.000000000 -0400 49190+++ linux-2.6.35.7/kernel/lockdep.c 2010-09-17 20:12:09.000000000 -0400
50488@@ -577,6 +577,10 @@ static int static_obj(void *obj) 49191@@ -571,6 +571,10 @@ static int static_obj(void *obj)
50489 int i; 49192 end = (unsigned long) &_end,
50490 #endif 49193 addr = (unsigned long) obj;
50491 49194
50492+#ifdef CONFIG_PAX_KERNEXEC 49195+#ifdef CONFIG_PAX_KERNEXEC
50493+ start = ktla_ktva(start); 49196+ start = ktla_ktva(start);
@@ -50496,17 +49199,7 @@ diff -urNp linux-2.6.32.24/kernel/lockdep.c linux-2.6.32.24/kernel/lockdep.c
50496 /* 49199 /*
50497 * static variable? 49200 * static variable?
50498 */ 49201 */
50499@@ -592,8 +596,7 @@ static int static_obj(void *obj) 49202@@ -696,6 +700,7 @@ register_lock_class(struct lockdep_map *
50500 */
50501 for_each_possible_cpu(i) {
50502 start = (unsigned long) &__per_cpu_start + per_cpu_offset(i);
50503- end = (unsigned long) &__per_cpu_start + PERCPU_ENOUGH_ROOM
50504- + per_cpu_offset(i);
50505+ end = start + PERCPU_ENOUGH_ROOM;
50506
50507 if ((addr >= start) && (addr < end))
50508 return 1;
50509@@ -710,6 +713,7 @@ register_lock_class(struct lockdep_map *
50510 if (!static_obj(lock->key)) { 49203 if (!static_obj(lock->key)) {
50511 debug_locks_off(); 49204 debug_locks_off();
50512 printk("INFO: trying to register non-static key.\n"); 49205 printk("INFO: trying to register non-static key.\n");
@@ -50514,9 +49207,9 @@ diff -urNp linux-2.6.32.24/kernel/lockdep.c linux-2.6.32.24/kernel/lockdep.c
50514 printk("the code is fine but needs lockdep annotation.\n"); 49207 printk("the code is fine but needs lockdep annotation.\n");
50515 printk("turning off the locking correctness validator.\n"); 49208 printk("turning off the locking correctness validator.\n");
50516 dump_stack(); 49209 dump_stack();
50517diff -urNp linux-2.6.32.24/kernel/lockdep_proc.c linux-2.6.32.24/kernel/lockdep_proc.c 49210diff -urNp linux-2.6.35.7/kernel/lockdep_proc.c linux-2.6.35.7/kernel/lockdep_proc.c
50518--- linux-2.6.32.24/kernel/lockdep_proc.c 2010-08-13 16:24:37.000000000 -0400 49211--- linux-2.6.35.7/kernel/lockdep_proc.c 2010-08-26 19:47:12.000000000 -0400
50519+++ linux-2.6.32.24/kernel/lockdep_proc.c 2010-10-23 19:59:20.000000000 -0400 49212+++ linux-2.6.35.7/kernel/lockdep_proc.c 2010-09-17 20:12:09.000000000 -0400
50520@@ -39,7 +39,7 @@ static void l_stop(struct seq_file *m, v 49213@@ -39,7 +39,7 @@ static void l_stop(struct seq_file *m, v
50521 49214
50522 static void print_name(struct seq_file *m, struct lock_class *class) 49215 static void print_name(struct seq_file *m, struct lock_class *class)
@@ -50526,20 +49219,20 @@ diff -urNp linux-2.6.32.24/kernel/lockdep_proc.c linux-2.6.32.24/kernel/lockdep_
50526 const char *name = class->name; 49219 const char *name = class->name;
50527 49220
50528 if (!name) { 49221 if (!name) {
50529diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c 49222diff -urNp linux-2.6.35.7/kernel/module.c linux-2.6.35.7/kernel/module.c
50530--- linux-2.6.32.24/kernel/module.c 2010-08-13 16:24:37.000000000 -0400 49223--- linux-2.6.35.7/kernel/module.c 2010-08-26 19:47:12.000000000 -0400
50531+++ linux-2.6.32.24/kernel/module.c 2010-10-23 19:59:20.000000000 -0400 49224+++ linux-2.6.35.7/kernel/module.c 2010-09-17 20:12:37.000000000 -0400
50532@@ -89,7 +89,8 @@ static DECLARE_WAIT_QUEUE_HEAD(module_wq 49225@@ -96,7 +96,8 @@ static BLOCKING_NOTIFIER_HEAD(module_not
50533 static BLOCKING_NOTIFIER_HEAD(module_notify_list);
50534 49226
50535 /* Bounds of module allocation, for speeding __module_address */ 49227 /* Bounds of module allocation, for speeding __module_address.
49228 * Protected by module_mutex. */
50536-static unsigned long module_addr_min = -1UL, module_addr_max = 0; 49229-static unsigned long module_addr_min = -1UL, module_addr_max = 0;
50537+static unsigned long module_addr_min_rw = -1UL, module_addr_max_rw = 0; 49230+static unsigned long module_addr_min_rw = -1UL, module_addr_max_rw = 0;
50538+static unsigned long module_addr_min_rx = -1UL, module_addr_max_rx = 0; 49231+static unsigned long module_addr_min_rx = -1UL, module_addr_max_rx = 0;
50539 49232
50540 int register_module_notifier(struct notifier_block * nb) 49233 int register_module_notifier(struct notifier_block * nb)
50541 { 49234 {
50542@@ -245,7 +246,7 @@ bool each_symbol(bool (*fn)(const struct 49235@@ -250,7 +251,7 @@ bool each_symbol(bool (*fn)(const struct
50543 return true; 49236 return true;
50544 49237
50545 list_for_each_entry_rcu(mod, &modules, list) { 49238 list_for_each_entry_rcu(mod, &modules, list) {
@@ -50548,7 +49241,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50548 { mod->syms, mod->syms + mod->num_syms, mod->crcs, 49241 { mod->syms, mod->syms + mod->num_syms, mod->crcs,
50549 NOT_GPL_ONLY, false }, 49242 NOT_GPL_ONLY, false },
50550 { mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms, 49243 { mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
50551@@ -267,7 +268,7 @@ bool each_symbol(bool (*fn)(const struct 49244@@ -272,7 +273,7 @@ bool each_symbol(bool (*fn)(const struct
50552 #endif 49245 #endif
50553 }; 49246 };
50554 49247
@@ -50557,16 +49250,16 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50557 return true; 49250 return true;
50558 } 49251 }
50559 return false; 49252 return false;
50560@@ -442,7 +443,7 @@ static void *percpu_modalloc(unsigned lo 49253@@ -383,7 +384,7 @@ static inline void __percpu *mod_percpu(
50561 void *ptr; 49254 static int percpu_modalloc(struct module *mod,
50562 int cpu; 49255 unsigned long size, unsigned long align)
50563 49256 {
50564- if (align > PAGE_SIZE) { 49257- if (align > PAGE_SIZE) {
50565+ if (align-1 >= PAGE_SIZE) { 49258+ if (align-1 >= PAGE_SIZE) {
50566 printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n", 49259 printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n",
50567 name, align, PAGE_SIZE); 49260 mod->name, align, PAGE_SIZE);
50568 align = PAGE_SIZE; 49261 align = PAGE_SIZE;
50569@@ -1545,7 +1546,8 @@ static void free_module(struct module *m 49262@@ -1562,7 +1563,8 @@ static void free_module(struct module *m
50570 destroy_params(mod->kp, mod->num_kp); 49263 destroy_params(mod->kp, mod->num_kp);
50571 49264
50572 /* This may be NULL, but that's OK */ 49265 /* This may be NULL, but that's OK */
@@ -50574,10 +49267,10 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50574+ module_free(mod, mod->module_init_rw); 49267+ module_free(mod, mod->module_init_rw);
50575+ module_free_exec(mod, mod->module_init_rx); 49268+ module_free_exec(mod, mod->module_init_rx);
50576 kfree(mod->args); 49269 kfree(mod->args);
50577 if (mod->percpu) 49270 percpu_modfree(mod);
50578 percpu_modfree(mod->percpu); 49271 #if defined(CONFIG_MODULE_UNLOAD)
50579@@ -1554,10 +1556,12 @@ static void free_module(struct module *m 49272@@ -1570,10 +1572,12 @@ static void free_module(struct module *m
50580 percpu_modfree(mod->refptr); 49273 free_percpu(mod->refptr);
50581 #endif 49274 #endif
50582 /* Free lock-classes: */ 49275 /* Free lock-classes: */
50583- lockdep_free_key_range(mod->module_core, mod->core_size); 49276- lockdep_free_key_range(mod->module_core, mod->core_size);
@@ -50591,18 +49284,18 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50591 49284
50592 #ifdef CONFIG_MPU 49285 #ifdef CONFIG_MPU
50593 update_protections(current->mm); 49286 update_protections(current->mm);
50594@@ -1651,7 +1655,9 @@ static int simplify_symbols(Elf_Shdr *se 49287@@ -1670,7 +1674,9 @@ static int simplify_symbols(Elf_Shdr *se
50595 strtab + sym[i].st_name, mod); 49288 mod);
50596 /* Ok if resolved. */ 49289 /* Ok if resolved. */
50597 if (ksym) { 49290 if (ksym && !IS_ERR(ksym)) {
50598+ pax_open_kernel(); 49291+ pax_open_kernel();
50599 sym[i].st_value = ksym->value; 49292 sym[i].st_value = ksym->value;
50600+ pax_close_kernel(); 49293+ pax_close_kernel();
50601 break; 49294 break;
50602 } 49295 }
50603 49296
50604@@ -1670,7 +1676,9 @@ static int simplify_symbols(Elf_Shdr *se 49297@@ -1690,7 +1696,9 @@ static int simplify_symbols(Elf_Shdr *se
50605 secbase = (unsigned long)mod->percpu; 49298 secbase = (unsigned long)mod_percpu(mod);
50606 else 49299 else
50607 secbase = sechdrs[sym[i].st_shndx].sh_addr; 49300 secbase = sechdrs[sym[i].st_shndx].sh_addr;
50608+ pax_open_kernel(); 49301+ pax_open_kernel();
@@ -50611,7 +49304,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50611 break; 49304 break;
50612 } 49305 }
50613 } 49306 }
50614@@ -1731,11 +1739,12 @@ static void layout_sections(struct modul 49307@@ -1751,11 +1759,12 @@ static void layout_sections(struct modul
50615 || s->sh_entsize != ~0UL 49308 || s->sh_entsize != ~0UL
50616 || strstarts(secstrings + s->sh_name, ".init")) 49309 || strstarts(secstrings + s->sh_name, ".init"))
50617 continue; 49310 continue;
@@ -50627,7 +49320,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50627 } 49320 }
50628 49321
50629 DEBUGP("Init section allocation order:\n"); 49322 DEBUGP("Init section allocation order:\n");
50630@@ -1748,12 +1757,13 @@ static void layout_sections(struct modul 49323@@ -1768,12 +1777,13 @@ static void layout_sections(struct modul
50631 || s->sh_entsize != ~0UL 49324 || s->sh_entsize != ~0UL
50632 || !strstarts(secstrings + s->sh_name, ".init")) 49325 || !strstarts(secstrings + s->sh_name, ".init"))
50633 continue; 49326 continue;
@@ -50645,7 +49338,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50645 } 49338 }
50646 } 49339 }
50647 49340
50648@@ -1857,9 +1867,8 @@ static int is_exported(const char *name, 49341@@ -1877,9 +1887,8 @@ static int is_exported(const char *name,
50649 49342
50650 /* As per nm */ 49343 /* As per nm */
50651 static char elf_type(const Elf_Sym *sym, 49344 static char elf_type(const Elf_Sym *sym,
@@ -50657,7 +49350,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50657 { 49350 {
50658 if (ELF_ST_BIND(sym->st_info) == STB_WEAK) { 49351 if (ELF_ST_BIND(sym->st_info) == STB_WEAK) {
50659 if (ELF_ST_TYPE(sym->st_info) == STT_OBJECT) 49352 if (ELF_ST_TYPE(sym->st_info) == STT_OBJECT)
50660@@ -1934,7 +1943,7 @@ static unsigned long layout_symtab(struc 49353@@ -1954,7 +1963,7 @@ static unsigned long layout_symtab(struc
50661 49354
50662 /* Put symbol section at end of init part of module. */ 49355 /* Put symbol section at end of init part of module. */
50663 symsect->sh_flags |= SHF_ALLOC; 49356 symsect->sh_flags |= SHF_ALLOC;
@@ -50666,7 +49359,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50666 symindex) | INIT_OFFSET_MASK; 49359 symindex) | INIT_OFFSET_MASK;
50667 DEBUGP("\t%s\n", secstrings + symsect->sh_name); 49360 DEBUGP("\t%s\n", secstrings + symsect->sh_name);
50668 49361
50669@@ -1951,19 +1960,19 @@ static unsigned long layout_symtab(struc 49362@@ -1971,19 +1980,19 @@ static unsigned long layout_symtab(struc
50670 } 49363 }
50671 49364
50672 /* Append room for core symbols at end of core part. */ 49365 /* Append room for core symbols at end of core part. */
@@ -50691,7 +49384,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50691 49384
50692 return symoffs; 49385 return symoffs;
50693 } 49386 }
50694@@ -1987,12 +1996,14 @@ static void add_kallsyms(struct module * 49387@@ -2007,12 +2016,14 @@ static void add_kallsyms(struct module *
50695 mod->num_symtab = sechdrs[symindex].sh_size / sizeof(Elf_Sym); 49388 mod->num_symtab = sechdrs[symindex].sh_size / sizeof(Elf_Sym);
50696 mod->strtab = (void *)sechdrs[strindex].sh_addr; 49389 mod->strtab = (void *)sechdrs[strindex].sh_addr;
50697 49390
@@ -50708,7 +49401,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50708 src = mod->symtab; 49401 src = mod->symtab;
50709 *dst = *src; 49402 *dst = *src;
50710 for (ndst = i = 1; i < mod->num_symtab; ++i, ++src) { 49403 for (ndst = i = 1; i < mod->num_symtab; ++i, ++src) {
50711@@ -2004,10 +2015,12 @@ static void add_kallsyms(struct module * 49404@@ -2024,10 +2035,12 @@ static void add_kallsyms(struct module *
50712 } 49405 }
50713 mod->core_num_syms = ndst; 49406 mod->core_num_syms = ndst;
50714 49407
@@ -50722,8 +49415,8 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50722 } 49415 }
50723 #else 49416 #else
50724 static inline unsigned long layout_symtab(struct module *mod, 49417 static inline unsigned long layout_symtab(struct module *mod,
50725@@ -2044,16 +2057,30 @@ static void dynamic_debug_setup(struct _ 49418@@ -2070,17 +2083,33 @@ static void dynamic_debug_remove(struct
50726 #endif 49419 ddebug_remove_module(debug->modname);
50727 } 49420 }
50728 49421
50729-static void *module_alloc_update_bounds(unsigned long size) 49422-static void *module_alloc_update_bounds(unsigned long size)
@@ -50732,6 +49425,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50732 void *ret = module_alloc(size); 49425 void *ret = module_alloc(size);
50733 49426
50734 if (ret) { 49427 if (ret) {
49428 mutex_lock(&module_mutex);
50735 /* Update module bounds. */ 49429 /* Update module bounds. */
50736- if ((unsigned long)ret < module_addr_min) 49430- if ((unsigned long)ret < module_addr_min)
50737- module_addr_min = (unsigned long)ret; 49431- module_addr_min = (unsigned long)ret;
@@ -50741,6 +49435,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50741+ module_addr_min_rw = (unsigned long)ret; 49435+ module_addr_min_rw = (unsigned long)ret;
50742+ if ((unsigned long)ret + size > module_addr_max_rw) 49436+ if ((unsigned long)ret + size > module_addr_max_rw)
50743+ module_addr_max_rw = (unsigned long)ret + size; 49437+ module_addr_max_rw = (unsigned long)ret + size;
49438+ mutex_unlock(&module_mutex);
50744+ } 49439+ }
50745+ return ret; 49440+ return ret;
50746+} 49441+}
@@ -50750,37 +49445,16 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50750+ void *ret = module_alloc_exec(size); 49445+ void *ret = module_alloc_exec(size);
50751+ 49446+
50752+ if (ret) { 49447+ if (ret) {
49448+ mutex_lock(&module_mutex);
50753+ /* Update module bounds. */ 49449+ /* Update module bounds. */
50754+ if ((unsigned long)ret < module_addr_min_rx) 49450+ if ((unsigned long)ret < module_addr_min_rx)
50755+ module_addr_min_rx = (unsigned long)ret; 49451+ module_addr_min_rx = (unsigned long)ret;
50756+ if ((unsigned long)ret + size > module_addr_max_rx) 49452+ if ((unsigned long)ret + size > module_addr_max_rx)
50757+ module_addr_max_rx = (unsigned long)ret + size; 49453+ module_addr_max_rx = (unsigned long)ret + size;
49454 mutex_unlock(&module_mutex);
50758 } 49455 }
50759 return ret; 49456 return ret;
50760 } 49457@@ -2284,7 +2313,7 @@ static noinline struct module *load_modu
50761@@ -2065,8 +2092,8 @@ static void kmemleak_load_module(struct
50762 unsigned int i;
50763
50764 /* only scan the sections containing data */
50765- kmemleak_scan_area(mod->module_core, (unsigned long)mod -
50766- (unsigned long)mod->module_core,
50767+ kmemleak_scan_area(mod->module_core_rw, (unsigned long)mod -
50768+ (unsigned long)mod->module_core_rw,
50769 sizeof(struct module), GFP_KERNEL);
50770
50771 for (i = 1; i < hdr->e_shnum; i++) {
50772@@ -2076,8 +2103,8 @@ static void kmemleak_load_module(struct
50773 && strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) != 0)
50774 continue;
50775
50776- kmemleak_scan_area(mod->module_core, sechdrs[i].sh_addr -
50777- (unsigned long)mod->module_core,
50778+ kmemleak_scan_area(mod->module_core_rw, sechdrs[i].sh_addr -
50779+ (unsigned long)mod->module_core_rw,
50780 sechdrs[i].sh_size, GFP_KERNEL);
50781 }
50782 }
50783@@ -2263,7 +2290,7 @@ static noinline struct module *load_modu
50784 secstrings, &stroffs, strmap); 49458 secstrings, &stroffs, strmap);
50785 49459
50786 /* Do the allocs. */ 49460 /* Do the allocs. */
@@ -50789,7 +49463,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50789 /* 49463 /*
50790 * The pointer to this block is stored in the module structure 49464 * The pointer to this block is stored in the module structure
50791 * which is inside the block. Just mark it as not being a 49465 * which is inside the block. Just mark it as not being a
50792@@ -2274,23 +2301,47 @@ static noinline struct module *load_modu 49466@@ -2295,23 +2324,47 @@ static noinline struct module *load_modu
50793 err = -ENOMEM; 49467 err = -ENOMEM;
50794 goto free_percpu; 49468 goto free_percpu;
50795 } 49469 }
@@ -50819,12 +49493,9 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50819+ ptr = module_alloc_update_bounds_rx(mod->core_size_rx); 49493+ ptr = module_alloc_update_bounds_rx(mod->core_size_rx);
50820+ kmemleak_not_leak(ptr); 49494+ kmemleak_not_leak(ptr);
50821+ if (!ptr) { 49495+ if (!ptr) {
50822 err = -ENOMEM; 49496+ err = -ENOMEM;
50823- goto free_core;
50824+ goto free_init_rw; 49497+ goto free_init_rw;
50825 } 49498+ }
50826- memset(ptr, 0, mod->init_size);
50827- mod->module_init = ptr;
50828+ 49499+
50829+ pax_open_kernel(); 49500+ pax_open_kernel();
50830+ memset(ptr, 0, mod->core_size_rx); 49501+ memset(ptr, 0, mod->core_size_rx);
@@ -50834,9 +49505,12 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50834+ ptr = module_alloc_update_bounds_rx(mod->init_size_rx); 49505+ ptr = module_alloc_update_bounds_rx(mod->init_size_rx);
50835+ kmemleak_not_leak(ptr); 49506+ kmemleak_not_leak(ptr);
50836+ if (!ptr && mod->init_size_rx) { 49507+ if (!ptr && mod->init_size_rx) {
50837+ err = -ENOMEM; 49508 err = -ENOMEM;
49509- goto free_core;
50838+ goto free_core_rx; 49510+ goto free_core_rx;
50839+ } 49511 }
49512- memset(ptr, 0, mod->init_size);
49513- mod->module_init = ptr;
50840+ 49514+
50841+ pax_open_kernel(); 49515+ pax_open_kernel();
50842+ memset(ptr, 0, mod->init_size_rx); 49516+ memset(ptr, 0, mod->init_size_rx);
@@ -50845,7 +49519,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50845 49519
50846 /* Transfer each section which specifies SHF_ALLOC */ 49520 /* Transfer each section which specifies SHF_ALLOC */
50847 DEBUGP("final section addresses:\n"); 49521 DEBUGP("final section addresses:\n");
50848@@ -2300,17 +2351,41 @@ static noinline struct module *load_modu 49522@@ -2321,17 +2374,41 @@ static noinline struct module *load_modu
50849 if (!(sechdrs[i].sh_flags & SHF_ALLOC)) 49523 if (!(sechdrs[i].sh_flags & SHF_ALLOC))
50850 continue; 49524 continue;
50851 49525
@@ -50869,7 +49543,10 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50869+ } 49543+ }
50870+ 49544+
50871+ if (sechdrs[i].sh_type != SHT_NOBITS) { 49545+ if (sechdrs[i].sh_type != SHT_NOBITS) {
50872+ 49546
49547- if (sechdrs[i].sh_type != SHT_NOBITS)
49548- memcpy(dest, (void *)sechdrs[i].sh_addr,
49549- sechdrs[i].sh_size);
50873+#ifdef CONFIG_PAX_KERNEXEC 49550+#ifdef CONFIG_PAX_KERNEXEC
50874+ if (!(sechdrs[i].sh_flags & SHF_WRITE) && (sechdrs[i].sh_flags & SHF_ALLOC)) { 49551+ if (!(sechdrs[i].sh_flags & SHF_WRITE) && (sechdrs[i].sh_flags & SHF_ALLOC)) {
50875+ pax_open_kernel(); 49552+ pax_open_kernel();
@@ -50877,10 +49554,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50877+ pax_close_kernel(); 49554+ pax_close_kernel();
50878+ } else 49555+ } else
50879+#endif 49556+#endif
50880 49557+
50881- if (sechdrs[i].sh_type != SHT_NOBITS)
50882- memcpy(dest, (void *)sechdrs[i].sh_addr,
50883- sechdrs[i].sh_size);
50884+ memcpy(dest, (void *)sechdrs[i].sh_addr, sechdrs[i].sh_size); 49558+ memcpy(dest, (void *)sechdrs[i].sh_addr, sechdrs[i].sh_size);
50885+ } 49559+ }
50886 /* Update sh_addr to point to copy in image. */ 49560 /* Update sh_addr to point to copy in image. */
@@ -50896,8 +49570,8 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50896 DEBUGP("\t0x%lx %s\n", sechdrs[i].sh_addr, secstrings + sechdrs[i].sh_name); 49570 DEBUGP("\t0x%lx %s\n", sechdrs[i].sh_addr, secstrings + sechdrs[i].sh_name);
50897 } 49571 }
50898 /* Module has been moved. */ 49572 /* Module has been moved. */
50899@@ -2322,7 +2397,7 @@ static noinline struct module *load_modu 49573@@ -2342,7 +2419,7 @@ static noinline struct module *load_modu
50900 mod->name); 49574 mod->refptr = alloc_percpu(struct module_ref);
50901 if (!mod->refptr) { 49575 if (!mod->refptr) {
50902 err = -ENOMEM; 49576 err = -ENOMEM;
50903- goto free_init; 49577- goto free_init;
@@ -50905,7 +49579,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50905 } 49579 }
50906 #endif 49580 #endif
50907 /* Now we've moved module, initialize linked lists, etc. */ 49581 /* Now we've moved module, initialize linked lists, etc. */
50908@@ -2431,8 +2506,8 @@ static noinline struct module *load_modu 49582@@ -2452,8 +2529,8 @@ static noinline struct module *load_modu
50909 49583
50910 /* Now do relocations. */ 49584 /* Now do relocations. */
50911 for (i = 1; i < hdr->e_shnum; i++) { 49585 for (i = 1; i < hdr->e_shnum; i++) {
@@ -50915,7 +49589,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50915 49589
50916 /* Not a valid relocation section? */ 49590 /* Not a valid relocation section? */
50917 if (info >= hdr->e_shnum) 49591 if (info >= hdr->e_shnum)
50918@@ -2493,12 +2568,12 @@ static noinline struct module *load_modu 49592@@ -2503,12 +2580,12 @@ static noinline struct module *load_modu
50919 * Do it before processing of module parameters, so the module 49593 * Do it before processing of module parameters, so the module
50920 * can provide parameter accessor functions of its own. 49594 * can provide parameter accessor functions of its own.
50921 */ 49595 */
@@ -50934,12 +49608,12 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50934 49608
50935 set_fs(old_fs); 49609 set_fs(old_fs);
50936 49610
50937@@ -2546,12 +2621,16 @@ static noinline struct module *load_modu 49611@@ -2574,12 +2651,16 @@ static noinline struct module *load_modu
50938 free_unload: 49612 free_modinfo(mod);
50939 module_unload_free(mod); 49613 module_unload_free(mod);
50940 #if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) 49614 #if defined(CONFIG_MODULE_UNLOAD)
50941+ free_init_rx: 49615+ free_init_rx:
50942 percpu_modfree(mod->refptr); 49616 free_percpu(mod->refptr);
50943- free_init: 49617- free_init:
50944 #endif 49618 #endif
50945- module_free(mod, mod->module_init); 49619- module_free(mod, mod->module_init);
@@ -50954,8 +49628,8 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50954+ module_free(mod, mod->module_core_rw); 49628+ module_free(mod, mod->module_core_rw);
50955 /* mod will be freed with core. Don't access it beyond this line! */ 49629 /* mod will be freed with core. Don't access it beyond this line! */
50956 free_percpu: 49630 free_percpu:
50957 if (percpu) 49631 free_percpu(percpu);
50958@@ -2653,10 +2732,12 @@ SYSCALL_DEFINE3(init_module, void __user 49632@@ -2669,10 +2750,12 @@ SYSCALL_DEFINE3(init_module, void __user
50959 mod->symtab = mod->core_symtab; 49633 mod->symtab = mod->core_symtab;
50960 mod->strtab = mod->core_strtab; 49634 mod->strtab = mod->core_strtab;
50961 #endif 49635 #endif
@@ -50972,7 +49646,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50972 mutex_unlock(&module_mutex); 49646 mutex_unlock(&module_mutex);
50973 49647
50974 return 0; 49648 return 0;
50975@@ -2687,10 +2768,16 @@ static const char *get_ksymbol(struct mo 49649@@ -2703,10 +2786,16 @@ static const char *get_ksymbol(struct mo
50976 unsigned long nextval; 49650 unsigned long nextval;
50977 49651
50978 /* At worse, next value is at end of module */ 49652 /* At worse, next value is at end of module */
@@ -50992,7 +49666,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
50992 49666
50993 /* Scan for closest preceeding symbol, and next symbol. (ELF 49667 /* Scan for closest preceeding symbol, and next symbol. (ELF
50994 starts real symbols at 1). */ 49668 starts real symbols at 1). */
50995@@ -2936,7 +3023,7 @@ static int m_show(struct seq_file *m, vo 49669@@ -2952,7 +3041,7 @@ static int m_show(struct seq_file *m, vo
50996 char buf[8]; 49670 char buf[8];
50997 49671
50998 seq_printf(m, "%s %u", 49672 seq_printf(m, "%s %u",
@@ -51001,7 +49675,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
51001 print_unload_info(m, mod); 49675 print_unload_info(m, mod);
51002 49676
51003 /* Informative for users. */ 49677 /* Informative for users. */
51004@@ -2945,7 +3032,7 @@ static int m_show(struct seq_file *m, vo 49678@@ -2961,7 +3050,7 @@ static int m_show(struct seq_file *m, vo
51005 mod->state == MODULE_STATE_COMING ? "Loading": 49679 mod->state == MODULE_STATE_COMING ? "Loading":
51006 "Live"); 49680 "Live");
51007 /* Used by oprofile and other similar tools. */ 49681 /* Used by oprofile and other similar tools. */
@@ -51010,7 +49684,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
51010 49684
51011 /* Taints info */ 49685 /* Taints info */
51012 if (mod->taints) 49686 if (mod->taints)
51013@@ -2981,7 +3068,17 @@ static const struct file_operations proc 49687@@ -2997,7 +3086,17 @@ static const struct file_operations proc
51014 49688
51015 static int __init proc_modules_init(void) 49689 static int __init proc_modules_init(void)
51016 { 49690 {
@@ -51028,7 +49702,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
51028 return 0; 49702 return 0;
51029 } 49703 }
51030 module_init(proc_modules_init); 49704 module_init(proc_modules_init);
51031@@ -3040,12 +3137,12 @@ struct module *__module_address(unsigned 49705@@ -3056,12 +3155,12 @@ struct module *__module_address(unsigned
51032 { 49706 {
51033 struct module *mod; 49707 struct module *mod;
51034 49708
@@ -51044,7 +49718,7 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
51044 return mod; 49718 return mod;
51045 return NULL; 49719 return NULL;
51046 } 49720 }
51047@@ -3079,11 +3176,20 @@ bool is_module_text_address(unsigned lon 49721@@ -3095,11 +3194,20 @@ bool is_module_text_address(unsigned lon
51048 */ 49722 */
51049 struct module *__module_text_address(unsigned long addr) 49723 struct module *__module_text_address(unsigned long addr)
51050 { 49724 {
@@ -51068,10 +49742,10 @@ diff -urNp linux-2.6.32.24/kernel/module.c linux-2.6.32.24/kernel/module.c
51068 mod = NULL; 49742 mod = NULL;
51069 } 49743 }
51070 return mod; 49744 return mod;
51071diff -urNp linux-2.6.32.24/kernel/panic.c linux-2.6.32.24/kernel/panic.c 49745diff -urNp linux-2.6.35.7/kernel/panic.c linux-2.6.35.7/kernel/panic.c
51072--- linux-2.6.32.24/kernel/panic.c 2010-08-13 16:24:37.000000000 -0400 49746--- linux-2.6.35.7/kernel/panic.c 2010-08-26 19:47:12.000000000 -0400
51073+++ linux-2.6.32.24/kernel/panic.c 2010-10-23 19:59:20.000000000 -0400 49747+++ linux-2.6.35.7/kernel/panic.c 2010-09-17 20:12:09.000000000 -0400
51074@@ -392,7 +392,8 @@ EXPORT_SYMBOL(warn_slowpath_null); 49748@@ -429,7 +429,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
51075 */ 49749 */
51076 void __stack_chk_fail(void) 49750 void __stack_chk_fail(void)
51077 { 49751 {
@@ -51081,30 +49755,9 @@ diff -urNp linux-2.6.32.24/kernel/panic.c linux-2.6.32.24/kernel/panic.c
51081 __builtin_return_address(0)); 49755 __builtin_return_address(0));
51082 } 49756 }
51083 EXPORT_SYMBOL(__stack_chk_fail); 49757 EXPORT_SYMBOL(__stack_chk_fail);
51084diff -urNp linux-2.6.32.24/kernel/params.c linux-2.6.32.24/kernel/params.c 49758diff -urNp linux-2.6.35.7/kernel/pid.c linux-2.6.35.7/kernel/pid.c
51085--- linux-2.6.32.24/kernel/params.c 2010-08-13 16:24:37.000000000 -0400 49759--- linux-2.6.35.7/kernel/pid.c 2010-08-26 19:47:12.000000000 -0400
51086+++ linux-2.6.32.24/kernel/params.c 2010-10-23 19:59:20.000000000 -0400 49760+++ linux-2.6.35.7/kernel/pid.c 2010-09-17 20:12:37.000000000 -0400
51087@@ -725,7 +725,7 @@ static ssize_t module_attr_store(struct
51088 return ret;
51089 }
51090
51091-static struct sysfs_ops module_sysfs_ops = {
51092+static const struct sysfs_ops module_sysfs_ops = {
51093 .show = module_attr_show,
51094 .store = module_attr_store,
51095 };
51096@@ -739,7 +739,7 @@ static int uevent_filter(struct kset *ks
51097 return 0;
51098 }
51099
51100-static struct kset_uevent_ops module_uevent_ops = {
51101+static const struct kset_uevent_ops module_uevent_ops = {
51102 .filter = uevent_filter,
51103 };
51104
51105diff -urNp linux-2.6.32.24/kernel/pid.c linux-2.6.32.24/kernel/pid.c
51106--- linux-2.6.32.24/kernel/pid.c 2010-08-13 16:24:37.000000000 -0400
51107+++ linux-2.6.32.24/kernel/pid.c 2010-10-23 19:59:20.000000000 -0400
51108@@ -33,6 +33,7 @@ 49761@@ -33,6 +33,7 @@
51109 #include <linux/rculist.h> 49762 #include <linux/rculist.h>
51110 #include <linux/bootmem.h> 49763 #include <linux/bootmem.h>
@@ -51122,7 +49775,7 @@ diff -urNp linux-2.6.32.24/kernel/pid.c linux-2.6.32.24/kernel/pid.c
51122 49775
51123 int pid_max_min = RESERVED_PIDS + 1; 49776 int pid_max_min = RESERVED_PIDS + 1;
51124 int pid_max_max = PID_MAX_LIMIT; 49777 int pid_max_max = PID_MAX_LIMIT;
51125@@ -380,7 +381,14 @@ EXPORT_SYMBOL(pid_task); 49778@@ -382,7 +383,14 @@ EXPORT_SYMBOL(pid_task);
51126 */ 49779 */
51127 struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns) 49780 struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
51128 { 49781 {
@@ -51138,9 +49791,9 @@ diff -urNp linux-2.6.32.24/kernel/pid.c linux-2.6.32.24/kernel/pid.c
51138 } 49791 }
51139 49792
51140 struct task_struct *find_task_by_vpid(pid_t vnr) 49793 struct task_struct *find_task_by_vpid(pid_t vnr)
51141diff -urNp linux-2.6.32.24/kernel/posix-cpu-timers.c linux-2.6.32.24/kernel/posix-cpu-timers.c 49794diff -urNp linux-2.6.35.7/kernel/posix-cpu-timers.c linux-2.6.35.7/kernel/posix-cpu-timers.c
51142--- linux-2.6.32.24/kernel/posix-cpu-timers.c 2010-08-13 16:24:37.000000000 -0400 49795--- linux-2.6.35.7/kernel/posix-cpu-timers.c 2010-08-26 19:47:12.000000000 -0400
51143+++ linux-2.6.32.24/kernel/posix-cpu-timers.c 2010-10-23 19:59:20.000000000 -0400 49796+++ linux-2.6.35.7/kernel/posix-cpu-timers.c 2010-09-17 20:12:37.000000000 -0400
51144@@ -6,6 +6,7 @@ 49797@@ -6,6 +6,7 @@
51145 #include <linux/posix-timers.h> 49798 #include <linux/posix-timers.h>
51146 #include <linux/errno.h> 49799 #include <linux/errno.h>
@@ -51149,26 +49802,26 @@ diff -urNp linux-2.6.32.24/kernel/posix-cpu-timers.c linux-2.6.32.24/kernel/posi
51149 #include <asm/uaccess.h> 49802 #include <asm/uaccess.h>
51150 #include <linux/kernel_stat.h> 49803 #include <linux/kernel_stat.h>
51151 #include <trace/events/timer.h> 49804 #include <trace/events/timer.h>
51152@@ -1035,6 +1036,7 @@ static void check_thread_timers(struct t 49805@@ -972,6 +973,7 @@ static void check_thread_timers(struct t
51153 unsigned long hard = sig->rlim[RLIMIT_RTTIME].rlim_max; 49806 unsigned long hard =
51154 unsigned long *soft = &sig->rlim[RLIMIT_RTTIME].rlim_cur; 49807 ACCESS_ONCE(sig->rlim[RLIMIT_RTTIME].rlim_max);
51155 49808
51156+ gr_learn_resource(tsk, RLIMIT_RTTIME, tsk->rt.timeout * (USEC_PER_SEC/HZ), 1); 49809+ gr_learn_resource(tsk, RLIMIT_RTTIME, tsk->rt.timeout * (USEC_PER_SEC/HZ), 1);
51157 if (hard != RLIM_INFINITY && 49810 if (hard != RLIM_INFINITY &&
51158 tsk->rt.timeout > DIV_ROUND_UP(hard, USEC_PER_SEC/HZ)) { 49811 tsk->rt.timeout > DIV_ROUND_UP(hard, USEC_PER_SEC/HZ)) {
51159 /* 49812 /*
51160@@ -1198,6 +1200,7 @@ static void check_process_timers(struct 49813@@ -1138,6 +1140,7 @@ static void check_process_timers(struct
51161 if (sig->rlim[RLIMIT_CPU].rlim_cur != RLIM_INFINITY) { 49814 unsigned long hard =
51162 unsigned long psecs = cputime_to_secs(ptime); 49815 ACCESS_ONCE(sig->rlim[RLIMIT_CPU].rlim_max);
51163 cputime_t x; 49816 cputime_t x;
51164+ gr_learn_resource(tsk, RLIMIT_CPU, psecs, 0); 49817+ gr_learn_resource(tsk, RLIMIT_CPU, psecs, 0);
51165 if (psecs >= sig->rlim[RLIMIT_CPU].rlim_max) { 49818 if (psecs >= hard) {
51166 /* 49819 /*
51167 * At the hard limit, we just die. 49820 * At the hard limit, we just die.
51168diff -urNp linux-2.6.32.24/kernel/power/hibernate.c linux-2.6.32.24/kernel/power/hibernate.c 49821diff -urNp linux-2.6.35.7/kernel/power/hibernate.c linux-2.6.35.7/kernel/power/hibernate.c
51169--- linux-2.6.32.24/kernel/power/hibernate.c 2010-08-13 16:24:37.000000000 -0400 49822--- linux-2.6.35.7/kernel/power/hibernate.c 2010-08-26 19:47:12.000000000 -0400
51170+++ linux-2.6.32.24/kernel/power/hibernate.c 2010-10-23 19:59:20.000000000 -0400 49823+++ linux-2.6.35.7/kernel/power/hibernate.c 2010-09-17 20:12:09.000000000 -0400
51171@@ -48,14 +48,14 @@ enum { 49824@@ -50,14 +50,14 @@ enum {
51172 49825
51173 static int hibernation_mode = HIBERNATION_SHUTDOWN; 49826 static int hibernation_mode = HIBERNATION_SHUTDOWN;
51174 49827
@@ -51185,9 +49838,9 @@ diff -urNp linux-2.6.32.24/kernel/power/hibernate.c linux-2.6.32.24/kernel/power
51185 { 49838 {
51186 if (ops && !(ops->begin && ops->end && ops->pre_snapshot 49839 if (ops && !(ops->begin && ops->end && ops->pre_snapshot
51187 && ops->prepare && ops->finish && ops->enter && ops->pre_restore 49840 && ops->prepare && ops->finish && ops->enter && ops->pre_restore
51188diff -urNp linux-2.6.32.24/kernel/power/poweroff.c linux-2.6.32.24/kernel/power/poweroff.c 49841diff -urNp linux-2.6.35.7/kernel/power/poweroff.c linux-2.6.35.7/kernel/power/poweroff.c
51189--- linux-2.6.32.24/kernel/power/poweroff.c 2010-08-13 16:24:37.000000000 -0400 49842--- linux-2.6.35.7/kernel/power/poweroff.c 2010-08-26 19:47:12.000000000 -0400
51190+++ linux-2.6.32.24/kernel/power/poweroff.c 2010-10-23 19:59:20.000000000 -0400 49843+++ linux-2.6.35.7/kernel/power/poweroff.c 2010-09-17 20:12:09.000000000 -0400
51191@@ -37,7 +37,7 @@ static struct sysrq_key_op sysrq_powerof 49844@@ -37,7 +37,7 @@ static struct sysrq_key_op sysrq_powerof
51192 .enable_mask = SYSRQ_ENABLE_BOOT, 49845 .enable_mask = SYSRQ_ENABLE_BOOT,
51193 }; 49846 };
@@ -51197,10 +49850,10 @@ diff -urNp linux-2.6.32.24/kernel/power/poweroff.c linux-2.6.32.24/kernel/power/
51197 { 49850 {
51198 register_sysrq_key('o', &sysrq_poweroff_op); 49851 register_sysrq_key('o', &sysrq_poweroff_op);
51199 return 0; 49852 return 0;
51200diff -urNp linux-2.6.32.24/kernel/power/process.c linux-2.6.32.24/kernel/power/process.c 49853diff -urNp linux-2.6.35.7/kernel/power/process.c linux-2.6.35.7/kernel/power/process.c
51201--- linux-2.6.32.24/kernel/power/process.c 2010-08-13 16:24:37.000000000 -0400 49854--- linux-2.6.35.7/kernel/power/process.c 2010-08-26 19:47:12.000000000 -0400
51202+++ linux-2.6.32.24/kernel/power/process.c 2010-10-23 19:59:20.000000000 -0400 49855+++ linux-2.6.35.7/kernel/power/process.c 2010-09-17 20:12:09.000000000 -0400
51203@@ -37,12 +37,15 @@ static int try_to_freeze_tasks(bool sig_ 49856@@ -38,12 +38,15 @@ static int try_to_freeze_tasks(bool sig_
51204 struct timeval start, end; 49857 struct timeval start, end;
51205 u64 elapsed_csecs64; 49858 u64 elapsed_csecs64;
51206 unsigned int elapsed_csecs; 49859 unsigned int elapsed_csecs;
@@ -51209,14 +49862,14 @@ diff -urNp linux-2.6.32.24/kernel/power/process.c linux-2.6.32.24/kernel/power/p
51209 do_gettimeofday(&start); 49862 do_gettimeofday(&start);
51210 49863
51211 end_time = jiffies + TIMEOUT; 49864 end_time = jiffies + TIMEOUT;
51212 do { 49865 while (true) {
51213 todo = 0; 49866 todo = 0;
51214+ if (time_after(jiffies, end_time)) 49867+ if (time_after(jiffies, end_time))
51215+ timedout = true; 49868+ timedout = true;
51216 read_lock(&tasklist_lock); 49869 read_lock(&tasklist_lock);
51217 do_each_thread(g, p) { 49870 do_each_thread(g, p) {
51218 if (frozen(p) || !freezeable(p)) 49871 if (frozen(p) || !freezeable(p))
51219@@ -57,15 +60,17 @@ static int try_to_freeze_tasks(bool sig_ 49872@@ -58,12 +61,16 @@ static int try_to_freeze_tasks(bool sig_
51220 * It is "frozen enough". If the task does wake 49873 * It is "frozen enough". If the task does wake
51221 * up, it will immediately call try_to_freeze. 49874 * up, it will immediately call try_to_freeze.
51222 */ 49875 */
@@ -51231,18 +49884,15 @@ diff -urNp linux-2.6.32.24/kernel/power/process.c linux-2.6.32.24/kernel/power/p
51231+ } 49884+ }
51232 } while_each_thread(g, p); 49885 } while_each_thread(g, p);
51233 read_unlock(&tasklist_lock); 49886 read_unlock(&tasklist_lock);
51234 yield(); /* Yield is okay here */ 49887- if (!todo || time_after(jiffies, end_time))
51235- if (time_after(jiffies, end_time)) 49888+ if (!todo || timedout)
51236- break; 49889 break;
51237- } while (todo); 49890
51238+ } while (todo && !timedout); 49891 /*
51239 49892diff -urNp linux-2.6.35.7/kernel/power/suspend.c linux-2.6.35.7/kernel/power/suspend.c
51240 do_gettimeofday(&end); 49893--- linux-2.6.35.7/kernel/power/suspend.c 2010-08-26 19:47:12.000000000 -0400
51241 elapsed_csecs64 = timeval_to_ns(&end) - timeval_to_ns(&start); 49894+++ linux-2.6.35.7/kernel/power/suspend.c 2010-09-17 20:12:09.000000000 -0400
51242diff -urNp linux-2.6.32.24/kernel/power/suspend.c linux-2.6.32.24/kernel/power/suspend.c 49895@@ -30,13 +30,13 @@ const char *const pm_states[PM_SUSPEND_M
51243--- linux-2.6.32.24/kernel/power/suspend.c 2010-08-13 16:24:37.000000000 -0400
51244+++ linux-2.6.32.24/kernel/power/suspend.c 2010-10-23 19:59:20.000000000 -0400
51245@@ -23,13 +23,13 @@ const char *const pm_states[PM_SUSPEND_M
51246 [PM_SUSPEND_MEM] = "mem", 49896 [PM_SUSPEND_MEM] = "mem",
51247 }; 49897 };
51248 49898
@@ -51258,10 +49908,10 @@ diff -urNp linux-2.6.32.24/kernel/power/suspend.c linux-2.6.32.24/kernel/power/s
51258 { 49908 {
51259 mutex_lock(&pm_mutex); 49909 mutex_lock(&pm_mutex);
51260 suspend_ops = ops; 49910 suspend_ops = ops;
51261diff -urNp linux-2.6.32.24/kernel/printk.c linux-2.6.32.24/kernel/printk.c 49911diff -urNp linux-2.6.35.7/kernel/printk.c linux-2.6.35.7/kernel/printk.c
51262--- linux-2.6.32.24/kernel/printk.c 2010-08-13 16:24:37.000000000 -0400 49912--- linux-2.6.35.7/kernel/printk.c 2010-08-26 19:47:12.000000000 -0400
51263+++ linux-2.6.32.24/kernel/printk.c 2010-10-23 19:59:20.000000000 -0400 49913+++ linux-2.6.35.7/kernel/printk.c 2010-09-17 20:12:37.000000000 -0400
51264@@ -278,6 +278,11 @@ int do_syslog(int type, char __user *buf 49914@@ -266,6 +266,11 @@ int do_syslog(int type, char __user *buf
51265 char c; 49915 char c;
51266 int error = 0; 49916 int error = 0;
51267 49917
@@ -51270,13 +49920,13 @@ diff -urNp linux-2.6.32.24/kernel/printk.c linux-2.6.32.24/kernel/printk.c
51270+ return -EPERM; 49920+ return -EPERM;
51271+#endif 49921+#endif
51272+ 49922+
51273 error = security_syslog(type); 49923 error = security_syslog(type, from_file);
51274 if (error) 49924 if (error)
51275 return error; 49925 return error;
51276diff -urNp linux-2.6.32.24/kernel/ptrace.c linux-2.6.32.24/kernel/ptrace.c 49926diff -urNp linux-2.6.35.7/kernel/ptrace.c linux-2.6.35.7/kernel/ptrace.c
51277--- linux-2.6.32.24/kernel/ptrace.c 2010-08-13 16:24:37.000000000 -0400 49927--- linux-2.6.35.7/kernel/ptrace.c 2010-08-26 19:47:12.000000000 -0400
51278+++ linux-2.6.32.24/kernel/ptrace.c 2010-10-23 19:59:20.000000000 -0400 49928+++ linux-2.6.35.7/kernel/ptrace.c 2010-09-17 20:12:37.000000000 -0400
51279@@ -141,7 +141,7 @@ int __ptrace_may_access(struct task_stru 49929@@ -140,7 +140,7 @@ int __ptrace_may_access(struct task_stru
51280 cred->gid != tcred->egid || 49930 cred->gid != tcred->egid ||
51281 cred->gid != tcred->sgid || 49931 cred->gid != tcred->sgid ||
51282 cred->gid != tcred->gid) && 49932 cred->gid != tcred->gid) &&
@@ -51285,7 +49935,7 @@ diff -urNp linux-2.6.32.24/kernel/ptrace.c linux-2.6.32.24/kernel/ptrace.c
51285 rcu_read_unlock(); 49935 rcu_read_unlock();
51286 return -EPERM; 49936 return -EPERM;
51287 } 49937 }
51288@@ -149,7 +149,7 @@ int __ptrace_may_access(struct task_stru 49938@@ -148,7 +148,7 @@ int __ptrace_may_access(struct task_stru
51289 smp_rmb(); 49939 smp_rmb();
51290 if (task->mm) 49940 if (task->mm)
51291 dumpable = get_dumpable(task->mm); 49941 dumpable = get_dumpable(task->mm);
@@ -51294,7 +49944,7 @@ diff -urNp linux-2.6.32.24/kernel/ptrace.c linux-2.6.32.24/kernel/ptrace.c
51294 return -EPERM; 49944 return -EPERM;
51295 49945
51296 return security_ptrace_access_check(task, mode); 49946 return security_ptrace_access_check(task, mode);
51297@@ -199,7 +199,7 @@ int ptrace_attach(struct task_struct *ta 49947@@ -198,7 +198,7 @@ int ptrace_attach(struct task_struct *ta
51298 goto unlock_tasklist; 49948 goto unlock_tasklist;
51299 49949
51300 task->ptrace = PT_PTRACED; 49950 task->ptrace = PT_PTRACED;
@@ -51303,7 +49953,16 @@ diff -urNp linux-2.6.32.24/kernel/ptrace.c linux-2.6.32.24/kernel/ptrace.c
51303 task->ptrace |= PT_PTRACE_CAP; 49953 task->ptrace |= PT_PTRACE_CAP;
51304 49954
51305 __ptrace_link(task, current); 49955 __ptrace_link(task, current);
51306@@ -532,18 +532,18 @@ int ptrace_request(struct task_struct *c 49956@@ -361,7 +361,7 @@ int ptrace_readdata(struct task_struct *
49957 break;
49958 return -EIO;
49959 }
49960- if (copy_to_user(dst, buf, retval))
49961+ if (retval > sizeof(buf) || copy_to_user(dst, buf, retval))
49962 return -EFAULT;
49963 copied += retval;
49964 src += retval;
49965@@ -572,18 +572,18 @@ int ptrace_request(struct task_struct *c
51307 ret = ptrace_setoptions(child, data); 49966 ret = ptrace_setoptions(child, data);
51308 break; 49967 break;
51309 case PTRACE_GETEVENTMSG: 49968 case PTRACE_GETEVENTMSG:
@@ -51325,7 +49984,7 @@ diff -urNp linux-2.6.32.24/kernel/ptrace.c linux-2.6.32.24/kernel/ptrace.c
51325 sizeof siginfo)) 49984 sizeof siginfo))
51326 ret = -EFAULT; 49985 ret = -EFAULT;
51327 else 49986 else
51328@@ -621,14 +621,21 @@ SYSCALL_DEFINE4(ptrace, long, request, l 49987@@ -703,14 +703,21 @@ SYSCALL_DEFINE4(ptrace, long, request, l
51329 goto out; 49988 goto out;
51330 } 49989 }
51331 49990
@@ -51348,7 +50007,7 @@ diff -urNp linux-2.6.32.24/kernel/ptrace.c linux-2.6.32.24/kernel/ptrace.c
51348 goto out_put_task_struct; 50007 goto out_put_task_struct;
51349 } 50008 }
51350 50009
51351@@ -653,7 +660,7 @@ int generic_ptrace_peekdata(struct task_ 50010@@ -734,7 +741,7 @@ int generic_ptrace_peekdata(struct task_
51352 copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0); 50011 copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
51353 if (copied != sizeof(tmp)) 50012 if (copied != sizeof(tmp))
51354 return -EIO; 50013 return -EIO;
@@ -51357,10 +50016,10 @@ diff -urNp linux-2.6.32.24/kernel/ptrace.c linux-2.6.32.24/kernel/ptrace.c
51357 } 50016 }
51358 50017
51359 int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data) 50018 int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
51360diff -urNp linux-2.6.32.24/kernel/rcutree.c linux-2.6.32.24/kernel/rcutree.c 50019diff -urNp linux-2.6.35.7/kernel/rcutree.c linux-2.6.35.7/kernel/rcutree.c
51361--- linux-2.6.32.24/kernel/rcutree.c 2010-08-13 16:24:37.000000000 -0400 50020--- linux-2.6.35.7/kernel/rcutree.c 2010-08-26 19:47:12.000000000 -0400
51362+++ linux-2.6.32.24/kernel/rcutree.c 2010-10-23 19:59:20.000000000 -0400 50021+++ linux-2.6.35.7/kernel/rcutree.c 2010-09-17 20:12:09.000000000 -0400
51363@@ -1303,7 +1303,7 @@ __rcu_process_callbacks(struct rcu_state 50022@@ -1356,7 +1356,7 @@ __rcu_process_callbacks(struct rcu_state
51364 /* 50023 /*
51365 * Do softirq processing for the current CPU. 50024 * Do softirq processing for the current CPU.
51366 */ 50025 */
@@ -51369,30 +50028,10 @@ diff -urNp linux-2.6.32.24/kernel/rcutree.c linux-2.6.32.24/kernel/rcutree.c
51369 { 50028 {
51370 /* 50029 /*
51371 * Memory references from any prior RCU read-side critical sections 50030 * Memory references from any prior RCU read-side critical sections
51372diff -urNp linux-2.6.32.24/kernel/relay.c linux-2.6.32.24/kernel/relay.c 50031diff -urNp linux-2.6.35.7/kernel/resource.c linux-2.6.35.7/kernel/resource.c
51373--- linux-2.6.32.24/kernel/relay.c 2010-08-13 16:24:37.000000000 -0400 50032--- linux-2.6.35.7/kernel/resource.c 2010-08-26 19:47:12.000000000 -0400
51374+++ linux-2.6.32.24/kernel/relay.c 2010-10-23 19:59:20.000000000 -0400 50033+++ linux-2.6.35.7/kernel/resource.c 2010-09-17 20:12:37.000000000 -0400
51375@@ -1222,7 +1222,7 @@ static int subbuf_splice_actor(struct fi 50034@@ -133,8 +133,18 @@ static const struct file_operations proc
51376 unsigned int flags,
51377 int *nonpad_ret)
51378 {
51379- unsigned int pidx, poff, total_len, subbuf_pages, nr_pages, ret;
51380+ unsigned int pidx, poff, total_len, subbuf_pages, nr_pages;
51381 struct rchan_buf *rbuf = in->private_data;
51382 unsigned int subbuf_size = rbuf->chan->subbuf_size;
51383 uint64_t pos = (uint64_t) *ppos;
51384@@ -1241,6 +1241,7 @@ static int subbuf_splice_actor(struct fi
51385 .ops = &relay_pipe_buf_ops,
51386 .spd_release = relay_page_release,
51387 };
51388+ ssize_t ret;
51389
51390 if (rbuf->subbufs_produced == rbuf->subbufs_consumed)
51391 return 0;
51392diff -urNp linux-2.6.32.24/kernel/resource.c linux-2.6.32.24/kernel/resource.c
51393--- linux-2.6.32.24/kernel/resource.c 2010-08-13 16:24:37.000000000 -0400
51394+++ linux-2.6.32.24/kernel/resource.c 2010-10-23 19:59:20.000000000 -0400
51395@@ -132,8 +132,18 @@ static const struct file_operations proc
51396 50035
51397 static int __init ioresources_init(void) 50036 static int __init ioresources_init(void)
51398 { 50037 {
@@ -51411,40 +50050,31 @@ diff -urNp linux-2.6.32.24/kernel/resource.c linux-2.6.32.24/kernel/resource.c
51411 return 0; 50050 return 0;
51412 } 50051 }
51413 __initcall(ioresources_init); 50052 __initcall(ioresources_init);
51414diff -urNp linux-2.6.32.24/kernel/rtmutex.c linux-2.6.32.24/kernel/rtmutex.c 50053diff -urNp linux-2.6.35.7/kernel/rtmutex.c linux-2.6.35.7/kernel/rtmutex.c
51415--- linux-2.6.32.24/kernel/rtmutex.c 2010-08-13 16:24:37.000000000 -0400 50054--- linux-2.6.35.7/kernel/rtmutex.c 2010-08-26 19:47:12.000000000 -0400
51416+++ linux-2.6.32.24/kernel/rtmutex.c 2010-10-23 19:59:24.000000000 -0400 50055+++ linux-2.6.35.7/kernel/rtmutex.c 2010-10-11 22:41:44.000000000 -0400
51417@@ -511,7 +511,7 @@ static void wakeup_next_waiter(struct rt 50056@@ -511,7 +511,7 @@ static void wakeup_next_waiter(struct rt
51418 */ 50057 */
51419 spin_lock_irqsave(&pendowner->pi_lock, flags); 50058 raw_spin_lock_irqsave(&pendowner->pi_lock, flags);
51420 50059
51421- WARN_ON(!pendowner->pi_blocked_on); 50060- WARN_ON(!pendowner->pi_blocked_on);
51422+ BUG_ON(!pendowner->pi_blocked_on); 50061+ BUG_ON(!pendowner->pi_blocked_on);
51423 WARN_ON(pendowner->pi_blocked_on != waiter); 50062 WARN_ON(pendowner->pi_blocked_on != waiter);
51424 WARN_ON(pendowner->pi_blocked_on->lock != lock); 50063 WARN_ON(pendowner->pi_blocked_on->lock != lock);
51425 50064
51426diff -urNp linux-2.6.32.24/kernel/sched.c linux-2.6.32.24/kernel/sched.c 50065diff -urNp linux-2.6.35.7/kernel/sched.c linux-2.6.35.7/kernel/sched.c
51427--- linux-2.6.32.24/kernel/sched.c 2010-09-26 17:26:05.000000000 -0400 50066--- linux-2.6.35.7/kernel/sched.c 2010-09-26 17:32:11.000000000 -0400
51428+++ linux-2.6.32.24/kernel/sched.c 2010-10-23 19:59:24.000000000 -0400 50067+++ linux-2.6.35.7/kernel/sched.c 2010-10-11 22:41:44.000000000 -0400
51429@@ -4905,7 +4905,7 @@ out: 50068@@ -4266,6 +4266,8 @@ int can_nice(const struct task_struct *p
51430 * In CONFIG_NO_HZ case, the idle load balance owner will do the
51431 * rebalancing for all the cpus for whom scheduler ticks are stopped.
51432 */
51433-static void run_rebalance_domains(struct softirq_action *h)
51434+static void run_rebalance_domains(void)
51435 {
51436 int this_cpu = smp_processor_id();
51437 struct rq *this_rq = cpu_rq(this_cpu);
51438@@ -6221,6 +6221,8 @@ int can_nice(const struct task_struct *p
51439 /* convert nice value [19,-20] to rlimit style value [1,40] */ 50069 /* convert nice value [19,-20] to rlimit style value [1,40] */
51440 int nice_rlim = 20 - nice; 50070 int nice_rlim = 20 - nice;
51441 50071
51442+ gr_learn_resource(p, RLIMIT_NICE, nice_rlim, 1); 50072+ gr_learn_resource(p, RLIMIT_NICE, nice_rlim, 1);
51443+ 50073+
51444 return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur || 50074 return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
51445 capable(CAP_SYS_NICE)); 50075 capable(CAP_SYS_NICE));
51446 } 50076 }
51447@@ -6254,7 +6256,8 @@ SYSCALL_DEFINE1(nice, int, increment) 50077@@ -4299,7 +4301,8 @@ SYSCALL_DEFINE1(nice, int, increment)
51448 if (nice > 19) 50078 if (nice > 19)
51449 nice = 19; 50079 nice = 19;
51450 50080
@@ -51454,25 +50084,15 @@ diff -urNp linux-2.6.32.24/kernel/sched.c linux-2.6.32.24/kernel/sched.c
51454 return -EPERM; 50084 return -EPERM;
51455 50085
51456 retval = security_task_setnice(current, nice); 50086 retval = security_task_setnice(current, nice);
51457@@ -7550,7 +7553,7 @@ static struct ctl_table sd_ctl_dir[] = { 50087@@ -4446,6 +4449,7 @@ recheck:
51458 .procname = "sched_domain", 50088 rlim_rtprio = task_rlimit(p, RLIMIT_RTPRIO);
51459 .mode = 0555, 50089 unlock_task_sighand(p, &flags);
51460 }, 50090
51461- {0, }, 50091+ gr_learn_resource(p, RLIMIT_RTPRIO, param->sched_priority, 1);
51462+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL } 50092 /* can't set/change the rt policy */
51463 }; 50093 if (policy != p->policy && !rlim_rtprio)
51464 50094 return -EPERM;
51465 static struct ctl_table sd_ctl_root[] = { 50095@@ -6588,7 +6592,7 @@ static void init_sched_groups_power(int
51466@@ -7560,7 +7563,7 @@ static struct ctl_table sd_ctl_root[] =
51467 .mode = 0555,
51468 .child = sd_ctl_dir,
51469 },
51470- {0, },
51471+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
51472 };
51473
51474 static struct ctl_table *sd_alloc_ctl_entry(int n)
51475@@ -8629,7 +8632,7 @@ static void init_sched_groups_power(int
51476 long power; 50096 long power;
51477 int weight; 50097 int weight;
51478 50098
@@ -51481,12 +50101,24 @@ diff -urNp linux-2.6.32.24/kernel/sched.c linux-2.6.32.24/kernel/sched.c
51481 50101
51482 if (cpu != group_first_cpu(sd->groups)) 50102 if (cpu != group_first_cpu(sd->groups))
51483 return; 50103 return;
51484diff -urNp linux-2.6.32.24/kernel/signal.c linux-2.6.32.24/kernel/signal.c 50104diff -urNp linux-2.6.35.7/kernel/sched_fair.c linux-2.6.35.7/kernel/sched_fair.c
51485--- linux-2.6.32.24/kernel/signal.c 2010-08-13 16:24:37.000000000 -0400 50105--- linux-2.6.35.7/kernel/sched_fair.c 2010-08-26 19:47:12.000000000 -0400
51486+++ linux-2.6.32.24/kernel/signal.c 2010-10-23 19:59:20.000000000 -0400 50106+++ linux-2.6.35.7/kernel/sched_fair.c 2010-09-17 20:12:09.000000000 -0400
51487@@ -41,12 +41,12 @@ 50107@@ -3390,7 +3390,7 @@ out:
50108 * In CONFIG_NO_HZ case, the idle load balance owner will do the
50109 * rebalancing for all the cpus for whom scheduler ticks are stopped.
50110 */
50111-static void run_rebalance_domains(struct softirq_action *h)
50112+static void run_rebalance_domains(void)
50113 {
50114 int this_cpu = smp_processor_id();
50115 struct rq *this_rq = cpu_rq(this_cpu);
50116diff -urNp linux-2.6.35.7/kernel/signal.c linux-2.6.35.7/kernel/signal.c
50117--- linux-2.6.35.7/kernel/signal.c 2010-08-26 19:47:12.000000000 -0400
50118+++ linux-2.6.35.7/kernel/signal.c 2010-09-17 20:20:18.000000000 -0400
50119@@ -45,12 +45,12 @@ static struct kmem_cache *sigqueue_cache
51488 50120
51489 static struct kmem_cache *sigqueue_cachep; 50121 int print_fatal_signals __read_mostly;
51490 50122
51491-static void __user *sig_handler(struct task_struct *t, int sig) 50123-static void __user *sig_handler(struct task_struct *t, int sig)
51492+static __sighandler_t sig_handler(struct task_struct *t, int sig) 50124+static __sighandler_t sig_handler(struct task_struct *t, int sig)
@@ -51499,7 +50131,7 @@ diff -urNp linux-2.6.32.24/kernel/signal.c linux-2.6.32.24/kernel/signal.c
51499 { 50131 {
51500 /* Is it explicitly or implicitly ignored? */ 50132 /* Is it explicitly or implicitly ignored? */
51501 return handler == SIG_IGN || 50133 return handler == SIG_IGN ||
51502@@ -56,7 +56,7 @@ static int sig_handler_ignored(void __us 50134@@ -60,7 +60,7 @@ static int sig_handler_ignored(void __us
51503 static int sig_task_ignored(struct task_struct *t, int sig, 50135 static int sig_task_ignored(struct task_struct *t, int sig,
51504 int from_ancestor_ns) 50136 int from_ancestor_ns)
51505 { 50137 {
@@ -51508,17 +50140,17 @@ diff -urNp linux-2.6.32.24/kernel/signal.c linux-2.6.32.24/kernel/signal.c
51508 50140
51509 handler = sig_handler(t, sig); 50141 handler = sig_handler(t, sig);
51510 50142
51511@@ -207,6 +207,9 @@ static struct sigqueue *__sigqueue_alloc 50143@@ -243,6 +243,9 @@ __sigqueue_alloc(int sig, struct task_st
51512 */
51513 user = get_uid(__task_cred(t)->user);
51514 atomic_inc(&user->sigpending); 50144 atomic_inc(&user->sigpending);
51515+ 50145 rcu_read_unlock();
50146
51516+ if (!override_rlimit) 50147+ if (!override_rlimit)
51517+ gr_learn_resource(t, RLIMIT_SIGPENDING, atomic_read(&user->sigpending), 1); 50148+ gr_learn_resource(t, RLIMIT_SIGPENDING, atomic_read(&user->sigpending), 1);
50149+
51518 if (override_rlimit || 50150 if (override_rlimit ||
51519 atomic_read(&user->sigpending) <= 50151 atomic_read(&user->sigpending) <=
51520 t->signal->rlim[RLIMIT_SIGPENDING].rlim_cur) 50152 task_rlimit(t, RLIMIT_SIGPENDING)) {
51521@@ -327,7 +330,7 @@ flush_signal_handlers(struct task_struct 50153@@ -367,7 +370,7 @@ flush_signal_handlers(struct task_struct
51522 50154
51523 int unhandled_signal(struct task_struct *tsk, int sig) 50155 int unhandled_signal(struct task_struct *tsk, int sig)
51524 { 50156 {
@@ -51527,7 +50159,7 @@ diff -urNp linux-2.6.32.24/kernel/signal.c linux-2.6.32.24/kernel/signal.c
51527 if (is_global_init(tsk)) 50159 if (is_global_init(tsk))
51528 return 1; 50160 return 1;
51529 if (handler != SIG_IGN && handler != SIG_DFL) 50161 if (handler != SIG_IGN && handler != SIG_DFL)
51530@@ -627,6 +630,9 @@ static int check_kill_permission(int sig 50162@@ -678,6 +681,9 @@ static int check_kill_permission(int sig
51531 } 50163 }
51532 } 50164 }
51533 50165
@@ -51537,7 +50169,7 @@ diff -urNp linux-2.6.32.24/kernel/signal.c linux-2.6.32.24/kernel/signal.c
51537 return security_task_kill(t, info, sig, 0); 50169 return security_task_kill(t, info, sig, 0);
51538 } 50170 }
51539 50171
51540@@ -968,7 +974,7 @@ __group_send_sig_info(int sig, struct si 50172@@ -1025,7 +1031,7 @@ __group_send_sig_info(int sig, struct si
51541 return send_signal(sig, info, p, 1); 50173 return send_signal(sig, info, p, 1);
51542 } 50174 }
51543 50175
@@ -51546,7 +50178,7 @@ diff -urNp linux-2.6.32.24/kernel/signal.c linux-2.6.32.24/kernel/signal.c
51546 specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t) 50178 specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
51547 { 50179 {
51548 return send_signal(sig, info, t, 0); 50180 return send_signal(sig, info, t, 0);
51549@@ -1022,6 +1028,9 @@ force_sig_info(int sig, struct siginfo * 50181@@ -1079,6 +1085,9 @@ force_sig_info(int sig, struct siginfo *
51550 ret = specific_send_sig_info(sig, info, t); 50182 ret = specific_send_sig_info(sig, info, t);
51551 spin_unlock_irqrestore(&t->sighand->siglock, flags); 50183 spin_unlock_irqrestore(&t->sighand->siglock, flags);
51552 50184
@@ -51556,9 +50188,9 @@ diff -urNp linux-2.6.32.24/kernel/signal.c linux-2.6.32.24/kernel/signal.c
51556 return ret; 50188 return ret;
51557 } 50189 }
51558 50190
51559@@ -1081,8 +1090,11 @@ int group_send_sig_info(int sig, struct 50191@@ -1136,8 +1145,11 @@ int group_send_sig_info(int sig, struct
51560 { 50192 ret = check_kill_permission(sig, info, p);
51561 int ret = check_kill_permission(sig, info, p); 50193 rcu_read_unlock();
51562 50194
51563- if (!ret && sig) 50195- if (!ret && sig)
51564+ if (!ret && sig) { 50196+ if (!ret && sig) {
@@ -51569,39 +50201,39 @@ diff -urNp linux-2.6.32.24/kernel/signal.c linux-2.6.32.24/kernel/signal.c
51569 50201
51570 return ret; 50202 return ret;
51571 } 50203 }
51572diff -urNp linux-2.6.32.24/kernel/smp.c linux-2.6.32.24/kernel/smp.c 50204diff -urNp linux-2.6.35.7/kernel/smp.c linux-2.6.35.7/kernel/smp.c
51573--- linux-2.6.32.24/kernel/smp.c 2010-08-13 16:24:37.000000000 -0400 50205--- linux-2.6.35.7/kernel/smp.c 2010-08-26 19:47:12.000000000 -0400
51574+++ linux-2.6.32.24/kernel/smp.c 2010-10-23 19:59:20.000000000 -0400 50206+++ linux-2.6.35.7/kernel/smp.c 2010-09-17 20:12:09.000000000 -0400
51575@@ -459,22 +459,22 @@ int smp_call_function(void (*func)(void 50207@@ -499,22 +499,22 @@ int smp_call_function(void (*func)(void
51576 } 50208 }
51577 EXPORT_SYMBOL(smp_call_function); 50209 EXPORT_SYMBOL(smp_call_function);
51578 50210
51579-void ipi_call_lock(void) 50211-void ipi_call_lock(void)
51580+void ipi_call_lock(void) __acquires(call_function.lock) 50212+void ipi_call_lock(void) __acquires(call_function.lock)
51581 { 50213 {
51582 spin_lock(&call_function.lock); 50214 raw_spin_lock(&call_function.lock);
51583 } 50215 }
51584 50216
51585-void ipi_call_unlock(void) 50217-void ipi_call_unlock(void)
51586+void ipi_call_unlock(void) __releases(call_function.lock) 50218+void ipi_call_unlock(void) __releases(call_function.lock)
51587 { 50219 {
51588 spin_unlock(&call_function.lock); 50220 raw_spin_unlock(&call_function.lock);
51589 } 50221 }
51590 50222
51591-void ipi_call_lock_irq(void) 50223-void ipi_call_lock_irq(void)
51592+void ipi_call_lock_irq(void) __acquires(call_function.lock) 50224+void ipi_call_lock_irq(void) __acquires(call_function.lock)
51593 { 50225 {
51594 spin_lock_irq(&call_function.lock); 50226 raw_spin_lock_irq(&call_function.lock);
51595 } 50227 }
51596 50228
51597-void ipi_call_unlock_irq(void) 50229-void ipi_call_unlock_irq(void)
51598+void ipi_call_unlock_irq(void) __releases(call_function.lock) 50230+void ipi_call_unlock_irq(void) __releases(call_function.lock)
51599 { 50231 {
51600 spin_unlock_irq(&call_function.lock); 50232 raw_spin_unlock_irq(&call_function.lock);
51601 } 50233 }
51602diff -urNp linux-2.6.32.24/kernel/softirq.c linux-2.6.32.24/kernel/softirq.c 50234diff -urNp linux-2.6.35.7/kernel/softirq.c linux-2.6.35.7/kernel/softirq.c
51603--- linux-2.6.32.24/kernel/softirq.c 2010-08-13 16:24:37.000000000 -0400 50235--- linux-2.6.35.7/kernel/softirq.c 2010-08-26 19:47:12.000000000 -0400
51604+++ linux-2.6.32.24/kernel/softirq.c 2010-10-23 19:59:20.000000000 -0400 50236+++ linux-2.6.35.7/kernel/softirq.c 2010-09-17 20:12:09.000000000 -0400
51605@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec 50237@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec
51606 50238
51607 static DEFINE_PER_CPU(struct task_struct *, ksoftirqd); 50239 static DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
@@ -51656,10 +50288,10 @@ diff -urNp linux-2.6.32.24/kernel/softirq.c linux-2.6.32.24/kernel/softirq.c
51656 { 50288 {
51657 struct tasklet_struct *list; 50289 struct tasklet_struct *list;
51658 50290
51659diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c 50291diff -urNp linux-2.6.35.7/kernel/sys.c linux-2.6.35.7/kernel/sys.c
51660--- linux-2.6.32.24/kernel/sys.c 2010-09-26 17:26:05.000000000 -0400 50292--- linux-2.6.35.7/kernel/sys.c 2010-09-26 17:32:11.000000000 -0400
51661+++ linux-2.6.32.24/kernel/sys.c 2010-10-23 19:59:20.000000000 -0400 50293+++ linux-2.6.35.7/kernel/sys.c 2010-09-26 17:32:50.000000000 -0400
51662@@ -133,6 +133,12 @@ static int set_one_prio(struct task_stru 50294@@ -134,6 +134,12 @@ static int set_one_prio(struct task_stru
51663 error = -EACCES; 50295 error = -EACCES;
51664 goto out; 50296 goto out;
51665 } 50297 }
@@ -51672,36 +50304,7 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51672 no_nice = security_task_setnice(p, niceval); 50304 no_nice = security_task_setnice(p, niceval);
51673 if (no_nice) { 50305 if (no_nice) {
51674 error = no_nice; 50306 error = no_nice;
51675@@ -190,10 +196,10 @@ SYSCALL_DEFINE3(setpriority, int, which, 50307@@ -511,6 +517,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, g
51676 !(user = find_user(who)))
51677 goto out_unlock; /* No processes for this user */
51678
51679- do_each_thread(g, p)
51680+ do_each_thread(g, p) {
51681 if (__task_cred(p)->uid == who)
51682 error = set_one_prio(p, niceval, error);
51683- while_each_thread(g, p);
51684+ } while_each_thread(g, p);
51685 if (who != cred->uid)
51686 free_uid(user); /* For find_user() */
51687 break;
51688@@ -253,13 +259,13 @@ SYSCALL_DEFINE2(getpriority, int, which,
51689 !(user = find_user(who)))
51690 goto out_unlock; /* No processes for this user */
51691
51692- do_each_thread(g, p)
51693+ do_each_thread(g, p) {
51694 if (__task_cred(p)->uid == who) {
51695 niceval = 20 - task_nice(p);
51696 if (niceval > retval)
51697 retval = niceval;
51698 }
51699- while_each_thread(g, p);
51700+ } while_each_thread(g, p);
51701 if (who != cred->uid)
51702 free_uid(user); /* for find_user() */
51703 break;
51704@@ -509,6 +515,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, g
51705 goto error; 50308 goto error;
51706 } 50309 }
51707 50310
@@ -51711,8 +50314,8 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51711 if (rgid != (gid_t) -1 || 50314 if (rgid != (gid_t) -1 ||
51712 (egid != (gid_t) -1 && egid != old->gid)) 50315 (egid != (gid_t) -1 && egid != old->gid))
51713 new->sgid = new->egid; 50316 new->sgid = new->egid;
51714@@ -542,6 +551,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid) 50317@@ -540,6 +549,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid)
51715 goto error; 50318 old = current_cred();
51716 50319
51717 retval = -EPERM; 50320 retval = -EPERM;
51718+ 50321+
@@ -51722,7 +50325,7 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51722 if (capable(CAP_SETGID)) 50325 if (capable(CAP_SETGID))
51723 new->gid = new->egid = new->sgid = new->fsgid = gid; 50326 new->gid = new->egid = new->sgid = new->fsgid = gid;
51724 else if (gid == old->gid || gid == old->sgid) 50327 else if (gid == old->gid || gid == old->sgid)
51725@@ -632,6 +645,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, u 50328@@ -620,6 +633,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, u
51726 goto error; 50329 goto error;
51727 } 50330 }
51728 50331
@@ -51732,8 +50335,8 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51732 if (new->uid != old->uid) { 50335 if (new->uid != old->uid) {
51733 retval = set_user(new); 50336 retval = set_user(new);
51734 if (retval < 0) 50337 if (retval < 0)
51735@@ -680,6 +696,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid) 50338@@ -664,6 +680,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid)
51736 goto error; 50339 old = current_cred();
51737 50340
51738 retval = -EPERM; 50341 retval = -EPERM;
51739+ 50342+
@@ -51745,7 +50348,7 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51745 if (capable(CAP_SETUID)) { 50348 if (capable(CAP_SETUID)) {
51746 new->suid = new->uid = uid; 50349 new->suid = new->uid = uid;
51747 if (uid != old->uid) { 50350 if (uid != old->uid) {
51748@@ -737,6 +759,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, 50351@@ -718,6 +740,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid,
51749 goto error; 50352 goto error;
51750 } 50353 }
51751 50354
@@ -51755,7 +50358,7 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51755 if (ruid != (uid_t) -1) { 50358 if (ruid != (uid_t) -1) {
51756 new->uid = ruid; 50359 new->uid = ruid;
51757 if (ruid != old->uid) { 50360 if (ruid != old->uid) {
51758@@ -805,6 +830,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, 50361@@ -782,6 +807,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid,
51759 goto error; 50362 goto error;
51760 } 50363 }
51761 50364
@@ -51765,9 +50368,9 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51765 if (rgid != (gid_t) -1) 50368 if (rgid != (gid_t) -1)
51766 new->gid = rgid; 50369 new->gid = rgid;
51767 if (egid != (gid_t) -1) 50370 if (egid != (gid_t) -1)
51768@@ -854,6 +882,9 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid) 50371@@ -828,6 +856,9 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
51769 if (security_task_setuid(uid, (uid_t)-1, (uid_t)-1, LSM_SETID_FS) < 0) 50372 old = current_cred();
51770 goto error; 50373 old_fsuid = old->fsuid;
51771 50374
51772+ if (gr_check_user_change(-1, -1, uid)) 50375+ if (gr_check_user_change(-1, -1, uid))
51773+ goto error; 50376+ goto error;
@@ -51775,7 +50378,15 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51775 if (uid == old->uid || uid == old->euid || 50378 if (uid == old->uid || uid == old->euid ||
51776 uid == old->suid || uid == old->fsuid || 50379 uid == old->suid || uid == old->fsuid ||
51777 capable(CAP_SETUID)) { 50380 capable(CAP_SETUID)) {
51778@@ -894,6 +925,9 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid) 50381@@ -838,6 +869,7 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid)
50382 }
50383 }
50384
50385+error:
50386 abort_creds(new);
50387 return old_fsuid;
50388
50389@@ -864,12 +896,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid)
51779 if (gid == old->gid || gid == old->egid || 50390 if (gid == old->gid || gid == old->egid ||
51780 gid == old->sgid || gid == old->fsgid || 50391 gid == old->sgid || gid == old->fsgid ||
51781 capable(CAP_SETGID)) { 50392 capable(CAP_SETGID)) {
@@ -51785,7 +50396,14 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51785 if (gid != old_fsgid) { 50396 if (gid != old_fsgid) {
51786 new->fsgid = gid; 50397 new->fsgid = gid;
51787 goto change_okay; 50398 goto change_okay;
51788@@ -1459,7 +1493,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsi 50399 }
50400 }
50401
50402+error:
50403 abort_creds(new);
50404 return old_fsgid;
50405
50406@@ -1493,7 +1529,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
51789 error = get_dumpable(me->mm); 50407 error = get_dumpable(me->mm);
51790 break; 50408 break;
51791 case PR_SET_DUMPABLE: 50409 case PR_SET_DUMPABLE:
@@ -51794,11 +50412,11 @@ diff -urNp linux-2.6.32.24/kernel/sys.c linux-2.6.32.24/kernel/sys.c
51794 error = -EINVAL; 50412 error = -EINVAL;
51795 break; 50413 break;
51796 } 50414 }
51797diff -urNp linux-2.6.32.24/kernel/sysctl.c linux-2.6.32.24/kernel/sysctl.c 50415diff -urNp linux-2.6.35.7/kernel/sysctl.c linux-2.6.35.7/kernel/sysctl.c
51798--- linux-2.6.32.24/kernel/sysctl.c 2010-08-13 16:24:37.000000000 -0400 50416--- linux-2.6.35.7/kernel/sysctl.c 2010-08-26 19:47:12.000000000 -0400
51799+++ linux-2.6.32.24/kernel/sysctl.c 2010-10-23 19:59:20.000000000 -0400 50417+++ linux-2.6.35.7/kernel/sysctl.c 2010-10-11 22:41:44.000000000 -0400
51800@@ -63,6 +63,13 @@ 50418@@ -78,6 +78,13 @@
51801 static int deprecated_sysctl_warning(struct __sysctl_args *args); 50419
51802 50420
51803 #if defined(CONFIG_SYSCTL) 50421 #if defined(CONFIG_SYSCTL)
51804+#include <linux/grsecurity.h> 50422+#include <linux/grsecurity.h>
@@ -51810,23 +50428,22 @@ diff -urNp linux-2.6.32.24/kernel/sysctl.c linux-2.6.32.24/kernel/sysctl.c
51810+extern int gr_handle_chroot_sysctl(const int op); 50428+extern int gr_handle_chroot_sysctl(const int op);
51811 50429
51812 /* External variables not in a header file. */ 50430 /* External variables not in a header file. */
51813 extern int C_A_D; 50431 extern int sysctl_overcommit_memory;
51814@@ -168,6 +175,7 @@ static int proc_do_cad_pid(struct ctl_ta 50432@@ -185,6 +192,7 @@ static int sysrq_sysctl_handler(ctl_tabl
51815 static int proc_taint(struct ctl_table *table, int write, 50433 }
51816 void __user *buffer, size_t *lenp, loff_t *ppos); 50434
51817 #endif 50435 #endif
51818+extern ctl_table grsecurity_table[]; 50436+extern struct ctl_table grsecurity_table[];
51819 50437
51820 static struct ctl_table root_table[]; 50438 static struct ctl_table root_table[];
51821 static struct ctl_table_root sysctl_table_root; 50439 static struct ctl_table_root sysctl_table_root;
51822@@ -200,6 +208,21 @@ extern struct ctl_table epoll_table[]; 50440@@ -217,6 +225,20 @@ extern struct ctl_table epoll_table[];
51823 int sysctl_legacy_va_layout; 50441 int sysctl_legacy_va_layout;
51824 #endif 50442 #endif
51825 50443
51826+#ifdef CONFIG_PAX_SOFTMODE 50444+#ifdef CONFIG_PAX_SOFTMODE
51827+static ctl_table pax_table[] = { 50445+static ctl_table pax_table[] = {
51828+ { 50446+ {
51829+ .ctl_name = CTL_UNNUMBERED,
51830+ .procname = "softmode", 50447+ .procname = "softmode",
51831+ .data = &pax_softmode, 50448+ .data = &pax_softmode,
51832+ .maxlen = sizeof(unsigned int), 50449+ .maxlen = sizeof(unsigned int),
@@ -51834,20 +50451,19 @@ diff -urNp linux-2.6.32.24/kernel/sysctl.c linux-2.6.32.24/kernel/sysctl.c
51834+ .proc_handler = &proc_dointvec, 50451+ .proc_handler = &proc_dointvec,
51835+ }, 50452+ },
51836+ 50453+
51837+ { .ctl_name = 0 } 50454+ { }
51838+}; 50455+};
51839+#endif 50456+#endif
51840+ 50457+
51841 extern int prove_locking; 50458 /* The default sysctl tables: */
51842 extern int lock_stat;
51843 50459
51844@@ -251,6 +274,24 @@ static int max_wakeup_granularity_ns = N 50460 static struct ctl_table root_table[] = {
50461@@ -269,6 +291,22 @@ static int max_extfrag_threshold = 1000;
51845 #endif 50462 #endif
51846 50463
51847 static struct ctl_table kern_table[] = { 50464 static struct ctl_table kern_table[] = {
51848+#if defined(CONFIG_GRKERNSEC_SYSCTL) || defined(CONFIG_GRKERNSEC_ROFS) 50465+#if defined(CONFIG_GRKERNSEC_SYSCTL) || defined(CONFIG_GRKERNSEC_ROFS)
51849+ { 50466+ {
51850+ .ctl_name = CTL_UNNUMBERED,
51851+ .procname = "grsecurity", 50467+ .procname = "grsecurity",
51852+ .mode = 0500, 50468+ .mode = 0500,
51853+ .child = grsecurity_table, 50469+ .child = grsecurity_table,
@@ -51856,7 +50472,6 @@ diff -urNp linux-2.6.32.24/kernel/sysctl.c linux-2.6.32.24/kernel/sysctl.c
51856+ 50472+
51857+#ifdef CONFIG_PAX_SOFTMODE 50473+#ifdef CONFIG_PAX_SOFTMODE
51858+ { 50474+ {
51859+ .ctl_name = CTL_UNNUMBERED,
51860+ .procname = "pax", 50475+ .procname = "pax",
51861+ .mode = 0500, 50476+ .mode = 0500,
51862+ .child = pax_table, 50477+ .child = pax_table,
@@ -51864,11 +50479,11 @@ diff -urNp linux-2.6.32.24/kernel/sysctl.c linux-2.6.32.24/kernel/sysctl.c
51864+#endif 50479+#endif
51865+ 50480+
51866 { 50481 {
51867 .ctl_name = CTL_UNNUMBERED,
51868 .procname = "sched_child_runs_first", 50482 .procname = "sched_child_runs_first",
51869@@ -1247,6 +1288,13 @@ static struct ctl_table vm_table[] = { 50483 .data = &sysctl_sched_child_runs_first,
51870 .mode = 0644, 50484@@ -1171,6 +1209,13 @@ static struct ctl_table vm_table[] = {
51871 .proc_handler = &proc_dointvec 50485 .proc_handler = proc_dointvec_minmax,
50486 .extra1 = &zero,
51872 }, 50487 },
51873+ { 50488+ {
51874+ .procname = "heap_stack_gap", 50489+ .procname = "heap_stack_gap",
@@ -51879,26 +50494,8 @@ diff -urNp linux-2.6.32.24/kernel/sysctl.c linux-2.6.32.24/kernel/sysctl.c
51879+ }, 50494+ },
51880 #else 50495 #else
51881 { 50496 {
51882 .ctl_name = CTL_UNNUMBERED, 50497 .procname = "nr_trim_pages",
51883@@ -1803,6 +1851,8 @@ static int do_sysctl_strategy(struct ctl 50498@@ -1686,6 +1731,16 @@ int sysctl_perm(struct ctl_table_root *r
51884 return 0;
51885 }
51886
51887+static int sysctl_perm_nochk(struct ctl_table_root *root, struct ctl_table *table, int op);
51888+
51889 static int parse_table(int __user *name, int nlen,
51890 void __user *oldval, size_t __user *oldlenp,
51891 void __user *newval, size_t newlen,
51892@@ -1821,7 +1871,7 @@ repeat:
51893 if (n == table->ctl_name) {
51894 int error;
51895 if (table->child) {
51896- if (sysctl_perm(root, table, MAY_EXEC))
51897+ if (sysctl_perm_nochk(root, table, MAY_EXEC))
51898 return -EPERM;
51899 name++;
51900 nlen--;
51901@@ -1906,6 +1956,33 @@ int sysctl_perm(struct ctl_table_root *r
51902 int error; 50499 int error;
51903 int mode; 50500 int mode;
51904 50501
@@ -51912,39 +50509,44 @@ diff -urNp linux-2.6.32.24/kernel/sysctl.c linux-2.6.32.24/kernel/sysctl.c
51912+ if (error) 50509+ if (error)
51913+ return error; 50510+ return error;
51914+ 50511+
51915+ error = security_sysctl(table, op & (MAY_READ | MAY_WRITE | MAY_EXEC));
51916+ if (error)
51917+ return error;
51918+
51919+ if (root->permissions)
51920+ mode = root->permissions(root, current->nsproxy, table);
51921+ else
51922+ mode = table->mode;
51923+
51924+ return test_perm(mode, op);
51925+}
51926+
51927+int sysctl_perm_nochk(struct ctl_table_root *root, struct ctl_table *table, int op)
51928+{
51929+ int error;
51930+ int mode;
51931+
51932 error = security_sysctl(table, op & (MAY_READ | MAY_WRITE | MAY_EXEC)); 50512 error = security_sysctl(table, op & (MAY_READ | MAY_WRITE | MAY_EXEC));
51933 if (error) 50513 if (error)
51934 return error; 50514 return error;
51935@@ -2609,7 +2686,7 @@ static int __do_proc_doulongvec_minmax(v 50515@@ -2201,6 +2256,8 @@ static int proc_put_long(void __user **b
51936 vleft = table->maxlen / sizeof(unsigned long); 50516 len = strlen(tmp);
51937 left = *lenp; 50517 if (len > *size)
51938 50518 len = *size;
50519+ if (len > sizeof(tmp))
50520+ len = sizeof(tmp);
50521 if (copy_to_user(*buf, tmp, len))
50522 return -EFAULT;
50523 *size -= len;
50524@@ -2486,7 +2543,7 @@ static int __do_proc_doulongvec_minmax(v
50525 kbuf[left] = 0;
50526 }
50527
51939- for (; left && vleft--; i++, min++, max++, first=0) { 50528- for (; left && vleft--; i++, min++, max++, first=0) {
51940+ for (; left && vleft--; i++, first=0) { 50529+ for (; left && vleft--; i++, first=0) {
50530 unsigned long val;
50531
51941 if (write) { 50532 if (write) {
51942 while (left) { 50533@@ -2506,8 +2563,11 @@ static int __do_proc_doulongvec_minmax(v
51943 char c; 50534 *i = val;
51944diff -urNp linux-2.6.32.24/kernel/taskstats.c linux-2.6.32.24/kernel/taskstats.c 50535 } else {
51945--- linux-2.6.32.24/kernel/taskstats.c 2010-08-13 16:24:37.000000000 -0400 50536 val = convdiv * (*i) / convmul;
51946+++ linux-2.6.32.24/kernel/taskstats.c 2010-10-23 19:59:20.000000000 -0400 50537- if (!first)
51947@@ -26,9 +26,12 @@ 50538+ if (!first) {
50539 err = proc_put_char(&buffer, &left, '\t');
50540+ if (err)
50541+ break;
50542+ }
50543 err = proc_put_long(&buffer, &left, val, false);
50544 if (err)
50545 break;
50546diff -urNp linux-2.6.35.7/kernel/taskstats.c linux-2.6.35.7/kernel/taskstats.c
50547--- linux-2.6.35.7/kernel/taskstats.c 2010-08-26 19:47:12.000000000 -0400
50548+++ linux-2.6.35.7/kernel/taskstats.c 2010-09-17 20:12:37.000000000 -0400
50549@@ -27,9 +27,12 @@
51948 #include <linux/cgroup.h> 50550 #include <linux/cgroup.h>
51949 #include <linux/fs.h> 50551 #include <linux/fs.h>
51950 #include <linux/file.h> 50552 #include <linux/file.h>
@@ -51957,7 +50559,7 @@ diff -urNp linux-2.6.32.24/kernel/taskstats.c linux-2.6.32.24/kernel/taskstats.c
51957 /* 50559 /*
51958 * Maximum length of a cpumask that can be specified in 50560 * Maximum length of a cpumask that can be specified in
51959 * the TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK attribute 50561 * the TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK attribute
51960@@ -433,6 +436,9 @@ static int taskstats_user_cmd(struct sk_ 50562@@ -432,6 +435,9 @@ static int taskstats_user_cmd(struct sk_
51961 size_t size; 50563 size_t size;
51962 cpumask_var_t mask; 50564 cpumask_var_t mask;
51963 50565
@@ -51967,9 +50569,9 @@ diff -urNp linux-2.6.32.24/kernel/taskstats.c linux-2.6.32.24/kernel/taskstats.c
51967 if (!alloc_cpumask_var(&mask, GFP_KERNEL)) 50569 if (!alloc_cpumask_var(&mask, GFP_KERNEL))
51968 return -ENOMEM; 50570 return -ENOMEM;
51969 50571
51970diff -urNp linux-2.6.32.24/kernel/time/tick-broadcast.c linux-2.6.32.24/kernel/time/tick-broadcast.c 50572diff -urNp linux-2.6.35.7/kernel/time/tick-broadcast.c linux-2.6.35.7/kernel/time/tick-broadcast.c
51971--- linux-2.6.32.24/kernel/time/tick-broadcast.c 2010-08-13 16:24:37.000000000 -0400 50573--- linux-2.6.35.7/kernel/time/tick-broadcast.c 2010-08-26 19:47:12.000000000 -0400
51972+++ linux-2.6.32.24/kernel/time/tick-broadcast.c 2010-10-23 19:59:20.000000000 -0400 50574+++ linux-2.6.35.7/kernel/time/tick-broadcast.c 2010-09-17 20:12:09.000000000 -0400
51973@@ -116,7 +116,7 @@ int tick_device_uses_broadcast(struct cl 50575@@ -116,7 +116,7 @@ int tick_device_uses_broadcast(struct cl
51974 * then clear the broadcast bit. 50576 * then clear the broadcast bit.
51975 */ 50577 */
@@ -51979,9 +50581,9 @@ diff -urNp linux-2.6.32.24/kernel/time/tick-broadcast.c linux-2.6.32.24/kernel/t
51979 50581
51980 cpumask_clear_cpu(cpu, tick_get_broadcast_mask()); 50582 cpumask_clear_cpu(cpu, tick_get_broadcast_mask());
51981 tick_broadcast_clear_oneshot(cpu); 50583 tick_broadcast_clear_oneshot(cpu);
51982diff -urNp linux-2.6.32.24/kernel/time/timer_list.c linux-2.6.32.24/kernel/time/timer_list.c 50584diff -urNp linux-2.6.35.7/kernel/time/timer_list.c linux-2.6.35.7/kernel/time/timer_list.c
51983--- linux-2.6.32.24/kernel/time/timer_list.c 2010-08-13 16:24:37.000000000 -0400 50585--- linux-2.6.35.7/kernel/time/timer_list.c 2010-08-26 19:47:12.000000000 -0400
51984+++ linux-2.6.32.24/kernel/time/timer_list.c 2010-10-23 19:59:20.000000000 -0400 50586+++ linux-2.6.35.7/kernel/time/timer_list.c 2010-09-17 20:12:37.000000000 -0400
51985@@ -38,12 +38,16 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base, 50587@@ -38,12 +38,16 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base,
51986 50588
51987 static void print_name_offset(struct seq_file *m, void *sym) 50589 static void print_name_offset(struct seq_file *m, void *sym)
@@ -52011,7 +50613,7 @@ diff -urNp linux-2.6.32.24/kernel/time/timer_list.c linux-2.6.32.24/kernel/time/
52011 SEQ_printf(m, " .index: %d\n", 50613 SEQ_printf(m, " .index: %d\n",
52012 base->index); 50614 base->index);
52013 SEQ_printf(m, " .resolution: %Lu nsecs\n", 50615 SEQ_printf(m, " .resolution: %Lu nsecs\n",
52014@@ -289,7 +297,11 @@ static int __init init_timer_list_procfs 50616@@ -293,7 +301,11 @@ static int __init init_timer_list_procfs
52015 { 50617 {
52016 struct proc_dir_entry *pe; 50618 struct proc_dir_entry *pe;
52017 50619
@@ -52023,9 +50625,9 @@ diff -urNp linux-2.6.32.24/kernel/time/timer_list.c linux-2.6.32.24/kernel/time/
52023 if (!pe) 50625 if (!pe)
52024 return -ENOMEM; 50626 return -ENOMEM;
52025 return 0; 50627 return 0;
52026diff -urNp linux-2.6.32.24/kernel/time/timer_stats.c linux-2.6.32.24/kernel/time/timer_stats.c 50628diff -urNp linux-2.6.35.7/kernel/time/timer_stats.c linux-2.6.35.7/kernel/time/timer_stats.c
52027--- linux-2.6.32.24/kernel/time/timer_stats.c 2010-08-13 16:24:37.000000000 -0400 50629--- linux-2.6.35.7/kernel/time/timer_stats.c 2010-08-26 19:47:12.000000000 -0400
52028+++ linux-2.6.32.24/kernel/time/timer_stats.c 2010-10-23 19:59:20.000000000 -0400 50630+++ linux-2.6.35.7/kernel/time/timer_stats.c 2010-09-17 20:12:37.000000000 -0400
52029@@ -269,12 +269,16 @@ void timer_stats_update_stats(void *time 50631@@ -269,12 +269,16 @@ void timer_stats_update_stats(void *time
52030 50632
52031 static void print_name_offset(struct seq_file *m, unsigned long addr) 50633 static void print_name_offset(struct seq_file *m, unsigned long addr)
@@ -52043,7 +50645,7 @@ diff -urNp linux-2.6.32.24/kernel/time/timer_stats.c linux-2.6.32.24/kernel/time
52043 } 50645 }
52044 50646
52045 static int tstats_show(struct seq_file *m, void *v) 50647 static int tstats_show(struct seq_file *m, void *v)
52046@@ -415,7 +419,11 @@ static int __init init_tstats_procfs(voi 50648@@ -417,7 +421,11 @@ static int __init init_tstats_procfs(voi
52047 { 50649 {
52048 struct proc_dir_entry *pe; 50650 struct proc_dir_entry *pe;
52049 50651
@@ -52055,10 +50657,10 @@ diff -urNp linux-2.6.32.24/kernel/time/timer_stats.c linux-2.6.32.24/kernel/time
52055 if (!pe) 50657 if (!pe)
52056 return -ENOMEM; 50658 return -ENOMEM;
52057 return 0; 50659 return 0;
52058diff -urNp linux-2.6.32.24/kernel/time.c linux-2.6.32.24/kernel/time.c 50660diff -urNp linux-2.6.35.7/kernel/time.c linux-2.6.35.7/kernel/time.c
52059--- linux-2.6.32.24/kernel/time.c 2010-08-13 16:24:37.000000000 -0400 50661--- linux-2.6.35.7/kernel/time.c 2010-08-26 19:47:12.000000000 -0400
52060+++ linux-2.6.32.24/kernel/time.c 2010-10-23 19:59:20.000000000 -0400 50662+++ linux-2.6.35.7/kernel/time.c 2010-09-17 20:12:37.000000000 -0400
52061@@ -94,6 +94,9 @@ SYSCALL_DEFINE1(stime, time_t __user *, 50663@@ -93,6 +93,9 @@ SYSCALL_DEFINE1(stime, time_t __user *,
52062 return err; 50664 return err;
52063 50665
52064 do_settimeofday(&tv); 50666 do_settimeofday(&tv);
@@ -52068,7 +50670,7 @@ diff -urNp linux-2.6.32.24/kernel/time.c linux-2.6.32.24/kernel/time.c
52068 return 0; 50670 return 0;
52069 } 50671 }
52070 50672
52071@@ -202,6 +205,8 @@ SYSCALL_DEFINE2(settimeofday, struct tim 50673@@ -200,6 +203,8 @@ SYSCALL_DEFINE2(settimeofday, struct tim
52072 return -EFAULT; 50674 return -EFAULT;
52073 } 50675 }
52074 50676
@@ -52077,7 +50679,7 @@ diff -urNp linux-2.6.32.24/kernel/time.c linux-2.6.32.24/kernel/time.c
52077 return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL); 50679 return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
52078 } 50680 }
52079 50681
52080@@ -240,7 +245,7 @@ EXPORT_SYMBOL(current_fs_time); 50682@@ -238,7 +243,7 @@ EXPORT_SYMBOL(current_fs_time);
52081 * Avoid unnecessary multiplications/divisions in the 50683 * Avoid unnecessary multiplications/divisions in the
52082 * two most common HZ cases: 50684 * two most common HZ cases:
52083 */ 50685 */
@@ -52086,7 +50688,7 @@ diff -urNp linux-2.6.32.24/kernel/time.c linux-2.6.32.24/kernel/time.c
52086 { 50688 {
52087 #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ) 50689 #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
52088 return (MSEC_PER_SEC / HZ) * j; 50690 return (MSEC_PER_SEC / HZ) * j;
52089@@ -256,7 +261,7 @@ unsigned int inline jiffies_to_msecs(con 50691@@ -254,7 +259,7 @@ unsigned int inline jiffies_to_msecs(con
52090 } 50692 }
52091 EXPORT_SYMBOL(jiffies_to_msecs); 50693 EXPORT_SYMBOL(jiffies_to_msecs);
52092 50694
@@ -52095,10 +50697,10 @@ diff -urNp linux-2.6.32.24/kernel/time.c linux-2.6.32.24/kernel/time.c
52095 { 50697 {
52096 #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ) 50698 #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
52097 return (USEC_PER_SEC / HZ) * j; 50699 return (USEC_PER_SEC / HZ) * j;
52098diff -urNp linux-2.6.32.24/kernel/timer.c linux-2.6.32.24/kernel/timer.c 50700diff -urNp linux-2.6.35.7/kernel/timer.c linux-2.6.35.7/kernel/timer.c
52099--- linux-2.6.32.24/kernel/timer.c 2010-08-13 16:24:37.000000000 -0400 50701--- linux-2.6.35.7/kernel/timer.c 2010-08-26 19:47:12.000000000 -0400
52100+++ linux-2.6.32.24/kernel/timer.c 2010-10-23 19:59:20.000000000 -0400 50702+++ linux-2.6.35.7/kernel/timer.c 2010-09-17 20:12:09.000000000 -0400
52101@@ -1207,7 +1207,7 @@ void update_process_times(int user_tick) 50703@@ -1272,7 +1272,7 @@ void update_process_times(int user_tick)
52102 /* 50704 /*
52103 * This function runs timers and the timer-tq in bottom half context. 50705 * This function runs timers and the timer-tq in bottom half context.
52104 */ 50706 */
@@ -52107,10 +50709,10 @@ diff -urNp linux-2.6.32.24/kernel/timer.c linux-2.6.32.24/kernel/timer.c
52107 { 50709 {
52108 struct tvec_base *base = __get_cpu_var(tvec_bases); 50710 struct tvec_base *base = __get_cpu_var(tvec_bases);
52109 50711
52110diff -urNp linux-2.6.32.24/kernel/trace/ftrace.c linux-2.6.32.24/kernel/trace/ftrace.c 50712diff -urNp linux-2.6.35.7/kernel/trace/ftrace.c linux-2.6.35.7/kernel/trace/ftrace.c
52111--- linux-2.6.32.24/kernel/trace/ftrace.c 2010-09-20 17:26:42.000000000 -0400 50713--- linux-2.6.35.7/kernel/trace/ftrace.c 2010-09-20 17:33:09.000000000 -0400
52112+++ linux-2.6.32.24/kernel/trace/ftrace.c 2010-10-23 19:59:20.000000000 -0400 50714+++ linux-2.6.35.7/kernel/trace/ftrace.c 2010-09-20 17:33:37.000000000 -0400
52113@@ -1100,13 +1100,18 @@ ftrace_code_disable(struct module *mod, 50715@@ -1108,13 +1108,18 @@ ftrace_code_disable(struct module *mod,
52114 50716
52115 ip = rec->ip; 50717 ip = rec->ip;
52116 50718
@@ -52131,10 +50733,10 @@ diff -urNp linux-2.6.32.24/kernel/trace/ftrace.c linux-2.6.32.24/kernel/trace/ft
52131 } 50733 }
52132 50734
52133 /* 50735 /*
52134diff -urNp linux-2.6.32.24/kernel/trace/ring_buffer.c linux-2.6.32.24/kernel/trace/ring_buffer.c 50736diff -urNp linux-2.6.35.7/kernel/trace/ring_buffer.c linux-2.6.35.7/kernel/trace/ring_buffer.c
52135--- linux-2.6.32.24/kernel/trace/ring_buffer.c 2010-08-13 16:24:37.000000000 -0400 50737--- linux-2.6.35.7/kernel/trace/ring_buffer.c 2010-08-26 19:47:12.000000000 -0400
52136+++ linux-2.6.32.24/kernel/trace/ring_buffer.c 2010-10-23 19:59:20.000000000 -0400 50738+++ linux-2.6.35.7/kernel/trace/ring_buffer.c 2010-09-17 20:12:09.000000000 -0400
52137@@ -606,7 +606,7 @@ static struct list_head *rb_list_head(st 50739@@ -635,7 +635,7 @@ static struct list_head *rb_list_head(st
52138 * the reader page). But if the next page is a header page, 50740 * the reader page). But if the next page is a header page,
52139 * its flags will be non zero. 50741 * its flags will be non zero.
52140 */ 50742 */
@@ -52143,10 +50745,10 @@ diff -urNp linux-2.6.32.24/kernel/trace/ring_buffer.c linux-2.6.32.24/kernel/tra
52143 rb_is_head_page(struct ring_buffer_per_cpu *cpu_buffer, 50745 rb_is_head_page(struct ring_buffer_per_cpu *cpu_buffer,
52144 struct buffer_page *page, struct list_head *list) 50746 struct buffer_page *page, struct list_head *list)
52145 { 50747 {
52146diff -urNp linux-2.6.32.24/kernel/trace/trace.c linux-2.6.32.24/kernel/trace/trace.c 50748diff -urNp linux-2.6.35.7/kernel/trace/trace.c linux-2.6.35.7/kernel/trace/trace.c
52147--- linux-2.6.32.24/kernel/trace/trace.c 2010-08-13 16:24:37.000000000 -0400 50749--- linux-2.6.35.7/kernel/trace/trace.c 2010-08-26 19:47:12.000000000 -0400
52148+++ linux-2.6.32.24/kernel/trace/trace.c 2010-10-23 19:59:20.000000000 -0400 50750+++ linux-2.6.35.7/kernel/trace/trace.c 2010-09-17 20:12:09.000000000 -0400
52149@@ -3808,10 +3808,9 @@ static const struct file_operations trac 50751@@ -3965,10 +3965,9 @@ static const struct file_operations trac
52150 }; 50752 };
52151 #endif 50753 #endif
52152 50754
@@ -52158,7 +50760,7 @@ diff -urNp linux-2.6.32.24/kernel/trace/trace.c linux-2.6.32.24/kernel/trace/tra
52158 static int once; 50760 static int once;
52159 50761
52160 if (d_tracer) 50762 if (d_tracer)
52161@@ -3831,10 +3830,9 @@ struct dentry *tracing_init_dentry(void) 50763@@ -3988,10 +3987,9 @@ struct dentry *tracing_init_dentry(void)
52162 return d_tracer; 50764 return d_tracer;
52163 } 50765 }
52164 50766
@@ -52170,23 +50772,11 @@ diff -urNp linux-2.6.32.24/kernel/trace/trace.c linux-2.6.32.24/kernel/trace/tra
52170 static int once; 50772 static int once;
52171 struct dentry *d_tracer; 50773 struct dentry *d_tracer;
52172 50774
52173diff -urNp linux-2.6.32.24/kernel/trace/trace_events.c linux-2.6.32.24/kernel/trace/trace_events.c 50775diff -urNp linux-2.6.35.7/kernel/trace/trace_output.c linux-2.6.35.7/kernel/trace/trace_output.c
52174--- linux-2.6.32.24/kernel/trace/trace_events.c 2010-08-13 16:24:37.000000000 -0400 50776--- linux-2.6.35.7/kernel/trace/trace_output.c 2010-08-26 19:47:12.000000000 -0400
52175+++ linux-2.6.32.24/kernel/trace/trace_events.c 2010-10-23 19:59:20.000000000 -0400 50777+++ linux-2.6.35.7/kernel/trace/trace_output.c 2010-09-17 20:12:09.000000000 -0400
52176@@ -951,6 +951,8 @@ static LIST_HEAD(ftrace_module_file_list 50778@@ -281,7 +281,7 @@ int trace_seq_path(struct trace_seq *s,
52177 * Modules must own their file_operations to keep up with 50779
52178 * reference counting.
52179 */
52180+
52181+/* cannot be const */
52182 struct ftrace_module_file_ops {
52183 struct list_head list;
52184 struct module *mod;
52185diff -urNp linux-2.6.32.24/kernel/trace/trace_output.c linux-2.6.32.24/kernel/trace/trace_output.c
52186--- linux-2.6.32.24/kernel/trace/trace_output.c 2010-08-13 16:24:37.000000000 -0400
52187+++ linux-2.6.32.24/kernel/trace/trace_output.c 2010-10-23 19:59:20.000000000 -0400
52188@@ -237,7 +237,7 @@ int trace_seq_path(struct trace_seq *s,
52189 return 0;
52190 p = d_path(path, s->buffer + s->len, PAGE_SIZE - s->len); 50780 p = d_path(path, s->buffer + s->len, PAGE_SIZE - s->len);
52191 if (!IS_ERR(p)) { 50781 if (!IS_ERR(p)) {
52192- p = mangle_path(s->buffer + s->len, p, "\n"); 50782- p = mangle_path(s->buffer + s->len, p, "\n");
@@ -52194,9 +50784,9 @@ diff -urNp linux-2.6.32.24/kernel/trace/trace_output.c linux-2.6.32.24/kernel/tr
52194 if (p) { 50784 if (p) {
52195 s->len = p - s->buffer; 50785 s->len = p - s->buffer;
52196 return 1; 50786 return 1;
52197diff -urNp linux-2.6.32.24/kernel/trace/trace_stack.c linux-2.6.32.24/kernel/trace/trace_stack.c 50787diff -urNp linux-2.6.35.7/kernel/trace/trace_stack.c linux-2.6.35.7/kernel/trace/trace_stack.c
52198--- linux-2.6.32.24/kernel/trace/trace_stack.c 2010-08-13 16:24:37.000000000 -0400 50788--- linux-2.6.35.7/kernel/trace/trace_stack.c 2010-08-26 19:47:12.000000000 -0400
52199+++ linux-2.6.32.24/kernel/trace/trace_stack.c 2010-10-23 19:59:20.000000000 -0400 50789+++ linux-2.6.35.7/kernel/trace/trace_stack.c 2010-09-17 20:12:09.000000000 -0400
52200@@ -50,7 +50,7 @@ static inline void check_stack(void) 50790@@ -50,7 +50,7 @@ static inline void check_stack(void)
52201 return; 50791 return;
52202 50792
@@ -52206,30 +50796,9 @@ diff -urNp linux-2.6.32.24/kernel/trace/trace_stack.c linux-2.6.32.24/kernel/tra
52206 return; 50796 return;
52207 50797
52208 local_irq_save(flags); 50798 local_irq_save(flags);
52209diff -urNp linux-2.6.32.24/kernel/utsname_sysctl.c linux-2.6.32.24/kernel/utsname_sysctl.c 50799diff -urNp linux-2.6.35.7/lib/bug.c linux-2.6.35.7/lib/bug.c
52210--- linux-2.6.32.24/kernel/utsname_sysctl.c 2010-08-13 16:24:37.000000000 -0400 50800--- linux-2.6.35.7/lib/bug.c 2010-08-26 19:47:12.000000000 -0400
52211+++ linux-2.6.32.24/kernel/utsname_sysctl.c 2010-10-23 19:59:20.000000000 -0400 50801+++ linux-2.6.35.7/lib/bug.c 2010-09-17 20:12:09.000000000 -0400
52212@@ -123,7 +123,7 @@ static struct ctl_table uts_kern_table[]
52213 .proc_handler = proc_do_uts_string,
52214 .strategy = sysctl_uts_string,
52215 },
52216- {}
52217+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
52218 };
52219
52220 static struct ctl_table uts_root_table[] = {
52221@@ -133,7 +133,7 @@ static struct ctl_table uts_root_table[]
52222 .mode = 0555,
52223 .child = uts_kern_table,
52224 },
52225- {}
52226+ { 0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL }
52227 };
52228
52229 static int __init utsname_sysctl_init(void)
52230diff -urNp linux-2.6.32.24/lib/bug.c linux-2.6.32.24/lib/bug.c
52231--- linux-2.6.32.24/lib/bug.c 2010-08-13 16:24:37.000000000 -0400
52232+++ linux-2.6.32.24/lib/bug.c 2010-10-23 19:59:20.000000000 -0400
52233@@ -135,6 +135,8 @@ enum bug_trap_type report_bug(unsigned l 50802@@ -135,6 +135,8 @@ enum bug_trap_type report_bug(unsigned l
52234 return BUG_TRAP_TYPE_NONE; 50803 return BUG_TRAP_TYPE_NONE;
52235 50804
@@ -52239,10 +50808,10 @@ diff -urNp linux-2.6.32.24/lib/bug.c linux-2.6.32.24/lib/bug.c
52239 50808
52240 printk(KERN_EMERG "------------[ cut here ]------------\n"); 50809 printk(KERN_EMERG "------------[ cut here ]------------\n");
52241 50810
52242diff -urNp linux-2.6.32.24/lib/debugobjects.c linux-2.6.32.24/lib/debugobjects.c 50811diff -urNp linux-2.6.35.7/lib/debugobjects.c linux-2.6.35.7/lib/debugobjects.c
52243--- linux-2.6.32.24/lib/debugobjects.c 2010-08-13 16:24:37.000000000 -0400 50812--- linux-2.6.35.7/lib/debugobjects.c 2010-08-26 19:47:12.000000000 -0400
52244+++ linux-2.6.32.24/lib/debugobjects.c 2010-10-23 19:59:20.000000000 -0400 50813+++ linux-2.6.35.7/lib/debugobjects.c 2010-09-17 20:12:09.000000000 -0400
52245@@ -277,7 +277,7 @@ static void debug_object_is_on_stack(voi 50814@@ -281,7 +281,7 @@ static void debug_object_is_on_stack(voi
52246 if (limit > 4) 50815 if (limit > 4)
52247 return; 50816 return;
52248 50817
@@ -52251,9 +50820,9 @@ diff -urNp linux-2.6.32.24/lib/debugobjects.c linux-2.6.32.24/lib/debugobjects.c
52251 if (is_on_stack == onstack) 50820 if (is_on_stack == onstack)
52252 return; 50821 return;
52253 50822
52254diff -urNp linux-2.6.32.24/lib/dma-debug.c linux-2.6.32.24/lib/dma-debug.c 50823diff -urNp linux-2.6.35.7/lib/dma-debug.c linux-2.6.35.7/lib/dma-debug.c
52255--- linux-2.6.32.24/lib/dma-debug.c 2010-08-13 16:24:37.000000000 -0400 50824--- linux-2.6.35.7/lib/dma-debug.c 2010-08-26 19:47:12.000000000 -0400
52256+++ linux-2.6.32.24/lib/dma-debug.c 2010-10-23 19:59:20.000000000 -0400 50825+++ linux-2.6.35.7/lib/dma-debug.c 2010-09-17 20:12:09.000000000 -0400
52257@@ -861,7 +861,7 @@ out: 50826@@ -861,7 +861,7 @@ out:
52258 50827
52259 static void check_for_stack(struct device *dev, void *addr) 50828 static void check_for_stack(struct device *dev, void *addr)
@@ -52263,22 +50832,10 @@ diff -urNp linux-2.6.32.24/lib/dma-debug.c linux-2.6.32.24/lib/dma-debug.c
52263 err_printk(dev, NULL, "DMA-API: device driver maps memory from" 50832 err_printk(dev, NULL, "DMA-API: device driver maps memory from"
52264 "stack [addr=%p]\n", addr); 50833 "stack [addr=%p]\n", addr);
52265 } 50834 }
52266diff -urNp linux-2.6.32.24/lib/idr.c linux-2.6.32.24/lib/idr.c 50835diff -urNp linux-2.6.35.7/lib/inflate.c linux-2.6.35.7/lib/inflate.c
52267--- linux-2.6.32.24/lib/idr.c 2010-08-13 16:24:37.000000000 -0400 50836--- linux-2.6.35.7/lib/inflate.c 2010-08-26 19:47:12.000000000 -0400
52268+++ linux-2.6.32.24/lib/idr.c 2010-10-23 19:59:20.000000000 -0400 50837+++ linux-2.6.35.7/lib/inflate.c 2010-09-17 20:12:09.000000000 -0400
52269@@ -156,7 +156,7 @@ static int sub_alloc(struct idr *idp, in 50838@@ -267,7 +267,7 @@ static void free(void *where)
52270 id = (id | ((1 << (IDR_BITS * l)) - 1)) + 1;
52271
52272 /* if already at the top layer, we need to grow */
52273- if (id >= 1 << (idp->layers * IDR_BITS)) {
52274+ if (id >= (1 << (idp->layers * IDR_BITS))) {
52275 *starting_id = id;
52276 return IDR_NEED_TO_GROW;
52277 }
52278diff -urNp linux-2.6.32.24/lib/inflate.c linux-2.6.32.24/lib/inflate.c
52279--- linux-2.6.32.24/lib/inflate.c 2010-08-13 16:24:37.000000000 -0400
52280+++ linux-2.6.32.24/lib/inflate.c 2010-10-23 19:59:20.000000000 -0400
52281@@ -266,7 +266,7 @@ static void free(void *where)
52282 malloc_ptr = free_mem_ptr; 50839 malloc_ptr = free_mem_ptr;
52283 } 50840 }
52284 #else 50841 #else
@@ -52287,10 +50844,10 @@ diff -urNp linux-2.6.32.24/lib/inflate.c linux-2.6.32.24/lib/inflate.c
52287 #define free(a) kfree(a) 50844 #define free(a) kfree(a)
52288 #endif 50845 #endif
52289 50846
52290diff -urNp linux-2.6.32.24/lib/Kconfig.debug linux-2.6.32.24/lib/Kconfig.debug 50847diff -urNp linux-2.6.35.7/lib/Kconfig.debug linux-2.6.35.7/lib/Kconfig.debug
52291--- linux-2.6.32.24/lib/Kconfig.debug 2010-08-13 16:24:37.000000000 -0400 50848--- linux-2.6.35.7/lib/Kconfig.debug 2010-08-26 19:47:12.000000000 -0400
52292+++ linux-2.6.32.24/lib/Kconfig.debug 2010-10-23 19:59:20.000000000 -0400 50849+++ linux-2.6.35.7/lib/Kconfig.debug 2010-09-17 20:12:37.000000000 -0400
52293@@ -905,7 +905,7 @@ config LATENCYTOP 50850@@ -970,7 +970,7 @@ config LATENCYTOP
52294 select STACKTRACE 50851 select STACKTRACE
52295 select SCHEDSTATS 50852 select SCHEDSTATS
52296 select SCHED_DEBUG 50853 select SCHED_DEBUG
@@ -52299,52 +50856,10 @@ diff -urNp linux-2.6.32.24/lib/Kconfig.debug linux-2.6.32.24/lib/Kconfig.debug
52299 help 50856 help
52300 Enable this option if you want to use the LatencyTOP tool 50857 Enable this option if you want to use the LatencyTOP tool
52301 to find out which userspace is blocking on what kernel operations. 50858 to find out which userspace is blocking on what kernel operations.
52302diff -urNp linux-2.6.32.24/lib/kobject.c linux-2.6.32.24/lib/kobject.c 50859diff -urNp linux-2.6.35.7/lib/kref.c linux-2.6.35.7/lib/kref.c
52303--- linux-2.6.32.24/lib/kobject.c 2010-08-13 16:24:37.000000000 -0400 50860--- linux-2.6.35.7/lib/kref.c 2010-08-26 19:47:12.000000000 -0400
52304+++ linux-2.6.32.24/lib/kobject.c 2010-10-23 19:59:20.000000000 -0400 50861+++ linux-2.6.35.7/lib/kref.c 2010-10-11 22:41:44.000000000 -0400
52305@@ -700,7 +700,7 @@ static ssize_t kobj_attr_store(struct ko 50862@@ -52,7 +52,7 @@ void kref_get(struct kref *kref)
52306 return ret;
52307 }
52308
52309-struct sysfs_ops kobj_sysfs_ops = {
52310+const struct sysfs_ops kobj_sysfs_ops = {
52311 .show = kobj_attr_show,
52312 .store = kobj_attr_store,
52313 };
52314@@ -789,7 +789,7 @@ static struct kobj_type kset_ktype = {
52315 * If the kset was not able to be created, NULL will be returned.
52316 */
52317 static struct kset *kset_create(const char *name,
52318- struct kset_uevent_ops *uevent_ops,
52319+ const struct kset_uevent_ops *uevent_ops,
52320 struct kobject *parent_kobj)
52321 {
52322 struct kset *kset;
52323@@ -832,7 +832,7 @@ static struct kset *kset_create(const ch
52324 * If the kset was not able to be created, NULL will be returned.
52325 */
52326 struct kset *kset_create_and_add(const char *name,
52327- struct kset_uevent_ops *uevent_ops,
52328+ const struct kset_uevent_ops *uevent_ops,
52329 struct kobject *parent_kobj)
52330 {
52331 struct kset *kset;
52332diff -urNp linux-2.6.32.24/lib/kobject_uevent.c linux-2.6.32.24/lib/kobject_uevent.c
52333--- linux-2.6.32.24/lib/kobject_uevent.c 2010-08-13 16:24:37.000000000 -0400
52334+++ linux-2.6.32.24/lib/kobject_uevent.c 2010-10-23 19:59:20.000000000 -0400
52335@@ -95,7 +95,7 @@ int kobject_uevent_env(struct kobject *k
52336 const char *subsystem;
52337 struct kobject *top_kobj;
52338 struct kset *kset;
52339- struct kset_uevent_ops *uevent_ops;
52340+ const struct kset_uevent_ops *uevent_ops;
52341 u64 seq;
52342 int i = 0;
52343 int retval = 0;
52344diff -urNp linux-2.6.32.24/lib/kref.c linux-2.6.32.24/lib/kref.c
52345--- linux-2.6.32.24/lib/kref.c 2010-08-13 16:24:37.000000000 -0400
52346+++ linux-2.6.32.24/lib/kref.c 2010-10-23 19:59:24.000000000 -0400
52347@@ -61,7 +61,7 @@ void kref_get(struct kref *kref)
52348 */ 50863 */
52349 int kref_put(struct kref *kref, void (*release)(struct kref *kref)) 50864 int kref_put(struct kref *kref, void (*release)(struct kref *kref))
52350 { 50865 {
@@ -52353,10 +50868,10 @@ diff -urNp linux-2.6.32.24/lib/kref.c linux-2.6.32.24/lib/kref.c
52353 WARN_ON(release == (void (*)(struct kref *))kfree); 50868 WARN_ON(release == (void (*)(struct kref *))kfree);
52354 50869
52355 if (atomic_dec_and_test(&kref->refcount)) { 50870 if (atomic_dec_and_test(&kref->refcount)) {
52356diff -urNp linux-2.6.32.24/lib/parser.c linux-2.6.32.24/lib/parser.c 50871diff -urNp linux-2.6.35.7/lib/parser.c linux-2.6.35.7/lib/parser.c
52357--- linux-2.6.32.24/lib/parser.c 2010-08-13 16:24:37.000000000 -0400 50872--- linux-2.6.35.7/lib/parser.c 2010-08-26 19:47:12.000000000 -0400
52358+++ linux-2.6.32.24/lib/parser.c 2010-10-23 19:59:20.000000000 -0400 50873+++ linux-2.6.35.7/lib/parser.c 2010-09-17 20:12:09.000000000 -0400
52359@@ -126,7 +126,7 @@ static int match_number(substring_t *s, 50874@@ -129,7 +129,7 @@ static int match_number(substring_t *s,
52360 char *buf; 50875 char *buf;
52361 int ret; 50876 int ret;
52362 50877
@@ -52365,10 +50880,10 @@ diff -urNp linux-2.6.32.24/lib/parser.c linux-2.6.32.24/lib/parser.c
52365 if (!buf) 50880 if (!buf)
52366 return -ENOMEM; 50881 return -ENOMEM;
52367 memcpy(buf, s->from, s->to - s->from); 50882 memcpy(buf, s->from, s->to - s->from);
52368diff -urNp linux-2.6.32.24/lib/radix-tree.c linux-2.6.32.24/lib/radix-tree.c 50883diff -urNp linux-2.6.35.7/lib/radix-tree.c linux-2.6.35.7/lib/radix-tree.c
52369--- linux-2.6.32.24/lib/radix-tree.c 2010-08-13 16:24:37.000000000 -0400 50884--- linux-2.6.35.7/lib/radix-tree.c 2010-08-26 19:47:12.000000000 -0400
52370+++ linux-2.6.32.24/lib/radix-tree.c 2010-10-23 19:59:20.000000000 -0400 50885+++ linux-2.6.35.7/lib/radix-tree.c 2010-09-17 20:12:09.000000000 -0400
52371@@ -81,7 +81,7 @@ struct radix_tree_preload { 50886@@ -80,7 +80,7 @@ struct radix_tree_preload {
52372 int nr; 50887 int nr;
52373 struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH]; 50888 struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH];
52374 }; 50889 };
@@ -52377,32 +50892,11 @@ diff -urNp linux-2.6.32.24/lib/radix-tree.c linux-2.6.32.24/lib/radix-tree.c
52377 50892
52378 static inline gfp_t root_gfp_mask(struct radix_tree_root *root) 50893 static inline gfp_t root_gfp_mask(struct radix_tree_root *root)
52379 { 50894 {
52380diff -urNp linux-2.6.32.24/lib/random32.c linux-2.6.32.24/lib/random32.c 50895diff -urNp linux-2.6.35.7/lib/vsprintf.c linux-2.6.35.7/lib/vsprintf.c
52381--- linux-2.6.32.24/lib/random32.c 2010-08-13 16:24:37.000000000 -0400 50896--- linux-2.6.35.7/lib/vsprintf.c 2010-08-26 19:47:12.000000000 -0400
52382+++ linux-2.6.32.24/lib/random32.c 2010-10-23 19:59:20.000000000 -0400 50897+++ linux-2.6.35.7/lib/vsprintf.c 2010-09-22 19:19:27.000000000 -0400
52383@@ -61,7 +61,7 @@ static u32 __random32(struct rnd_state * 50898@@ -990,7 +990,7 @@ char *pointer(const char *fmt, char *buf
52384 */ 50899 struct printf_spec spec)
52385 static inline u32 __seed(u32 x, u32 m)
52386 {
52387- return (x < m) ? x + m : x;
52388+ return (x <= m) ? x + m + 1 : x;
52389 }
52390
52391 /**
52392diff -urNp linux-2.6.32.24/lib/vsprintf.c linux-2.6.32.24/lib/vsprintf.c
52393--- linux-2.6.32.24/lib/vsprintf.c 2010-08-13 16:24:37.000000000 -0400
52394+++ linux-2.6.32.24/lib/vsprintf.c 2010-10-23 19:59:20.000000000 -0400
52395@@ -551,7 +551,7 @@ static char *string(char *buf, char *end
52396 int len, i;
52397
52398 if ((unsigned long)s < PAGE_SIZE)
52399- s = "<NULL>";
52400+ s = "(null)";
52401
52402 len = strnlen(s, spec.precision);
52403
52404@@ -822,7 +822,7 @@ static char *pointer(const char *fmt, ch
52405 struct printf_spec spec)
52406 { 50900 {
52407 if (!ptr) 50901 if (!ptr)
52408- return string(buf, end, "(null)", spec); 50902- return string(buf, end, "(null)", spec);
@@ -52410,24 +50904,15 @@ diff -urNp linux-2.6.32.24/lib/vsprintf.c linux-2.6.32.24/lib/vsprintf.c
52410 50904
52411 switch (*fmt) { 50905 switch (*fmt) {
52412 case 'F': 50906 case 'F':
52413@@ -1445,7 +1445,7 @@ do { \ 50907diff -urNp linux-2.6.35.7/localversion-grsec linux-2.6.35.7/localversion-grsec
52414 size_t len; 50908--- linux-2.6.35.7/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
52415 if ((unsigned long)save_str > (unsigned long)-PAGE_SIZE 50909+++ linux-2.6.35.7/localversion-grsec 2010-09-17 20:12:37.000000000 -0400
52416 || (unsigned long)save_str < PAGE_SIZE)
52417- save_str = "<NULL>";
52418+ save_str = "(null)";
52419 len = strlen(save_str);
52420 if (str + len + 1 < end)
52421 memcpy(str, save_str, len + 1);
52422diff -urNp linux-2.6.32.24/localversion-grsec linux-2.6.32.24/localversion-grsec
52423--- linux-2.6.32.24/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
52424+++ linux-2.6.32.24/localversion-grsec 2010-10-23 19:59:20.000000000 -0400
52425@@ -0,0 +1 @@ 50910@@ -0,0 +1 @@
52426+-grsec 50911+-grsec
52427diff -urNp linux-2.6.32.24/Makefile linux-2.6.32.24/Makefile 50912diff -urNp linux-2.6.35.7/Makefile linux-2.6.35.7/Makefile
52428--- linux-2.6.32.24/Makefile 2010-09-28 17:23:28.000000000 -0400 50913--- linux-2.6.35.7/Makefile 2010-09-28 17:23:57.000000000 -0400
52429+++ linux-2.6.32.24/Makefile 2010-10-23 19:59:20.000000000 -0400 50914+++ linux-2.6.35.7/Makefile 2010-10-02 11:43:45.000000000 -0400
52430@@ -221,8 +221,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" 50915@@ -230,8 +230,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
52431 50916
52432 HOSTCC = gcc 50917 HOSTCC = gcc
52433 HOSTCXX = g++ 50918 HOSTCXX = g++
@@ -52438,7 +50923,7 @@ diff -urNp linux-2.6.32.24/Makefile linux-2.6.32.24/Makefile
52438 50923
52439 # Decide whether to build built-in, modular, or both. 50924 # Decide whether to build built-in, modular, or both.
52440 # Normally, just do built-in. 50925 # Normally, just do built-in.
52441@@ -644,7 +644,7 @@ export mod_strip_cmd 50926@@ -650,7 +650,7 @@ export mod_strip_cmd
52442 50927
52443 50928
52444 ifeq ($(KBUILD_EXTMOD),) 50929 ifeq ($(KBUILD_EXTMOD),)
@@ -52447,10 +50932,46 @@ diff -urNp linux-2.6.32.24/Makefile linux-2.6.32.24/Makefile
52447 50932
52448 vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ 50933 vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
52449 $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ 50934 $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
52450diff -urNp linux-2.6.32.24/mm/filemap.c linux-2.6.32.24/mm/filemap.c 50935diff -urNp linux-2.6.35.7/mm/bootmem.c linux-2.6.35.7/mm/bootmem.c
52451--- linux-2.6.32.24/mm/filemap.c 2010-08-13 16:24:37.000000000 -0400 50936--- linux-2.6.35.7/mm/bootmem.c 2010-08-26 19:47:12.000000000 -0400
52452+++ linux-2.6.32.24/mm/filemap.c 2010-10-23 19:59:20.000000000 -0400 50937+++ linux-2.6.35.7/mm/bootmem.c 2010-09-17 20:12:09.000000000 -0400
52453@@ -1628,7 +1628,7 @@ int generic_file_mmap(struct file * file 50938@@ -200,19 +200,30 @@ static void __init __free_pages_memory(u
50939 unsigned long __init free_all_memory_core_early(int nodeid)
50940 {
50941 int i;
50942- u64 start, end;
50943+ u64 start, end, startrange, endrange;
50944 unsigned long count = 0;
50945- struct range *range = NULL;
50946+ struct range *range = NULL, rangerange = { 0, 0 };
50947 int nr_range;
50948
50949 nr_range = get_free_all_memory_range(&range, nodeid);
50950+ startrange = __pa(range) >> PAGE_SHIFT;
50951+ endrange = (__pa(range + nr_range) - 1) >> PAGE_SHIFT;
50952
50953 for (i = 0; i < nr_range; i++) {
50954 start = range[i].start;
50955 end = range[i].end;
50956+ if (start <= endrange && startrange < end) {
50957+ BUG_ON(rangerange.start | rangerange.end);
50958+ rangerange = range[i];
50959+ continue;
50960+ }
50961 count += end - start;
50962 __free_pages_memory(start, end);
50963 }
50964+ start = rangerange.start;
50965+ end = rangerange.end;
50966+ count += end - start;
50967+ __free_pages_memory(start, end);
50968
50969 return count;
50970 }
50971diff -urNp linux-2.6.35.7/mm/filemap.c linux-2.6.35.7/mm/filemap.c
50972--- linux-2.6.35.7/mm/filemap.c 2010-08-26 19:47:12.000000000 -0400
50973+++ linux-2.6.35.7/mm/filemap.c 2010-09-17 20:12:37.000000000 -0400
50974@@ -1640,7 +1640,7 @@ int generic_file_mmap(struct file * file
52454 struct address_space *mapping = file->f_mapping; 50975 struct address_space *mapping = file->f_mapping;
52455 50976
52456 if (!mapping->a_ops->readpage) 50977 if (!mapping->a_ops->readpage)
@@ -52459,7 +50980,7 @@ diff -urNp linux-2.6.32.24/mm/filemap.c linux-2.6.32.24/mm/filemap.c
52459 file_accessed(file); 50980 file_accessed(file);
52460 vma->vm_ops = &generic_file_vm_ops; 50981 vma->vm_ops = &generic_file_vm_ops;
52461 vma->vm_flags |= VM_CAN_NONLINEAR; 50982 vma->vm_flags |= VM_CAN_NONLINEAR;
52462@@ -2024,6 +2024,7 @@ inline int generic_write_checks(struct f 50983@@ -2036,6 +2036,7 @@ inline int generic_write_checks(struct f
52463 *pos = i_size_read(inode); 50984 *pos = i_size_read(inode);
52464 50985
52465 if (limit != RLIM_INFINITY) { 50986 if (limit != RLIM_INFINITY) {
@@ -52467,9 +50988,9 @@ diff -urNp linux-2.6.32.24/mm/filemap.c linux-2.6.32.24/mm/filemap.c
52467 if (*pos >= limit) { 50988 if (*pos >= limit) {
52468 send_sig(SIGXFSZ, current, 0); 50989 send_sig(SIGXFSZ, current, 0);
52469 return -EFBIG; 50990 return -EFBIG;
52470diff -urNp linux-2.6.32.24/mm/fremap.c linux-2.6.32.24/mm/fremap.c 50991diff -urNp linux-2.6.35.7/mm/fremap.c linux-2.6.35.7/mm/fremap.c
52471--- linux-2.6.32.24/mm/fremap.c 2010-08-13 16:24:37.000000000 -0400 50992--- linux-2.6.35.7/mm/fremap.c 2010-08-26 19:47:12.000000000 -0400
52472+++ linux-2.6.32.24/mm/fremap.c 2010-10-23 19:59:20.000000000 -0400 50993+++ linux-2.6.35.7/mm/fremap.c 2010-09-17 20:12:09.000000000 -0400
52473@@ -153,6 +153,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsign 50994@@ -153,6 +153,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
52474 retry: 50995 retry:
52475 vma = find_vma(mm, start); 50996 vma = find_vma(mm, start);
@@ -52491,9 +51012,9 @@ diff -urNp linux-2.6.32.24/mm/fremap.c linux-2.6.32.24/mm/fremap.c
52491 munlock_vma_pages_range(vma, start, start + size); 51012 munlock_vma_pages_range(vma, start, start + size);
52492 vma->vm_flags = saved_flags; 51013 vma->vm_flags = saved_flags;
52493 } 51014 }
52494diff -urNp linux-2.6.32.24/mm/highmem.c linux-2.6.32.24/mm/highmem.c 51015diff -urNp linux-2.6.35.7/mm/highmem.c linux-2.6.35.7/mm/highmem.c
52495--- linux-2.6.32.24/mm/highmem.c 2010-08-13 16:24:37.000000000 -0400 51016--- linux-2.6.35.7/mm/highmem.c 2010-08-26 19:47:12.000000000 -0400
52496+++ linux-2.6.32.24/mm/highmem.c 2010-10-23 19:59:20.000000000 -0400 51017+++ linux-2.6.35.7/mm/highmem.c 2010-09-17 20:12:09.000000000 -0400
52497@@ -116,9 +116,10 @@ static void flush_all_zero_pkmaps(void) 51018@@ -116,9 +116,10 @@ static void flush_all_zero_pkmaps(void)
52498 * So no dangers, even with speculative execution. 51019 * So no dangers, even with speculative execution.
52499 */ 51020 */
@@ -52519,10 +51040,10 @@ diff -urNp linux-2.6.32.24/mm/highmem.c linux-2.6.32.24/mm/highmem.c
52519 pkmap_count[last_pkmap_nr] = 1; 51040 pkmap_count[last_pkmap_nr] = 1;
52520 set_page_address(page, (void *)vaddr); 51041 set_page_address(page, (void *)vaddr);
52521 51042
52522diff -urNp linux-2.6.32.24/mm/hugetlb.c linux-2.6.32.24/mm/hugetlb.c 51043diff -urNp linux-2.6.35.7/mm/hugetlb.c linux-2.6.35.7/mm/hugetlb.c
52523--- linux-2.6.32.24/mm/hugetlb.c 2010-08-13 16:24:37.000000000 -0400 51044--- linux-2.6.35.7/mm/hugetlb.c 2010-08-26 19:47:12.000000000 -0400
52524+++ linux-2.6.32.24/mm/hugetlb.c 2010-10-23 19:59:20.000000000 -0400 51045+++ linux-2.6.35.7/mm/hugetlb.c 2010-09-17 20:12:09.000000000 -0400
52525@@ -1925,6 +1925,26 @@ static int unmap_ref_private(struct mm_s 51046@@ -2272,6 +2272,26 @@ static int unmap_ref_private(struct mm_s
52526 return 1; 51047 return 1;
52527 } 51048 }
52528 51049
@@ -52549,7 +51070,7 @@ diff -urNp linux-2.6.32.24/mm/hugetlb.c linux-2.6.32.24/mm/hugetlb.c
52549 static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma, 51070 static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma,
52550 unsigned long address, pte_t *ptep, pte_t pte, 51071 unsigned long address, pte_t *ptep, pte_t pte,
52551 struct page *pagecache_page) 51072 struct page *pagecache_page)
52552@@ -1996,6 +2016,11 @@ retry_avoidcopy: 51073@@ -2352,6 +2372,11 @@ retry_avoidcopy:
52553 huge_ptep_clear_flush(vma, address, ptep); 51074 huge_ptep_clear_flush(vma, address, ptep);
52554 set_huge_pte_at(mm, address, ptep, 51075 set_huge_pte_at(mm, address, ptep,
52555 make_huge_pte(vma, new_page, 1)); 51076 make_huge_pte(vma, new_page, 1));
@@ -52561,7 +51082,7 @@ diff -urNp linux-2.6.32.24/mm/hugetlb.c linux-2.6.32.24/mm/hugetlb.c
52561 /* Make the old page be freed below */ 51082 /* Make the old page be freed below */
52562 new_page = old_page; 51083 new_page = old_page;
52563 } 51084 }
52564@@ -2127,6 +2152,10 @@ retry: 51085@@ -2483,6 +2508,10 @@ retry:
52565 && (vma->vm_flags & VM_SHARED))); 51086 && (vma->vm_flags & VM_SHARED)));
52566 set_huge_pte_at(mm, address, ptep, new_pte); 51087 set_huge_pte_at(mm, address, ptep, new_pte);
52567 51088
@@ -52572,7 +51093,7 @@ diff -urNp linux-2.6.32.24/mm/hugetlb.c linux-2.6.32.24/mm/hugetlb.c
52572 if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) { 51093 if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
52573 /* Optimization, do the COW without a second fault */ 51094 /* Optimization, do the COW without a second fault */
52574 ret = hugetlb_cow(mm, vma, address, ptep, new_pte, page); 51095 ret = hugetlb_cow(mm, vma, address, ptep, new_pte, page);
52575@@ -2155,6 +2184,28 @@ int hugetlb_fault(struct mm_struct *mm, 51096@@ -2511,6 +2540,28 @@ int hugetlb_fault(struct mm_struct *mm,
52576 static DEFINE_MUTEX(hugetlb_instantiation_mutex); 51097 static DEFINE_MUTEX(hugetlb_instantiation_mutex);
52577 struct hstate *h = hstate_vma(vma); 51098 struct hstate *h = hstate_vma(vma);
52578 51099
@@ -52601,10 +51122,10 @@ diff -urNp linux-2.6.32.24/mm/hugetlb.c linux-2.6.32.24/mm/hugetlb.c
52601 ptep = huge_pte_alloc(mm, address, huge_page_size(h)); 51122 ptep = huge_pte_alloc(mm, address, huge_page_size(h));
52602 if (!ptep) 51123 if (!ptep)
52603 return VM_FAULT_OOM; 51124 return VM_FAULT_OOM;
52604diff -urNp linux-2.6.32.24/mm/Kconfig linux-2.6.32.24/mm/Kconfig 51125diff -urNp linux-2.6.35.7/mm/Kconfig linux-2.6.35.7/mm/Kconfig
52605--- linux-2.6.32.24/mm/Kconfig 2010-08-13 16:24:37.000000000 -0400 51126--- linux-2.6.35.7/mm/Kconfig 2010-08-26 19:47:12.000000000 -0400
52606+++ linux-2.6.32.24/mm/Kconfig 2010-10-23 19:59:20.000000000 -0400 51127+++ linux-2.6.35.7/mm/Kconfig 2010-09-17 20:12:37.000000000 -0400
52607@@ -228,7 +228,7 @@ config KSM 51128@@ -240,7 +240,7 @@ config KSM
52608 config DEFAULT_MMAP_MIN_ADDR 51129 config DEFAULT_MMAP_MIN_ADDR
52609 int "Low address space to protect from user allocation" 51130 int "Low address space to protect from user allocation"
52610 depends on MMU 51131 depends on MMU
@@ -52613,31 +51134,39 @@ diff -urNp linux-2.6.32.24/mm/Kconfig linux-2.6.32.24/mm/Kconfig
52613 help 51134 help
52614 This is the portion of low virtual memory which should be protected 51135 This is the portion of low virtual memory which should be protected
52615 from userspace allocation. Keeping a user from writing to low pages 51136 from userspace allocation. Keeping a user from writing to low pages
52616diff -urNp linux-2.6.32.24/mm/maccess.c linux-2.6.32.24/mm/maccess.c 51137diff -urNp linux-2.6.35.7/mm/maccess.c linux-2.6.35.7/mm/maccess.c
52617--- linux-2.6.32.24/mm/maccess.c 2010-08-13 16:24:37.000000000 -0400 51138--- linux-2.6.35.7/mm/maccess.c 2010-08-26 19:47:12.000000000 -0400
52618+++ linux-2.6.32.24/mm/maccess.c 2010-10-23 19:59:20.000000000 -0400 51139+++ linux-2.6.35.7/mm/maccess.c 2010-09-17 20:12:09.000000000 -0400
52619@@ -14,7 +14,7 @@ 51140@@ -15,10 +15,10 @@
52620 * Safely read from address @src to the buffer at @dst. If a kernel fault
52621 * happens, handle that and return -EFAULT. 51141 * happens, handle that and return -EFAULT.
52622 */ 51142 */
52623-long probe_kernel_read(void *dst, void *src, size_t size) 51143
52624+long probe_kernel_read(void *dst, const void *src, size_t size) 51144-long __weak probe_kernel_read(void *dst, void *src, size_t size)
51145+long __weak probe_kernel_read(void *dst, const void *src, size_t size)
51146 __attribute__((alias("__probe_kernel_read")));
51147
51148-long __probe_kernel_read(void *dst, void *src, size_t size)
51149+long __probe_kernel_read(void *dst, const void *src, size_t size)
52625 { 51150 {
52626 long ret; 51151 long ret;
52627 mm_segment_t old_fs = get_fs(); 51152 mm_segment_t old_fs = get_fs();
52628@@ -39,7 +39,7 @@ EXPORT_SYMBOL_GPL(probe_kernel_read); 51153@@ -43,10 +43,10 @@ EXPORT_SYMBOL_GPL(probe_kernel_read);
52629 * Safely write to address @dst from the buffer at @src. If a kernel fault 51154 * Safely write to address @dst from the buffer at @src. If a kernel fault
52630 * happens, handle that and return -EFAULT. 51155 * happens, handle that and return -EFAULT.
52631 */ 51156 */
52632-long notrace __weak probe_kernel_write(void *dst, void *src, size_t size) 51157-long __weak probe_kernel_write(void *dst, void *src, size_t size)
52633+long notrace __weak probe_kernel_write(void *dst, const void *src, size_t size) 51158+long __weak probe_kernel_write(void *dst, const void *src, size_t size)
51159 __attribute__((alias("__probe_kernel_write")));
51160
51161-long __probe_kernel_write(void *dst, void *src, size_t size)
51162+long __probe_kernel_write(void *dst, const void *src, size_t size)
52634 { 51163 {
52635 long ret; 51164 long ret;
52636 mm_segment_t old_fs = get_fs(); 51165 mm_segment_t old_fs = get_fs();
52637diff -urNp linux-2.6.32.24/mm/madvise.c linux-2.6.32.24/mm/madvise.c 51166diff -urNp linux-2.6.35.7/mm/madvise.c linux-2.6.35.7/mm/madvise.c
52638--- linux-2.6.32.24/mm/madvise.c 2010-08-13 16:24:37.000000000 -0400 51167--- linux-2.6.35.7/mm/madvise.c 2010-08-26 19:47:12.000000000 -0400
52639+++ linux-2.6.32.24/mm/madvise.c 2010-10-23 19:59:20.000000000 -0400 51168+++ linux-2.6.35.7/mm/madvise.c 2010-09-17 20:12:09.000000000 -0400
52640@@ -44,6 +44,10 @@ static long madvise_behavior(struct vm_a 51169@@ -45,6 +45,10 @@ static long madvise_behavior(struct vm_a
52641 pgoff_t pgoff; 51170 pgoff_t pgoff;
52642 unsigned long new_flags = vma->vm_flags; 51171 unsigned long new_flags = vma->vm_flags;
52643 51172
@@ -52648,7 +51177,7 @@ diff -urNp linux-2.6.32.24/mm/madvise.c linux-2.6.32.24/mm/madvise.c
52648 switch (behavior) { 51177 switch (behavior) {
52649 case MADV_NORMAL: 51178 case MADV_NORMAL:
52650 new_flags = new_flags & ~VM_RAND_READ & ~VM_SEQ_READ; 51179 new_flags = new_flags & ~VM_RAND_READ & ~VM_SEQ_READ;
52651@@ -103,6 +107,13 @@ success: 51180@@ -104,6 +108,13 @@ success:
52652 /* 51181 /*
52653 * vm_flags is protected by the mmap_sem held in write mode. 51182 * vm_flags is protected by the mmap_sem held in write mode.
52654 */ 51183 */
@@ -52662,7 +51191,7 @@ diff -urNp linux-2.6.32.24/mm/madvise.c linux-2.6.32.24/mm/madvise.c
52662 vma->vm_flags = new_flags; 51191 vma->vm_flags = new_flags;
52663 51192
52664 out: 51193 out:
52665@@ -161,6 +172,11 @@ static long madvise_dontneed(struct vm_a 51194@@ -162,6 +173,11 @@ static long madvise_dontneed(struct vm_a
52666 struct vm_area_struct ** prev, 51195 struct vm_area_struct ** prev,
52667 unsigned long start, unsigned long end) 51196 unsigned long start, unsigned long end)
52668 { 51197 {
@@ -52674,7 +51203,7 @@ diff -urNp linux-2.6.32.24/mm/madvise.c linux-2.6.32.24/mm/madvise.c
52674 *prev = vma; 51203 *prev = vma;
52675 if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP)) 51204 if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP))
52676 return -EINVAL; 51205 return -EINVAL;
52677@@ -173,6 +189,21 @@ static long madvise_dontneed(struct vm_a 51206@@ -174,6 +190,21 @@ static long madvise_dontneed(struct vm_a
52678 zap_page_range(vma, start, end - start, &details); 51207 zap_page_range(vma, start, end - start, &details);
52679 } else 51208 } else
52680 zap_page_range(vma, start, end - start, NULL); 51209 zap_page_range(vma, start, end - start, NULL);
@@ -52696,7 +51225,7 @@ diff -urNp linux-2.6.32.24/mm/madvise.c linux-2.6.32.24/mm/madvise.c
52696 return 0; 51225 return 0;
52697 } 51226 }
52698 51227
52699@@ -359,6 +390,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, 51228@@ -366,6 +397,16 @@ SYSCALL_DEFINE3(madvise, unsigned long,
52700 if (end < start) 51229 if (end < start)
52701 goto out; 51230 goto out;
52702 51231
@@ -52713,10 +51242,10 @@ diff -urNp linux-2.6.32.24/mm/madvise.c linux-2.6.32.24/mm/madvise.c
52713 error = 0; 51242 error = 0;
52714 if (end == start) 51243 if (end == start)
52715 goto out; 51244 goto out;
52716diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c 51245diff -urNp linux-2.6.35.7/mm/memory.c linux-2.6.35.7/mm/memory.c
52717--- linux-2.6.32.24/mm/memory.c 2010-09-26 17:26:05.000000000 -0400 51246--- linux-2.6.35.7/mm/memory.c 2010-09-26 17:32:11.000000000 -0400
52718+++ linux-2.6.32.24/mm/memory.c 2010-10-23 19:59:24.000000000 -0400 51247+++ linux-2.6.35.7/mm/memory.c 2010-10-11 22:41:44.000000000 -0400
52719@@ -187,8 +187,12 @@ static inline void free_pmd_range(struct 51248@@ -259,8 +259,12 @@ static inline void free_pmd_range(struct
52720 return; 51249 return;
52721 51250
52722 pmd = pmd_offset(pud, start); 51251 pmd = pmd_offset(pud, start);
@@ -52729,7 +51258,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52729 } 51258 }
52730 51259
52731 static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, 51260 static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
52732@@ -219,9 +223,12 @@ static inline void free_pud_range(struct 51261@@ -291,9 +295,12 @@ static inline void free_pud_range(struct
52733 if (end - 1 > ceiling - 1) 51262 if (end - 1 > ceiling - 1)
52734 return; 51263 return;
52735 51264
@@ -52742,7 +51271,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52742 } 51271 }
52743 51272
52744 /* 51273 /*
52745@@ -1251,10 +1258,10 @@ int __get_user_pages(struct task_struct 51274@@ -1363,10 +1370,10 @@ int __get_user_pages(struct task_struct
52746 (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE); 51275 (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
52747 i = 0; 51276 i = 0;
52748 51277
@@ -52755,7 +51284,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52755 if (!vma && in_gate_area(tsk, start)) { 51284 if (!vma && in_gate_area(tsk, start)) {
52756 unsigned long pg = start & PAGE_MASK; 51285 unsigned long pg = start & PAGE_MASK;
52757 struct vm_area_struct *gate_vma = get_gate_vma(tsk); 51286 struct vm_area_struct *gate_vma = get_gate_vma(tsk);
52758@@ -1306,7 +1313,7 @@ int __get_user_pages(struct task_struct 51287@@ -1418,7 +1425,7 @@ int __get_user_pages(struct task_struct
52759 continue; 51288 continue;
52760 } 51289 }
52761 51290
@@ -52764,7 +51293,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52764 (vma->vm_flags & (VM_IO | VM_PFNMAP)) || 51293 (vma->vm_flags & (VM_IO | VM_PFNMAP)) ||
52765 !(vm_flags & vma->vm_flags)) 51294 !(vm_flags & vma->vm_flags))
52766 return i ? : -EFAULT; 51295 return i ? : -EFAULT;
52767@@ -1381,7 +1388,7 @@ int __get_user_pages(struct task_struct 51296@@ -1493,7 +1500,7 @@ int __get_user_pages(struct task_struct
52768 start += PAGE_SIZE; 51297 start += PAGE_SIZE;
52769 nr_pages--; 51298 nr_pages--;
52770 } while (nr_pages && start < vma->vm_end); 51299 } while (nr_pages && start < vma->vm_end);
@@ -52773,7 +51302,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52773 return i; 51302 return i;
52774 } 51303 }
52775 51304
52776@@ -1977,6 +1984,186 @@ static inline void cow_user_page(struct 51305@@ -2089,6 +2096,186 @@ static inline void cow_user_page(struct
52777 copy_user_highpage(dst, src, va, vma); 51306 copy_user_highpage(dst, src, va, vma);
52778 } 51307 }
52779 51308
@@ -52802,9 +51331,9 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52802+ if (page) { 51331+ if (page) {
52803+ update_hiwater_rss(mm); 51332+ update_hiwater_rss(mm);
52804+ if (PageAnon(page)) 51333+ if (PageAnon(page))
52805+ dec_mm_counter(mm, anon_rss); 51334+ dec_mm_counter_fast(mm, MM_ANONPAGES);
52806+ else 51335+ else
52807+ dec_mm_counter(mm, file_rss); 51336+ dec_mm_counter_fast(mm, MM_FILEPAGES);
52808+ page_remove_rmap(page); 51337+ page_remove_rmap(page);
52809+ page_cache_release(page); 51338+ page_cache_release(page);
52810+ } 51339+ }
@@ -52847,7 +51376,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52847+ entry_m = pfn_pte(page_to_pfn(page_m), vma_m->vm_page_prot); 51376+ entry_m = pfn_pte(page_to_pfn(page_m), vma_m->vm_page_prot);
52848+ page_cache_get(page_m); 51377+ page_cache_get(page_m);
52849+ page_add_anon_rmap(page_m, vma_m, address_m); 51378+ page_add_anon_rmap(page_m, vma_m, address_m);
52850+ inc_mm_counter(mm, anon_rss); 51379+ inc_mm_counter_fast(mm, MM_ANONPAGES);
52851+ set_pte_at(mm, address_m, pte_m, entry_m); 51380+ set_pte_at(mm, address_m, pte_m, entry_m);
52852+ update_mmu_cache(vma_m, address_m, entry_m); 51381+ update_mmu_cache(vma_m, address_m, entry_m);
52853+out: 51382+out:
@@ -52886,7 +51415,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52886+ entry_m = pfn_pte(page_to_pfn(page_m), vma_m->vm_page_prot); 51415+ entry_m = pfn_pte(page_to_pfn(page_m), vma_m->vm_page_prot);
52887+ page_cache_get(page_m); 51416+ page_cache_get(page_m);
52888+ page_add_file_rmap(page_m); 51417+ page_add_file_rmap(page_m);
52889+ inc_mm_counter(mm, file_rss); 51418+ inc_mm_counter_fast(mm, MM_FILEPAGES);
52890+ set_pte_at(mm, address_m, pte_m, entry_m); 51419+ set_pte_at(mm, address_m, pte_m, entry_m);
52891+ update_mmu_cache(vma_m, address_m, entry_m); 51420+ update_mmu_cache(vma_m, address_m, entry_m);
52892+out: 51421+out:
@@ -52960,7 +51489,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52960 /* 51489 /*
52961 * This routine handles present pages, when users try to write 51490 * This routine handles present pages, when users try to write
52962 * to a shared page. It is done by copying the page to a new address 51491 * to a shared page. It is done by copying the page to a new address
52963@@ -2156,6 +2343,12 @@ gotten: 51492@@ -2275,6 +2462,12 @@ gotten:
52964 */ 51493 */
52965 page_table = pte_offset_map_lock(mm, pmd, address, &ptl); 51494 page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
52966 if (likely(pte_same(*page_table, orig_pte))) { 51495 if (likely(pte_same(*page_table, orig_pte))) {
@@ -52972,8 +51501,8 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52972+ 51501+
52973 if (old_page) { 51502 if (old_page) {
52974 if (!PageAnon(old_page)) { 51503 if (!PageAnon(old_page)) {
52975 dec_mm_counter(mm, file_rss); 51504 dec_mm_counter_fast(mm, MM_FILEPAGES);
52976@@ -2207,6 +2400,10 @@ gotten: 51505@@ -2326,6 +2519,10 @@ gotten:
52977 page_remove_rmap(old_page); 51506 page_remove_rmap(old_page);
52978 } 51507 }
52979 51508
@@ -52984,7 +51513,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52984 /* Free the old page.. */ 51513 /* Free the old page.. */
52985 new_page = old_page; 51514 new_page = old_page;
52986 ret |= VM_FAULT_WRITE; 51515 ret |= VM_FAULT_WRITE;
52987@@ -2604,6 +2801,11 @@ static int do_swap_page(struct mm_struct 51516@@ -2749,19 +2946,12 @@ static int do_swap_page(struct mm_struct
52988 swap_free(entry); 51517 swap_free(entry);
52989 if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page)) 51518 if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
52990 try_to_free_swap(page); 51519 try_to_free_swap(page);
@@ -52994,12 +51523,25 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
52994+#endif 51523+#endif
52995+ 51524+
52996 unlock_page(page); 51525 unlock_page(page);
51526- if (swapcache) {
51527- /*
51528- * Hold the lock to avoid the swap entry to be reused
51529- * until we take the PT lock for the pte_same() check
51530- * (to avoid false positives from pte_same). For
51531- * further safety release the lock after the swap_free
51532- * so that the swap count won't change under a
51533- * parallel locked swapcache.
51534- */
51535- unlock_page(swapcache);
51536- page_cache_release(swapcache);
51537- }
52997 51538
52998 if (flags & FAULT_FLAG_WRITE) { 51539 if (flags & FAULT_FLAG_WRITE) {
52999@@ -2615,6 +2817,11 @@ static int do_swap_page(struct mm_struct 51540 ret |= do_wp_page(mm, vma, address, page_table, pmd, ptl, pte);
51541@@ -2772,6 +2962,11 @@ static int do_swap_page(struct mm_struct
53000 51542
53001 /* No need to invalidate - it was non-present before */ 51543 /* No need to invalidate - it was non-present before */
53002 update_mmu_cache(vma, address, pte); 51544 update_mmu_cache(vma, address, page_table);
53003+ 51545+
53004+#ifdef CONFIG_PAX_SEGMEXEC 51546+#ifdef CONFIG_PAX_SEGMEXEC
53005+ pax_mirror_anon_pte(vma, address, page, ptl); 51547+ pax_mirror_anon_pte(vma, address, page, ptl);
@@ -53008,7 +51550,15 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53008 unlock: 51550 unlock:
53009 pte_unmap_unlock(page_table, ptl); 51551 pte_unmap_unlock(page_table, ptl);
53010 out: 51552 out:
53011@@ -2630,40 +2837,6 @@ out_release: 51553@@ -2783,48 +2978,10 @@ out_page:
51554 unlock_page(page);
51555 out_release:
51556 page_cache_release(page);
51557- if (swapcache) {
51558- unlock_page(swapcache);
51559- page_cache_release(swapcache);
51560- }
51561 return ret;
53012 } 51562 }
53013 51563
53014 /* 51564 /*
@@ -53049,7 +51599,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53049 * We enter with non-exclusive mmap_sem (to exclude vma changes, 51599 * We enter with non-exclusive mmap_sem (to exclude vma changes,
53050 * but allow concurrent faults), and pte mapped but not yet locked. 51600 * but allow concurrent faults), and pte mapped but not yet locked.
53051 * We return with mmap_sem still held, but pte unmapped and unlocked. 51601 * We return with mmap_sem still held, but pte unmapped and unlocked.
53052@@ -2672,27 +2845,23 @@ static int do_anonymous_page(struct mm_s 51602@@ -2833,27 +2990,23 @@ static int do_anonymous_page(struct mm_s
53053 unsigned long address, pte_t *page_table, pmd_t *pmd, 51603 unsigned long address, pte_t *page_table, pmd_t *pmd,
53054 unsigned int flags) 51604 unsigned int flags)
53055 { 51605 {
@@ -53082,7 +51632,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53082 if (unlikely(anon_vma_prepare(vma))) 51632 if (unlikely(anon_vma_prepare(vma)))
53083 goto oom; 51633 goto oom;
53084 page = alloc_zeroed_user_highpage_movable(vma, address); 51634 page = alloc_zeroed_user_highpage_movable(vma, address);
53085@@ -2711,6 +2880,11 @@ static int do_anonymous_page(struct mm_s 51635@@ -2872,6 +3025,11 @@ static int do_anonymous_page(struct mm_s
53086 if (!pte_none(*page_table)) 51636 if (!pte_none(*page_table))
53087 goto release; 51637 goto release;
53088 51638
@@ -53091,13 +51641,13 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53091+ BUG_ON(!trylock_page(page)); 51641+ BUG_ON(!trylock_page(page));
53092+#endif 51642+#endif
53093+ 51643+
53094 inc_mm_counter(mm, anon_rss); 51644 inc_mm_counter_fast(mm, MM_ANONPAGES);
53095 page_add_new_anon_rmap(page, vma, address); 51645 page_add_new_anon_rmap(page, vma, address);
53096 setpte: 51646 setpte:
53097@@ -2718,6 +2892,12 @@ setpte: 51647@@ -2879,6 +3037,12 @@ setpte:
53098 51648
53099 /* No need to invalidate - it was non-present before */ 51649 /* No need to invalidate - it was non-present before */
53100 update_mmu_cache(vma, address, entry); 51650 update_mmu_cache(vma, address, page_table);
53101+ 51651+
53102+#ifdef CONFIG_PAX_SEGMEXEC 51652+#ifdef CONFIG_PAX_SEGMEXEC
53103+ if (page) 51653+ if (page)
@@ -53107,7 +51657,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53107 unlock: 51657 unlock:
53108 pte_unmap_unlock(page_table, ptl); 51658 pte_unmap_unlock(page_table, ptl);
53109 return 0; 51659 return 0;
53110@@ -2860,6 +3040,12 @@ static int __do_fault(struct mm_struct * 51660@@ -3021,6 +3185,12 @@ static int __do_fault(struct mm_struct *
53111 */ 51661 */
53112 /* Only go through if we didn't race with anybody else... */ 51662 /* Only go through if we didn't race with anybody else... */
53113 if (likely(pte_same(*page_table, orig_pte))) { 51663 if (likely(pte_same(*page_table, orig_pte))) {
@@ -53120,10 +51670,10 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53120 flush_icache_page(vma, page); 51670 flush_icache_page(vma, page);
53121 entry = mk_pte(page, vma->vm_page_prot); 51671 entry = mk_pte(page, vma->vm_page_prot);
53122 if (flags & FAULT_FLAG_WRITE) 51672 if (flags & FAULT_FLAG_WRITE)
53123@@ -2879,6 +3065,14 @@ static int __do_fault(struct mm_struct * 51673@@ -3040,6 +3210,14 @@ static int __do_fault(struct mm_struct *
53124 51674
53125 /* no need to invalidate: a not-present page won't be cached */ 51675 /* no need to invalidate: a not-present page won't be cached */
53126 update_mmu_cache(vma, address, entry); 51676 update_mmu_cache(vma, address, page_table);
53127+ 51677+
53128+#ifdef CONFIG_PAX_SEGMEXEC 51678+#ifdef CONFIG_PAX_SEGMEXEC
53129+ if (anon) 51679+ if (anon)
@@ -53135,7 +51685,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53135 } else { 51685 } else {
53136 if (charged) 51686 if (charged)
53137 mem_cgroup_uncharge_page(page); 51687 mem_cgroup_uncharge_page(page);
53138@@ -3026,6 +3220,12 @@ static inline int handle_pte_fault(struc 51688@@ -3187,6 +3365,12 @@ static inline int handle_pte_fault(struc
53139 if (flags & FAULT_FLAG_WRITE) 51689 if (flags & FAULT_FLAG_WRITE)
53140 flush_tlb_page(vma, address); 51690 flush_tlb_page(vma, address);
53141 } 51691 }
@@ -53148,7 +51698,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53148 unlock: 51698 unlock:
53149 pte_unmap_unlock(pte, ptl); 51699 pte_unmap_unlock(pte, ptl);
53150 return 0; 51700 return 0;
53151@@ -3042,6 +3242,10 @@ int handle_mm_fault(struct mm_struct *mm 51701@@ -3203,6 +3387,10 @@ int handle_mm_fault(struct mm_struct *mm
53152 pmd_t *pmd; 51702 pmd_t *pmd;
53153 pte_t *pte; 51703 pte_t *pte;
53154 51704
@@ -53159,7 +51709,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53159 __set_current_state(TASK_RUNNING); 51709 __set_current_state(TASK_RUNNING);
53160 51710
53161 count_vm_event(PGFAULT); 51711 count_vm_event(PGFAULT);
53162@@ -3049,6 +3253,34 @@ int handle_mm_fault(struct mm_struct *mm 51712@@ -3213,6 +3401,34 @@ int handle_mm_fault(struct mm_struct *mm
53163 if (unlikely(is_vm_hugetlb_page(vma))) 51713 if (unlikely(is_vm_hugetlb_page(vma)))
53164 return hugetlb_fault(mm, vma, address, flags); 51714 return hugetlb_fault(mm, vma, address, flags);
53165 51715
@@ -53194,7 +51744,7 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53194 pgd = pgd_offset(mm, address); 51744 pgd = pgd_offset(mm, address);
53195 pud = pud_alloc(mm, pgd, address); 51745 pud = pud_alloc(mm, pgd, address);
53196 if (!pud) 51746 if (!pud)
53197@@ -3146,7 +3378,7 @@ static int __init gate_vma_init(void) 51747@@ -3310,7 +3526,7 @@ static int __init gate_vma_init(void)
53198 gate_vma.vm_start = FIXADDR_USER_START; 51748 gate_vma.vm_start = FIXADDR_USER_START;
53199 gate_vma.vm_end = FIXADDR_USER_END; 51749 gate_vma.vm_end = FIXADDR_USER_END;
53200 gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC; 51750 gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC;
@@ -53203,19 +51753,19 @@ diff -urNp linux-2.6.32.24/mm/memory.c linux-2.6.32.24/mm/memory.c
53203 /* 51753 /*
53204 * Make sure the vDSO gets into every core dump. 51754 * Make sure the vDSO gets into every core dump.
53205 * Dumping its contents makes post-mortem fully interpretable later 51755 * Dumping its contents makes post-mortem fully interpretable later
53206diff -urNp linux-2.6.32.24/mm/memory-failure.c linux-2.6.32.24/mm/memory-failure.c 51756diff -urNp linux-2.6.35.7/mm/memory-failure.c linux-2.6.35.7/mm/memory-failure.c
53207--- linux-2.6.32.24/mm/memory-failure.c 2010-08-13 16:24:37.000000000 -0400 51757--- linux-2.6.35.7/mm/memory-failure.c 2010-08-26 19:47:12.000000000 -0400
53208+++ linux-2.6.32.24/mm/memory-failure.c 2010-10-23 19:59:20.000000000 -0400 51758+++ linux-2.6.35.7/mm/memory-failure.c 2010-09-17 20:12:09.000000000 -0400
53209@@ -46,7 +46,7 @@ int sysctl_memory_failure_early_kill __r 51759@@ -51,7 +51,7 @@ int sysctl_memory_failure_early_kill __r
53210 51760
53211 int sysctl_memory_failure_recovery __read_mostly = 1; 51761 int sysctl_memory_failure_recovery __read_mostly = 1;
53212 51762
53213-atomic_long_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0); 51763-atomic_long_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
53214+atomic_long_unchecked_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0); 51764+atomic_long_unchecked_t mce_bad_pages __read_mostly = ATOMIC_LONG_INIT(0);
53215 51765
53216 /* 51766 #if defined(CONFIG_HWPOISON_INJECT) || defined(CONFIG_HWPOISON_INJECT_MODULE)
53217 * Send all the processes who have the page mapped an ``action optional'' 51767
53218@@ -745,7 +745,7 @@ int __memory_failure(unsigned long pfn, 51768@@ -939,7 +939,7 @@ int __memory_failure(unsigned long pfn,
53219 return 0; 51769 return 0;
53220 } 51770 }
53221 51771
@@ -53224,38 +51774,74 @@ diff -urNp linux-2.6.32.24/mm/memory-failure.c linux-2.6.32.24/mm/memory-failure
53224 51774
53225 /* 51775 /*
53226 * We need/can do nothing about count=0 pages. 51776 * We need/can do nothing about count=0 pages.
53227diff -urNp linux-2.6.32.24/mm/mempolicy.c linux-2.6.32.24/mm/mempolicy.c 51777@@ -1003,7 +1003,7 @@ int __memory_failure(unsigned long pfn,
53228--- linux-2.6.32.24/mm/mempolicy.c 2010-08-13 16:24:37.000000000 -0400 51778 }
53229+++ linux-2.6.32.24/mm/mempolicy.c 2010-10-23 19:59:20.000000000 -0400 51779 if (hwpoison_filter(p)) {
53230@@ -573,6 +573,10 @@ static int mbind_range(struct vm_area_st 51780 if (TestClearPageHWPoison(p))
53231 struct vm_area_struct *next; 51781- atomic_long_dec(&mce_bad_pages);
53232 int err; 51782+ atomic_long_dec_unchecked(&mce_bad_pages);
51783 unlock_page(p);
51784 put_page(p);
51785 return 0;
51786@@ -1096,7 +1096,7 @@ int unpoison_memory(unsigned long pfn)
51787
51788 if (!get_page_unless_zero(page)) {
51789 if (TestClearPageHWPoison(p))
51790- atomic_long_dec(&mce_bad_pages);
51791+ atomic_long_dec_unchecked(&mce_bad_pages);
51792 pr_debug("MCE: Software-unpoisoned free page %#lx\n", pfn);
51793 return 0;
51794 }
51795@@ -1110,7 +1110,7 @@ int unpoison_memory(unsigned long pfn)
51796 */
51797 if (TestClearPageHWPoison(p)) {
51798 pr_debug("MCE: Software-unpoisoned page %#lx\n", pfn);
51799- atomic_long_dec(&mce_bad_pages);
51800+ atomic_long_dec_unchecked(&mce_bad_pages);
51801 freeit = 1;
51802 }
51803 unlock_page(page);
51804@@ -1291,7 +1291,7 @@ int soft_offline_page(struct page *page,
51805 return ret;
51806
51807 done:
51808- atomic_long_add(1, &mce_bad_pages);
51809+ atomic_long_add_unchecked(1, &mce_bad_pages);
51810 SetPageHWPoison(page);
51811 /* keep elevated page count for bad page */
51812 return ret;
51813diff -urNp linux-2.6.35.7/mm/mempolicy.c linux-2.6.35.7/mm/mempolicy.c
51814--- linux-2.6.35.7/mm/mempolicy.c 2010-08-26 19:47:12.000000000 -0400
51815+++ linux-2.6.35.7/mm/mempolicy.c 2010-09-17 20:12:37.000000000 -0400
51816@@ -642,6 +642,10 @@ static int mbind_range(struct mm_struct
51817 unsigned long vmstart;
51818 unsigned long vmend;
53233 51819
53234+#ifdef CONFIG_PAX_SEGMEXEC 51820+#ifdef CONFIG_PAX_SEGMEXEC
53235+ struct vm_area_struct *vma_m; 51821+ struct vm_area_struct *vma_m;
53236+#endif 51822+#endif
53237+ 51823+
53238 err = 0; 51824 vma = find_vma_prev(mm, start, &prev);
53239 for (; vma && vma->vm_start < end; vma = next) { 51825 if (!vma || vma->vm_start > start)
53240 next = vma->vm_next; 51826 return -EFAULT;
53241@@ -584,6 +588,16 @@ static int mbind_range(struct vm_area_st 51827@@ -672,6 +676,16 @@ static int mbind_range(struct mm_struct
53242 err = policy_vma(vma, new); 51828 err = policy_vma(vma, new_pol);
53243 if (err) 51829 if (err)
53244 break; 51830 goto out;
53245+ 51831+
53246+#ifdef CONFIG_PAX_SEGMEXEC 51832+#ifdef CONFIG_PAX_SEGMEXEC
53247+ vma_m = pax_find_mirror_vma(vma); 51833+ vma_m = pax_find_mirror_vma(vma);
53248+ if (vma_m) { 51834+ if (vma_m) {
53249+ err = policy_vma(vma_m, new); 51835+ err = policy_vma(vma_m, new_pol);
53250+ if (err) 51836+ if (err)
53251+ break; 51837+ goto out;
53252+ } 51838+ }
53253+#endif 51839+#endif
53254+ 51840+
53255 } 51841 }
53256 return err; 51842
53257 } 51843 out:
53258@@ -1002,6 +1016,17 @@ static long do_mbind(unsigned long start 51844@@ -1098,6 +1112,17 @@ static long do_mbind(unsigned long start
53259 51845
53260 if (end < start) 51846 if (end < start)
53261 return -EINVAL; 51847 return -EINVAL;
@@ -53273,7 +51859,7 @@ diff -urNp linux-2.6.32.24/mm/mempolicy.c linux-2.6.32.24/mm/mempolicy.c
53273 if (end == start) 51859 if (end == start)
53274 return 0; 51860 return 0;
53275 51861
53276@@ -1207,6 +1232,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi 51862@@ -1303,6 +1328,14 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
53277 if (!mm) 51863 if (!mm)
53278 return -EINVAL; 51864 return -EINVAL;
53279 51865
@@ -53288,7 +51874,7 @@ diff -urNp linux-2.6.32.24/mm/mempolicy.c linux-2.6.32.24/mm/mempolicy.c
53288 /* 51874 /*
53289 * Check if this process has the right to modify the specified 51875 * Check if this process has the right to modify the specified
53290 * process. The right exists if the process has administrative 51876 * process. The right exists if the process has administrative
53291@@ -1216,8 +1249,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi 51877@@ -1312,8 +1345,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pi
53292 rcu_read_lock(); 51878 rcu_read_lock();
53293 tcred = __task_cred(task); 51879 tcred = __task_cred(task);
53294 if (cred->euid != tcred->suid && cred->euid != tcred->uid && 51880 if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
@@ -53298,7 +51884,7 @@ diff -urNp linux-2.6.32.24/mm/mempolicy.c linux-2.6.32.24/mm/mempolicy.c
53298 rcu_read_unlock(); 51884 rcu_read_unlock();
53299 err = -EPERM; 51885 err = -EPERM;
53300 goto out; 51886 goto out;
53301@@ -2396,7 +2428,7 @@ int show_numa_map(struct seq_file *m, vo 51887@@ -2564,7 +2596,7 @@ int show_numa_map(struct seq_file *m, vo
53302 51888
53303 if (file) { 51889 if (file) {
53304 seq_printf(m, " file="); 51890 seq_printf(m, " file=");
@@ -53307,10 +51893,10 @@ diff -urNp linux-2.6.32.24/mm/mempolicy.c linux-2.6.32.24/mm/mempolicy.c
53307 } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { 51893 } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
53308 seq_printf(m, " heap"); 51894 seq_printf(m, " heap");
53309 } else if (vma->vm_start <= mm->start_stack && 51895 } else if (vma->vm_start <= mm->start_stack &&
53310diff -urNp linux-2.6.32.24/mm/migrate.c linux-2.6.32.24/mm/migrate.c 51896diff -urNp linux-2.6.35.7/mm/migrate.c linux-2.6.35.7/mm/migrate.c
53311--- linux-2.6.32.24/mm/migrate.c 2010-08-13 16:24:37.000000000 -0400 51897--- linux-2.6.35.7/mm/migrate.c 2010-08-26 19:47:12.000000000 -0400
53312+++ linux-2.6.32.24/mm/migrate.c 2010-10-23 19:59:20.000000000 -0400 51898+++ linux-2.6.35.7/mm/migrate.c 2010-09-17 20:12:37.000000000 -0400
53313@@ -1106,6 +1106,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, 51899@@ -1102,6 +1102,14 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
53314 if (!mm) 51900 if (!mm)
53315 return -EINVAL; 51901 return -EINVAL;
53316 51902
@@ -53325,7 +51911,7 @@ diff -urNp linux-2.6.32.24/mm/migrate.c linux-2.6.32.24/mm/migrate.c
53325 /* 51911 /*
53326 * Check if this process has the right to modify the specified 51912 * Check if this process has the right to modify the specified
53327 * process. The right exists if the process has administrative 51913 * process. The right exists if the process has administrative
53328@@ -1115,8 +1123,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, 51914@@ -1111,8 +1119,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
53329 rcu_read_lock(); 51915 rcu_read_lock();
53330 tcred = __task_cred(task); 51916 tcred = __task_cred(task);
53331 if (cred->euid != tcred->suid && cred->euid != tcred->uid && 51917 if (cred->euid != tcred->suid && cred->euid != tcred->uid &&
@@ -53335,9 +51921,9 @@ diff -urNp linux-2.6.32.24/mm/migrate.c linux-2.6.32.24/mm/migrate.c
53335 rcu_read_unlock(); 51921 rcu_read_unlock();
53336 err = -EPERM; 51922 err = -EPERM;
53337 goto out; 51923 goto out;
53338diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c 51924diff -urNp linux-2.6.35.7/mm/mlock.c linux-2.6.35.7/mm/mlock.c
53339--- linux-2.6.32.24/mm/mlock.c 2010-08-29 21:08:20.000000000 -0400 51925--- linux-2.6.35.7/mm/mlock.c 2010-08-26 19:47:12.000000000 -0400
53340+++ linux-2.6.32.24/mm/mlock.c 2010-10-23 19:59:20.000000000 -0400 51926+++ linux-2.6.35.7/mm/mlock.c 2010-09-17 20:12:37.000000000 -0400
53341@@ -13,6 +13,7 @@ 51927@@ -13,6 +13,7 @@
53342 #include <linux/pagemap.h> 51928 #include <linux/pagemap.h>
53343 #include <linux/mempolicy.h> 51929 #include <linux/mempolicy.h>
@@ -53346,7 +51932,7 @@ diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c
53346 #include <linux/sched.h> 51932 #include <linux/sched.h>
53347 #include <linux/module.h> 51933 #include <linux/module.h>
53348 #include <linux/rmap.h> 51934 #include <linux/rmap.h>
53349@@ -138,19 +139,6 @@ void munlock_vma_page(struct page *page) 51935@@ -135,19 +136,6 @@ void munlock_vma_page(struct page *page)
53350 } 51936 }
53351 } 51937 }
53352 51938
@@ -53366,7 +51952,7 @@ diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c
53366 /** 51952 /**
53367 * __mlock_vma_pages_range() - mlock a range of pages in the vma. 51953 * __mlock_vma_pages_range() - mlock a range of pages in the vma.
53368 * @vma: target vma 51954 * @vma: target vma
53369@@ -183,12 +171,6 @@ static long __mlock_vma_pages_range(stru 51955@@ -180,12 +168,6 @@ static long __mlock_vma_pages_range(stru
53370 if (vma->vm_flags & VM_WRITE) 51956 if (vma->vm_flags & VM_WRITE)
53371 gup_flags |= FOLL_WRITE; 51957 gup_flags |= FOLL_WRITE;
53372 51958
@@ -53379,7 +51965,7 @@ diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c
53379 while (nr_pages > 0) { 51965 while (nr_pages > 0) {
53380 int i; 51966 int i;
53381 51967
53382@@ -454,6 +436,9 @@ static int do_mlock(unsigned long start, 51968@@ -451,6 +433,9 @@ static int do_mlock(unsigned long start,
53383 return -EINVAL; 51969 return -EINVAL;
53384 if (end == start) 51970 if (end == start)
53385 return 0; 51971 return 0;
@@ -53389,7 +51975,7 @@ diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c
53389 vma = find_vma_prev(current->mm, start, &prev); 51975 vma = find_vma_prev(current->mm, start, &prev);
53390 if (!vma || vma->vm_start > start) 51976 if (!vma || vma->vm_start > start)
53391 return -ENOMEM; 51977 return -ENOMEM;
53392@@ -464,6 +449,11 @@ static int do_mlock(unsigned long start, 51978@@ -461,6 +446,11 @@ static int do_mlock(unsigned long start,
53393 for (nstart = start ; ; ) { 51979 for (nstart = start ; ; ) {
53394 unsigned int newflags; 51980 unsigned int newflags;
53395 51981
@@ -53401,7 +51987,7 @@ diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c
53401 /* Here we know that vma->vm_start <= nstart < vma->vm_end. */ 51987 /* Here we know that vma->vm_start <= nstart < vma->vm_end. */
53402 51988
53403 newflags = vma->vm_flags | VM_LOCKED; 51989 newflags = vma->vm_flags | VM_LOCKED;
53404@@ -513,6 +503,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st 51990@@ -510,6 +500,7 @@ SYSCALL_DEFINE2(mlock, unsigned long, st
53405 lock_limit >>= PAGE_SHIFT; 51991 lock_limit >>= PAGE_SHIFT;
53406 51992
53407 /* check against resource limits */ 51993 /* check against resource limits */
@@ -53409,7 +51995,7 @@ diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c
53409 if ((locked <= lock_limit) || capable(CAP_IPC_LOCK)) 51995 if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
53410 error = do_mlock(start, len, 1); 51996 error = do_mlock(start, len, 1);
53411 up_write(&current->mm->mmap_sem); 51997 up_write(&current->mm->mmap_sem);
53412@@ -534,17 +525,23 @@ SYSCALL_DEFINE2(munlock, unsigned long, 51998@@ -531,17 +522,23 @@ SYSCALL_DEFINE2(munlock, unsigned long,
53413 static int do_mlockall(int flags) 51999 static int do_mlockall(int flags)
53414 { 52000 {
53415 struct vm_area_struct * vma, * prev = NULL; 52001 struct vm_area_struct * vma, * prev = NULL;
@@ -53437,7 +52023,7 @@ diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c
53437 newflags = vma->vm_flags | VM_LOCKED; 52023 newflags = vma->vm_flags | VM_LOCKED;
53438 if (!(flags & MCL_CURRENT)) 52024 if (!(flags & MCL_CURRENT))
53439 newflags &= ~VM_LOCKED; 52025 newflags &= ~VM_LOCKED;
53440@@ -576,6 +573,7 @@ SYSCALL_DEFINE1(mlockall, int, flags) 52026@@ -573,6 +570,7 @@ SYSCALL_DEFINE1(mlockall, int, flags)
53441 lock_limit >>= PAGE_SHIFT; 52027 lock_limit >>= PAGE_SHIFT;
53442 52028
53443 ret = -ENOMEM; 52029 ret = -ENOMEM;
@@ -53445,10 +52031,10 @@ diff -urNp linux-2.6.32.24/mm/mlock.c linux-2.6.32.24/mm/mlock.c
53445 if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) || 52031 if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) ||
53446 capable(CAP_IPC_LOCK)) 52032 capable(CAP_IPC_LOCK))
53447 ret = do_mlockall(flags); 52033 ret = do_mlockall(flags);
53448diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c 52034diff -urNp linux-2.6.35.7/mm/mmap.c linux-2.6.35.7/mm/mmap.c
53449--- linux-2.6.32.24/mm/mmap.c 2010-09-26 17:26:05.000000000 -0400 52035--- linux-2.6.35.7/mm/mmap.c 2010-09-26 17:32:11.000000000 -0400
53450+++ linux-2.6.32.24/mm/mmap.c 2010-10-23 19:59:20.000000000 -0400 52036+++ linux-2.6.35.7/mm/mmap.c 2010-10-18 21:01:30.000000000 -0400
53451@@ -45,6 +45,16 @@ 52037@@ -44,6 +44,16 @@
53452 #define arch_rebalance_pgtables(addr, len) (addr) 52038 #define arch_rebalance_pgtables(addr, len) (addr)
53453 #endif 52039 #endif
53454 52040
@@ -53465,7 +52051,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53465 static void unmap_region(struct mm_struct *mm, 52051 static void unmap_region(struct mm_struct *mm,
53466 struct vm_area_struct *vma, struct vm_area_struct *prev, 52052 struct vm_area_struct *vma, struct vm_area_struct *prev,
53467 unsigned long start, unsigned long end); 52053 unsigned long start, unsigned long end);
53468@@ -70,22 +80,32 @@ static void unmap_region(struct mm_struc 52054@@ -69,22 +79,32 @@ static void unmap_region(struct mm_struc
53469 * x: (no) no x: (no) yes x: (no) yes x: (yes) yes 52055 * x: (no) no x: (no) yes x: (no) yes x: (yes) yes
53470 * 52056 *
53471 */ 52057 */
@@ -53483,7 +52069,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53483 pgprot_val(arch_vm_get_page_prot(vm_flags))); 52069 pgprot_val(arch_vm_get_page_prot(vm_flags)));
53484+ 52070+
53485+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_X86_32) 52071+#if defined(CONFIG_PAX_PAGEEXEC) && defined(CONFIG_X86_32)
53486+ if (!nx_enabled && 52072+ if (!(__supported_pte_mask & _PAGE_NX) &&
53487+ (vm_flags & (VM_PAGEEXEC | VM_EXEC)) == VM_PAGEEXEC && 52073+ (vm_flags & (VM_PAGEEXEC | VM_EXEC)) == VM_PAGEEXEC &&
53488+ (vm_flags & (VM_READ | VM_WRITE))) 52074+ (vm_flags & (VM_READ | VM_WRITE)))
53489+ prot = __pgprot(pte_val(pte_exprotect(__pte(pgprot_val(prot))))); 52075+ prot = __pgprot(pte_val(pte_exprotect(__pte(pgprot_val(prot)))));
@@ -53500,7 +52086,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53500 struct percpu_counter vm_committed_as; 52086 struct percpu_counter vm_committed_as;
53501 52087
53502 /* 52088 /*
53503@@ -231,6 +251,7 @@ static struct vm_area_struct *remove_vma 52089@@ -230,6 +250,7 @@ static struct vm_area_struct *remove_vma
53504 struct vm_area_struct *next = vma->vm_next; 52090 struct vm_area_struct *next = vma->vm_next;
53505 52091
53506 might_sleep(); 52092 might_sleep();
@@ -53508,15 +52094,15 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53508 if (vma->vm_ops && vma->vm_ops->close) 52094 if (vma->vm_ops && vma->vm_ops->close)
53509 vma->vm_ops->close(vma); 52095 vma->vm_ops->close(vma);
53510 if (vma->vm_file) { 52096 if (vma->vm_file) {
53511@@ -267,6 +288,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) 52097@@ -266,6 +287,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
53512 * not page aligned -Ram Gupta 52098 * not page aligned -Ram Gupta
53513 */ 52099 */
53514 rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur; 52100 rlim = rlimit(RLIMIT_DATA);
53515+ gr_learn_resource(current, RLIMIT_DATA, (brk - mm->start_brk) + (mm->end_data - mm->start_data), 1); 52101+ gr_learn_resource(current, RLIMIT_DATA, (brk - mm->start_brk) + (mm->end_data - mm->start_data), 1);
53516 if (rlim < RLIM_INFINITY && (brk - mm->start_brk) + 52102 if (rlim < RLIM_INFINITY && (brk - mm->start_brk) +
53517 (mm->end_data - mm->start_data) > rlim) 52103 (mm->end_data - mm->start_data) > rlim)
53518 goto out; 52104 goto out;
53519@@ -704,6 +726,12 @@ static int 52105@@ -695,6 +717,12 @@ static int
53520 can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags, 52106 can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
53521 struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff) 52107 struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
53522 { 52108 {
@@ -53529,7 +52115,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53529 if (is_mergeable_vma(vma, file, vm_flags) && 52115 if (is_mergeable_vma(vma, file, vm_flags) &&
53530 is_mergeable_anon_vma(anon_vma, vma->anon_vma)) { 52116 is_mergeable_anon_vma(anon_vma, vma->anon_vma)) {
53531 if (vma->vm_pgoff == vm_pgoff) 52117 if (vma->vm_pgoff == vm_pgoff)
53532@@ -723,6 +751,12 @@ static int 52118@@ -714,6 +742,12 @@ static int
53533 can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags, 52119 can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
53534 struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff) 52120 struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
53535 { 52121 {
@@ -53542,7 +52128,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53542 if (is_mergeable_vma(vma, file, vm_flags) && 52128 if (is_mergeable_vma(vma, file, vm_flags) &&
53543 is_mergeable_anon_vma(anon_vma, vma->anon_vma)) { 52129 is_mergeable_anon_vma(anon_vma, vma->anon_vma)) {
53544 pgoff_t vm_pglen; 52130 pgoff_t vm_pglen;
53545@@ -765,12 +799,19 @@ can_vma_merge_after(struct vm_area_struc 52131@@ -756,13 +790,20 @@ can_vma_merge_after(struct vm_area_struc
53546 struct vm_area_struct *vma_merge(struct mm_struct *mm, 52132 struct vm_area_struct *vma_merge(struct mm_struct *mm,
53547 struct vm_area_struct *prev, unsigned long addr, 52133 struct vm_area_struct *prev, unsigned long addr,
53548 unsigned long end, unsigned long vm_flags, 52134 unsigned long end, unsigned long vm_flags,
@@ -53552,6 +52138,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53552 { 52138 {
53553 pgoff_t pglen = (end - addr) >> PAGE_SHIFT; 52139 pgoff_t pglen = (end - addr) >> PAGE_SHIFT;
53554 struct vm_area_struct *area, *next; 52140 struct vm_area_struct *area, *next;
52141 int err;
53555 52142
53556+#ifdef CONFIG_PAX_SEGMEXEC 52143+#ifdef CONFIG_PAX_SEGMEXEC
53557+ unsigned long addr_m = addr + SEGMEXEC_TASK_SIZE, end_m = end + SEGMEXEC_TASK_SIZE; 52144+ unsigned long addr_m = addr + SEGMEXEC_TASK_SIZE, end_m = end + SEGMEXEC_TASK_SIZE;
@@ -53563,7 +52150,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53563 /* 52150 /*
53564 * We later require that vma->vm_flags == vm_flags, 52151 * We later require that vma->vm_flags == vm_flags,
53565 * so this tests vma->vm_flags & VM_SPECIAL, too. 52152 * so this tests vma->vm_flags & VM_SPECIAL, too.
53566@@ -786,6 +827,15 @@ struct vm_area_struct *vma_merge(struct 52153@@ -778,6 +819,15 @@ struct vm_area_struct *vma_merge(struct
53567 if (next && next->vm_end == end) /* cases 6, 7, 8 */ 52154 if (next && next->vm_end == end) /* cases 6, 7, 8 */
53568 next = next->vm_next; 52155 next = next->vm_next;
53569 52156
@@ -53579,63 +52166,63 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53579 /* 52166 /*
53580 * Can it merge with the predecessor? 52167 * Can it merge with the predecessor?
53581 */ 52168 */
53582@@ -805,9 +855,24 @@ struct vm_area_struct *vma_merge(struct 52169@@ -797,9 +847,24 @@ struct vm_area_struct *vma_merge(struct
53583 /* cases 1, 6 */ 52170 /* cases 1, 6 */
53584 vma_adjust(prev, prev->vm_start, 52171 err = vma_adjust(prev, prev->vm_start,
53585 next->vm_end, prev->vm_pgoff, NULL); 52172 next->vm_end, prev->vm_pgoff, NULL);
53586- } else /* cases 2, 5, 7 */ 52173- } else /* cases 2, 5, 7 */
53587+ 52174+
53588+#ifdef CONFIG_PAX_SEGMEXEC 52175+#ifdef CONFIG_PAX_SEGMEXEC
53589+ if (prev_m) 52176+ if (!err && prev_m)
53590+ vma_adjust(prev_m, prev_m->vm_start, 52177+ err = vma_adjust(prev_m, prev_m->vm_start,
53591+ next_m->vm_end, prev_m->vm_pgoff, NULL); 52178+ next_m->vm_end, prev_m->vm_pgoff, NULL);
53592+#endif 52179+#endif
53593+ 52180+
53594+ } else { /* cases 2, 5, 7 */ 52181+ } else { /* cases 2, 5, 7 */
53595 vma_adjust(prev, prev->vm_start, 52182 err = vma_adjust(prev, prev->vm_start,
53596 end, prev->vm_pgoff, NULL); 52183 end, prev->vm_pgoff, NULL);
53597+ 52184+
53598+#ifdef CONFIG_PAX_SEGMEXEC 52185+#ifdef CONFIG_PAX_SEGMEXEC
53599+ if (prev_m) 52186+ if (!err && prev_m)
53600+ vma_adjust(prev_m, prev_m->vm_start, 52187+ err = vma_adjust(prev_m, prev_m->vm_start,
53601+ end_m, prev_m->vm_pgoff, NULL); 52188+ end_m, prev_m->vm_pgoff, NULL);
53602+#endif 52189+#endif
53603+ 52190+
53604+ } 52191+ }
52192 if (err)
52193 return NULL;
53605 return prev; 52194 return prev;
53606 } 52195@@ -812,12 +877,27 @@ struct vm_area_struct *vma_merge(struct
53607
53608@@ -818,12 +883,27 @@ struct vm_area_struct *vma_merge(struct
53609 mpol_equal(policy, vma_policy(next)) && 52196 mpol_equal(policy, vma_policy(next)) &&
53610 can_vma_merge_before(next, vm_flags, 52197 can_vma_merge_before(next, vm_flags,
53611 anon_vma, file, pgoff+pglen)) { 52198 anon_vma, file, pgoff+pglen)) {
53612- if (prev && addr < prev->vm_end) /* case 4 */ 52199- if (prev && addr < prev->vm_end) /* case 4 */
53613+ if (prev && addr < prev->vm_end) { /* case 4 */ 52200+ if (prev && addr < prev->vm_end) { /* case 4 */
53614 vma_adjust(prev, prev->vm_start, 52201 err = vma_adjust(prev, prev->vm_start,
53615 addr, prev->vm_pgoff, NULL); 52202 addr, prev->vm_pgoff, NULL);
53616- else /* cases 3, 8 */ 52203- else /* cases 3, 8 */
53617+ 52204+
53618+#ifdef CONFIG_PAX_SEGMEXEC 52205+#ifdef CONFIG_PAX_SEGMEXEC
53619+ if (prev_m) 52206+ if (!err && prev_m)
53620+ vma_adjust(prev_m, prev_m->vm_start, 52207+ err = vma_adjust(prev_m, prev_m->vm_start,
53621+ addr_m, prev_m->vm_pgoff, NULL); 52208+ addr_m, prev_m->vm_pgoff, NULL);
53622+#endif 52209+#endif
53623+ 52210+
53624+ } else { /* cases 3, 8 */ 52211+ } else { /* cases 3, 8 */
53625 vma_adjust(area, addr, next->vm_end, 52212 err = vma_adjust(area, addr, next->vm_end,
53626 next->vm_pgoff - pglen, NULL); 52213 next->vm_pgoff - pglen, NULL);
53627+ 52214+
53628+#ifdef CONFIG_PAX_SEGMEXEC 52215+#ifdef CONFIG_PAX_SEGMEXEC
53629+ if (area_m) 52216+ if (!err && area_m)
53630+ vma_adjust(area_m, addr_m, next_m->vm_end, 52217+ err = vma_adjust(area_m, addr_m, next_m->vm_end,
53631+ next_m->vm_pgoff - pglen, NULL); 52218+ next_m->vm_pgoff - pglen, NULL);
53632+#endif 52219+#endif
53633+ 52220+
53634+ } 52221+ }
52222 if (err)
52223 return NULL;
53635 return area; 52224 return area;
53636 } 52225@@ -932,14 +1012,11 @@ none:
53637
53638@@ -898,14 +978,11 @@ none:
53639 void vm_stat_account(struct mm_struct *mm, unsigned long flags, 52226 void vm_stat_account(struct mm_struct *mm, unsigned long flags,
53640 struct file *file, long pages) 52227 struct file *file, long pages)
53641 { 52228 {
@@ -53651,7 +52238,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53651 mm->stack_vm += pages; 52238 mm->stack_vm += pages;
53652 if (flags & (VM_RESERVED|VM_IO)) 52239 if (flags & (VM_RESERVED|VM_IO))
53653 mm->reserved_vm += pages; 52240 mm->reserved_vm += pages;
53654@@ -932,7 +1009,7 @@ unsigned long do_mmap_pgoff(struct file 52241@@ -966,7 +1043,7 @@ unsigned long do_mmap_pgoff(struct file
53655 * (the exception is when the underlying filesystem is noexec 52242 * (the exception is when the underlying filesystem is noexec
53656 * mounted, in which case we dont add PROT_EXEC.) 52243 * mounted, in which case we dont add PROT_EXEC.)
53657 */ 52244 */
@@ -53660,7 +52247,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53660 if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC))) 52247 if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
53661 prot |= PROT_EXEC; 52248 prot |= PROT_EXEC;
53662 52249
53663@@ -958,7 +1035,7 @@ unsigned long do_mmap_pgoff(struct file 52250@@ -992,7 +1069,7 @@ unsigned long do_mmap_pgoff(struct file
53664 /* Obtain the address to map to. we verify (or select) it and ensure 52251 /* Obtain the address to map to. we verify (or select) it and ensure
53665 * that it represents a valid section of the address space. 52252 * that it represents a valid section of the address space.
53666 */ 52253 */
@@ -53669,7 +52256,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53669 if (addr & ~PAGE_MASK) 52256 if (addr & ~PAGE_MASK)
53670 return addr; 52257 return addr;
53671 52258
53672@@ -969,6 +1046,31 @@ unsigned long do_mmap_pgoff(struct file 52259@@ -1003,6 +1080,31 @@ unsigned long do_mmap_pgoff(struct file
53673 vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) | 52260 vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
53674 mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; 52261 mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
53675 52262
@@ -53701,15 +52288,15 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53701 if (flags & MAP_LOCKED) 52288 if (flags & MAP_LOCKED)
53702 if (!can_do_mlock()) 52289 if (!can_do_mlock())
53703 return -EPERM; 52290 return -EPERM;
53704@@ -980,6 +1082,7 @@ unsigned long do_mmap_pgoff(struct file 52291@@ -1014,6 +1116,7 @@ unsigned long do_mmap_pgoff(struct file
53705 locked += mm->locked_vm; 52292 locked += mm->locked_vm;
53706 lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur; 52293 lock_limit = rlimit(RLIMIT_MEMLOCK);
53707 lock_limit >>= PAGE_SHIFT; 52294 lock_limit >>= PAGE_SHIFT;
53708+ gr_learn_resource(current, RLIMIT_MEMLOCK, locked << PAGE_SHIFT, 1); 52295+ gr_learn_resource(current, RLIMIT_MEMLOCK, locked << PAGE_SHIFT, 1);
53709 if (locked > lock_limit && !capable(CAP_IPC_LOCK)) 52296 if (locked > lock_limit && !capable(CAP_IPC_LOCK))
53710 return -EAGAIN; 52297 return -EAGAIN;
53711 } 52298 }
53712@@ -1053,6 +1156,9 @@ unsigned long do_mmap_pgoff(struct file 52299@@ -1084,6 +1187,9 @@ unsigned long do_mmap_pgoff(struct file
53713 if (error) 52300 if (error)
53714 return error; 52301 return error;
53715 52302
@@ -53719,7 +52306,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53719 return mmap_region(file, addr, len, flags, vm_flags, pgoff); 52306 return mmap_region(file, addr, len, flags, vm_flags, pgoff);
53720 } 52307 }
53721 EXPORT_SYMBOL(do_mmap_pgoff); 52308 EXPORT_SYMBOL(do_mmap_pgoff);
53722@@ -1065,10 +1171,10 @@ EXPORT_SYMBOL(do_mmap_pgoff); 52309@@ -1160,10 +1266,10 @@ SYSCALL_DEFINE1(old_mmap, struct mmap_ar
53723 */ 52310 */
53724 int vma_wants_writenotify(struct vm_area_struct *vma) 52311 int vma_wants_writenotify(struct vm_area_struct *vma)
53725 { 52312 {
@@ -53732,7 +52319,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53732 return 0; 52319 return 0;
53733 52320
53734 /* The backer wishes to know when pages are first written to? */ 52321 /* The backer wishes to know when pages are first written to? */
53735@@ -1117,14 +1223,24 @@ unsigned long mmap_region(struct file *f 52322@@ -1212,14 +1318,24 @@ unsigned long mmap_region(struct file *f
53736 unsigned long charged = 0; 52323 unsigned long charged = 0;
53737 struct inode *inode = file ? file->f_path.dentry->d_inode : NULL; 52324 struct inode *inode = file ? file->f_path.dentry->d_inode : NULL;
53738 52325
@@ -53759,7 +52346,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53759 } 52346 }
53760 52347
53761 /* Check against address space limit. */ 52348 /* Check against address space limit. */
53762@@ -1173,6 +1289,16 @@ munmap_back: 52349@@ -1268,6 +1384,16 @@ munmap_back:
53763 goto unacct_error; 52350 goto unacct_error;
53764 } 52351 }
53765 52352
@@ -53776,7 +52363,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53776 vma->vm_mm = mm; 52363 vma->vm_mm = mm;
53777 vma->vm_start = addr; 52364 vma->vm_start = addr;
53778 vma->vm_end = addr + len; 52365 vma->vm_end = addr + len;
53779@@ -1195,6 +1321,19 @@ munmap_back: 52366@@ -1291,6 +1417,19 @@ munmap_back:
53780 error = file->f_op->mmap(file, vma); 52367 error = file->f_op->mmap(file, vma);
53781 if (error) 52368 if (error)
53782 goto unmap_and_free_vma; 52369 goto unmap_and_free_vma;
@@ -53796,27 +52383,27 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53796 if (vm_flags & VM_EXECUTABLE) 52383 if (vm_flags & VM_EXECUTABLE)
53797 added_exe_file_vma(mm); 52384 added_exe_file_vma(mm);
53798 52385
53799@@ -1218,6 +1357,11 @@ munmap_back: 52386@@ -1326,6 +1465,11 @@ munmap_back:
53800 vma_link(mm, vma, prev, rb_link, rb_parent); 52387 vma_link(mm, vma, prev, rb_link, rb_parent);
53801 file = vma->vm_file; 52388 file = vma->vm_file;
53802 52389
53803+#ifdef CONFIG_PAX_SEGMEXEC 52390+#ifdef CONFIG_PAX_SEGMEXEC
53804+ if (vma_m) 52391+ if (vma_m)
53805+ pax_mirror_vma(vma_m, vma); 52392+ BUG_ON(pax_mirror_vma(vma_m, vma));
53806+#endif 52393+#endif
53807+ 52394+
53808 /* Once vma denies write, undo our temporary denial count */ 52395 /* Once vma denies write, undo our temporary denial count */
53809 if (correct_wcount) 52396 if (correct_wcount)
53810 atomic_inc(&inode->i_writecount); 52397 atomic_inc(&inode->i_writecount);
53811@@ -1226,6 +1370,7 @@ out: 52398@@ -1334,6 +1478,7 @@ out:
53812 52399
53813 mm->total_vm += len >> PAGE_SHIFT; 52400 mm->total_vm += len >> PAGE_SHIFT;
53814 vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); 52401 vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
53815+ track_exec_limit(mm, addr, addr + len, vm_flags); 52402+ track_exec_limit(mm, addr, addr + len, vm_flags);
53816 if (vm_flags & VM_LOCKED) { 52403 if (vm_flags & VM_LOCKED) {
53817 /* 52404 if (!mlock_vma_pages_range(vma, addr, addr + len))
53818 * makes pages present; downgrades, drops, reacquires mmap_sem 52405 mm->locked_vm += (len >> PAGE_SHIFT);
53819@@ -1248,6 +1393,12 @@ unmap_and_free_vma: 52406@@ -1351,6 +1496,12 @@ unmap_and_free_vma:
53820 unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); 52407 unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
53821 charged = 0; 52408 charged = 0;
53822 free_vma: 52409 free_vma:
@@ -53829,7 +52416,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53829 kmem_cache_free(vm_area_cachep, vma); 52416 kmem_cache_free(vm_area_cachep, vma);
53830 unacct_error: 52417 unacct_error:
53831 if (charged) 52418 if (charged)
53832@@ -1255,6 +1406,33 @@ unacct_error: 52419@@ -1358,6 +1509,33 @@ unacct_error:
53833 return error; 52420 return error;
53834 } 52421 }
53835 52422
@@ -53863,7 +52450,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53863 /* Get an address range which is currently unmapped. 52450 /* Get an address range which is currently unmapped.
53864 * For shmat() with addr=0. 52451 * For shmat() with addr=0.
53865 * 52452 *
53866@@ -1281,18 +1459,23 @@ arch_get_unmapped_area(struct file *filp 52453@@ -1384,18 +1562,23 @@ arch_get_unmapped_area(struct file *filp
53867 if (flags & MAP_FIXED) 52454 if (flags & MAP_FIXED)
53868 return addr; 52455 return addr;
53869 52456
@@ -53894,7 +52481,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53894 } 52481 }
53895 52482
53896 full_search: 52483 full_search:
53897@@ -1303,34 +1486,40 @@ full_search: 52484@@ -1406,34 +1589,40 @@ full_search:
53898 * Start a new search - just in case we missed 52485 * Start a new search - just in case we missed
53899 * some holes. 52486 * some holes.
53900 */ 52487 */
@@ -53946,7 +52533,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53946 mm->free_area_cache = addr; 52533 mm->free_area_cache = addr;
53947 mm->cached_hole_size = ~0UL; 52534 mm->cached_hole_size = ~0UL;
53948 } 52535 }
53949@@ -1348,7 +1537,7 @@ arch_get_unmapped_area_topdown(struct fi 52536@@ -1451,7 +1640,7 @@ arch_get_unmapped_area_topdown(struct fi
53950 { 52537 {
53951 struct vm_area_struct *vma; 52538 struct vm_area_struct *vma;
53952 struct mm_struct *mm = current->mm; 52539 struct mm_struct *mm = current->mm;
@@ -53955,7 +52542,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53955 52542
53956 /* requested length too big for entire address space */ 52543 /* requested length too big for entire address space */
53957 if (len > TASK_SIZE) 52544 if (len > TASK_SIZE)
53958@@ -1357,13 +1546,18 @@ arch_get_unmapped_area_topdown(struct fi 52545@@ -1460,13 +1649,18 @@ arch_get_unmapped_area_topdown(struct fi
53959 if (flags & MAP_FIXED) 52546 if (flags & MAP_FIXED)
53960 return addr; 52547 return addr;
53961 52548
@@ -53978,7 +52565,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53978 } 52565 }
53979 52566
53980 /* check if free_area_cache is useful for us */ 52567 /* check if free_area_cache is useful for us */
53981@@ -1378,7 +1572,7 @@ arch_get_unmapped_area_topdown(struct fi 52568@@ -1481,7 +1675,7 @@ arch_get_unmapped_area_topdown(struct fi
53982 /* make sure it can fit in the remaining address space */ 52569 /* make sure it can fit in the remaining address space */
53983 if (addr > len) { 52570 if (addr > len) {
53984 vma = find_vma(mm, addr-len); 52571 vma = find_vma(mm, addr-len);
@@ -53987,7 +52574,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53987 /* remember the address as a hint for next time */ 52574 /* remember the address as a hint for next time */
53988 return (mm->free_area_cache = addr-len); 52575 return (mm->free_area_cache = addr-len);
53989 } 52576 }
53990@@ -1395,7 +1589,7 @@ arch_get_unmapped_area_topdown(struct fi 52577@@ -1498,7 +1692,7 @@ arch_get_unmapped_area_topdown(struct fi
53991 * return with success: 52578 * return with success:
53992 */ 52579 */
53993 vma = find_vma(mm, addr); 52580 vma = find_vma(mm, addr);
@@ -53996,7 +52583,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
53996 /* remember the address as a hint for next time */ 52583 /* remember the address as a hint for next time */
53997 return (mm->free_area_cache = addr); 52584 return (mm->free_area_cache = addr);
53998 52585
53999@@ -1414,13 +1608,21 @@ bottomup: 52586@@ -1517,13 +1711,21 @@ bottomup:
54000 * can happen with large stack limits and large mmap() 52587 * can happen with large stack limits and large mmap()
54001 * allocations. 52588 * allocations.
54002 */ 52589 */
@@ -54020,7 +52607,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54020 mm->cached_hole_size = ~0UL; 52607 mm->cached_hole_size = ~0UL;
54021 52608
54022 return addr; 52609 return addr;
54023@@ -1429,6 +1631,12 @@ bottomup: 52610@@ -1532,6 +1734,12 @@ bottomup:
54024 52611
54025 void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr) 52612 void arch_unmap_area_topdown(struct mm_struct *mm, unsigned long addr)
54026 { 52613 {
@@ -54033,7 +52620,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54033 /* 52620 /*
54034 * Is this a new hole at the highest possible address? 52621 * Is this a new hole at the highest possible address?
54035 */ 52622 */
54036@@ -1436,8 +1644,10 @@ void arch_unmap_area_topdown(struct mm_s 52623@@ -1539,8 +1747,10 @@ void arch_unmap_area_topdown(struct mm_s
54037 mm->free_area_cache = addr; 52624 mm->free_area_cache = addr;
54038 52625
54039 /* dont allow allocations above current base */ 52626 /* dont allow allocations above current base */
@@ -54045,7 +52632,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54045 } 52632 }
54046 52633
54047 unsigned long 52634 unsigned long
54048@@ -1545,6 +1755,27 @@ out: 52635@@ -1648,6 +1858,34 @@ out:
54049 return prev ? prev->vm_next : vma; 52636 return prev ? prev->vm_next : vma;
54050 } 52637 }
54051 52638
@@ -54064,7 +52651,14 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54064+ BUG_ON(!vma_m || vma_m->vm_mirror != vma); 52651+ BUG_ON(!vma_m || vma_m->vm_mirror != vma);
54065+ BUG_ON(vma->vm_file != vma_m->vm_file); 52652+ BUG_ON(vma->vm_file != vma_m->vm_file);
54066+ BUG_ON(vma->vm_end - vma->vm_start != vma_m->vm_end - vma_m->vm_start); 52653+ BUG_ON(vma->vm_end - vma->vm_start != vma_m->vm_end - vma_m->vm_start);
54067+ BUG_ON(vma->vm_pgoff != vma_m->vm_pgoff || vma->anon_vma != vma_m->anon_vma); 52654+ BUG_ON(vma->vm_pgoff != vma_m->vm_pgoff);
52655+ if (vma->anon_vma != vma_m->anon_vma) {
52656+ struct anon_vma_chain *avc, *avc_m;
52657+
52658+ avc = list_entry(vma->anon_vma_chain.prev, struct anon_vma_chain, same_vma);
52659+ avc_m = list_entry(vma_m->anon_vma_chain.prev, struct anon_vma_chain, same_vma);
52660+ BUG_ON(avc->anon_vma != avc_m->anon_vma);
52661+ }
54068+ BUG_ON((vma->vm_flags ^ vma_m->vm_flags) & ~(VM_WRITE | VM_MAYWRITE | VM_ACCOUNT | VM_LOCKED)); 52662+ BUG_ON((vma->vm_flags ^ vma_m->vm_flags) & ~(VM_WRITE | VM_MAYWRITE | VM_ACCOUNT | VM_LOCKED));
54069+ return vma_m; 52663+ return vma_m;
54070+} 52664+}
@@ -54073,23 +52667,23 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54073 /* 52667 /*
54074 * Verify that the stack growth is acceptable and 52668 * Verify that the stack growth is acceptable and
54075 * update accounting. This is shared with both the 52669 * update accounting. This is shared with both the
54076@@ -1561,6 +1792,7 @@ static int acct_stack_growth(struct vm_a 52670@@ -1664,6 +1902,7 @@ static int acct_stack_growth(struct vm_a
54077 return -ENOMEM; 52671 return -ENOMEM;
54078 52672
54079 /* Stack limit test */ 52673 /* Stack limit test */
54080+ gr_learn_resource(current, RLIMIT_STACK, size, 1); 52674+ gr_learn_resource(current, RLIMIT_STACK, size, 1);
54081 if (size > rlim[RLIMIT_STACK].rlim_cur) 52675 if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur))
54082 return -ENOMEM; 52676 return -ENOMEM;
54083 52677
54084@@ -1570,6 +1802,7 @@ static int acct_stack_growth(struct vm_a 52678@@ -1674,6 +1913,7 @@ static int acct_stack_growth(struct vm_a
54085 unsigned long limit;
54086 locked = mm->locked_vm + grow; 52679 locked = mm->locked_vm + grow;
54087 limit = rlim[RLIMIT_MEMLOCK].rlim_cur >> PAGE_SHIFT; 52680 limit = ACCESS_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur);
52681 limit >>= PAGE_SHIFT;
54088+ gr_learn_resource(current, RLIMIT_MEMLOCK, locked << PAGE_SHIFT, 1); 52682+ gr_learn_resource(current, RLIMIT_MEMLOCK, locked << PAGE_SHIFT, 1);
54089 if (locked > limit && !capable(CAP_IPC_LOCK)) 52683 if (locked > limit && !capable(CAP_IPC_LOCK))
54090 return -ENOMEM; 52684 return -ENOMEM;
54091 } 52685 }
54092@@ -1600,37 +1833,47 @@ static int acct_stack_growth(struct vm_a 52686@@ -1704,37 +1944,47 @@ static int acct_stack_growth(struct vm_a
54093 * PA-RISC uses this for its stack; IA64 for its Register Backing Store. 52687 * PA-RISC uses this for its stack; IA64 for its Register Backing Store.
54094 * vma is the last one with address > vma->vm_end. Have to extend vma. 52688 * vma is the last one with address > vma->vm_end. Have to extend vma.
54095 */ 52689 */
@@ -54147,7 +52741,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54147 unsigned long size, grow; 52741 unsigned long size, grow;
54148 52742
54149 size = address - vma->vm_start; 52743 size = address - vma->vm_start;
54150@@ -1640,6 +1883,8 @@ int expand_upwards(struct vm_area_struct 52744@@ -1744,6 +1994,8 @@ int expand_upwards(struct vm_area_struct
54151 if (!error) 52745 if (!error)
54152 vma->vm_end = address; 52746 vma->vm_end = address;
54153 } 52747 }
@@ -54156,7 +52750,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54156 anon_vma_unlock(vma); 52750 anon_vma_unlock(vma);
54157 return error; 52751 return error;
54158 } 52752 }
54159@@ -1651,7 +1896,8 @@ int expand_upwards(struct vm_area_struct 52753@@ -1755,7 +2007,8 @@ int expand_upwards(struct vm_area_struct
54160 static int expand_downwards(struct vm_area_struct *vma, 52754 static int expand_downwards(struct vm_area_struct *vma,
54161 unsigned long address) 52755 unsigned long address)
54162 { 52756 {
@@ -54166,7 +52760,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54166 52760
54167 /* 52761 /*
54168 * We must make sure the anon_vma is allocated 52762 * We must make sure the anon_vma is allocated
54169@@ -1665,6 +1911,15 @@ static int expand_downwards(struct vm_ar 52763@@ -1769,6 +2022,15 @@ static int expand_downwards(struct vm_ar
54170 if (error) 52764 if (error)
54171 return error; 52765 return error;
54172 52766
@@ -54182,7 +52776,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54182 anon_vma_lock(vma); 52776 anon_vma_lock(vma);
54183 52777
54184 /* 52778 /*
54185@@ -1674,9 +1929,17 @@ static int expand_downwards(struct vm_ar 52779@@ -1778,9 +2040,17 @@ static int expand_downwards(struct vm_ar
54186 */ 52780 */
54187 52781
54188 /* Somebody else might have raced and expanded it already */ 52782 /* Somebody else might have raced and expanded it already */
@@ -54201,7 +52795,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54201 size = vma->vm_end - address; 52795 size = vma->vm_end - address;
54202 grow = (vma->vm_start - address) >> PAGE_SHIFT; 52796 grow = (vma->vm_start - address) >> PAGE_SHIFT;
54203 52797
54204@@ -1684,9 +1947,20 @@ static int expand_downwards(struct vm_ar 52798@@ -1788,9 +2058,20 @@ static int expand_downwards(struct vm_ar
54205 if (!error) { 52799 if (!error) {
54206 vma->vm_start = address; 52800 vma->vm_start = address;
54207 vma->vm_pgoff -= grow; 52801 vma->vm_pgoff -= grow;
@@ -54222,7 +52816,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54222 return error; 52816 return error;
54223 } 52817 }
54224 52818
54225@@ -1762,6 +2036,13 @@ static void remove_vma_list(struct mm_st 52819@@ -1864,6 +2145,13 @@ static void remove_vma_list(struct mm_st
54226 do { 52820 do {
54227 long nrpages = vma_pages(vma); 52821 long nrpages = vma_pages(vma);
54228 52822
@@ -54236,7 +52830,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54236 mm->total_vm -= nrpages; 52830 mm->total_vm -= nrpages;
54237 vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages); 52831 vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
54238 vma = remove_vma(vma); 52832 vma = remove_vma(vma);
54239@@ -1807,6 +2088,16 @@ detach_vmas_to_be_unmapped(struct mm_str 52833@@ -1909,6 +2197,16 @@ detach_vmas_to_be_unmapped(struct mm_str
54240 insertion_point = (prev ? &prev->vm_next : &mm->mmap); 52834 insertion_point = (prev ? &prev->vm_next : &mm->mmap);
54241 vma->vm_prev = NULL; 52835 vma->vm_prev = NULL;
54242 do { 52836 do {
@@ -54253,9 +52847,9 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54253 rb_erase(&vma->vm_rb, &mm->mm_rb); 52847 rb_erase(&vma->vm_rb, &mm->mm_rb);
54254 mm->map_count--; 52848 mm->map_count--;
54255 tail_vma = vma; 52849 tail_vma = vma;
54256@@ -1834,10 +2125,25 @@ int split_vma(struct mm_struct * mm, str 52850@@ -1937,14 +2235,33 @@ static int __split_vma(struct mm_struct
54257 struct mempolicy *pol;
54258 struct vm_area_struct *new; 52851 struct vm_area_struct *new;
52852 int err = -ENOMEM;
54259 52853
54260+#ifdef CONFIG_PAX_SEGMEXEC 52854+#ifdef CONFIG_PAX_SEGMEXEC
54261+ struct vm_area_struct *vma_m, *new_m = NULL; 52855+ struct vm_area_struct *vma_m, *new_m = NULL;
@@ -54268,27 +52862,18 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54268 52862
54269+#ifdef CONFIG_PAX_SEGMEXEC 52863+#ifdef CONFIG_PAX_SEGMEXEC
54270+ vma_m = pax_find_mirror_vma(vma); 52864+ vma_m = pax_find_mirror_vma(vma);
54271+
54272+ if (mm->pax_flags & MF_PAX_SEGMEXEC) {
54273+ BUG_ON(vma->vm_end > SEGMEXEC_TASK_SIZE);
54274+ if (mm->map_count >= sysctl_max_map_count-1)
54275+ return -ENOMEM;
54276+ } else
54277+#endif 52865+#endif
54278+ 52866+
54279 if (mm->map_count >= sysctl_max_map_count) 52867 new = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
54280 return -ENOMEM;
54281
54282@@ -1845,6 +2151,16 @@ int split_vma(struct mm_struct * mm, str
54283 if (!new) 52868 if (!new)
54284 return -ENOMEM; 52869 goto out_err;
54285 52870
54286+#ifdef CONFIG_PAX_SEGMEXEC 52871+#ifdef CONFIG_PAX_SEGMEXEC
54287+ if (vma_m) { 52872+ if (vma_m) {
54288+ new_m = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 52873+ new_m = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
54289+ if (!new_m) { 52874+ if (!new_m) {
54290+ kmem_cache_free(vm_area_cachep, new); 52875+ kmem_cache_free(vm_area_cachep, new);
54291+ return -ENOMEM; 52876+ goto out_err;
54292+ } 52877+ }
54293+ } 52878+ }
54294+#endif 52879+#endif
@@ -54296,13 +52881,14 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54296 /* most fields are the same, copy all, and then fixup */ 52881 /* most fields are the same, copy all, and then fixup */
54297 *new = *vma; 52882 *new = *vma;
54298 52883
54299@@ -1855,8 +2171,29 @@ int split_vma(struct mm_struct * mm, str 52884@@ -1957,6 +2274,22 @@ static int __split_vma(struct mm_struct
54300 new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT); 52885 new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
54301 } 52886 }
54302 52887
54303+#ifdef CONFIG_PAX_SEGMEXEC 52888+#ifdef CONFIG_PAX_SEGMEXEC
54304+ if (vma_m) { 52889+ if (vma_m) {
54305+ *new_m = *vma_m; 52890+ *new_m = *vma_m;
52891+ INIT_LIST_HEAD(&new_m->anon_vma_chain);
54306+ new_m->vm_mirror = new; 52892+ new_m->vm_mirror = new;
54307+ new->vm_mirror = new_m; 52893+ new->vm_mirror = new_m;
54308+ 52894+
@@ -54317,21 +52903,16 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54317+ 52903+
54318 pol = mpol_dup(vma_policy(vma)); 52904 pol = mpol_dup(vma_policy(vma));
54319 if (IS_ERR(pol)) { 52905 if (IS_ERR(pol)) {
54320+ 52906 err = PTR_ERR(pol);
54321+#ifdef CONFIG_PAX_SEGMEXEC 52907@@ -1982,6 +2315,42 @@ static int __split_vma(struct mm_struct
54322+ if (new_m)
54323+ kmem_cache_free(vm_area_cachep, new_m);
54324+#endif
54325+
54326 kmem_cache_free(vm_area_cachep, new);
54327 return PTR_ERR(pol);
54328 }
54329@@ -1877,6 +2214,28 @@ int split_vma(struct mm_struct * mm, str
54330 else 52908 else
54331 vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new); 52909 err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
54332 52910
54333+#ifdef CONFIG_PAX_SEGMEXEC 52911+#ifdef CONFIG_PAX_SEGMEXEC
54334+ if (vma_m) { 52912+ if (!err && vma_m) {
52913+ if (anon_vma_clone(new_m, vma_m))
52914+ goto out_free_mpol;
52915+
54335+ mpol_get(pol); 52916+ mpol_get(pol);
54336+ vma_set_policy(new_m, pol); 52917+ vma_set_policy(new_m, pol);
54337+ 52918+
@@ -54345,17 +52926,64 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54345+ new_m->vm_ops->open(new_m); 52926+ new_m->vm_ops->open(new_m);
54346+ 52927+
54347+ if (new_below) 52928+ if (new_below)
54348+ vma_adjust(vma_m, addr_m, vma_m->vm_end, vma_m->vm_pgoff + 52929+ err = vma_adjust(vma_m, addr_m, vma_m->vm_end, vma_m->vm_pgoff +
54349+ ((addr_m - new_m->vm_start) >> PAGE_SHIFT), new_m); 52930+ ((addr_m - new_m->vm_start) >> PAGE_SHIFT), new_m);
54350+ else 52931+ else
54351+ vma_adjust(vma_m, vma_m->vm_start, addr_m, vma_m->vm_pgoff, new_m); 52932+ err = vma_adjust(vma_m, vma_m->vm_start, addr_m, vma_m->vm_pgoff, new_m);
52933+
52934+ if (err) {
52935+ if (new_m->vm_ops && new_m->vm_ops->close)
52936+ new_m->vm_ops->close(new_m);
52937+ if (new_m->vm_file) {
52938+ if (vma_m->vm_flags & VM_EXECUTABLE)
52939+ removed_exe_file_vma(mm);
52940+ fput(new_m->vm_file);
52941+ }
52942+ mpol_put(pol);
52943+ }
54352+ } 52944+ }
54353+#endif 52945+#endif
54354+ 52946+
54355 return 0; 52947 /* Success. */
54356 } 52948 if (!err)
52949 return 0;
52950@@ -1994,10 +2363,18 @@ static int __split_vma(struct mm_struct
52951 removed_exe_file_vma(mm);
52952 fput(new->vm_file);
52953 }
52954- unlink_anon_vmas(new);
52955 out_free_mpol:
52956 mpol_put(pol);
52957 out_free_vma:
52958+
52959+#ifdef CONFIG_PAX_SEGMEXEC
52960+ if (new_m) {
52961+ unlink_anon_vmas(new_m);
52962+ kmem_cache_free(vm_area_cachep, new_m);
52963+ }
52964+#endif
52965+
52966+ unlink_anon_vmas(new);
52967 kmem_cache_free(vm_area_cachep, new);
52968 out_err:
52969 return err;
52970@@ -2010,6 +2387,15 @@ static int __split_vma(struct mm_struct
52971 int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
52972 unsigned long addr, int new_below)
52973 {
52974+
52975+#ifdef CONFIG_PAX_SEGMEXEC
52976+ if (mm->pax_flags & MF_PAX_SEGMEXEC) {
52977+ BUG_ON(vma->vm_end > SEGMEXEC_TASK_SIZE);
52978+ if (mm->map_count >= sysctl_max_map_count-1)
52979+ return -ENOMEM;
52980+ } else
52981+#endif
52982+
52983 if (mm->map_count >= sysctl_max_map_count)
52984 return -ENOMEM;
54357 52985
54358@@ -1885,11 +2244,30 @@ int split_vma(struct mm_struct * mm, str 52986@@ -2021,11 +2407,30 @@ int split_vma(struct mm_struct *mm, stru
54359 * work. This now handles partial unmappings. 52987 * work. This now handles partial unmappings.
54360 * Jeremy Fitzhardinge <jeremy@goop.org> 52988 * Jeremy Fitzhardinge <jeremy@goop.org>
54361 */ 52989 */
@@ -54386,7 +53014,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54386 if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start) 53014 if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
54387 return -EINVAL; 53015 return -EINVAL;
54388 53016
54389@@ -1953,6 +2331,8 @@ int do_munmap(struct mm_struct *mm, unsi 53017@@ -2099,6 +2504,8 @@ int do_munmap(struct mm_struct *mm, unsi
54390 /* Fix up all other VM information */ 53018 /* Fix up all other VM information */
54391 remove_vma_list(mm, vma); 53019 remove_vma_list(mm, vma);
54392 53020
@@ -54395,7 +53023,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54395 return 0; 53023 return 0;
54396 } 53024 }
54397 53025
54398@@ -1965,22 +2345,18 @@ SYSCALL_DEFINE2(munmap, unsigned long, a 53026@@ -2111,22 +2518,18 @@ SYSCALL_DEFINE2(munmap, unsigned long, a
54399 53027
54400 profile_munmap(addr); 53028 profile_munmap(addr);
54401 53029
@@ -54424,7 +53052,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54424 /* 53052 /*
54425 * this is really a simplified "do_mmap". it only handles 53053 * this is really a simplified "do_mmap". it only handles
54426 * anonymous maps. eventually we may be able to do some 53054 * anonymous maps. eventually we may be able to do some
54427@@ -1994,6 +2370,7 @@ unsigned long do_brk(unsigned long addr, 53055@@ -2140,6 +2543,7 @@ unsigned long do_brk(unsigned long addr,
54428 struct rb_node ** rb_link, * rb_parent; 53056 struct rb_node ** rb_link, * rb_parent;
54429 pgoff_t pgoff = addr >> PAGE_SHIFT; 53057 pgoff_t pgoff = addr >> PAGE_SHIFT;
54430 int error; 53058 int error;
@@ -54432,7 +53060,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54432 53060
54433 len = PAGE_ALIGN(len); 53061 len = PAGE_ALIGN(len);
54434 if (!len) 53062 if (!len)
54435@@ -2005,16 +2382,30 @@ unsigned long do_brk(unsigned long addr, 53063@@ -2151,16 +2555,30 @@ unsigned long do_brk(unsigned long addr,
54436 53064
54437 flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; 53065 flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
54438 53066
@@ -54462,9 +53090,9 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54462- locked = len >> PAGE_SHIFT; 53090- locked = len >> PAGE_SHIFT;
54463+ locked = charged; 53091+ locked = charged;
54464 locked += mm->locked_vm; 53092 locked += mm->locked_vm;
54465 lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur; 53093 lock_limit = rlimit(RLIMIT_MEMLOCK);
54466 lock_limit >>= PAGE_SHIFT; 53094 lock_limit >>= PAGE_SHIFT;
54467@@ -2031,22 +2422,22 @@ unsigned long do_brk(unsigned long addr, 53095@@ -2177,22 +2595,22 @@ unsigned long do_brk(unsigned long addr,
54468 /* 53096 /*
54469 * Clear old maps. this also does some error checking for us 53097 * Clear old maps. this also does some error checking for us
54470 */ 53098 */
@@ -54491,7 +53119,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54491 return -ENOMEM; 53119 return -ENOMEM;
54492 53120
54493 /* Can we just expand an old private anonymous mapping? */ 53121 /* Can we just expand an old private anonymous mapping? */
54494@@ -2060,7 +2451,7 @@ unsigned long do_brk(unsigned long addr, 53122@@ -2206,7 +2624,7 @@ unsigned long do_brk(unsigned long addr,
54495 */ 53123 */
54496 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); 53124 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
54497 if (!vma) { 53125 if (!vma) {
@@ -54500,7 +53128,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54500 return -ENOMEM; 53128 return -ENOMEM;
54501 } 53129 }
54502 53130
54503@@ -2072,11 +2463,12 @@ unsigned long do_brk(unsigned long addr, 53131@@ -2219,11 +2637,12 @@ unsigned long do_brk(unsigned long addr,
54504 vma->vm_page_prot = vm_get_page_prot(flags); 53132 vma->vm_page_prot = vm_get_page_prot(flags);
54505 vma_link(mm, vma, prev, rb_link, rb_parent); 53133 vma_link(mm, vma, prev, rb_link, rb_parent);
54506 out: 53134 out:
@@ -54515,7 +53143,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54515 return addr; 53143 return addr;
54516 } 53144 }
54517 53145
54518@@ -2123,8 +2515,10 @@ void exit_mmap(struct mm_struct *mm) 53146@@ -2270,8 +2689,10 @@ void exit_mmap(struct mm_struct *mm)
54519 * Walk the list again, actually closing and freeing it, 53147 * Walk the list again, actually closing and freeing it,
54520 * with preemption enabled, without holding any MM locks. 53148 * with preemption enabled, without holding any MM locks.
54521 */ 53149 */
@@ -54527,7 +53155,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54527 53155
54528 BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT); 53156 BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT);
54529 } 53157 }
54530@@ -2138,6 +2532,10 @@ int insert_vm_struct(struct mm_struct * 53158@@ -2285,6 +2706,10 @@ int insert_vm_struct(struct mm_struct *
54531 struct vm_area_struct * __vma, * prev; 53159 struct vm_area_struct * __vma, * prev;
54532 struct rb_node ** rb_link, * rb_parent; 53160 struct rb_node ** rb_link, * rb_parent;
54533 53161
@@ -54538,7 +53166,7 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54538 /* 53166 /*
54539 * The vm_pgoff of a purely anonymous vma should be irrelevant 53167 * The vm_pgoff of a purely anonymous vma should be irrelevant
54540 * until its first write fault, when page's anon_vma and index 53168 * until its first write fault, when page's anon_vma and index
54541@@ -2160,7 +2558,22 @@ int insert_vm_struct(struct mm_struct * 53169@@ -2307,7 +2732,22 @@ int insert_vm_struct(struct mm_struct *
54542 if ((vma->vm_flags & VM_ACCOUNT) && 53170 if ((vma->vm_flags & VM_ACCOUNT) &&
54543 security_vm_enough_memory_mm(mm, vma_pages(vma))) 53171 security_vm_enough_memory_mm(mm, vma_pages(vma)))
54544 return -ENOMEM; 53172 return -ENOMEM;
@@ -54555,13 +53183,13 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54555+ 53183+
54556+#ifdef CONFIG_PAX_SEGMEXEC 53184+#ifdef CONFIG_PAX_SEGMEXEC
54557+ if (vma_m) 53185+ if (vma_m)
54558+ pax_mirror_vma(vma_m, vma); 53186+ BUG_ON(pax_mirror_vma(vma_m, vma));
54559+#endif 53187+#endif
54560+ 53188+
54561 return 0; 53189 return 0;
54562 } 53190 }
54563 53191
54564@@ -2178,6 +2591,8 @@ struct vm_area_struct *copy_vma(struct v 53192@@ -2325,6 +2765,8 @@ struct vm_area_struct *copy_vma(struct v
54565 struct rb_node **rb_link, *rb_parent; 53193 struct rb_node **rb_link, *rb_parent;
54566 struct mempolicy *pol; 53194 struct mempolicy *pol;
54567 53195
@@ -54570,12 +53198,13 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54570 /* 53198 /*
54571 * If anonymous vma has not yet been faulted, update new pgoff 53199 * If anonymous vma has not yet been faulted, update new pgoff
54572 * to match new location, to increase its chance of merging. 53200 * to match new location, to increase its chance of merging.
54573@@ -2221,6 +2636,35 @@ struct vm_area_struct *copy_vma(struct v 53201@@ -2374,6 +2816,39 @@ struct vm_area_struct *copy_vma(struct v
54574 return new_vma; 53202 kmem_cache_free(vm_area_cachep, new_vma);
53203 return NULL;
54575 } 53204 }
54576 53205+
54577+#ifdef CONFIG_PAX_SEGMEXEC 53206+#ifdef CONFIG_PAX_SEGMEXEC
54578+void pax_mirror_vma(struct vm_area_struct *vma_m, struct vm_area_struct *vma) 53207+long pax_mirror_vma(struct vm_area_struct *vma_m, struct vm_area_struct *vma)
54579+{ 53208+{
54580+ struct vm_area_struct *prev_m; 53209+ struct vm_area_struct *prev_m;
54581+ struct rb_node **rb_link_m, *rb_parent_m; 53210+ struct rb_node **rb_link_m, *rb_parent_m;
@@ -54585,6 +53214,9 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54585+ BUG_ON(vma->vm_mirror || vma_m->vm_mirror); 53214+ BUG_ON(vma->vm_mirror || vma_m->vm_mirror);
54586+ BUG_ON(!mpol_equal(vma_policy(vma), vma_policy(vma_m))); 53215+ BUG_ON(!mpol_equal(vma_policy(vma), vma_policy(vma_m)));
54587+ *vma_m = *vma; 53216+ *vma_m = *vma;
53217+ INIT_LIST_HEAD(&vma_m->anon_vma_chain);
53218+ if (anon_vma_clone(vma_m, vma))
53219+ return -ENOMEM;
54588+ pol_m = vma_policy(vma_m); 53220+ pol_m = vma_policy(vma_m);
54589+ mpol_get(pol_m); 53221+ mpol_get(pol_m);
54590+ vma_set_policy(vma_m, pol_m); 53222+ vma_set_policy(vma_m, pol_m);
@@ -54600,22 +53232,22 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54600+ vma_link(vma->vm_mm, vma_m, prev_m, rb_link_m, rb_parent_m); 53232+ vma_link(vma->vm_mm, vma_m, prev_m, rb_link_m, rb_parent_m);
54601+ vma_m->vm_mirror = vma; 53233+ vma_m->vm_mirror = vma;
54602+ vma->vm_mirror = vma_m; 53234+ vma->vm_mirror = vma_m;
53235+ return 0;
54603+} 53236+}
54604+#endif 53237+#endif
54605+ 53238
54606 /* 53239 /*
54607 * Return true if the calling process may expand its vm space by the passed 53240 * Return true if the calling process may expand its vm space by the passed
54608 * number of pages 53241@@ -2385,7 +2860,7 @@ int may_expand_vm(struct mm_struct *mm,
54609@@ -2231,7 +2675,7 @@ int may_expand_vm(struct mm_struct *mm,
54610 unsigned long lim; 53242 unsigned long lim;
54611 53243
54612 lim = current->signal->rlim[RLIMIT_AS].rlim_cur >> PAGE_SHIFT; 53244 lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT;
54613- 53245-
54614+ gr_learn_resource(current, RLIMIT_AS, (cur + npages) << PAGE_SHIFT, 1); 53246+ gr_learn_resource(current, RLIMIT_AS, (cur + npages) << PAGE_SHIFT, 1);
54615 if (cur + npages > lim) 53247 if (cur + npages > lim)
54616 return 0; 53248 return 0;
54617 return 1; 53249 return 1;
54618@@ -2300,6 +2744,17 @@ int install_special_mapping(struct mm_st 53250@@ -2455,6 +2930,17 @@ int install_special_mapping(struct mm_st
54619 vma->vm_start = addr; 53251 vma->vm_start = addr;
54620 vma->vm_end = addr + len; 53252 vma->vm_end = addr + len;
54621 53253
@@ -54633,10 +53265,10 @@ diff -urNp linux-2.6.32.24/mm/mmap.c linux-2.6.32.24/mm/mmap.c
54633 vma->vm_flags = vm_flags | mm->def_flags | VM_DONTEXPAND; 53265 vma->vm_flags = vm_flags | mm->def_flags | VM_DONTEXPAND;
54634 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); 53266 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
54635 53267
54636diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c 53268diff -urNp linux-2.6.35.7/mm/mprotect.c linux-2.6.35.7/mm/mprotect.c
54637--- linux-2.6.32.24/mm/mprotect.c 2010-08-13 16:24:37.000000000 -0400 53269--- linux-2.6.35.7/mm/mprotect.c 2010-08-26 19:47:12.000000000 -0400
54638+++ linux-2.6.32.24/mm/mprotect.c 2010-10-23 19:59:20.000000000 -0400 53270+++ linux-2.6.35.7/mm/mprotect.c 2010-10-18 21:01:30.000000000 -0400
54639@@ -24,10 +24,16 @@ 53271@@ -23,10 +23,16 @@
54640 #include <linux/mmu_notifier.h> 53272 #include <linux/mmu_notifier.h>
54641 #include <linux/migrate.h> 53273 #include <linux/migrate.h>
54642 #include <linux/perf_event.h> 53274 #include <linux/perf_event.h>
@@ -54653,7 +53285,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54653 53285
54654 #ifndef pgprot_modify 53286 #ifndef pgprot_modify
54655 static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) 53287 static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
54656@@ -132,6 +138,48 @@ static void change_protection(struct vm_ 53288@@ -131,6 +137,48 @@ static void change_protection(struct vm_
54657 flush_tlb_range(vma, start, end); 53289 flush_tlb_range(vma, start, end);
54658 } 53290 }
54659 53291
@@ -54663,7 +53295,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54663+{ 53295+{
54664+ unsigned long oldlimit, newlimit = 0UL; 53296+ unsigned long oldlimit, newlimit = 0UL;
54665+ 53297+
54666+ if (!(mm->pax_flags & MF_PAX_PAGEEXEC) || nx_enabled) 53298+ if (!(mm->pax_flags & MF_PAX_PAGEEXEC) || (__supported_pte_mask & _PAGE_NX))
54667+ return; 53299+ return;
54668+ 53300+
54669+ spin_lock(&mm->page_table_lock); 53301+ spin_lock(&mm->page_table_lock);
@@ -54702,7 +53334,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54702 int 53334 int
54703 mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, 53335 mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
54704 unsigned long start, unsigned long end, unsigned long newflags) 53336 unsigned long start, unsigned long end, unsigned long newflags)
54705@@ -144,11 +192,29 @@ mprotect_fixup(struct vm_area_struct *vm 53337@@ -143,11 +191,29 @@ mprotect_fixup(struct vm_area_struct *vm
54706 int error; 53338 int error;
54707 int dirty_accountable = 0; 53339 int dirty_accountable = 0;
54708 53340
@@ -54732,7 +53364,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54732 /* 53364 /*
54733 * If we make a private mapping writable we increase our commit; 53365 * If we make a private mapping writable we increase our commit;
54734 * but (without finer accounting) cannot reduce our commit if we 53366 * but (without finer accounting) cannot reduce our commit if we
54735@@ -165,6 +231,38 @@ mprotect_fixup(struct vm_area_struct *vm 53367@@ -164,6 +230,42 @@ mprotect_fixup(struct vm_area_struct *vm
54736 } 53368 }
54737 } 53369 }
54738 53370
@@ -54763,7 +53395,11 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54763+ goto fail; 53395+ goto fail;
54764+ } 53396+ }
54765+ vma->vm_flags = newflags; 53397+ vma->vm_flags = newflags;
54766+ pax_mirror_vma(vma_m, vma); 53398+ error = pax_mirror_vma(vma_m, vma);
53399+ if (error) {
53400+ vma->vm_flags = oldflags;
53401+ goto fail;
53402+ }
54767+ } 53403+ }
54768+ } 53404+ }
54769+#endif 53405+#endif
@@ -54771,7 +53407,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54771 /* 53407 /*
54772 * First try to merge with previous and/or next vma. 53408 * First try to merge with previous and/or next vma.
54773 */ 53409 */
54774@@ -195,9 +293,21 @@ success: 53410@@ -194,9 +296,21 @@ success:
54775 * vm_flags and vm_page_prot are protected by the mmap_sem 53411 * vm_flags and vm_page_prot are protected by the mmap_sem
54776 * held in write mode. 53412 * held in write mode.
54777 */ 53413 */
@@ -54794,7 +53430,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54794 53430
54795 if (vma_wants_writenotify(vma)) { 53431 if (vma_wants_writenotify(vma)) {
54796 vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED); 53432 vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
54797@@ -238,6 +348,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, 53433@@ -237,6 +351,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
54798 end = start + len; 53434 end = start + len;
54799 if (end <= start) 53435 if (end <= start)
54800 return -ENOMEM; 53436 return -ENOMEM;
@@ -54812,7 +53448,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54812 if (!arch_validate_prot(prot)) 53448 if (!arch_validate_prot(prot))
54813 return -EINVAL; 53449 return -EINVAL;
54814 53450
54815@@ -245,7 +366,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, 53451@@ -244,7 +369,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
54816 /* 53452 /*
54817 * Does the application expect PROT_READ to imply PROT_EXEC: 53453 * Does the application expect PROT_READ to imply PROT_EXEC:
54818 */ 53454 */
@@ -54821,7 +53457,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54821 prot |= PROT_EXEC; 53457 prot |= PROT_EXEC;
54822 53458
54823 vm_flags = calc_vm_prot_bits(prot); 53459 vm_flags = calc_vm_prot_bits(prot);
54824@@ -277,6 +398,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, 53460@@ -276,6 +401,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
54825 if (start > vma->vm_start) 53461 if (start > vma->vm_start)
54826 prev = vma; 53462 prev = vma;
54827 53463
@@ -54833,7 +53469,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54833 for (nstart = start ; ; ) { 53469 for (nstart = start ; ; ) {
54834 unsigned long newflags; 53470 unsigned long newflags;
54835 53471
54836@@ -286,6 +412,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, 53472@@ -285,6 +415,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
54837 53473
54838 /* newflags >> 4 shift VM_MAY% in place of VM_% */ 53474 /* newflags >> 4 shift VM_MAY% in place of VM_% */
54839 if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) { 53475 if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) {
@@ -54848,7 +53484,7 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54848 error = -EACCES; 53484 error = -EACCES;
54849 goto out; 53485 goto out;
54850 } 53486 }
54851@@ -301,6 +435,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, 53487@@ -300,6 +438,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
54852 if (error) 53488 if (error)
54853 goto out; 53489 goto out;
54854 perf_event_mmap(vma); 53490 perf_event_mmap(vma);
@@ -54858,23 +53494,23 @@ diff -urNp linux-2.6.32.24/mm/mprotect.c linux-2.6.32.24/mm/mprotect.c
54858 nstart = tmp; 53494 nstart = tmp;
54859 53495
54860 if (nstart < prev->vm_end) 53496 if (nstart < prev->vm_end)
54861diff -urNp linux-2.6.32.24/mm/mremap.c linux-2.6.32.24/mm/mremap.c 53497diff -urNp linux-2.6.35.7/mm/mremap.c linux-2.6.35.7/mm/mremap.c
54862--- linux-2.6.32.24/mm/mremap.c 2010-08-13 16:24:37.000000000 -0400 53498--- linux-2.6.35.7/mm/mremap.c 2010-08-26 19:47:12.000000000 -0400
54863+++ linux-2.6.32.24/mm/mremap.c 2010-10-23 19:59:20.000000000 -0400 53499+++ linux-2.6.35.7/mm/mremap.c 2010-09-26 22:02:10.000000000 -0400
54864@@ -114,6 +114,12 @@ static void move_ptes(struct vm_area_str 53500@@ -113,6 +113,12 @@ static void move_ptes(struct vm_area_str
54865 continue; 53501 continue;
54866 pte = ptep_clear_flush(vma, old_addr, old_pte); 53502 pte = ptep_clear_flush(vma, old_addr, old_pte);
54867 pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr); 53503 pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
54868+ 53504+
54869+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT 53505+#ifdef CONFIG_ARCH_TRACK_EXEC_LIMIT
54870+ if (!nx_enabled && (new_vma->vm_flags & (VM_PAGEEXEC | VM_EXEC)) == VM_PAGEEXEC) 53506+ if (!(__supported_pte_mask & _PAGE_NX) && (new_vma->vm_flags & (VM_PAGEEXEC | VM_EXEC)) == VM_PAGEEXEC)
54871+ pte = pte_exprotect(pte); 53507+ pte = pte_exprotect(pte);
54872+#endif 53508+#endif
54873+ 53509+
54874 set_pte_at(mm, new_addr, new_pte, pte); 53510 set_pte_at(mm, new_addr, new_pte, pte);
54875 } 53511 }
54876 53512
54877@@ -273,6 +279,11 @@ static struct vm_area_struct *vma_to_res 53513@@ -272,6 +278,11 @@ static struct vm_area_struct *vma_to_res
54878 if (is_vm_hugetlb_page(vma)) 53514 if (is_vm_hugetlb_page(vma))
54879 goto Einval; 53515 goto Einval;
54880 53516
@@ -54886,7 +53522,7 @@ diff -urNp linux-2.6.32.24/mm/mremap.c linux-2.6.32.24/mm/mremap.c
54886 /* We can't remap across vm area boundaries */ 53522 /* We can't remap across vm area boundaries */
54887 if (old_len > vma->vm_end - addr) 53523 if (old_len > vma->vm_end - addr)
54888 goto Efault; 53524 goto Efault;
54889@@ -322,20 +333,25 @@ static unsigned long mremap_to(unsigned 53525@@ -321,20 +332,25 @@ static unsigned long mremap_to(unsigned
54890 unsigned long ret = -EINVAL; 53526 unsigned long ret = -EINVAL;
54891 unsigned long charged = 0; 53527 unsigned long charged = 0;
54892 unsigned long map_flags; 53528 unsigned long map_flags;
@@ -54917,7 +53553,7 @@ diff -urNp linux-2.6.32.24/mm/mremap.c linux-2.6.32.24/mm/mremap.c
54917 goto out; 53553 goto out;
54918 53554
54919 ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1); 53555 ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1);
54920@@ -407,6 +423,7 @@ unsigned long do_mremap(unsigned long ad 53556@@ -406,6 +422,7 @@ unsigned long do_mremap(unsigned long ad
54921 struct vm_area_struct *vma; 53557 struct vm_area_struct *vma;
54922 unsigned long ret = -EINVAL; 53558 unsigned long ret = -EINVAL;
54923 unsigned long charged = 0; 53559 unsigned long charged = 0;
@@ -54925,7 +53561,7 @@ diff -urNp linux-2.6.32.24/mm/mremap.c linux-2.6.32.24/mm/mremap.c
54925 53561
54926 if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE)) 53562 if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
54927 goto out; 53563 goto out;
54928@@ -425,6 +442,17 @@ unsigned long do_mremap(unsigned long ad 53564@@ -424,6 +441,17 @@ unsigned long do_mremap(unsigned long ad
54929 if (!new_len) 53565 if (!new_len)
54930 goto out; 53566 goto out;
54931 53567
@@ -54943,7 +53579,7 @@ diff -urNp linux-2.6.32.24/mm/mremap.c linux-2.6.32.24/mm/mremap.c
54943 if (flags & MREMAP_FIXED) { 53579 if (flags & MREMAP_FIXED) {
54944 if (flags & MREMAP_MAYMOVE) 53580 if (flags & MREMAP_MAYMOVE)
54945 ret = mremap_to(addr, old_len, new_addr, new_len); 53581 ret = mremap_to(addr, old_len, new_addr, new_len);
54946@@ -471,6 +499,7 @@ unsigned long do_mremap(unsigned long ad 53582@@ -473,6 +501,7 @@ unsigned long do_mremap(unsigned long ad
54947 addr + new_len); 53583 addr + new_len);
54948 } 53584 }
54949 ret = addr; 53585 ret = addr;
@@ -54951,7 +53587,7 @@ diff -urNp linux-2.6.32.24/mm/mremap.c linux-2.6.32.24/mm/mremap.c
54951 goto out; 53587 goto out;
54952 } 53588 }
54953 } 53589 }
54954@@ -497,7 +526,13 @@ unsigned long do_mremap(unsigned long ad 53590@@ -499,7 +528,13 @@ unsigned long do_mremap(unsigned long ad
54955 ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1); 53591 ret = security_file_mmap(NULL, 0, 0, 0, new_addr, 1);
54956 if (ret) 53592 if (ret)
54957 goto out; 53593 goto out;
@@ -54965,9 +53601,9 @@ diff -urNp linux-2.6.32.24/mm/mremap.c linux-2.6.32.24/mm/mremap.c
54965 } 53601 }
54966 out: 53602 out:
54967 if (ret & ~PAGE_MASK) 53603 if (ret & ~PAGE_MASK)
54968diff -urNp linux-2.6.32.24/mm/nommu.c linux-2.6.32.24/mm/nommu.c 53604diff -urNp linux-2.6.35.7/mm/nommu.c linux-2.6.35.7/mm/nommu.c
54969--- linux-2.6.32.24/mm/nommu.c 2010-08-29 21:08:20.000000000 -0400 53605--- linux-2.6.35.7/mm/nommu.c 2010-08-26 19:47:12.000000000 -0400
54970+++ linux-2.6.32.24/mm/nommu.c 2010-10-23 19:59:20.000000000 -0400 53606+++ linux-2.6.35.7/mm/nommu.c 2010-09-17 20:12:09.000000000 -0400
54971@@ -67,7 +67,6 @@ int sysctl_overcommit_memory = OVERCOMMI 53607@@ -67,7 +67,6 @@ int sysctl_overcommit_memory = OVERCOMMI
54972 int sysctl_overcommit_ratio = 50; /* default is 50% */ 53608 int sysctl_overcommit_ratio = 50; /* default is 50% */
54973 int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT; 53609 int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
@@ -54976,7 +53612,7 @@ diff -urNp linux-2.6.32.24/mm/nommu.c linux-2.6.32.24/mm/nommu.c
54976 53612
54977 atomic_long_t mmap_pages_allocated; 53613 atomic_long_t mmap_pages_allocated;
54978 53614
54979@@ -761,15 +760,6 @@ struct vm_area_struct *find_vma(struct m 53615@@ -762,15 +761,6 @@ struct vm_area_struct *find_vma(struct m
54980 EXPORT_SYMBOL(find_vma); 53616 EXPORT_SYMBOL(find_vma);
54981 53617
54982 /* 53618 /*
@@ -54992,21 +53628,29 @@ diff -urNp linux-2.6.32.24/mm/nommu.c linux-2.6.32.24/mm/nommu.c
54992 * expand a stack to a given address 53628 * expand a stack to a given address
54993 * - not supported under NOMMU conditions 53629 * - not supported under NOMMU conditions
54994 */ 53630 */
54995diff -urNp linux-2.6.32.24/mm/page_alloc.c linux-2.6.32.24/mm/page_alloc.c 53631@@ -1491,6 +1481,7 @@ int split_vma(struct mm_struct *mm, stru
54996--- linux-2.6.32.24/mm/page_alloc.c 2010-09-26 17:26:05.000000000 -0400 53632
54997+++ linux-2.6.32.24/mm/page_alloc.c 2010-10-23 19:59:20.000000000 -0400 53633 /* most fields are the same, copy all, and then fixup */
54998@@ -587,6 +587,10 @@ static void __free_pages_ok(struct page 53634 *new = *vma;
53635+ INIT_LIST_HEAD(&new->anon_vma_chain);
53636 *region = *vma->vm_region;
53637 new->vm_region = region;
53638
53639diff -urNp linux-2.6.35.7/mm/page_alloc.c linux-2.6.35.7/mm/page_alloc.c
53640--- linux-2.6.35.7/mm/page_alloc.c 2010-09-26 17:32:11.000000000 -0400
53641+++ linux-2.6.35.7/mm/page_alloc.c 2010-09-26 17:32:50.000000000 -0400
53642@@ -642,6 +642,10 @@ static bool free_pages_prepare(struct pa
53643 int i;
54999 int bad = 0; 53644 int bad = 0;
55000 int wasMlocked = __TestClearPageMlocked(page);
55001 53645
55002+#ifdef CONFIG_PAX_MEMORY_SANITIZE 53646+#ifdef CONFIG_PAX_MEMORY_SANITIZE
55003+ unsigned long index = 1UL << order; 53647+ unsigned long index = 1UL << order;
55004+#endif 53648+#endif
55005+ 53649+
53650 trace_mm_page_free_direct(page, order);
55006 kmemcheck_free_shadow(page, order); 53651 kmemcheck_free_shadow(page, order);
55007 53652
55008 for (i = 0 ; i < (1 << order) ; ++i) 53653@@ -660,6 +664,12 @@ static bool free_pages_prepare(struct pa
55009@@ -599,6 +603,12 @@ static void __free_pages_ok(struct page
55010 debug_check_no_obj_freed(page_address(page), 53654 debug_check_no_obj_freed(page_address(page),
55011 PAGE_SIZE << order); 53655 PAGE_SIZE << order);
55012 } 53656 }
@@ -55019,7 +53663,7 @@ diff -urNp linux-2.6.32.24/mm/page_alloc.c linux-2.6.32.24/mm/page_alloc.c
55019 arch_free_page(page, order); 53663 arch_free_page(page, order);
55020 kernel_map_pages(page, 1 << order, 0); 53664 kernel_map_pages(page, 1 << order, 0);
55021 53665
55022@@ -702,8 +712,10 @@ static int prep_new_page(struct page *pa 53666@@ -774,8 +784,10 @@ static int prep_new_page(struct page *pa
55023 arch_alloc_page(page, order); 53667 arch_alloc_page(page, order);
55024 kernel_map_pages(page, 1 << order, 1); 53668 kernel_map_pages(page, 1 << order, 1);
55025 53669
@@ -55030,19 +53674,7 @@ diff -urNp linux-2.6.32.24/mm/page_alloc.c linux-2.6.32.24/mm/page_alloc.c
55030 53674
55031 if (order && (gfp_flags & __GFP_COMP)) 53675 if (order && (gfp_flags & __GFP_COMP))
55032 prep_compound_page(page, order); 53676 prep_compound_page(page, order);
55033@@ -1097,6 +1109,11 @@ static void free_hot_cold_page(struct pa 53677@@ -3986,7 +3998,7 @@ static void __init setup_usemap(struct p
55034 debug_check_no_locks_freed(page_address(page), PAGE_SIZE);
55035 debug_check_no_obj_freed(page_address(page), PAGE_SIZE);
55036 }
55037+
55038+#ifdef CONFIG_PAX_MEMORY_SANITIZE
55039+ sanitize_highpage(page);
55040+#endif
55041+
55042 arch_free_page(page, 0);
55043 kernel_map_pages(page, 1, 0);
55044
55045@@ -3736,7 +3753,7 @@ static void __init setup_usemap(struct p
55046 zone->pageblock_flags = alloc_bootmem_node(pgdat, usemapsize); 53678 zone->pageblock_flags = alloc_bootmem_node(pgdat, usemapsize);
55047 } 53679 }
55048 #else 53680 #else
@@ -55051,9 +53683,9 @@ diff -urNp linux-2.6.32.24/mm/page_alloc.c linux-2.6.32.24/mm/page_alloc.c
55051 struct zone *zone, unsigned long zonesize) {} 53683 struct zone *zone, unsigned long zonesize) {}
55052 #endif /* CONFIG_SPARSEMEM */ 53684 #endif /* CONFIG_SPARSEMEM */
55053 53685
55054diff -urNp linux-2.6.32.24/mm/percpu.c linux-2.6.32.24/mm/percpu.c 53686diff -urNp linux-2.6.35.7/mm/percpu.c linux-2.6.35.7/mm/percpu.c
55055--- linux-2.6.32.24/mm/percpu.c 2010-09-26 17:26:05.000000000 -0400 53687--- linux-2.6.35.7/mm/percpu.c 2010-09-26 17:32:11.000000000 -0400
55056+++ linux-2.6.32.24/mm/percpu.c 2010-10-23 19:59:20.000000000 -0400 53688+++ linux-2.6.35.7/mm/percpu.c 2010-09-26 17:32:50.000000000 -0400
55057@@ -115,7 +115,7 @@ static unsigned int pcpu_first_unit_cpu 53689@@ -115,7 +115,7 @@ static unsigned int pcpu_first_unit_cpu
55058 static unsigned int pcpu_last_unit_cpu __read_mostly; 53690 static unsigned int pcpu_last_unit_cpu __read_mostly;
55059 53691
@@ -55063,10 +53695,34 @@ diff -urNp linux-2.6.32.24/mm/percpu.c linux-2.6.32.24/mm/percpu.c
55063 EXPORT_SYMBOL_GPL(pcpu_base_addr); 53695 EXPORT_SYMBOL_GPL(pcpu_base_addr);
55064 53696
55065 static const int *pcpu_unit_map __read_mostly; /* cpu -> unit */ 53697 static const int *pcpu_unit_map __read_mostly; /* cpu -> unit */
55066diff -urNp linux-2.6.32.24/mm/rmap.c linux-2.6.32.24/mm/rmap.c 53698diff -urNp linux-2.6.35.7/mm/rmap.c linux-2.6.35.7/mm/rmap.c
55067--- linux-2.6.32.24/mm/rmap.c 2010-08-13 16:24:37.000000000 -0400 53699--- linux-2.6.35.7/mm/rmap.c 2010-08-26 19:47:12.000000000 -0400
55068+++ linux-2.6.32.24/mm/rmap.c 2010-10-23 19:59:20.000000000 -0400 53700+++ linux-2.6.35.7/mm/rmap.c 2010-09-17 20:12:09.000000000 -0400
55069@@ -121,6 +121,17 @@ int anon_vma_prepare(struct vm_area_stru 53701@@ -116,6 +116,10 @@ int anon_vma_prepare(struct vm_area_stru
53702 struct anon_vma *anon_vma = vma->anon_vma;
53703 struct anon_vma_chain *avc;
53704
53705+#ifdef CONFIG_PAX_SEGMEXEC
53706+ struct anon_vma_chain *avc_m = NULL;
53707+#endif
53708+
53709 might_sleep();
53710 if (unlikely(!anon_vma)) {
53711 struct mm_struct *mm = vma->vm_mm;
53712@@ -125,6 +129,12 @@ int anon_vma_prepare(struct vm_area_stru
53713 if (!avc)
53714 goto out_enomem;
53715
53716+#ifdef CONFIG_PAX_SEGMEXEC
53717+ avc_m = anon_vma_chain_alloc();
53718+ if (!avc_m)
53719+ goto out_enomem_free_avc;
53720+#endif
53721+
53722 anon_vma = find_mergeable_anon_vma(vma);
53723 allocated = NULL;
53724 if (!anon_vma) {
53725@@ -138,6 +148,21 @@ int anon_vma_prepare(struct vm_area_stru
55070 /* page_table_lock to protect against threads */ 53726 /* page_table_lock to protect against threads */
55071 spin_lock(&mm->page_table_lock); 53727 spin_lock(&mm->page_table_lock);
55072 if (likely(!vma->anon_vma)) { 53728 if (likely(!vma->anon_vma)) {
@@ -55077,29 +53733,76 @@ diff -urNp linux-2.6.32.24/mm/rmap.c linux-2.6.32.24/mm/rmap.c
55077+ if (vma_m) { 53733+ if (vma_m) {
55078+ BUG_ON(vma_m->anon_vma); 53734+ BUG_ON(vma_m->anon_vma);
55079+ vma_m->anon_vma = anon_vma; 53735+ vma_m->anon_vma = anon_vma;
55080+ list_add_tail(&vma_m->anon_vma_node, &anon_vma->head); 53736+ avc_m->anon_vma = anon_vma;
53737+ avc_m->vma = vma;
53738+ list_add(&avc_m->same_vma, &vma_m->anon_vma_chain);
53739+ list_add(&avc_m->same_anon_vma, &anon_vma->head);
53740+ avc_m = NULL;
55081+ } 53741+ }
55082+#endif 53742+#endif
55083+ 53743+
55084 vma->anon_vma = anon_vma; 53744 vma->anon_vma = anon_vma;
55085 list_add_tail(&vma->anon_vma_node, &anon_vma->head); 53745 avc->anon_vma = anon_vma;
55086 allocated = NULL; 53746 avc->vma = vma;
55087diff -urNp linux-2.6.32.24/mm/shmem.c linux-2.6.32.24/mm/shmem.c 53747@@ -151,12 +176,24 @@ int anon_vma_prepare(struct vm_area_stru
55088--- linux-2.6.32.24/mm/shmem.c 2010-08-13 16:24:37.000000000 -0400 53748
55089+++ linux-2.6.32.24/mm/shmem.c 2010-10-23 19:59:20.000000000 -0400 53749 if (unlikely(allocated))
55090@@ -31,7 +31,7 @@ 53750 anon_vma_free(allocated);
53751+
53752+#ifdef CONFIG_PAX_SEGMEXEC
53753+ if (unlikely(avc_m))
53754+ anon_vma_chain_free(avc_m);
53755+#endif
53756+
53757 if (unlikely(avc))
53758 anon_vma_chain_free(avc);
53759 }
53760 return 0;
53761
53762 out_enomem_free_avc:
53763+
53764+#ifdef CONFIG_PAX_SEGMEXEC
53765+ if (avc_m)
53766+ anon_vma_chain_free(avc_m);
53767+#endif
53768+
53769 anon_vma_chain_free(avc);
53770 out_enomem:
53771 return -ENOMEM;
53772@@ -179,7 +216,7 @@ static void anon_vma_chain_link(struct v
53773 * Attach the anon_vmas from src to dst.
53774 * Returns 0 on success, -ENOMEM on failure.
53775 */
53776-int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
53777+int anon_vma_clone(struct vm_area_struct *dst, const struct vm_area_struct *src)
53778 {
53779 struct anon_vma_chain *avc, *pavc;
53780
53781@@ -201,7 +238,7 @@ int anon_vma_clone(struct vm_area_struct
53782 * the corresponding VMA in the parent process is attached to.
53783 * Returns 0 on success, non-zero on failure.
53784 */
53785-int anon_vma_fork(struct vm_area_struct *vma, struct vm_area_struct *pvma)
53786+int anon_vma_fork(struct vm_area_struct *vma, const struct vm_area_struct *pvma)
53787 {
53788 struct anon_vma_chain *avc;
53789 struct anon_vma *anon_vma;
53790diff -urNp linux-2.6.35.7/mm/shmem.c linux-2.6.35.7/mm/shmem.c
53791--- linux-2.6.35.7/mm/shmem.c 2010-08-26 19:47:12.000000000 -0400
53792+++ linux-2.6.35.7/mm/shmem.c 2010-09-17 20:12:37.000000000 -0400
53793@@ -30,7 +30,7 @@
53794 #include <linux/module.h>
55091 #include <linux/swap.h> 53795 #include <linux/swap.h>
55092 #include <linux/ima.h>
55093 53796
55094-static struct vfsmount *shm_mnt; 53797-static struct vfsmount *shm_mnt;
55095+struct vfsmount *shm_mnt; 53798+struct vfsmount *shm_mnt;
55096 53799
55097 #ifdef CONFIG_SHMEM 53800 #ifdef CONFIG_SHMEM
55098 /* 53801 /*
55099diff -urNp linux-2.6.32.24/mm/slab.c linux-2.6.32.24/mm/slab.c 53802diff -urNp linux-2.6.35.7/mm/slab.c linux-2.6.35.7/mm/slab.c
55100--- linux-2.6.32.24/mm/slab.c 2010-08-29 21:08:20.000000000 -0400 53803--- linux-2.6.35.7/mm/slab.c 2010-08-26 19:47:12.000000000 -0400
55101+++ linux-2.6.32.24/mm/slab.c 2010-10-23 19:59:20.000000000 -0400 53804+++ linux-2.6.35.7/mm/slab.c 2010-09-17 20:12:37.000000000 -0400
55102@@ -308,7 +308,7 @@ struct kmem_list3 { 53805@@ -285,7 +285,7 @@ struct kmem_list3 {
55103 * Need this for bootstrapping a per node allocator. 53806 * Need this for bootstrapping a per node allocator.
55104 */ 53807 */
55105 #define NUM_INIT_LISTS (3 * MAX_NUMNODES) 53808 #define NUM_INIT_LISTS (3 * MAX_NUMNODES)
@@ -55108,7 +53811,7 @@ diff -urNp linux-2.6.32.24/mm/slab.c linux-2.6.32.24/mm/slab.c
55108 #define CACHE_CACHE 0 53811 #define CACHE_CACHE 0
55109 #define SIZE_AC MAX_NUMNODES 53812 #define SIZE_AC MAX_NUMNODES
55110 #define SIZE_L3 (2 * MAX_NUMNODES) 53813 #define SIZE_L3 (2 * MAX_NUMNODES)
55111@@ -558,7 +558,7 @@ static inline void *index_to_obj(struct 53814@@ -535,7 +535,7 @@ static inline void *index_to_obj(struct
55112 * reciprocal_divide(offset, cache->reciprocal_buffer_size) 53815 * reciprocal_divide(offset, cache->reciprocal_buffer_size)
55113 */ 53816 */
55114 static inline unsigned int obj_to_index(const struct kmem_cache *cache, 53817 static inline unsigned int obj_to_index(const struct kmem_cache *cache,
@@ -55117,7 +53820,7 @@ diff -urNp linux-2.6.32.24/mm/slab.c linux-2.6.32.24/mm/slab.c
55117 { 53820 {
55118 u32 offset = (obj - slab->s_mem); 53821 u32 offset = (obj - slab->s_mem);
55119 return reciprocal_divide(offset, cache->reciprocal_buffer_size); 53822 return reciprocal_divide(offset, cache->reciprocal_buffer_size);
55120@@ -584,14 +584,14 @@ struct cache_names { 53823@@ -561,14 +561,14 @@ struct cache_names {
55121 static struct cache_names __initdata cache_names[] = { 53824 static struct cache_names __initdata cache_names[] = {
55122 #define CACHE(x) { .name = "size-" #x, .name_dma = "size-" #x "(DMA)" }, 53825 #define CACHE(x) { .name = "size-" #x, .name_dma = "size-" #x "(DMA)" },
55123 #include <linux/kmalloc_sizes.h> 53826 #include <linux/kmalloc_sizes.h>
@@ -55135,7 +53838,7 @@ diff -urNp linux-2.6.32.24/mm/slab.c linux-2.6.32.24/mm/slab.c
55135 53838
55136 /* internal cache of cache description objs */ 53839 /* internal cache of cache description objs */
55137 static struct kmem_cache cache_cache = { 53840 static struct kmem_cache cache_cache = {
55138@@ -4471,15 +4471,66 @@ static const struct file_operations proc 53841@@ -4558,15 +4558,66 @@ static const struct file_operations proc
55139 53842
55140 static int __init slab_proc_init(void) 53843 static int __init slab_proc_init(void)
55141 { 53844 {
@@ -55204,9 +53907,9 @@ diff -urNp linux-2.6.32.24/mm/slab.c linux-2.6.32.24/mm/slab.c
55204 /** 53907 /**
55205 * ksize - get the actual amount of memory allocated for a given object 53908 * ksize - get the actual amount of memory allocated for a given object
55206 * @objp: Pointer to the object 53909 * @objp: Pointer to the object
55207diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c 53910diff -urNp linux-2.6.35.7/mm/slob.c linux-2.6.35.7/mm/slob.c
55208--- linux-2.6.32.24/mm/slob.c 2010-08-13 16:24:37.000000000 -0400 53911--- linux-2.6.35.7/mm/slob.c 2010-08-26 19:47:12.000000000 -0400
55209+++ linux-2.6.32.24/mm/slob.c 2010-10-23 19:59:20.000000000 -0400 53912+++ linux-2.6.35.7/mm/slob.c 2010-09-17 20:12:09.000000000 -0400
55210@@ -29,7 +29,7 @@ 53913@@ -29,7 +29,7 @@
55211 * If kmalloc is asked for objects of PAGE_SIZE or larger, it calls 53914 * If kmalloc is asked for objects of PAGE_SIZE or larger, it calls
55212 * alloc_pages() directly, allocating compound pages so the page order 53915 * alloc_pages() directly, allocating compound pages so the page order
@@ -55300,9 +54003,9 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55300 INIT_LIST_HEAD(&sp->list); 54003 INIT_LIST_HEAD(&sp->list);
55301 set_slob(b, SLOB_UNITS(PAGE_SIZE), b + SLOB_UNITS(PAGE_SIZE)); 54004 set_slob(b, SLOB_UNITS(PAGE_SIZE), b + SLOB_UNITS(PAGE_SIZE));
55302 set_slob_page_free(sp, slob_list); 54005 set_slob_page_free(sp, slob_list);
55303@@ -475,10 +478,9 @@ out: 54006@@ -467,10 +470,9 @@ out:
55304 #define ARCH_SLAB_MINALIGN __alignof__(unsigned long) 54007 * End of slob allocator proper. Begin kmem_cache_alloc and kmalloc frontend.
55305 #endif 54008 */
55306 54009
55307-void *__kmalloc_node(size_t size, gfp_t gfp, int node) 54010-void *__kmalloc_node(size_t size, gfp_t gfp, int node)
55308+static void *__kmalloc_node_align(size_t size, gfp_t gfp, int node, int align) 54011+static void *__kmalloc_node_align(size_t size, gfp_t gfp, int node, int align)
@@ -55313,7 +54016,7 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55313 void *ret; 54016 void *ret;
55314 54017
55315 lockdep_trace_alloc(gfp); 54018 lockdep_trace_alloc(gfp);
55316@@ -491,7 +493,10 @@ void *__kmalloc_node(size_t size, gfp_t 54019@@ -483,7 +485,10 @@ void *__kmalloc_node(size_t size, gfp_t
55317 54020
55318 if (!m) 54021 if (!m)
55319 return NULL; 54022 return NULL;
@@ -55325,7 +54028,7 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55325 ret = (void *)m + align; 54028 ret = (void *)m + align;
55326 54029
55327 trace_kmalloc_node(_RET_IP_, ret, 54030 trace_kmalloc_node(_RET_IP_, ret,
55328@@ -501,9 +506,9 @@ void *__kmalloc_node(size_t size, gfp_t 54031@@ -493,9 +498,9 @@ void *__kmalloc_node(size_t size, gfp_t
55329 54032
55330 ret = slob_new_pages(gfp | __GFP_COMP, get_order(size), node); 54033 ret = slob_new_pages(gfp | __GFP_COMP, get_order(size), node);
55331 if (ret) { 54034 if (ret) {
@@ -55338,7 +54041,7 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55338 } 54041 }
55339 54042
55340 trace_kmalloc_node(_RET_IP_, ret, 54043 trace_kmalloc_node(_RET_IP_, ret,
55341@@ -513,6 +518,13 @@ void *__kmalloc_node(size_t size, gfp_t 54044@@ -505,6 +510,13 @@ void *__kmalloc_node(size_t size, gfp_t
55342 kmemleak_alloc(ret, size, 1, gfp); 54045 kmemleak_alloc(ret, size, 1, gfp);
55343 return ret; 54046 return ret;
55344 } 54047 }
@@ -55352,7 +54055,7 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55352 EXPORT_SYMBOL(__kmalloc_node); 54055 EXPORT_SYMBOL(__kmalloc_node);
55353 54056
55354 void kfree(const void *block) 54057 void kfree(const void *block)
55355@@ -528,13 +540,84 @@ void kfree(const void *block) 54058@@ -520,13 +532,84 @@ void kfree(const void *block)
55356 sp = slob_page(block); 54059 sp = slob_page(block);
55357 if (is_slob_page(sp)) { 54060 if (is_slob_page(sp)) {
55358 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); 54061 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
@@ -55440,7 +54143,7 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55440 /* can't use ksize for kmem_cache_alloc memory, only kmalloc */ 54143 /* can't use ksize for kmem_cache_alloc memory, only kmalloc */
55441 size_t ksize(const void *block) 54144 size_t ksize(const void *block)
55442 { 54145 {
55443@@ -547,10 +630,10 @@ size_t ksize(const void *block) 54146@@ -539,10 +622,10 @@ size_t ksize(const void *block)
55444 sp = slob_page(block); 54147 sp = slob_page(block);
55445 if (is_slob_page(sp)) { 54148 if (is_slob_page(sp)) {
55446 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); 54149 int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
@@ -55454,7 +54157,7 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55454 } 54157 }
55455 EXPORT_SYMBOL(ksize); 54158 EXPORT_SYMBOL(ksize);
55456 54159
55457@@ -605,17 +688,25 @@ void *kmem_cache_alloc_node(struct kmem_ 54160@@ -597,17 +680,25 @@ void *kmem_cache_alloc_node(struct kmem_
55458 { 54161 {
55459 void *b; 54162 void *b;
55460 54163
@@ -55480,7 +54183,7 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55480 54183
55481 if (c->ctor) 54184 if (c->ctor)
55482 c->ctor(b); 54185 c->ctor(b);
55483@@ -627,10 +718,16 @@ EXPORT_SYMBOL(kmem_cache_alloc_node); 54186@@ -619,10 +710,16 @@ EXPORT_SYMBOL(kmem_cache_alloc_node);
55484 54187
55485 static void __kmem_cache_free(void *b, int size) 54188 static void __kmem_cache_free(void *b, int size)
55486 { 54189 {
@@ -55499,7 +54202,7 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55499 } 54202 }
55500 54203
55501 static void kmem_rcu_free(struct rcu_head *head) 54204 static void kmem_rcu_free(struct rcu_head *head)
55502@@ -643,15 +740,24 @@ static void kmem_rcu_free(struct rcu_hea 54205@@ -635,15 +732,24 @@ static void kmem_rcu_free(struct rcu_hea
55503 54206
55504 void kmem_cache_free(struct kmem_cache *c, void *b) 54207 void kmem_cache_free(struct kmem_cache *c, void *b)
55505 { 54208 {
@@ -55527,10 +54230,10 @@ diff -urNp linux-2.6.32.24/mm/slob.c linux-2.6.32.24/mm/slob.c
55527 } 54230 }
55528 54231
55529 trace_kmem_cache_free(_RET_IP_, b); 54232 trace_kmem_cache_free(_RET_IP_, b);
55530diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c 54233diff -urNp linux-2.6.35.7/mm/slub.c linux-2.6.35.7/mm/slub.c
55531--- linux-2.6.32.24/mm/slub.c 2010-08-13 16:24:37.000000000 -0400 54234--- linux-2.6.35.7/mm/slub.c 2010-08-26 19:47:12.000000000 -0400
55532+++ linux-2.6.32.24/mm/slub.c 2010-10-23 19:59:20.000000000 -0400 54235+++ linux-2.6.35.7/mm/slub.c 2010-09-17 20:12:37.000000000 -0400
55533@@ -1893,6 +1893,8 @@ void kmem_cache_free(struct kmem_cache * 54236@@ -1873,6 +1873,8 @@ void kmem_cache_free(struct kmem_cache *
55534 54237
55535 page = virt_to_head_page(x); 54238 page = virt_to_head_page(x);
55536 54239
@@ -55539,7 +54242,7 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55539 slab_free(s, page, x, _RET_IP_); 54242 slab_free(s, page, x, _RET_IP_);
55540 54243
55541 trace_kmem_cache_free(_RET_IP_, x); 54244 trace_kmem_cache_free(_RET_IP_, x);
55542@@ -1937,7 +1939,7 @@ static int slub_min_objects; 54245@@ -1917,7 +1919,7 @@ static int slub_min_objects;
55543 * Merge control. If this is set then no merging of slab caches will occur. 54246 * Merge control. If this is set then no merging of slab caches will occur.
55544 * (Could be removed. This was introduced to pacify the merge skeptics.) 54247 * (Could be removed. This was introduced to pacify the merge skeptics.)
55545 */ 54248 */
@@ -55548,7 +54251,7 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55548 54251
55549 /* 54252 /*
55550 * Calculate the order of allocation given an slab object size. 54253 * Calculate the order of allocation given an slab object size.
55551@@ -2493,7 +2495,7 @@ static int kmem_cache_open(struct kmem_c 54254@@ -2344,7 +2346,7 @@ static int kmem_cache_open(struct kmem_c
55552 * list to avoid pounding the page allocator excessively. 54255 * list to avoid pounding the page allocator excessively.
55553 */ 54256 */
55554 set_min_partial(s, ilog2(s->size)); 54257 set_min_partial(s, ilog2(s->size));
@@ -55557,7 +54260,7 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55557 #ifdef CONFIG_NUMA 54260 #ifdef CONFIG_NUMA
55558 s->remote_node_defrag_ratio = 1000; 54261 s->remote_node_defrag_ratio = 1000;
55559 #endif 54262 #endif
55560@@ -2630,8 +2632,7 @@ static inline int kmem_cache_close(struc 54263@@ -2487,8 +2489,7 @@ static inline int kmem_cache_close(struc
55561 void kmem_cache_destroy(struct kmem_cache *s) 54264 void kmem_cache_destroy(struct kmem_cache *s)
55562 { 54265 {
55563 down_write(&slub_lock); 54266 down_write(&slub_lock);
@@ -55567,7 +54270,7 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55567 list_del(&s->list); 54270 list_del(&s->list);
55568 up_write(&slub_lock); 54271 up_write(&slub_lock);
55569 if (kmem_cache_close(s)) { 54272 if (kmem_cache_close(s)) {
55570@@ -2915,6 +2916,46 @@ void *__kmalloc_node(size_t size, gfp_t 54273@@ -2780,6 +2781,46 @@ void *__kmalloc_node(size_t size, gfp_t
55571 EXPORT_SYMBOL(__kmalloc_node); 54274 EXPORT_SYMBOL(__kmalloc_node);
55572 #endif 54275 #endif
55573 54276
@@ -55614,7 +54317,7 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55614 size_t ksize(const void *object) 54317 size_t ksize(const void *object)
55615 { 54318 {
55616 struct page *page; 54319 struct page *page;
55617@@ -3186,7 +3227,7 @@ void __init kmem_cache_init(void) 54320@@ -3049,7 +3090,7 @@ void __init kmem_cache_init(void)
55618 */ 54321 */
55619 create_kmalloc_cache(&kmalloc_caches[0], "kmem_cache_node", 54322 create_kmalloc_cache(&kmalloc_caches[0], "kmem_cache_node",
55620 sizeof(struct kmem_cache_node), GFP_NOWAIT); 54323 sizeof(struct kmem_cache_node), GFP_NOWAIT);
@@ -55623,7 +54326,7 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55623 caches++; 54326 caches++;
55624 54327
55625 hotplug_memory_notifier(slab_memory_callback, SLAB_CALLBACK_PRI); 54328 hotplug_memory_notifier(slab_memory_callback, SLAB_CALLBACK_PRI);
55626@@ -3293,7 +3334,7 @@ static int slab_unmergeable(struct kmem_ 54329@@ -3158,7 +3199,7 @@ static int slab_unmergeable(struct kmem_
55627 /* 54330 /*
55628 * We may have set a slab to be unmergeable during bootstrap. 54331 * We may have set a slab to be unmergeable during bootstrap.
55629 */ 54332 */
@@ -55632,16 +54335,16 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55632 return 1; 54335 return 1;
55633 54336
55634 return 0; 54337 return 0;
55635@@ -3353,7 +3394,7 @@ struct kmem_cache *kmem_cache_create(con 54338@@ -3216,7 +3257,7 @@ struct kmem_cache *kmem_cache_create(con
54339 down_write(&slub_lock);
54340 s = find_mergeable(size, align, flags, name, ctor);
55636 if (s) { 54341 if (s) {
55637 int cpu;
55638
55639- s->refcount++; 54342- s->refcount++;
55640+ atomic_inc(&s->refcount); 54343+ atomic_inc(&s->refcount);
55641 /* 54344 /*
55642 * Adjust the object sizes so that we clear 54345 * Adjust the object sizes so that we clear
55643 * the complete object on kzalloc. 54346 * the complete object on kzalloc.
55644@@ -3372,7 +3413,7 @@ struct kmem_cache *kmem_cache_create(con 54347@@ -3227,7 +3268,7 @@ struct kmem_cache *kmem_cache_create(con
55645 54348
55646 if (sysfs_slab_alias(s, name)) { 54349 if (sysfs_slab_alias(s, name)) {
55647 down_write(&slub_lock); 54350 down_write(&slub_lock);
@@ -55650,7 +54353,7 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55650 up_write(&slub_lock); 54353 up_write(&slub_lock);
55651 goto err; 54354 goto err;
55652 } 54355 }
55653@@ -4101,7 +4142,7 @@ SLAB_ATTR_RO(ctor); 54356@@ -3953,7 +3994,7 @@ SLAB_ATTR_RO(ctor);
55654 54357
55655 static ssize_t aliases_show(struct kmem_cache *s, char *buf) 54358 static ssize_t aliases_show(struct kmem_cache *s, char *buf)
55656 { 54359 {
@@ -55659,25 +54362,7 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55659 } 54362 }
55660 SLAB_ATTR_RO(aliases); 54363 SLAB_ATTR_RO(aliases);
55661 54364
55662@@ -4503,7 +4544,7 @@ static void kmem_cache_release(struct ko 54365@@ -4674,7 +4715,13 @@ static const struct file_operations proc
55663 kfree(s);
55664 }
55665
55666-static struct sysfs_ops slab_sysfs_ops = {
55667+static const struct sysfs_ops slab_sysfs_ops = {
55668 .show = slab_attr_show,
55669 .store = slab_attr_store,
55670 };
55671@@ -4522,7 +4563,7 @@ static int uevent_filter(struct kset *ks
55672 return 0;
55673 }
55674
55675-static struct kset_uevent_ops slab_uevent_ops = {
55676+static const struct kset_uevent_ops slab_uevent_ops = {
55677 .filter = uevent_filter,
55678 };
55679
55680@@ -4785,7 +4826,13 @@ static const struct file_operations proc
55681 54366
55682 static int __init slab_proc_init(void) 54367 static int __init slab_proc_init(void)
55683 { 54368 {
@@ -55692,10 +54377,10 @@ diff -urNp linux-2.6.32.24/mm/slub.c linux-2.6.32.24/mm/slub.c
55692 return 0; 54377 return 0;
55693 } 54378 }
55694 module_init(slab_proc_init); 54379 module_init(slab_proc_init);
55695diff -urNp linux-2.6.32.24/mm/util.c linux-2.6.32.24/mm/util.c 54380diff -urNp linux-2.6.35.7/mm/util.c linux-2.6.35.7/mm/util.c
55696--- linux-2.6.32.24/mm/util.c 2010-08-13 16:24:37.000000000 -0400 54381--- linux-2.6.35.7/mm/util.c 2010-08-26 19:47:12.000000000 -0400
55697+++ linux-2.6.32.24/mm/util.c 2010-10-23 19:59:20.000000000 -0400 54382+++ linux-2.6.35.7/mm/util.c 2010-09-17 20:12:09.000000000 -0400
55698@@ -228,6 +228,12 @@ EXPORT_SYMBOL(strndup_user); 54383@@ -245,6 +245,12 @@ EXPORT_SYMBOL(strndup_user);
55699 void arch_pick_mmap_layout(struct mm_struct *mm) 54384 void arch_pick_mmap_layout(struct mm_struct *mm)
55700 { 54385 {
55701 mm->mmap_base = TASK_UNMAPPED_BASE; 54386 mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -55708,9 +54393,9 @@ diff -urNp linux-2.6.32.24/mm/util.c linux-2.6.32.24/mm/util.c
55708 mm->get_unmapped_area = arch_get_unmapped_area; 54393 mm->get_unmapped_area = arch_get_unmapped_area;
55709 mm->unmap_area = arch_unmap_area; 54394 mm->unmap_area = arch_unmap_area;
55710 } 54395 }
55711diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c 54396diff -urNp linux-2.6.35.7/mm/vmalloc.c linux-2.6.35.7/mm/vmalloc.c
55712--- linux-2.6.32.24/mm/vmalloc.c 2010-08-13 16:24:37.000000000 -0400 54397--- linux-2.6.35.7/mm/vmalloc.c 2010-08-26 19:47:12.000000000 -0400
55713+++ linux-2.6.32.24/mm/vmalloc.c 2010-10-23 19:59:20.000000000 -0400 54398+++ linux-2.6.35.7/mm/vmalloc.c 2010-09-17 20:12:09.000000000 -0400
55714@@ -40,8 +40,19 @@ static void vunmap_pte_range(pmd_t *pmd, 54399@@ -40,8 +40,19 @@ static void vunmap_pte_range(pmd_t *pmd,
55715 54400
55716 pte = pte_offset_kernel(pmd, addr); 54401 pte = pte_offset_kernel(pmd, addr);
@@ -55741,7 +54426,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55741 54426
55742 /* 54427 /*
55743 * nr is a running index into the array which helps higher level 54428 * nr is a running index into the array which helps higher level
55744@@ -101,17 +113,32 @@ static int vmap_pte_range(pmd_t *pmd, un 54429@@ -101,17 +113,30 @@ static int vmap_pte_range(pmd_t *pmd, un
55745 pte = pte_alloc_kernel(pmd, addr); 54430 pte = pte_alloc_kernel(pmd, addr);
55746 if (!pte) 54431 if (!pte)
55747 return -ENOMEM; 54432 return -ENOMEM;
@@ -55755,9 +54440,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55755- if (WARN_ON(!page)) 54440- if (WARN_ON(!page))
55756- return -ENOMEM; 54441- return -ENOMEM;
55757+#if defined(CONFIG_MODULES) && defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC) 54442+#if defined(CONFIG_MODULES) && defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)
55758+ if (!(pgprot_val(prot) & _PAGE_NX)) 54443+ if (pgprot_val(prot) & _PAGE_NX)
55759+ BUG_ON(!pte_exec(*pte) || pte_pfn(*pte) != __pa(addr) >> PAGE_SHIFT);
55760+ else
55761+#endif 54444+#endif
55762+ 54445+
55763+ if (WARN_ON(!pte_none(*pte))) { 54446+ if (WARN_ON(!pte_none(*pte))) {
@@ -55779,7 +54462,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55779 } 54462 }
55780 54463
55781 static int vmap_pmd_range(pud_t *pud, unsigned long addr, 54464 static int vmap_pmd_range(pud_t *pud, unsigned long addr,
55782@@ -192,11 +219,20 @@ int is_vmalloc_or_module_addr(const void 54465@@ -192,11 +217,20 @@ int is_vmalloc_or_module_addr(const void
55783 * and fall back on vmalloc() if that fails. Others 54466 * and fall back on vmalloc() if that fails. Others
55784 * just put it in the vmalloc space. 54467 * just put it in the vmalloc space.
55785 */ 54468 */
@@ -55801,7 +54484,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55801 return is_vmalloc_addr(x); 54484 return is_vmalloc_addr(x);
55802 } 54485 }
55803 54486
55804@@ -217,8 +253,14 @@ struct page *vmalloc_to_page(const void 54487@@ -217,8 +251,14 @@ struct page *vmalloc_to_page(const void
55805 54488
55806 if (!pgd_none(*pgd)) { 54489 if (!pgd_none(*pgd)) {
55807 pud_t *pud = pud_offset(pgd, addr); 54490 pud_t *pud = pud_offset(pgd, addr);
@@ -55816,7 +54499,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55816 if (!pmd_none(*pmd)) { 54499 if (!pmd_none(*pmd)) {
55817 pte_t *ptep, pte; 54500 pte_t *ptep, pte;
55818 54501
55819@@ -292,13 +334,13 @@ static void __insert_vmap_area(struct vm 54502@@ -292,13 +332,13 @@ static void __insert_vmap_area(struct vm
55820 struct rb_node *tmp; 54503 struct rb_node *tmp;
55821 54504
55822 while (*p) { 54505 while (*p) {
@@ -55834,7 +54517,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55834 p = &(*p)->rb_right; 54517 p = &(*p)->rb_right;
55835 else 54518 else
55836 BUG(); 54519 BUG();
55837@@ -1223,6 +1265,16 @@ static struct vm_struct *__get_vm_area_n 54520@@ -1224,6 +1264,16 @@ static struct vm_struct *__get_vm_area_n
55838 struct vm_struct *area; 54521 struct vm_struct *area;
55839 54522
55840 BUG_ON(in_interrupt()); 54523 BUG_ON(in_interrupt());
@@ -55851,7 +54534,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55851 if (flags & VM_IOREMAP) { 54534 if (flags & VM_IOREMAP) {
55852 int bit = fls(size); 54535 int bit = fls(size);
55853 54536
55854@@ -1448,6 +1500,11 @@ void *vmap(struct page **pages, unsigned 54537@@ -1449,6 +1499,11 @@ void *vmap(struct page **pages, unsigned
55855 if (count > totalram_pages) 54538 if (count > totalram_pages)
55856 return NULL; 54539 return NULL;
55857 54540
@@ -55863,7 +54546,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55863 area = get_vm_area_caller((count << PAGE_SHIFT), flags, 54546 area = get_vm_area_caller((count << PAGE_SHIFT), flags,
55864 __builtin_return_address(0)); 54547 __builtin_return_address(0));
55865 if (!area) 54548 if (!area)
55866@@ -1558,6 +1615,13 @@ static void *__vmalloc_node(unsigned lon 54549@@ -1558,6 +1613,13 @@ static void *__vmalloc_node(unsigned lon
55867 if (!size || (size >> PAGE_SHIFT) > totalram_pages) 54550 if (!size || (size >> PAGE_SHIFT) > totalram_pages)
55868 return NULL; 54551 return NULL;
55869 54552
@@ -55877,7 +54560,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55877 area = __get_vm_area_node(size, align, VM_ALLOC, VMALLOC_START, 54560 area = __get_vm_area_node(size, align, VM_ALLOC, VMALLOC_START,
55878 VMALLOC_END, node, gfp_mask, caller); 54561 VMALLOC_END, node, gfp_mask, caller);
55879 54562
55880@@ -1576,6 +1640,7 @@ static void *__vmalloc_node(unsigned lon 54563@@ -1576,6 +1638,7 @@ static void *__vmalloc_node(unsigned lon
55881 return addr; 54564 return addr;
55882 } 54565 }
55883 54566
@@ -55885,7 +54568,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55885 void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) 54568 void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
55886 { 54569 {
55887 return __vmalloc_node(size, 1, gfp_mask, prot, -1, 54570 return __vmalloc_node(size, 1, gfp_mask, prot, -1,
55888@@ -1592,6 +1657,7 @@ EXPORT_SYMBOL(__vmalloc); 54571@@ -1592,6 +1655,7 @@ EXPORT_SYMBOL(__vmalloc);
55889 * For tight control over page level allocator and protection flags 54572 * For tight control over page level allocator and protection flags
55890 * use __vmalloc() instead. 54573 * use __vmalloc() instead.
55891 */ 54574 */
@@ -55893,7 +54576,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55893 void *vmalloc(unsigned long size) 54576 void *vmalloc(unsigned long size)
55894 { 54577 {
55895 return __vmalloc_node(size, 1, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL, 54578 return __vmalloc_node(size, 1, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL,
55896@@ -1606,6 +1672,7 @@ EXPORT_SYMBOL(vmalloc); 54579@@ -1606,6 +1670,7 @@ EXPORT_SYMBOL(vmalloc);
55897 * The resulting memory area is zeroed so it can be mapped to userspace 54580 * The resulting memory area is zeroed so it can be mapped to userspace
55898 * without leaking data. 54581 * without leaking data.
55899 */ 54582 */
@@ -55901,7 +54584,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55901 void *vmalloc_user(unsigned long size) 54584 void *vmalloc_user(unsigned long size)
55902 { 54585 {
55903 struct vm_struct *area; 54586 struct vm_struct *area;
55904@@ -1633,6 +1700,7 @@ EXPORT_SYMBOL(vmalloc_user); 54587@@ -1633,6 +1698,7 @@ EXPORT_SYMBOL(vmalloc_user);
55905 * For tight control over page level allocator and protection flags 54588 * For tight control over page level allocator and protection flags
55906 * use __vmalloc() instead. 54589 * use __vmalloc() instead.
55907 */ 54590 */
@@ -55909,7 +54592,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55909 void *vmalloc_node(unsigned long size, int node) 54592 void *vmalloc_node(unsigned long size, int node)
55910 { 54593 {
55911 return __vmalloc_node(size, 1, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL, 54594 return __vmalloc_node(size, 1, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL,
55912@@ -1655,10 +1723,10 @@ EXPORT_SYMBOL(vmalloc_node); 54595@@ -1655,10 +1721,10 @@ EXPORT_SYMBOL(vmalloc_node);
55913 * For tight control over page level allocator and protection flags 54596 * For tight control over page level allocator and protection flags
55914 * use __vmalloc() instead. 54597 * use __vmalloc() instead.
55915 */ 54598 */
@@ -55922,7 +54605,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55922 -1, __builtin_return_address(0)); 54605 -1, __builtin_return_address(0));
55923 } 54606 }
55924 54607
55925@@ -1677,6 +1745,7 @@ void *vmalloc_exec(unsigned long size) 54608@@ -1677,6 +1743,7 @@ void *vmalloc_exec(unsigned long size)
55926 * Allocate enough 32bit PA addressable pages to cover @size from the 54609 * Allocate enough 32bit PA addressable pages to cover @size from the
55927 * page level allocator and map them into contiguous kernel virtual space. 54610 * page level allocator and map them into contiguous kernel virtual space.
55928 */ 54611 */
@@ -55930,7 +54613,7 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55930 void *vmalloc_32(unsigned long size) 54613 void *vmalloc_32(unsigned long size)
55931 { 54614 {
55932 return __vmalloc_node(size, 1, GFP_VMALLOC32, PAGE_KERNEL, 54615 return __vmalloc_node(size, 1, GFP_VMALLOC32, PAGE_KERNEL,
55933@@ -1691,6 +1760,7 @@ EXPORT_SYMBOL(vmalloc_32); 54616@@ -1691,6 +1758,7 @@ EXPORT_SYMBOL(vmalloc_32);
55934 * The resulting memory area is 32bit addressable and zeroed so it can be 54617 * The resulting memory area is 32bit addressable and zeroed so it can be
55935 * mapped to userspace without leaking data. 54618 * mapped to userspace without leaking data.
55936 */ 54619 */
@@ -55938,10 +54621,10 @@ diff -urNp linux-2.6.32.24/mm/vmalloc.c linux-2.6.32.24/mm/vmalloc.c
55938 void *vmalloc_32_user(unsigned long size) 54621 void *vmalloc_32_user(unsigned long size)
55939 { 54622 {
55940 struct vm_struct *area; 54623 struct vm_struct *area;
55941diff -urNp linux-2.6.32.24/mm/vmstat.c linux-2.6.32.24/mm/vmstat.c 54624diff -urNp linux-2.6.35.7/mm/vmstat.c linux-2.6.35.7/mm/vmstat.c
55942--- linux-2.6.32.24/mm/vmstat.c 2010-09-26 17:26:05.000000000 -0400 54625--- linux-2.6.35.7/mm/vmstat.c 2010-09-26 17:32:11.000000000 -0400
55943+++ linux-2.6.32.24/mm/vmstat.c 2010-10-23 19:59:20.000000000 -0400 54626+++ linux-2.6.35.7/mm/vmstat.c 2010-09-26 17:32:51.000000000 -0400
55944@@ -74,7 +74,7 @@ void vm_events_fold_cpu(int cpu) 54627@@ -76,7 +76,7 @@ void vm_events_fold_cpu(int cpu)
55945 * 54628 *
55946 * vm_stat contains the global counters 54629 * vm_stat contains the global counters
55947 */ 54630 */
@@ -55950,7 +54633,7 @@ diff -urNp linux-2.6.32.24/mm/vmstat.c linux-2.6.32.24/mm/vmstat.c
55950 EXPORT_SYMBOL(vm_stat); 54633 EXPORT_SYMBOL(vm_stat);
55951 54634
55952 #ifdef CONFIG_SMP 54635 #ifdef CONFIG_SMP
55953@@ -324,7 +324,7 @@ void refresh_cpu_vm_stats(int cpu) 54636@@ -328,7 +328,7 @@ void refresh_cpu_vm_stats(int cpu)
55954 v = p->vm_stat_diff[i]; 54637 v = p->vm_stat_diff[i];
55955 p->vm_stat_diff[i] = 0; 54638 p->vm_stat_diff[i] = 0;
55956 local_irq_restore(flags); 54639 local_irq_restore(flags);
@@ -55959,7 +54642,7 @@ diff -urNp linux-2.6.32.24/mm/vmstat.c linux-2.6.32.24/mm/vmstat.c
55959 global_diff[i] += v; 54642 global_diff[i] += v;
55960 #ifdef CONFIG_NUMA 54643 #ifdef CONFIG_NUMA
55961 /* 3 seconds idle till flush */ 54644 /* 3 seconds idle till flush */
55962@@ -362,7 +362,7 @@ void refresh_cpu_vm_stats(int cpu) 54645@@ -366,7 +366,7 @@ void refresh_cpu_vm_stats(int cpu)
55963 54646
55964 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) 54647 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
55965 if (global_diff[i]) 54648 if (global_diff[i])
@@ -55968,7 +54651,7 @@ diff -urNp linux-2.6.32.24/mm/vmstat.c linux-2.6.32.24/mm/vmstat.c
55968 } 54651 }
55969 54652
55970 #endif 54653 #endif
55971@@ -953,10 +953,16 @@ static int __init setup_vmstat(void) 54654@@ -1051,10 +1051,16 @@ static int __init setup_vmstat(void)
55972 start_cpu_timer(cpu); 54655 start_cpu_timer(cpu);
55973 #endif 54656 #endif
55974 #ifdef CONFIG_PROC_FS 54657 #ifdef CONFIG_PROC_FS
@@ -55989,10 +54672,10 @@ diff -urNp linux-2.6.32.24/mm/vmstat.c linux-2.6.32.24/mm/vmstat.c
55989 #endif 54672 #endif
55990 return 0; 54673 return 0;
55991 } 54674 }
55992diff -urNp linux-2.6.32.24/net/8021q/vlan.c linux-2.6.32.24/net/8021q/vlan.c 54675diff -urNp linux-2.6.35.7/net/8021q/vlan.c linux-2.6.35.7/net/8021q/vlan.c
55993--- linux-2.6.32.24/net/8021q/vlan.c 2010-08-13 16:24:37.000000000 -0400 54676--- linux-2.6.35.7/net/8021q/vlan.c 2010-08-26 19:47:12.000000000 -0400
55994+++ linux-2.6.32.24/net/8021q/vlan.c 2010-10-23 19:59:20.000000000 -0400 54677+++ linux-2.6.35.7/net/8021q/vlan.c 2010-09-17 20:12:09.000000000 -0400
55995@@ -622,8 +622,7 @@ static int vlan_ioctl_handler(struct net 54678@@ -618,8 +618,7 @@ static int vlan_ioctl_handler(struct net
55996 err = -EPERM; 54679 err = -EPERM;
55997 if (!capable(CAP_NET_ADMIN)) 54680 if (!capable(CAP_NET_ADMIN))
55998 break; 54681 break;
@@ -56002,62 +54685,62 @@ diff -urNp linux-2.6.32.24/net/8021q/vlan.c linux-2.6.32.24/net/8021q/vlan.c
56002 struct vlan_net *vn; 54685 struct vlan_net *vn;
56003 54686
56004 vn = net_generic(net, vlan_net_id); 54687 vn = net_generic(net, vlan_net_id);
56005diff -urNp linux-2.6.32.24/net/atm/atm_misc.c linux-2.6.32.24/net/atm/atm_misc.c 54688diff -urNp linux-2.6.35.7/net/atm/atm_misc.c linux-2.6.35.7/net/atm/atm_misc.c
56006--- linux-2.6.32.24/net/atm/atm_misc.c 2010-08-13 16:24:37.000000000 -0400 54689--- linux-2.6.35.7/net/atm/atm_misc.c 2010-08-26 19:47:12.000000000 -0400
56007+++ linux-2.6.32.24/net/atm/atm_misc.c 2010-10-23 19:59:20.000000000 -0400 54690+++ linux-2.6.35.7/net/atm/atm_misc.c 2010-09-17 20:12:09.000000000 -0400
56008@@ -19,7 +19,7 @@ int atm_charge(struct atm_vcc *vcc,int t 54691@@ -17,7 +17,7 @@ int atm_charge(struct atm_vcc *vcc, int
56009 if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf) 54692 if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf)
56010 return 1; 54693 return 1;
56011 atm_return(vcc,truesize); 54694 atm_return(vcc, truesize);
56012- atomic_inc(&vcc->stats->rx_drop); 54695- atomic_inc(&vcc->stats->rx_drop);
56013+ atomic_inc_unchecked(&vcc->stats->rx_drop); 54696+ atomic_inc_unchecked(&vcc->stats->rx_drop);
56014 return 0; 54697 return 0;
56015 } 54698 }
56016 54699 EXPORT_SYMBOL(atm_charge);
56017@@ -41,7 +41,7 @@ struct sk_buff *atm_alloc_charge(struct 54700@@ -39,7 +39,7 @@ struct sk_buff *atm_alloc_charge(struct
56018 } 54701 }
56019 } 54702 }
56020 atm_return(vcc,guess); 54703 atm_return(vcc, guess);
56021- atomic_inc(&vcc->stats->rx_drop); 54704- atomic_inc(&vcc->stats->rx_drop);
56022+ atomic_inc_unchecked(&vcc->stats->rx_drop); 54705+ atomic_inc_unchecked(&vcc->stats->rx_drop);
56023 return NULL; 54706 return NULL;
56024 } 54707 }
54708 EXPORT_SYMBOL(atm_alloc_charge);
54709@@ -86,7 +86,7 @@ EXPORT_SYMBOL(atm_pcr_goal);
56025 54710
56026@@ -88,7 +88,7 @@ int atm_pcr_goal(const struct atm_trafpr 54711 void sonet_copy_stats(struct k_sonet_stats *from, struct sonet_stats *to)
56027
56028 void sonet_copy_stats(struct k_sonet_stats *from,struct sonet_stats *to)
56029 { 54712 {
56030-#define __HANDLE_ITEM(i) to->i = atomic_read(&from->i) 54713-#define __HANDLE_ITEM(i) to->i = atomic_read(&from->i)
56031+#define __HANDLE_ITEM(i) to->i = atomic_read_unchecked(&from->i) 54714+#define __HANDLE_ITEM(i) to->i = atomic_read_unchecked(&from->i)
56032 __SONET_ITEMS 54715 __SONET_ITEMS
56033 #undef __HANDLE_ITEM 54716 #undef __HANDLE_ITEM
56034 } 54717 }
56035@@ -96,7 +96,7 @@ void sonet_copy_stats(struct k_sonet_sta 54718@@ -94,7 +94,7 @@ EXPORT_SYMBOL(sonet_copy_stats);
56036 54719
56037 void sonet_subtract_stats(struct k_sonet_stats *from,struct sonet_stats *to) 54720 void sonet_subtract_stats(struct k_sonet_stats *from, struct sonet_stats *to)
56038 { 54721 {
56039-#define __HANDLE_ITEM(i) atomic_sub(to->i,&from->i) 54722-#define __HANDLE_ITEM(i) atomic_sub(to->i, &from->i)
56040+#define __HANDLE_ITEM(i) atomic_sub_unchecked(to->i,&from->i) 54723+#define __HANDLE_ITEM(i) atomic_sub_unchecked(to->i,&from->i)
56041 __SONET_ITEMS 54724 __SONET_ITEMS
56042 #undef __HANDLE_ITEM 54725 #undef __HANDLE_ITEM
56043 } 54726 }
56044diff -urNp linux-2.6.32.24/net/atm/proc.c linux-2.6.32.24/net/atm/proc.c 54727diff -urNp linux-2.6.35.7/net/atm/proc.c linux-2.6.35.7/net/atm/proc.c
56045--- linux-2.6.32.24/net/atm/proc.c 2010-08-13 16:24:37.000000000 -0400 54728--- linux-2.6.35.7/net/atm/proc.c 2010-08-26 19:47:12.000000000 -0400
56046+++ linux-2.6.32.24/net/atm/proc.c 2010-10-23 19:59:20.000000000 -0400 54729+++ linux-2.6.35.7/net/atm/proc.c 2010-09-17 20:12:37.000000000 -0400
56047@@ -43,9 +43,9 @@ static void add_stats(struct seq_file *s 54730@@ -44,9 +44,9 @@ static void add_stats(struct seq_file *s
56048 const struct k_atm_aal_stats *stats) 54731 const struct k_atm_aal_stats *stats)
56049 { 54732 {
56050 seq_printf(seq, "%s ( %d %d %d %d %d )", aal, 54733 seq_printf(seq, "%s ( %d %d %d %d %d )", aal,
56051- atomic_read(&stats->tx),atomic_read(&stats->tx_err), 54734- atomic_read(&stats->tx), atomic_read(&stats->tx_err),
56052- atomic_read(&stats->rx),atomic_read(&stats->rx_err), 54735- atomic_read(&stats->rx), atomic_read(&stats->rx_err),
56053- atomic_read(&stats->rx_drop)); 54736- atomic_read(&stats->rx_drop));
56054+ atomic_read_unchecked(&stats->tx),atomic_read_unchecked(&stats->tx_err), 54737+ atomic_read_unchecked(&stats->tx),atomic_read_unchecked(&stats->tx_err),
56055+ atomic_read_unchecked(&stats->rx),atomic_read_unchecked(&stats->rx_err), 54738+ atomic_read_unchecked(&stats->rx),atomic_read_unchecked(&stats->rx_err),
56056+ atomic_read_unchecked(&stats->rx_drop)); 54739+ atomic_read_unchecked(&stats->rx_drop));
56057 } 54740 }
56058 54741
56059 static void atm_dev_info(struct seq_file *seq, const struct atm_dev *dev) 54742 static void atm_dev_info(struct seq_file *seq, const struct atm_dev *dev)
56060@@ -188,7 +188,12 @@ static void vcc_info(struct seq_file *se 54743@@ -190,7 +190,12 @@ static void vcc_info(struct seq_file *se
56061 { 54744 {
56062 struct sock *sk = sk_atm(vcc); 54745 struct sock *sk = sk_atm(vcc);
56063 54746
@@ -56070,10 +54753,10 @@ diff -urNp linux-2.6.32.24/net/atm/proc.c linux-2.6.32.24/net/atm/proc.c
56070 if (!vcc->dev) 54753 if (!vcc->dev)
56071 seq_printf(seq, "Unassigned "); 54754 seq_printf(seq, "Unassigned ");
56072 else 54755 else
56073diff -urNp linux-2.6.32.24/net/atm/resources.c linux-2.6.32.24/net/atm/resources.c 54756diff -urNp linux-2.6.35.7/net/atm/resources.c linux-2.6.35.7/net/atm/resources.c
56074--- linux-2.6.32.24/net/atm/resources.c 2010-08-13 16:24:37.000000000 -0400 54757--- linux-2.6.35.7/net/atm/resources.c 2010-08-26 19:47:12.000000000 -0400
56075+++ linux-2.6.32.24/net/atm/resources.c 2010-10-23 19:59:20.000000000 -0400 54758+++ linux-2.6.35.7/net/atm/resources.c 2010-09-17 20:12:09.000000000 -0400
56076@@ -161,7 +161,7 @@ void atm_dev_deregister(struct atm_dev * 54759@@ -159,7 +159,7 @@ EXPORT_SYMBOL(atm_dev_deregister);
56077 static void copy_aal_stats(struct k_atm_aal_stats *from, 54760 static void copy_aal_stats(struct k_atm_aal_stats *from,
56078 struct atm_aal_stats *to) 54761 struct atm_aal_stats *to)
56079 { 54762 {
@@ -56082,7 +54765,7 @@ diff -urNp linux-2.6.32.24/net/atm/resources.c linux-2.6.32.24/net/atm/resources
56082 __AAL_STAT_ITEMS 54765 __AAL_STAT_ITEMS
56083 #undef __HANDLE_ITEM 54766 #undef __HANDLE_ITEM
56084 } 54767 }
56085@@ -170,7 +170,7 @@ static void copy_aal_stats(struct k_atm_ 54768@@ -167,7 +167,7 @@ static void copy_aal_stats(struct k_atm_
56086 static void subtract_aal_stats(struct k_atm_aal_stats *from, 54769 static void subtract_aal_stats(struct k_atm_aal_stats *from,
56087 struct atm_aal_stats *to) 54770 struct atm_aal_stats *to)
56088 { 54771 {
@@ -56091,46 +54774,46 @@ diff -urNp linux-2.6.32.24/net/atm/resources.c linux-2.6.32.24/net/atm/resources
56091 __AAL_STAT_ITEMS 54774 __AAL_STAT_ITEMS
56092 #undef __HANDLE_ITEM 54775 #undef __HANDLE_ITEM
56093 } 54776 }
56094diff -urNp linux-2.6.32.24/net/bridge/br_private.h linux-2.6.32.24/net/bridge/br_private.h 54777diff -urNp linux-2.6.35.7/net/bridge/br_multicast.c linux-2.6.35.7/net/bridge/br_multicast.c
56095--- linux-2.6.32.24/net/bridge/br_private.h 2010-08-13 16:24:37.000000000 -0400 54778--- linux-2.6.35.7/net/bridge/br_multicast.c 2010-08-26 19:47:12.000000000 -0400
56096+++ linux-2.6.32.24/net/bridge/br_private.h 2010-10-23 19:59:20.000000000 -0400 54779+++ linux-2.6.35.7/net/bridge/br_multicast.c 2010-10-11 22:41:44.000000000 -0400
56097@@ -254,7 +254,7 @@ extern void br_ifinfo_notify(int event, 54780@@ -1461,7 +1461,7 @@ static int br_multicast_ipv6_rcv(struct
56098 54781 nexthdr = ip6h->nexthdr;
56099 #ifdef CONFIG_SYSFS 54782 offset = ipv6_skip_exthdr(skb, sizeof(*ip6h), &nexthdr);
56100 /* br_sysfs_if.c */ 54783
56101-extern struct sysfs_ops brport_sysfs_ops; 54784- if (offset < 0 || nexthdr != IPPROTO_ICMPV6)
56102+extern const struct sysfs_ops brport_sysfs_ops; 54785+ if (nexthdr != IPPROTO_ICMPV6)
56103 extern int br_sysfs_addif(struct net_bridge_port *p); 54786 return 0;
56104 54787
56105 /* br_sysfs_br.c */ 54788 /* Okay, we found ICMPv6 header */
56106diff -urNp linux-2.6.32.24/net/bridge/br_stp_if.c linux-2.6.32.24/net/bridge/br_stp_if.c 54789diff -urNp linux-2.6.35.7/net/bridge/br_stp_if.c linux-2.6.35.7/net/bridge/br_stp_if.c
56107--- linux-2.6.32.24/net/bridge/br_stp_if.c 2010-08-13 16:24:37.000000000 -0400 54790--- linux-2.6.35.7/net/bridge/br_stp_if.c 2010-08-26 19:47:12.000000000 -0400
56108+++ linux-2.6.32.24/net/bridge/br_stp_if.c 2010-10-23 19:59:20.000000000 -0400 54791+++ linux-2.6.35.7/net/bridge/br_stp_if.c 2010-09-17 20:12:09.000000000 -0400
56109@@ -146,7 +146,7 @@ static void br_stp_stop(struct net_bridg 54792@@ -145,7 +145,7 @@ static void br_stp_stop(struct net_bridg
56110 char *envp[] = { NULL }; 54793 char *envp[] = { NULL };
56111 54794
56112 if (br->stp_enabled == BR_USER_STP) { 54795 if (br->stp_enabled == BR_USER_STP) {
56113- r = call_usermodehelper(BR_STP_PROG, argv, envp, 1); 54796- r = call_usermodehelper(BR_STP_PROG, argv, envp, 1);
56114+ r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC); 54797+ r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC);
56115 printk(KERN_INFO "%s: userspace STP stopped, return code %d\n", 54798 br_info(br, "userspace STP stopped, return code %d\n", r);
56116 br->dev->name, r); 54799
56117 54800 /* To start timers on any ports left in blocking */
56118diff -urNp linux-2.6.32.24/net/bridge/br_sysfs_if.c linux-2.6.32.24/net/bridge/br_sysfs_if.c 54801diff -urNp linux-2.6.35.7/net/bridge/netfilter/ebtables.c linux-2.6.35.7/net/bridge/netfilter/ebtables.c
56119--- linux-2.6.32.24/net/bridge/br_sysfs_if.c 2010-08-13 16:24:37.000000000 -0400 54802--- linux-2.6.35.7/net/bridge/netfilter/ebtables.c 2010-08-26 19:47:12.000000000 -0400
56120+++ linux-2.6.32.24/net/bridge/br_sysfs_if.c 2010-10-23 19:59:20.000000000 -0400 54803+++ linux-2.6.35.7/net/bridge/netfilter/ebtables.c 2010-09-17 20:12:09.000000000 -0400
56121@@ -220,7 +220,7 @@ static ssize_t brport_store(struct kobje 54804@@ -1501,7 +1501,7 @@ static int do_ebt_get_ctl(struct sock *s
56122 return ret; 54805 tmp.valid_hooks = t->table->valid_hooks;
56123 } 54806 }
56124 54807 mutex_unlock(&ebt_mutex);
56125-struct sysfs_ops brport_sysfs_ops = { 54808- if (copy_to_user(user, &tmp, *len) != 0){
56126+const struct sysfs_ops brport_sysfs_ops = { 54809+ if (*len > sizeof(tmp) || copy_to_user(user, &tmp, *len) != 0){
56127 .show = brport_show, 54810 BUGPRINT("c2u Didn't work\n");
56128 .store = brport_store, 54811 ret = -EFAULT;
56129 }; 54812 break;
56130diff -urNp linux-2.6.32.24/net/core/dev.c linux-2.6.32.24/net/core/dev.c 54813diff -urNp linux-2.6.35.7/net/core/dev.c linux-2.6.35.7/net/core/dev.c
56131--- linux-2.6.32.24/net/core/dev.c 2010-08-29 21:08:20.000000000 -0400 54814--- linux-2.6.35.7/net/core/dev.c 2010-08-26 19:47:12.000000000 -0400
56132+++ linux-2.6.32.24/net/core/dev.c 2010-10-23 19:59:20.000000000 -0400 54815+++ linux-2.6.35.7/net/core/dev.c 2010-09-17 20:12:09.000000000 -0400
56133@@ -2047,7 +2047,7 @@ int netif_rx_ni(struct sk_buff *skb) 54816@@ -2541,7 +2541,7 @@ int netif_rx_ni(struct sk_buff *skb)
56134 } 54817 }
56135 EXPORT_SYMBOL(netif_rx_ni); 54818 EXPORT_SYMBOL(netif_rx_ni);
56136 54819
@@ -56139,19 +54822,19 @@ diff -urNp linux-2.6.32.24/net/core/dev.c linux-2.6.32.24/net/core/dev.c
56139 { 54822 {
56140 struct softnet_data *sd = &__get_cpu_var(softnet_data); 54823 struct softnet_data *sd = &__get_cpu_var(softnet_data);
56141 54824
56142@@ -2808,7 +2808,7 @@ void netif_napi_del(struct napi_struct * 54825@@ -3474,7 +3474,7 @@ void netif_napi_del(struct napi_struct *
54826 }
56143 EXPORT_SYMBOL(netif_napi_del); 54827 EXPORT_SYMBOL(netif_napi_del);
56144 54828
56145
56146-static void net_rx_action(struct softirq_action *h) 54829-static void net_rx_action(struct softirq_action *h)
56147+static void net_rx_action(void) 54830+static void net_rx_action(void)
56148 { 54831 {
56149 struct list_head *list = &__get_cpu_var(softnet_data).poll_list; 54832 struct softnet_data *sd = &__get_cpu_var(softnet_data);
56150 unsigned long time_limit = jiffies + 2; 54833 unsigned long time_limit = jiffies + 2;
56151diff -urNp linux-2.6.32.24/net/core/ethtool.c linux-2.6.32.24/net/core/ethtool.c 54834diff -urNp linux-2.6.35.7/net/core/ethtool.c linux-2.6.35.7/net/core/ethtool.c
56152--- linux-2.6.32.24/net/core/ethtool.c 2010-08-13 16:24:37.000000000 -0400 54835--- linux-2.6.35.7/net/core/ethtool.c 2010-08-26 19:47:12.000000000 -0400
56153+++ linux-2.6.32.24/net/core/ethtool.c 2010-10-23 19:59:20.000000000 -0400 54836+++ linux-2.6.35.7/net/core/ethtool.c 2010-10-10 15:56:16.000000000 -0400
56154@@ -265,7 +265,7 @@ static int ethtool_get_rxnfc(struct net_ 54837@@ -366,7 +366,7 @@ static noinline_for_stack int ethtool_ge
56155 if (info.cmd == ETHTOOL_GRXCLSRLALL) { 54838 if (info.cmd == ETHTOOL_GRXCLSRLALL) {
56156 if (info.rule_cnt > 0) { 54839 if (info.rule_cnt > 0) {
56157 if (info.rule_cnt <= KMALLOC_MAX_SIZE / sizeof(u32)) 54840 if (info.rule_cnt <= KMALLOC_MAX_SIZE / sizeof(u32))
@@ -56160,39 +54843,42 @@ diff -urNp linux-2.6.32.24/net/core/ethtool.c linux-2.6.32.24/net/core/ethtool.c
56160 GFP_USER); 54843 GFP_USER);
56161 if (!rule_buf) 54844 if (!rule_buf)
56162 return -ENOMEM; 54845 return -ENOMEM;
56163diff -urNp linux-2.6.32.24/net/core/flow.c linux-2.6.32.24/net/core/flow.c 54846diff -urNp linux-2.6.35.7/net/core/net-sysfs.c linux-2.6.35.7/net/core/net-sysfs.c
56164--- linux-2.6.32.24/net/core/flow.c 2010-08-13 16:24:37.000000000 -0400 54847--- linux-2.6.35.7/net/core/net-sysfs.c 2010-08-26 19:47:12.000000000 -0400
56165+++ linux-2.6.32.24/net/core/flow.c 2010-10-23 19:59:20.000000000 -0400 54848+++ linux-2.6.35.7/net/core/net-sysfs.c 2010-09-17 20:12:09.000000000 -0400
56166@@ -39,7 +39,7 @@ atomic_t flow_cache_genid = ATOMIC_INIT( 54849@@ -511,7 +511,7 @@ static ssize_t rx_queue_attr_store(struc
56167 54850 return attribute->store(queue, attribute, buf, count);
56168 static u32 flow_hash_shift; 54851 }
56169 #define flow_hash_size (1 << flow_hash_shift) 54852
56170-static DEFINE_PER_CPU(struct flow_cache_entry **, flow_tables) = { NULL }; 54853-static struct sysfs_ops rx_queue_sysfs_ops = {
56171+static DEFINE_PER_CPU(struct flow_cache_entry **, flow_tables); 54854+static const struct sysfs_ops rx_queue_sysfs_ops = {
56172 54855 .show = rx_queue_attr_show,
56173 #define flow_table(cpu) (per_cpu(flow_tables, cpu)) 54856 .store = rx_queue_attr_store,
56174 54857 };
56175@@ -52,7 +52,7 @@ struct flow_percpu_info { 54858diff -urNp linux-2.6.35.7/net/core/sock.c linux-2.6.35.7/net/core/sock.c
56176 u32 hash_rnd; 54859--- linux-2.6.35.7/net/core/sock.c 2010-08-26 19:47:12.000000000 -0400
56177 int count; 54860+++ linux-2.6.35.7/net/core/sock.c 2010-09-17 20:12:09.000000000 -0400
56178 }; 54861@@ -915,7 +915,7 @@ int sock_getsockopt(struct socket *sock,
56179-static DEFINE_PER_CPU(struct flow_percpu_info, flow_hash_info) = { 0 }; 54862 return -ENOTCONN;
56180+static DEFINE_PER_CPU(struct flow_percpu_info, flow_hash_info); 54863 if (lv < len)
56181 54864 return -EINVAL;
56182 #define flow_hash_rnd_recalc(cpu) \ 54865- if (copy_to_user(optval, address, len))
56183 (per_cpu(flow_hash_info, cpu).hash_rnd_recalc) 54866+ if (len > sizeof(address) || copy_to_user(optval, address, len))
56184@@ -69,7 +69,7 @@ struct flow_flush_info { 54867 return -EFAULT;
56185 atomic_t cpuleft; 54868 goto lenout;
56186 struct completion completion; 54869 }
56187 }; 54870@@ -948,7 +948,7 @@ int sock_getsockopt(struct socket *sock,
56188-static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL };
56189+static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets);
56190
56191 #define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu))
56192 54871
56193diff -urNp linux-2.6.32.24/net/dccp/ccids/ccid3.c linux-2.6.32.24/net/dccp/ccids/ccid3.c 54872 if (len > lv)
56194--- linux-2.6.32.24/net/dccp/ccids/ccid3.c 2010-08-13 16:24:37.000000000 -0400 54873 len = lv;
56195+++ linux-2.6.32.24/net/dccp/ccids/ccid3.c 2010-10-23 19:59:20.000000000 -0400 54874- if (copy_to_user(optval, &v, len))
54875+ if (len > sizeof(v) || copy_to_user(optval, &v, len))
54876 return -EFAULT;
54877 lenout:
54878 if (put_user(len, optlen))
54879diff -urNp linux-2.6.35.7/net/dccp/ccids/ccid3.c linux-2.6.35.7/net/dccp/ccids/ccid3.c
54880--- linux-2.6.35.7/net/dccp/ccids/ccid3.c 2010-08-26 19:47:12.000000000 -0400
54881+++ linux-2.6.35.7/net/dccp/ccids/ccid3.c 2010-09-17 20:12:09.000000000 -0400
56196@@ -41,7 +41,7 @@ 54882@@ -41,7 +41,7 @@
56197 static int ccid3_debug; 54883 static int ccid3_debug;
56198 #define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a) 54884 #define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a)
@@ -56202,9 +54888,9 @@ diff -urNp linux-2.6.32.24/net/dccp/ccids/ccid3.c linux-2.6.32.24/net/dccp/ccids
56202 #endif 54888 #endif
56203 54889
56204 /* 54890 /*
56205diff -urNp linux-2.6.32.24/net/dccp/dccp.h linux-2.6.32.24/net/dccp/dccp.h 54891diff -urNp linux-2.6.35.7/net/dccp/dccp.h linux-2.6.35.7/net/dccp/dccp.h
56206--- linux-2.6.32.24/net/dccp/dccp.h 2010-08-13 16:24:37.000000000 -0400 54892--- linux-2.6.35.7/net/dccp/dccp.h 2010-08-26 19:47:12.000000000 -0400
56207+++ linux-2.6.32.24/net/dccp/dccp.h 2010-10-23 19:59:20.000000000 -0400 54893+++ linux-2.6.35.7/net/dccp/dccp.h 2010-09-17 20:12:09.000000000 -0400
56208@@ -44,9 +44,9 @@ extern int dccp_debug; 54894@@ -44,9 +44,9 @@ extern int dccp_debug;
56209 #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a) 54895 #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a)
56210 #define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a) 54896 #define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a)
@@ -56218,30 +54904,30 @@ diff -urNp linux-2.6.32.24/net/dccp/dccp.h linux-2.6.32.24/net/dccp/dccp.h
56218 #endif 54904 #endif
56219 54905
56220 extern struct inet_hashinfo dccp_hashinfo; 54906 extern struct inet_hashinfo dccp_hashinfo;
56221diff -urNp linux-2.6.32.24/net/decnet/sysctl_net_decnet.c linux-2.6.32.24/net/decnet/sysctl_net_decnet.c 54907diff -urNp linux-2.6.35.7/net/decnet/sysctl_net_decnet.c linux-2.6.35.7/net/decnet/sysctl_net_decnet.c
56222--- linux-2.6.32.24/net/decnet/sysctl_net_decnet.c 2010-08-13 16:24:37.000000000 -0400 54908--- linux-2.6.35.7/net/decnet/sysctl_net_decnet.c 2010-08-26 19:47:12.000000000 -0400
56223+++ linux-2.6.32.24/net/decnet/sysctl_net_decnet.c 2010-10-23 19:59:20.000000000 -0400 54909+++ linux-2.6.35.7/net/decnet/sysctl_net_decnet.c 2010-09-17 20:12:37.000000000 -0400
56224@@ -206,7 +206,7 @@ static int dn_node_address_handler(ctl_t 54910@@ -173,7 +173,7 @@ static int dn_node_address_handler(ctl_t
56225 54911
56226 if (len > *lenp) len = *lenp; 54912 if (len > *lenp) len = *lenp;
56227 54913
56228- if (copy_to_user(buffer, addr, len)) 54914- if (copy_to_user(buffer, addr, len))
56229+ if (len > sizeof addr || copy_to_user(buffer, addr, len)) 54915+ if (len > sizeof(addr) || copy_to_user(buffer, addr, len))
56230 return -EFAULT; 54916 return -EFAULT;
56231 54917
56232 *lenp = len; 54918 *lenp = len;
56233@@ -327,7 +327,7 @@ static int dn_def_dev_handler(ctl_table 54919@@ -236,7 +236,7 @@ static int dn_def_dev_handler(ctl_table
56234 54920
56235 if (len > *lenp) len = *lenp; 54921 if (len > *lenp) len = *lenp;
56236 54922
56237- if (copy_to_user(buffer, devname, len)) 54923- if (copy_to_user(buffer, devname, len))
56238+ if (len > sizeof devname || copy_to_user(buffer, devname, len)) 54924+ if (len > sizeof(devname) || copy_to_user(buffer, devname, len))
56239 return -EFAULT; 54925 return -EFAULT;
56240 54926
56241 *lenp = len; 54927 *lenp = len;
56242diff -urNp linux-2.6.32.24/net/ipv4/inet_hashtables.c linux-2.6.32.24/net/ipv4/inet_hashtables.c 54928diff -urNp linux-2.6.35.7/net/ipv4/inet_hashtables.c linux-2.6.35.7/net/ipv4/inet_hashtables.c
56243--- linux-2.6.32.24/net/ipv4/inet_hashtables.c 2010-08-13 16:24:37.000000000 -0400 54929--- linux-2.6.35.7/net/ipv4/inet_hashtables.c 2010-08-26 19:47:12.000000000 -0400
56244+++ linux-2.6.32.24/net/ipv4/inet_hashtables.c 2010-10-23 19:59:20.000000000 -0400 54930+++ linux-2.6.35.7/net/ipv4/inet_hashtables.c 2010-09-17 20:12:37.000000000 -0400
56245@@ -18,11 +18,14 @@ 54931@@ -18,11 +18,14 @@
56246 #include <linux/sched.h> 54932 #include <linux/sched.h>
56247 #include <linux/slab.h> 54933 #include <linux/slab.h>
@@ -56257,31 +54943,33 @@ diff -urNp linux-2.6.32.24/net/ipv4/inet_hashtables.c linux-2.6.32.24/net/ipv4/i
56257 /* 54943 /*
56258 * Allocate and initialize a new local port bind bucket. 54944 * Allocate and initialize a new local port bind bucket.
56259 * The bindhash mutex for snum's hash chain must be held here. 54945 * The bindhash mutex for snum's hash chain must be held here.
56260@@ -490,6 +493,8 @@ ok: 54946@@ -508,6 +511,8 @@ ok:
56261 } 54947 twrefcnt += inet_twsk_bind_unhash(tw, hinfo);
56262 spin_unlock(&head->lock); 54948 spin_unlock(&head->lock);
56263 54949
56264+ gr_update_task_in_ip_table(current, inet_sk(sk)); 54950+ gr_update_task_in_ip_table(current, inet_sk(sk));
56265+ 54951+
56266 if (tw) { 54952 if (tw) {
56267 inet_twsk_deschedule(tw, death_row); 54953 inet_twsk_deschedule(tw, death_row);
56268 inet_twsk_put(tw); 54954 while (twrefcnt) {
56269diff -urNp linux-2.6.32.24/net/ipv4/inetpeer.c linux-2.6.32.24/net/ipv4/inetpeer.c 54955diff -urNp linux-2.6.35.7/net/ipv4/inetpeer.c linux-2.6.35.7/net/ipv4/inetpeer.c
56270--- linux-2.6.32.24/net/ipv4/inetpeer.c 2010-08-13 16:24:37.000000000 -0400 54956--- linux-2.6.35.7/net/ipv4/inetpeer.c 2010-08-26 19:47:12.000000000 -0400
56271+++ linux-2.6.32.24/net/ipv4/inetpeer.c 2010-10-23 19:59:24.000000000 -0400 54957+++ linux-2.6.35.7/net/ipv4/inetpeer.c 2010-10-11 22:41:44.000000000 -0400
56272@@ -389,7 +389,7 @@ struct inet_peer *inet_getpeer(__be32 da 54958@@ -386,8 +386,8 @@ struct inet_peer *inet_getpeer(__be32 da
56273 return NULL; 54959 return NULL;
56274 n->v4daddr = daddr; 54960 n->v4daddr = daddr;
56275 atomic_set(&n->refcnt, 1); 54961 atomic_set(&n->refcnt, 1);
56276- atomic_set(&n->rid, 0); 54962- atomic_set(&n->rid, 0);
54963- atomic_set(&n->ip_id_count, secure_ip_id(daddr));
56277+ atomic_set_unchecked(&n->rid, 0); 54964+ atomic_set_unchecked(&n->rid, 0);
56278 n->ip_id_count = secure_ip_id(daddr); 54965+ atomic_set_unchecked(&n->ip_id_count, secure_ip_id(daddr));
56279 n->tcp_ts_stamp = 0; 54966 n->tcp_ts_stamp = 0;
56280 54967
56281diff -urNp linux-2.6.32.24/net/ipv4/ip_fragment.c linux-2.6.32.24/net/ipv4/ip_fragment.c 54968 write_lock_bh(&peer_pool_lock);
56282--- linux-2.6.32.24/net/ipv4/ip_fragment.c 2010-08-13 16:24:37.000000000 -0400 54969diff -urNp linux-2.6.35.7/net/ipv4/ip_fragment.c linux-2.6.35.7/net/ipv4/ip_fragment.c
56283+++ linux-2.6.32.24/net/ipv4/ip_fragment.c 2010-10-23 19:59:24.000000000 -0400 54970--- linux-2.6.35.7/net/ipv4/ip_fragment.c 2010-08-26 19:47:12.000000000 -0400
56284@@ -255,7 +255,7 @@ static inline int ip_frag_too_far(struct 54971+++ linux-2.6.35.7/net/ipv4/ip_fragment.c 2010-10-11 22:41:44.000000000 -0400
54972@@ -282,7 +282,7 @@ static inline int ip_frag_too_far(struct
56285 return 0; 54973 return 0;
56286 54974
56287 start = qp->rid; 54975 start = qp->rid;
@@ -56290,10 +54978,10 @@ diff -urNp linux-2.6.32.24/net/ipv4/ip_fragment.c linux-2.6.32.24/net/ipv4/ip_fr
56290 qp->rid = end; 54978 qp->rid = end;
56291 54979
56292 rc = qp->q.fragments && (end - start) > max; 54980 rc = qp->q.fragments && (end - start) > max;
56293diff -urNp linux-2.6.32.24/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.32.24/net/ipv4/netfilter/nf_nat_snmp_basic.c 54981diff -urNp linux-2.6.35.7/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.35.7/net/ipv4/netfilter/nf_nat_snmp_basic.c
56294--- linux-2.6.32.24/net/ipv4/netfilter/nf_nat_snmp_basic.c 2010-08-13 16:24:37.000000000 -0400 54982--- linux-2.6.35.7/net/ipv4/netfilter/nf_nat_snmp_basic.c 2010-08-26 19:47:12.000000000 -0400
56295+++ linux-2.6.32.24/net/ipv4/netfilter/nf_nat_snmp_basic.c 2010-10-23 19:59:20.000000000 -0400 54983+++ linux-2.6.35.7/net/ipv4/netfilter/nf_nat_snmp_basic.c 2010-09-17 20:12:09.000000000 -0400
56296@@ -397,7 +397,7 @@ static unsigned char asn1_octets_decode( 54984@@ -398,7 +398,7 @@ static unsigned char asn1_octets_decode(
56297 54985
56298 *len = 0; 54986 *len = 0;
56299 54987
@@ -56301,11 +54989,23 @@ diff -urNp linux-2.6.32.24/net/ipv4/netfilter/nf_nat_snmp_basic.c linux-2.6.32.2
56301+ *octets = kmalloc((eoc - ctx->pointer), GFP_ATOMIC); 54989+ *octets = kmalloc((eoc - ctx->pointer), GFP_ATOMIC);
56302 if (*octets == NULL) { 54990 if (*octets == NULL) {
56303 if (net_ratelimit()) 54991 if (net_ratelimit())
56304 printk("OOM in bsalg (%d)\n", __LINE__); 54992 pr_notice("OOM in bsalg (%d)\n", __LINE__);
56305diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4.c 54993diff -urNp linux-2.6.35.7/net/ipv4/route.c linux-2.6.35.7/net/ipv4/route.c
56306--- linux-2.6.32.24/net/ipv4/tcp_ipv4.c 2010-08-13 16:24:37.000000000 -0400 54994--- linux-2.6.35.7/net/ipv4/route.c 2010-09-26 17:32:11.000000000 -0400
56307+++ linux-2.6.32.24/net/ipv4/tcp_ipv4.c 2010-10-23 19:59:20.000000000 -0400 54995+++ linux-2.6.35.7/net/ipv4/route.c 2010-10-11 22:41:44.000000000 -0400
56308@@ -84,6 +84,9 @@ 54996@@ -2889,7 +2889,7 @@ static int rt_fill_info(struct net *net,
54997 error = rt->u.dst.error;
54998 expires = rt->u.dst.expires ? rt->u.dst.expires - jiffies : 0;
54999 if (rt->peer) {
55000- id = atomic_read(&rt->peer->ip_id_count) & 0xffff;
55001+ id = atomic_read_unchecked(&rt->peer->ip_id_count) & 0xffff;
55002 if (rt->peer->tcp_ts_stamp) {
55003 ts = rt->peer->tcp_ts;
55004 tsage = get_seconds() - rt->peer->tcp_ts_stamp;
55005diff -urNp linux-2.6.35.7/net/ipv4/tcp_ipv4.c linux-2.6.35.7/net/ipv4/tcp_ipv4.c
55006--- linux-2.6.35.7/net/ipv4/tcp_ipv4.c 2010-08-26 19:47:12.000000000 -0400
55007+++ linux-2.6.35.7/net/ipv4/tcp_ipv4.c 2010-09-17 20:12:37.000000000 -0400
55008@@ -85,6 +85,9 @@
56309 int sysctl_tcp_tw_reuse __read_mostly; 55009 int sysctl_tcp_tw_reuse __read_mostly;
56310 int sysctl_tcp_low_latency __read_mostly; 55010 int sysctl_tcp_low_latency __read_mostly;
56311 55011
@@ -56315,7 +55015,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4
56315 55015
56316 #ifdef CONFIG_TCP_MD5SIG 55016 #ifdef CONFIG_TCP_MD5SIG
56317 static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk, 55017 static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk,
56318@@ -1542,6 +1545,9 @@ int tcp_v4_do_rcv(struct sock *sk, struc 55018@@ -1593,6 +1596,9 @@ int tcp_v4_do_rcv(struct sock *sk, struc
56319 return 0; 55019 return 0;
56320 55020
56321 reset: 55021 reset:
@@ -56325,7 +55025,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4
56325 tcp_v4_send_reset(rsk, skb); 55025 tcp_v4_send_reset(rsk, skb);
56326 discard: 55026 discard:
56327 kfree_skb(skb); 55027 kfree_skb(skb);
56328@@ -1603,12 +1609,20 @@ int tcp_v4_rcv(struct sk_buff *skb) 55028@@ -1654,12 +1660,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
56329 TCP_SKB_CB(skb)->sacked = 0; 55029 TCP_SKB_CB(skb)->sacked = 0;
56330 55030
56331 sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); 55031 sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
@@ -56335,8 +55035,8 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4
56335+ ret = 1; 55035+ ret = 1;
56336+#endif 55036+#endif
56337 goto no_tcp_socket; 55037 goto no_tcp_socket;
55038-
56338+ } 55039+ }
56339
56340 process: 55040 process:
56341- if (sk->sk_state == TCP_TIME_WAIT) 55041- if (sk->sk_state == TCP_TIME_WAIT)
56342+ if (sk->sk_state == TCP_TIME_WAIT) { 55042+ if (sk->sk_state == TCP_TIME_WAIT) {
@@ -56346,9 +55046,9 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4
56346 goto do_time_wait; 55046 goto do_time_wait;
56347+ } 55047+ }
56348 55048
56349 if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) 55049 if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) {
56350 goto discard_and_relse; 55050 NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
56351@@ -1650,6 +1664,10 @@ no_tcp_socket: 55051@@ -1709,6 +1722,10 @@ no_tcp_socket:
56352 bad_packet: 55052 bad_packet:
56353 TCP_INC_STATS_BH(net, TCP_MIB_INERRS); 55053 TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
56354 } else { 55054 } else {
@@ -56359,7 +55059,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4
56359 tcp_v4_send_reset(NULL, skb); 55059 tcp_v4_send_reset(NULL, skb);
56360 } 55060 }
56361 55061
56362@@ -2237,7 +2255,11 @@ static void get_openreq4(struct sock *sk 55062@@ -2316,7 +2333,11 @@ static void get_openreq4(struct sock *sk
56363 0, /* non standard timer */ 55063 0, /* non standard timer */
56364 0, /* open_requests have no inode */ 55064 0, /* open_requests have no inode */
56365 atomic_read(&sk->sk_refcnt), 55065 atomic_read(&sk->sk_refcnt),
@@ -56371,7 +55071,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4
56371 len); 55071 len);
56372 } 55072 }
56373 55073
56374@@ -2279,7 +2301,12 @@ static void get_tcp4_sock(struct sock *s 55074@@ -2366,7 +2387,12 @@ static void get_tcp4_sock(struct sock *s
56375 sock_i_uid(sk), 55075 sock_i_uid(sk),
56376 icsk->icsk_probes_out, 55076 icsk->icsk_probes_out,
56377 sock_i_ino(sk), 55077 sock_i_ino(sk),
@@ -56385,7 +55085,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4
56385 jiffies_to_clock_t(icsk->icsk_rto), 55085 jiffies_to_clock_t(icsk->icsk_rto),
56386 jiffies_to_clock_t(icsk->icsk_ack.ato), 55086 jiffies_to_clock_t(icsk->icsk_ack.ato),
56387 (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong, 55087 (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
56388@@ -2307,7 +2334,13 @@ static void get_timewait4_sock(struct in 55088@@ -2394,7 +2420,13 @@ static void get_timewait4_sock(struct in
56389 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %p%n", 55089 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %p%n",
56390 i, src, srcp, dest, destp, tw->tw_substate, 0, 0, 55090 i, src, srcp, dest, destp, tw->tw_substate, 0, 0,
56391 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0, 55091 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
@@ -56400,10 +55100,10 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_ipv4.c linux-2.6.32.24/net/ipv4/tcp_ipv4
56400 } 55100 }
56401 55101
56402 #define TMPSZ 150 55102 #define TMPSZ 150
56403diff -urNp linux-2.6.32.24/net/ipv4/tcp_minisocks.c linux-2.6.32.24/net/ipv4/tcp_minisocks.c 55103diff -urNp linux-2.6.35.7/net/ipv4/tcp_minisocks.c linux-2.6.35.7/net/ipv4/tcp_minisocks.c
56404--- linux-2.6.32.24/net/ipv4/tcp_minisocks.c 2010-08-13 16:24:37.000000000 -0400 55104--- linux-2.6.35.7/net/ipv4/tcp_minisocks.c 2010-08-26 19:47:12.000000000 -0400
56405+++ linux-2.6.32.24/net/ipv4/tcp_minisocks.c 2010-10-23 19:59:20.000000000 -0400 55105+++ linux-2.6.35.7/net/ipv4/tcp_minisocks.c 2010-09-17 20:12:37.000000000 -0400
56406@@ -26,6 +26,10 @@ 55106@@ -27,6 +27,10 @@
56407 #include <net/inet_common.h> 55107 #include <net/inet_common.h>
56408 #include <net/xfrm.h> 55108 #include <net/xfrm.h>
56409 55109
@@ -56411,10 +55111,10 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_minisocks.c linux-2.6.32.24/net/ipv4/tcp
56411+extern int grsec_enable_blackhole; 55111+extern int grsec_enable_blackhole;
56412+#endif 55112+#endif
56413+ 55113+
56414 #ifdef CONFIG_SYSCTL 55114 int sysctl_tcp_syncookies __read_mostly = 1;
56415 #define SYNC_INIT 0 /* let the user enable it */ 55115 EXPORT_SYMBOL(sysctl_tcp_syncookies);
56416 #else 55116
56417@@ -672,6 +676,10 @@ listen_overflow: 55117@@ -700,6 +704,10 @@ listen_overflow:
56418 55118
56419 embryonic_reset: 55119 embryonic_reset:
56420 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_EMBRYONICRSTS); 55120 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_EMBRYONICRSTS);
@@ -56425,23 +55125,23 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_minisocks.c linux-2.6.32.24/net/ipv4/tcp
56425 if (!(flg & TCP_FLAG_RST)) 55125 if (!(flg & TCP_FLAG_RST))
56426 req->rsk_ops->send_reset(sk, skb); 55126 req->rsk_ops->send_reset(sk, skb);
56427 55127
56428diff -urNp linux-2.6.32.24/net/ipv4/tcp_probe.c linux-2.6.32.24/net/ipv4/tcp_probe.c 55128diff -urNp linux-2.6.35.7/net/ipv4/tcp_probe.c linux-2.6.35.7/net/ipv4/tcp_probe.c
56429--- linux-2.6.32.24/net/ipv4/tcp_probe.c 2010-08-13 16:24:37.000000000 -0400 55129--- linux-2.6.35.7/net/ipv4/tcp_probe.c 2010-08-26 19:47:12.000000000 -0400
56430+++ linux-2.6.32.24/net/ipv4/tcp_probe.c 2010-10-23 19:59:20.000000000 -0400 55130+++ linux-2.6.35.7/net/ipv4/tcp_probe.c 2010-09-17 20:12:37.000000000 -0400
56431@@ -200,7 +200,7 @@ static ssize_t tcpprobe_read(struct file 55131@@ -202,7 +202,7 @@ static ssize_t tcpprobe_read(struct file
56432 if (cnt + width >= len) 55132 if (cnt + width >= len)
56433 break; 55133 break;
56434 55134
56435- if (copy_to_user(buf + cnt, tbuf, width)) 55135- if (copy_to_user(buf + cnt, tbuf, width))
56436+ if (width > sizeof tbuf || copy_to_user(buf + cnt, tbuf, width)) 55136+ if (width > sizeof(tbuf) || copy_to_user(buf + cnt, tbuf, width))
56437 return -EFAULT; 55137 return -EFAULT;
56438 cnt += width; 55138 cnt += width;
56439 } 55139 }
56440diff -urNp linux-2.6.32.24/net/ipv4/tcp_timer.c linux-2.6.32.24/net/ipv4/tcp_timer.c 55140diff -urNp linux-2.6.35.7/net/ipv4/tcp_timer.c linux-2.6.35.7/net/ipv4/tcp_timer.c
56441--- linux-2.6.32.24/net/ipv4/tcp_timer.c 2010-09-26 17:26:06.000000000 -0400 55141--- linux-2.6.35.7/net/ipv4/tcp_timer.c 2010-09-26 17:32:11.000000000 -0400
56442+++ linux-2.6.32.24/net/ipv4/tcp_timer.c 2010-10-23 19:59:20.000000000 -0400 55142+++ linux-2.6.35.7/net/ipv4/tcp_timer.c 2010-09-26 17:32:51.000000000 -0400
56443@@ -21,6 +21,10 @@ 55143@@ -22,6 +22,10 @@
56444 #include <linux/module.h> 55144 #include <linux/gfp.h>
56445 #include <net/tcp.h> 55145 #include <net/tcp.h>
56446 55146
56447+#ifdef CONFIG_GRKERNSEC_BLACKHOLE 55147+#ifdef CONFIG_GRKERNSEC_BLACKHOLE
@@ -56451,7 +55151,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_timer.c linux-2.6.32.24/net/ipv4/tcp_tim
56451 int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES; 55151 int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES;
56452 int sysctl_tcp_synack_retries __read_mostly = TCP_SYNACK_RETRIES; 55152 int sysctl_tcp_synack_retries __read_mostly = TCP_SYNACK_RETRIES;
56453 int sysctl_tcp_keepalive_time __read_mostly = TCP_KEEPALIVE_TIME; 55153 int sysctl_tcp_keepalive_time __read_mostly = TCP_KEEPALIVE_TIME;
56454@@ -164,6 +168,13 @@ static int tcp_write_timeout(struct sock 55154@@ -195,6 +199,13 @@ static int tcp_write_timeout(struct sock
56455 } 55155 }
56456 } 55156 }
56457 55157
@@ -56465,9 +55165,9 @@ diff -urNp linux-2.6.32.24/net/ipv4/tcp_timer.c linux-2.6.32.24/net/ipv4/tcp_tim
56465 if (retransmits_timed_out(sk, retry_until)) { 55165 if (retransmits_timed_out(sk, retry_until)) {
56466 /* Has it gone just too far? */ 55166 /* Has it gone just too far? */
56467 tcp_write_err(sk); 55167 tcp_write_err(sk);
56468diff -urNp linux-2.6.32.24/net/ipv4/udp.c linux-2.6.32.24/net/ipv4/udp.c 55168diff -urNp linux-2.6.35.7/net/ipv4/udp.c linux-2.6.35.7/net/ipv4/udp.c
56469--- linux-2.6.32.24/net/ipv4/udp.c 2010-08-13 16:24:37.000000000 -0400 55169--- linux-2.6.35.7/net/ipv4/udp.c 2010-09-26 17:32:11.000000000 -0400
56470+++ linux-2.6.32.24/net/ipv4/udp.c 2010-10-23 19:59:20.000000000 -0400 55170+++ linux-2.6.35.7/net/ipv4/udp.c 2010-09-26 17:32:51.000000000 -0400
56471@@ -86,6 +86,7 @@ 55171@@ -86,6 +86,7 @@
56472 #include <linux/types.h> 55172 #include <linux/types.h>
56473 #include <linux/fcntl.h> 55173 #include <linux/fcntl.h>
@@ -56476,7 +55176,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/udp.c linux-2.6.32.24/net/ipv4/udp.c
56476 #include <linux/socket.h> 55176 #include <linux/socket.h>
56477 #include <linux/sockios.h> 55177 #include <linux/sockios.h>
56478 #include <linux/igmp.h> 55178 #include <linux/igmp.h>
56479@@ -106,6 +107,10 @@ 55179@@ -107,6 +108,10 @@
56480 #include <net/xfrm.h> 55180 #include <net/xfrm.h>
56481 #include "udp_impl.h" 55181 #include "udp_impl.h"
56482 55182
@@ -56484,10 +55184,10 @@ diff -urNp linux-2.6.32.24/net/ipv4/udp.c linux-2.6.32.24/net/ipv4/udp.c
56484+extern int grsec_enable_blackhole; 55184+extern int grsec_enable_blackhole;
56485+#endif 55185+#endif
56486+ 55186+
56487 struct udp_table udp_table; 55187 struct udp_table udp_table __read_mostly;
56488 EXPORT_SYMBOL(udp_table); 55188 EXPORT_SYMBOL(udp_table);
56489 55189
56490@@ -371,6 +376,9 @@ found: 55190@@ -564,6 +569,9 @@ found:
56491 return s; 55191 return s;
56492 } 55192 }
56493 55193
@@ -56497,7 +55197,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/udp.c linux-2.6.32.24/net/ipv4/udp.c
56497 /* 55197 /*
56498 * This routine is called by the ICMP module when it gets some 55198 * This routine is called by the ICMP module when it gets some
56499 * sort of error condition. If err < 0 then the socket should 55199 * sort of error condition. If err < 0 then the socket should
56500@@ -639,9 +647,18 @@ int udp_sendmsg(struct kiocb *iocb, stru 55200@@ -832,9 +840,18 @@ int udp_sendmsg(struct kiocb *iocb, stru
56501 dport = usin->sin_port; 55201 dport = usin->sin_port;
56502 if (dport == 0) 55202 if (dport == 0)
56503 return -EINVAL; 55203 return -EINVAL;
@@ -56513,10 +55213,10 @@ diff -urNp linux-2.6.32.24/net/ipv4/udp.c linux-2.6.32.24/net/ipv4/udp.c
56513+ if (err) 55213+ if (err)
56514+ return err; 55214+ return err;
56515+ 55215+
56516 daddr = inet->daddr; 55216 daddr = inet->inet_daddr;
56517 dport = inet->dport; 55217 dport = inet->inet_dport;
56518 /* Open fast path for connected socket. 55218 /* Open fast path for connected socket.
56519@@ -945,6 +962,10 @@ try_again: 55219@@ -1141,6 +1158,10 @@ try_again:
56520 if (!skb) 55220 if (!skb)
56521 goto out; 55221 goto out;
56522 55222
@@ -56525,9 +55225,9 @@ diff -urNp linux-2.6.32.24/net/ipv4/udp.c linux-2.6.32.24/net/ipv4/udp.c
56525+ goto out_free; 55225+ goto out_free;
56526+ 55226+
56527 ulen = skb->len - sizeof(struct udphdr); 55227 ulen = skb->len - sizeof(struct udphdr);
56528 copied = len; 55228 if (len > ulen)
56529 if (copied > ulen) 55229 len = ulen;
56530@@ -1335,6 +1356,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, 55230@@ -1625,6 +1646,9 @@ int __udp4_lib_rcv(struct sk_buff *skb,
56531 goto csum_error; 55231 goto csum_error;
56532 55232
56533 UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE); 55233 UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
@@ -56537,7 +55237,7 @@ diff -urNp linux-2.6.32.24/net/ipv4/udp.c linux-2.6.32.24/net/ipv4/udp.c
56537 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); 55237 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
56538 55238
56539 /* 55239 /*
56540@@ -1755,7 +1779,12 @@ static void udp4_format_sock(struct sock 55240@@ -2051,7 +2075,12 @@ static void udp4_format_sock(struct sock
56541 sk_wmem_alloc_get(sp), 55241 sk_wmem_alloc_get(sp),
56542 sk_rmem_alloc_get(sp), 55242 sk_rmem_alloc_get(sp),
56543 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp), 55243 0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
@@ -56551,10 +55251,10 @@ diff -urNp linux-2.6.32.24/net/ipv4/udp.c linux-2.6.32.24/net/ipv4/udp.c
56551 atomic_read(&sp->sk_drops), len); 55251 atomic_read(&sp->sk_drops), len);
56552 } 55252 }
56553 55253
56554diff -urNp linux-2.6.32.24/net/ipv6/exthdrs.c linux-2.6.32.24/net/ipv6/exthdrs.c 55254diff -urNp linux-2.6.35.7/net/ipv6/exthdrs.c linux-2.6.35.7/net/ipv6/exthdrs.c
56555--- linux-2.6.32.24/net/ipv6/exthdrs.c 2010-08-13 16:24:37.000000000 -0400 55255--- linux-2.6.35.7/net/ipv6/exthdrs.c 2010-08-26 19:47:12.000000000 -0400
56556+++ linux-2.6.32.24/net/ipv6/exthdrs.c 2010-10-23 19:59:20.000000000 -0400 55256+++ linux-2.6.35.7/net/ipv6/exthdrs.c 2010-09-17 20:12:09.000000000 -0400
56557@@ -635,7 +635,7 @@ static struct tlvtype_proc tlvprochopopt 55257@@ -636,7 +636,7 @@ static struct tlvtype_proc tlvprochopopt
56558 .type = IPV6_TLV_JUMBO, 55258 .type = IPV6_TLV_JUMBO,
56559 .func = ipv6_hop_jumbo, 55259 .func = ipv6_hop_jumbo,
56560 }, 55260 },
@@ -56563,10 +55263,10 @@ diff -urNp linux-2.6.32.24/net/ipv6/exthdrs.c linux-2.6.32.24/net/ipv6/exthdrs.c
56563 }; 55263 };
56564 55264
56565 int ipv6_parse_hopopts(struct sk_buff *skb) 55265 int ipv6_parse_hopopts(struct sk_buff *skb)
56566diff -urNp linux-2.6.32.24/net/ipv6/raw.c linux-2.6.32.24/net/ipv6/raw.c 55266diff -urNp linux-2.6.35.7/net/ipv6/raw.c linux-2.6.35.7/net/ipv6/raw.c
56567--- linux-2.6.32.24/net/ipv6/raw.c 2010-08-13 16:24:37.000000000 -0400 55267--- linux-2.6.35.7/net/ipv6/raw.c 2010-08-26 19:47:12.000000000 -0400
56568+++ linux-2.6.32.24/net/ipv6/raw.c 2010-10-23 19:59:20.000000000 -0400 55268+++ linux-2.6.35.7/net/ipv6/raw.c 2010-09-17 20:12:09.000000000 -0400
56569@@ -600,7 +600,7 @@ out: 55269@@ -601,7 +601,7 @@ out:
56570 return err; 55270 return err;
56571 } 55271 }
56572 55272
@@ -56575,10 +55275,10 @@ diff -urNp linux-2.6.32.24/net/ipv6/raw.c linux-2.6.32.24/net/ipv6/raw.c
56575 struct flowi *fl, struct rt6_info *rt, 55275 struct flowi *fl, struct rt6_info *rt,
56576 unsigned int flags) 55276 unsigned int flags)
56577 { 55277 {
56578diff -urNp linux-2.6.32.24/net/ipv6/tcp_ipv6.c linux-2.6.32.24/net/ipv6/tcp_ipv6.c 55278diff -urNp linux-2.6.35.7/net/ipv6/tcp_ipv6.c linux-2.6.35.7/net/ipv6/tcp_ipv6.c
56579--- linux-2.6.32.24/net/ipv6/tcp_ipv6.c 2010-08-13 16:24:37.000000000 -0400 55279--- linux-2.6.35.7/net/ipv6/tcp_ipv6.c 2010-08-26 19:47:12.000000000 -0400
56580+++ linux-2.6.32.24/net/ipv6/tcp_ipv6.c 2010-10-23 19:59:20.000000000 -0400 55280+++ linux-2.6.35.7/net/ipv6/tcp_ipv6.c 2010-09-17 20:23:25.000000000 -0400
56581@@ -88,6 +88,10 @@ static struct tcp_md5sig_key *tcp_v6_md5 55281@@ -92,6 +92,10 @@ static struct tcp_md5sig_key *tcp_v6_md5
56582 } 55282 }
56583 #endif 55283 #endif
56584 55284
@@ -56589,7 +55289,7 @@ diff -urNp linux-2.6.32.24/net/ipv6/tcp_ipv6.c linux-2.6.32.24/net/ipv6/tcp_ipv6
56589 static void tcp_v6_hash(struct sock *sk) 55289 static void tcp_v6_hash(struct sock *sk)
56590 { 55290 {
56591 if (sk->sk_state != TCP_CLOSE) { 55291 if (sk->sk_state != TCP_CLOSE) {
56592@@ -1578,6 +1582,9 @@ static int tcp_v6_do_rcv(struct sock *sk 55292@@ -1641,6 +1645,9 @@ static int tcp_v6_do_rcv(struct sock *sk
56593 return 0; 55293 return 0;
56594 55294
56595 reset: 55295 reset:
@@ -56599,7 +55299,7 @@ diff -urNp linux-2.6.32.24/net/ipv6/tcp_ipv6.c linux-2.6.32.24/net/ipv6/tcp_ipv6
56599 tcp_v6_send_reset(sk, skb); 55299 tcp_v6_send_reset(sk, skb);
56600 discard: 55300 discard:
56601 if (opt_skb) 55301 if (opt_skb)
56602@@ -1655,12 +1662,20 @@ static int tcp_v6_rcv(struct sk_buff *sk 55302@@ -1720,12 +1727,20 @@ static int tcp_v6_rcv(struct sk_buff *sk
56603 TCP_SKB_CB(skb)->sacked = 0; 55303 TCP_SKB_CB(skb)->sacked = 0;
56604 55304
56605 sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest); 55305 sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
@@ -56620,9 +55320,9 @@ diff -urNp linux-2.6.32.24/net/ipv6/tcp_ipv6.c linux-2.6.32.24/net/ipv6/tcp_ipv6
56620 goto do_time_wait; 55320 goto do_time_wait;
56621+ } 55321+ }
56622 55322
56623 if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) 55323 if (hdr->hop_limit < inet6_sk(sk)->min_hopcount) {
56624 goto discard_and_relse; 55324 NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
56625@@ -1700,6 +1715,10 @@ no_tcp_socket: 55325@@ -1773,6 +1788,10 @@ no_tcp_socket:
56626 bad_packet: 55326 bad_packet:
56627 TCP_INC_STATS_BH(net, TCP_MIB_INERRS); 55327 TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
56628 } else { 55328 } else {
@@ -56633,10 +55333,10 @@ diff -urNp linux-2.6.32.24/net/ipv6/tcp_ipv6.c linux-2.6.32.24/net/ipv6/tcp_ipv6
56633 tcp_v6_send_reset(NULL, skb); 55333 tcp_v6_send_reset(NULL, skb);
56634 } 55334 }
56635 55335
56636diff -urNp linux-2.6.32.24/net/ipv6/udp.c linux-2.6.32.24/net/ipv6/udp.c 55336diff -urNp linux-2.6.35.7/net/ipv6/udp.c linux-2.6.35.7/net/ipv6/udp.c
56637--- linux-2.6.32.24/net/ipv6/udp.c 2010-08-13 16:24:37.000000000 -0400 55337--- linux-2.6.35.7/net/ipv6/udp.c 2010-09-26 17:32:11.000000000 -0400
56638+++ linux-2.6.32.24/net/ipv6/udp.c 2010-10-23 19:59:20.000000000 -0400 55338+++ linux-2.6.35.7/net/ipv6/udp.c 2010-09-26 17:32:51.000000000 -0400
56639@@ -49,6 +49,10 @@ 55339@@ -50,6 +50,10 @@
56640 #include <linux/seq_file.h> 55340 #include <linux/seq_file.h>
56641 #include "udp_impl.h" 55341 #include "udp_impl.h"
56642 55342
@@ -56647,20 +55347,20 @@ diff -urNp linux-2.6.32.24/net/ipv6/udp.c linux-2.6.32.24/net/ipv6/udp.c
56647 int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) 55347 int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
56648 { 55348 {
56649 const struct in6_addr *sk_rcv_saddr6 = &inet6_sk(sk)->rcv_saddr; 55349 const struct in6_addr *sk_rcv_saddr6 = &inet6_sk(sk)->rcv_saddr;
56650@@ -587,6 +591,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, 55350@@ -765,6 +769,9 @@ int __udp6_lib_rcv(struct sk_buff *skb,
56651 UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, 55351 UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS,
56652 proto == IPPROTO_UDPLITE); 55352 proto == IPPROTO_UDPLITE);
56653 55353
56654+#ifdef CONFIG_GRKERNSEC_BLACKHOLE 55354+#ifdef CONFIG_GRKERNSEC_BLACKHOLE
56655+ if (!grsec_enable_blackhole || (skb->dev->flags & IFF_LOOPBACK)) 55355+ if (!grsec_enable_blackhole || (skb->dev->flags & IFF_LOOPBACK))
56656+#endif 55356+#endif
56657 icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev); 55357 icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
56658 55358
56659 kfree_skb(skb); 55359 kfree_skb(skb);
56660diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c 55360diff -urNp linux-2.6.35.7/net/irda/ircomm/ircomm_tty.c linux-2.6.35.7/net/irda/ircomm/ircomm_tty.c
56661--- linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c 2010-08-13 16:24:37.000000000 -0400 55361--- linux-2.6.35.7/net/irda/ircomm/ircomm_tty.c 2010-08-26 19:47:12.000000000 -0400
56662+++ linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c 2010-10-23 19:59:20.000000000 -0400 55362+++ linux-2.6.35.7/net/irda/ircomm/ircomm_tty.c 2010-09-17 20:12:09.000000000 -0400
56663@@ -280,16 +280,16 @@ static int ircomm_tty_block_til_ready(st 55363@@ -281,16 +281,16 @@ static int ircomm_tty_block_til_ready(st
56664 add_wait_queue(&self->open_wait, &wait); 55364 add_wait_queue(&self->open_wait, &wait);
56665 55365
56666 IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n", 55366 IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n",
@@ -56680,7 +55380,7 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56680 55380
56681 while (1) { 55381 while (1) {
56682 if (tty->termios->c_cflag & CBAUD) { 55382 if (tty->termios->c_cflag & CBAUD) {
56683@@ -329,7 +329,7 @@ static int ircomm_tty_block_til_ready(st 55383@@ -330,7 +330,7 @@ static int ircomm_tty_block_til_ready(st
56684 } 55384 }
56685 55385
56686 IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n", 55386 IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n",
@@ -56689,7 +55389,7 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56689 55389
56690 schedule(); 55390 schedule();
56691 } 55391 }
56692@@ -340,13 +340,13 @@ static int ircomm_tty_block_til_ready(st 55392@@ -341,13 +341,13 @@ static int ircomm_tty_block_til_ready(st
56693 if (extra_count) { 55393 if (extra_count) {
56694 /* ++ is not atomic, so this should be protected - Jean II */ 55394 /* ++ is not atomic, so this should be protected - Jean II */
56695 spin_lock_irqsave(&self->spinlock, flags); 55395 spin_lock_irqsave(&self->spinlock, flags);
@@ -56706,7 +55406,7 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56706 55406
56707 if (!retval) 55407 if (!retval)
56708 self->flags |= ASYNC_NORMAL_ACTIVE; 55408 self->flags |= ASYNC_NORMAL_ACTIVE;
56709@@ -415,14 +415,14 @@ static int ircomm_tty_open(struct tty_st 55409@@ -416,14 +416,14 @@ static int ircomm_tty_open(struct tty_st
56710 } 55410 }
56711 /* ++ is not atomic, so this should be protected - Jean II */ 55411 /* ++ is not atomic, so this should be protected - Jean II */
56712 spin_lock_irqsave(&self->spinlock, flags); 55412 spin_lock_irqsave(&self->spinlock, flags);
@@ -56723,7 +55423,7 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56723 55423
56724 /* Not really used by us, but lets do it anyway */ 55424 /* Not really used by us, but lets do it anyway */
56725 self->tty->low_latency = (self->flags & ASYNC_LOW_LATENCY) ? 1 : 0; 55425 self->tty->low_latency = (self->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
56726@@ -511,7 +511,7 @@ static void ircomm_tty_close(struct tty_ 55426@@ -509,7 +509,7 @@ static void ircomm_tty_close(struct tty_
56727 return; 55427 return;
56728 } 55428 }
56729 55429
@@ -56732,7 +55432,7 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56732 /* 55432 /*
56733 * Uh, oh. tty->count is 1, which means that the tty 55433 * Uh, oh. tty->count is 1, which means that the tty
56734 * structure will be freed. state->count should always 55434 * structure will be freed. state->count should always
56735@@ -521,16 +521,16 @@ static void ircomm_tty_close(struct tty_ 55435@@ -519,16 +519,16 @@ static void ircomm_tty_close(struct tty_
56736 */ 55436 */
56737 IRDA_DEBUG(0, "%s(), bad serial port count; " 55437 IRDA_DEBUG(0, "%s(), bad serial port count; "
56738 "tty->count is 1, state->count is %d\n", __func__ , 55438 "tty->count is 1, state->count is %d\n", __func__ ,
@@ -56755,7 +55455,7 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56755 spin_unlock_irqrestore(&self->spinlock, flags); 55455 spin_unlock_irqrestore(&self->spinlock, flags);
56756 55456
56757 IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ ); 55457 IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ );
56758@@ -562,7 +562,7 @@ static void ircomm_tty_close(struct tty_ 55458@@ -560,7 +560,7 @@ static void ircomm_tty_close(struct tty_
56759 tty->closing = 0; 55459 tty->closing = 0;
56760 self->tty = NULL; 55460 self->tty = NULL;
56761 55461
@@ -56764,7 +55464,7 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56764 if (self->close_delay) 55464 if (self->close_delay)
56765 schedule_timeout_interruptible(self->close_delay); 55465 schedule_timeout_interruptible(self->close_delay);
56766 wake_up_interruptible(&self->open_wait); 55466 wake_up_interruptible(&self->open_wait);
56767@@ -1017,7 +1017,7 @@ static void ircomm_tty_hangup(struct tty 55467@@ -1012,7 +1012,7 @@ static void ircomm_tty_hangup(struct tty
56768 spin_lock_irqsave(&self->spinlock, flags); 55468 spin_lock_irqsave(&self->spinlock, flags);
56769 self->flags &= ~ASYNC_NORMAL_ACTIVE; 55469 self->flags &= ~ASYNC_NORMAL_ACTIVE;
56770 self->tty = NULL; 55470 self->tty = NULL;
@@ -56773,7 +55473,7 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56773 spin_unlock_irqrestore(&self->spinlock, flags); 55473 spin_unlock_irqrestore(&self->spinlock, flags);
56774 55474
56775 wake_up_interruptible(&self->open_wait); 55475 wake_up_interruptible(&self->open_wait);
56776@@ -1369,7 +1369,7 @@ static void ircomm_tty_line_info(struct 55476@@ -1364,7 +1364,7 @@ static void ircomm_tty_line_info(struct
56777 seq_putc(m, '\n'); 55477 seq_putc(m, '\n');
56778 55478
56779 seq_printf(m, "Role: %s\n", self->client ? "client" : "server"); 55479 seq_printf(m, "Role: %s\n", self->client ? "client" : "server");
@@ -56782,10 +55482,10 @@ diff -urNp linux-2.6.32.24/net/irda/ircomm/ircomm_tty.c linux-2.6.32.24/net/irda
56782 seq_printf(m, "Max data size: %d\n", self->max_data_size); 55482 seq_printf(m, "Max data size: %d\n", self->max_data_size);
56783 seq_printf(m, "Max header size: %d\n", self->max_header_size); 55483 seq_printf(m, "Max header size: %d\n", self->max_header_size);
56784 55484
56785diff -urNp linux-2.6.32.24/net/key/af_key.c linux-2.6.32.24/net/key/af_key.c 55485diff -urNp linux-2.6.35.7/net/key/af_key.c linux-2.6.35.7/net/key/af_key.c
56786--- linux-2.6.32.24/net/key/af_key.c 2010-08-13 16:24:37.000000000 -0400 55486--- linux-2.6.35.7/net/key/af_key.c 2010-08-26 19:47:12.000000000 -0400
56787+++ linux-2.6.32.24/net/key/af_key.c 2010-10-23 19:59:20.000000000 -0400 55487+++ linux-2.6.35.7/net/key/af_key.c 2010-09-17 20:12:37.000000000 -0400
56788@@ -3660,7 +3660,11 @@ static int pfkey_seq_show(struct seq_fil 55488@@ -3644,7 +3644,11 @@ static int pfkey_seq_show(struct seq_fil
56789 seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n"); 55489 seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n");
56790 else 55490 else
56791 seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n", 55491 seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n",
@@ -56797,10 +55497,10 @@ diff -urNp linux-2.6.32.24/net/key/af_key.c linux-2.6.32.24/net/key/af_key.c
56797 atomic_read(&s->sk_refcnt), 55497 atomic_read(&s->sk_refcnt),
56798 sk_rmem_alloc_get(s), 55498 sk_rmem_alloc_get(s),
56799 sk_wmem_alloc_get(s), 55499 sk_wmem_alloc_get(s),
56800diff -urNp linux-2.6.32.24/net/mac80211/ieee80211_i.h linux-2.6.32.24/net/mac80211/ieee80211_i.h 55500diff -urNp linux-2.6.35.7/net/mac80211/ieee80211_i.h linux-2.6.35.7/net/mac80211/ieee80211_i.h
56801--- linux-2.6.32.24/net/mac80211/ieee80211_i.h 2010-08-13 16:24:37.000000000 -0400 55501--- linux-2.6.35.7/net/mac80211/ieee80211_i.h 2010-08-26 19:47:12.000000000 -0400
56802+++ linux-2.6.32.24/net/mac80211/ieee80211_i.h 2010-10-23 19:59:20.000000000 -0400 55502+++ linux-2.6.35.7/net/mac80211/ieee80211_i.h 2010-09-17 20:12:09.000000000 -0400
56803@@ -635,7 +635,7 @@ struct ieee80211_local { 55503@@ -649,7 +649,7 @@ struct ieee80211_local {
56804 /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */ 55504 /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
56805 spinlock_t queue_stop_reason_lock; 55505 spinlock_t queue_stop_reason_lock;
56806 55506
@@ -56809,10 +55509,10 @@ diff -urNp linux-2.6.32.24/net/mac80211/ieee80211_i.h linux-2.6.32.24/net/mac802
56809 int monitors, cooked_mntrs; 55509 int monitors, cooked_mntrs;
56810 /* number of interfaces with corresponding FIF_ flags */ 55510 /* number of interfaces with corresponding FIF_ flags */
56811 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll; 55511 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll;
56812diff -urNp linux-2.6.32.24/net/mac80211/iface.c linux-2.6.32.24/net/mac80211/iface.c 55512diff -urNp linux-2.6.35.7/net/mac80211/iface.c linux-2.6.35.7/net/mac80211/iface.c
56813--- linux-2.6.32.24/net/mac80211/iface.c 2010-08-13 16:24:37.000000000 -0400 55513--- linux-2.6.35.7/net/mac80211/iface.c 2010-08-26 19:47:12.000000000 -0400
56814+++ linux-2.6.32.24/net/mac80211/iface.c 2010-10-23 19:59:20.000000000 -0400 55514+++ linux-2.6.35.7/net/mac80211/iface.c 2010-09-17 20:12:09.000000000 -0400
56815@@ -166,7 +166,7 @@ static int ieee80211_open(struct net_dev 55515@@ -183,7 +183,7 @@ static int ieee80211_open(struct net_dev
56816 break; 55516 break;
56817 } 55517 }
56818 55518
@@ -56821,7 +55521,7 @@ diff -urNp linux-2.6.32.24/net/mac80211/iface.c linux-2.6.32.24/net/mac80211/ifa
56821 res = drv_start(local); 55521 res = drv_start(local);
56822 if (res) 55522 if (res)
56823 goto err_del_bss; 55523 goto err_del_bss;
56824@@ -196,7 +196,7 @@ static int ieee80211_open(struct net_dev 55524@@ -215,7 +215,7 @@ static int ieee80211_open(struct net_dev
56825 * Validate the MAC address for this device. 55525 * Validate the MAC address for this device.
56826 */ 55526 */
56827 if (!is_valid_ether_addr(dev->dev_addr)) { 55527 if (!is_valid_ether_addr(dev->dev_addr)) {
@@ -56830,7 +55530,7 @@ diff -urNp linux-2.6.32.24/net/mac80211/iface.c linux-2.6.32.24/net/mac80211/ifa
56830 drv_stop(local); 55530 drv_stop(local);
56831 return -EADDRNOTAVAIL; 55531 return -EADDRNOTAVAIL;
56832 } 55532 }
56833@@ -292,7 +292,7 @@ static int ieee80211_open(struct net_dev 55533@@ -308,7 +308,7 @@ static int ieee80211_open(struct net_dev
56834 55534
56835 hw_reconf_flags |= __ieee80211_recalc_idle(local); 55535 hw_reconf_flags |= __ieee80211_recalc_idle(local);
56836 55536
@@ -56839,16 +55539,16 @@ diff -urNp linux-2.6.32.24/net/mac80211/iface.c linux-2.6.32.24/net/mac80211/ifa
56839 if (hw_reconf_flags) { 55539 if (hw_reconf_flags) {
56840 ieee80211_hw_config(local, hw_reconf_flags); 55540 ieee80211_hw_config(local, hw_reconf_flags);
56841 /* 55541 /*
56842@@ -320,7 +320,7 @@ static int ieee80211_open(struct net_dev 55542@@ -336,7 +336,7 @@ static int ieee80211_open(struct net_dev
56843 err_del_interface: 55543 err_del_interface:
56844 drv_remove_interface(local, &conf); 55544 drv_remove_interface(local, &sdata->vif);
56845 err_stop: 55545 err_stop:
56846- if (!local->open_count) 55546- if (!local->open_count)
56847+ if (!atomic_read(&local->open_count)) 55547+ if (!atomic_read(&local->open_count))
56848 drv_stop(local); 55548 drv_stop(local);
56849 err_del_bss: 55549 err_del_bss:
56850 sdata->bss = NULL; 55550 sdata->bss = NULL;
56851@@ -420,7 +420,7 @@ static int ieee80211_stop(struct net_dev 55551@@ -439,7 +439,7 @@ static int ieee80211_stop(struct net_dev
56852 WARN_ON(!list_empty(&sdata->u.ap.vlans)); 55552 WARN_ON(!list_empty(&sdata->u.ap.vlans));
56853 } 55553 }
56854 55554
@@ -56857,7 +55557,7 @@ diff -urNp linux-2.6.32.24/net/mac80211/iface.c linux-2.6.32.24/net/mac80211/ifa
56857 55557
56858 switch (sdata->vif.type) { 55558 switch (sdata->vif.type) {
56859 case NL80211_IFTYPE_AP_VLAN: 55559 case NL80211_IFTYPE_AP_VLAN:
56860@@ -526,7 +526,7 @@ static int ieee80211_stop(struct net_dev 55560@@ -542,7 +542,7 @@ static int ieee80211_stop(struct net_dev
56861 55561
56862 ieee80211_recalc_ps(local, -1); 55562 ieee80211_recalc_ps(local, -1);
56863 55563
@@ -56866,10 +55566,10 @@ diff -urNp linux-2.6.32.24/net/mac80211/iface.c linux-2.6.32.24/net/mac80211/ifa
56866 ieee80211_clear_tx_pending(local); 55566 ieee80211_clear_tx_pending(local);
56867 ieee80211_stop_device(local); 55567 ieee80211_stop_device(local);
56868 55568
56869diff -urNp linux-2.6.32.24/net/mac80211/main.c linux-2.6.32.24/net/mac80211/main.c 55569diff -urNp linux-2.6.35.7/net/mac80211/main.c linux-2.6.35.7/net/mac80211/main.c
56870--- linux-2.6.32.24/net/mac80211/main.c 2010-08-13 16:24:37.000000000 -0400 55570--- linux-2.6.35.7/net/mac80211/main.c 2010-09-20 17:33:09.000000000 -0400
56871+++ linux-2.6.32.24/net/mac80211/main.c 2010-10-23 19:59:20.000000000 -0400 55571+++ linux-2.6.35.7/net/mac80211/main.c 2010-09-20 17:33:37.000000000 -0400
56872@@ -145,7 +145,7 @@ int ieee80211_hw_config(struct ieee80211 55572@@ -148,7 +148,7 @@ int ieee80211_hw_config(struct ieee80211
56873 local->hw.conf.power_level = power; 55573 local->hw.conf.power_level = power;
56874 } 55574 }
56875 55575
@@ -56878,10 +55578,10 @@ diff -urNp linux-2.6.32.24/net/mac80211/main.c linux-2.6.32.24/net/mac80211/main
56878 ret = drv_config(local, changed); 55578 ret = drv_config(local, changed);
56879 /* 55579 /*
56880 * Goal: 55580 * Goal:
56881diff -urNp linux-2.6.32.24/net/mac80211/pm.c linux-2.6.32.24/net/mac80211/pm.c 55581diff -urNp linux-2.6.35.7/net/mac80211/pm.c linux-2.6.35.7/net/mac80211/pm.c
56882--- linux-2.6.32.24/net/mac80211/pm.c 2010-08-13 16:24:37.000000000 -0400 55582--- linux-2.6.35.7/net/mac80211/pm.c 2010-08-26 19:47:12.000000000 -0400
56883+++ linux-2.6.32.24/net/mac80211/pm.c 2010-10-23 19:59:20.000000000 -0400 55583+++ linux-2.6.35.7/net/mac80211/pm.c 2010-09-17 20:12:09.000000000 -0400
56884@@ -107,7 +107,7 @@ int __ieee80211_suspend(struct ieee80211 55584@@ -101,7 +101,7 @@ int __ieee80211_suspend(struct ieee80211
56885 } 55585 }
56886 55586
56887 /* stop hardware - this must stop RX */ 55587 /* stop hardware - this must stop RX */
@@ -56890,21 +55590,33 @@ diff -urNp linux-2.6.32.24/net/mac80211/pm.c linux-2.6.32.24/net/mac80211/pm.c
56890 ieee80211_stop_device(local); 55590 ieee80211_stop_device(local);
56891 55591
56892 local->suspended = true; 55592 local->suspended = true;
56893diff -urNp linux-2.6.32.24/net/mac80211/rate.c linux-2.6.32.24/net/mac80211/rate.c 55593diff -urNp linux-2.6.35.7/net/mac80211/rate.c linux-2.6.35.7/net/mac80211/rate.c
56894--- linux-2.6.32.24/net/mac80211/rate.c 2010-08-13 16:24:37.000000000 -0400 55594--- linux-2.6.35.7/net/mac80211/rate.c 2010-08-26 19:47:12.000000000 -0400
56895+++ linux-2.6.32.24/net/mac80211/rate.c 2010-10-23 19:59:20.000000000 -0400 55595+++ linux-2.6.35.7/net/mac80211/rate.c 2010-09-17 20:12:09.000000000 -0400
56896@@ -287,7 +287,7 @@ int ieee80211_init_rate_ctrl_alg(struct 55596@@ -355,7 +355,7 @@ int ieee80211_init_rate_ctrl_alg(struct
56897 struct rate_control_ref *ref, *old;
56898 55597
56899 ASSERT_RTNL(); 55598 ASSERT_RTNL();
55599
56900- if (local->open_count) 55600- if (local->open_count)
56901+ if (atomic_read(&local->open_count)) 55601+ if (atomic_read(&local->open_count))
56902 return -EBUSY; 55602 return -EBUSY;
56903 55603
56904 ref = rate_control_alloc(name, local); 55604 if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) {
56905diff -urNp linux-2.6.32.24/net/mac80211/tx.c linux-2.6.32.24/net/mac80211/tx.c 55605diff -urNp linux-2.6.35.7/net/mac80211/rc80211_pid_debugfs.c linux-2.6.35.7/net/mac80211/rc80211_pid_debugfs.c
56906--- linux-2.6.32.24/net/mac80211/tx.c 2010-08-13 16:24:37.000000000 -0400 55606--- linux-2.6.35.7/net/mac80211/rc80211_pid_debugfs.c 2010-08-26 19:47:12.000000000 -0400
56907+++ linux-2.6.32.24/net/mac80211/tx.c 2010-10-23 19:59:20.000000000 -0400 55607+++ linux-2.6.35.7/net/mac80211/rc80211_pid_debugfs.c 2010-09-17 20:12:09.000000000 -0400
55608@@ -192,7 +192,7 @@ static ssize_t rate_control_pid_events_r
55609
55610 spin_unlock_irqrestore(&events->lock, status);
55611
55612- if (copy_to_user(buf, pb, p))
55613+ if (p > sizeof(pb) || copy_to_user(buf, pb, p))
55614 return -EFAULT;
55615
55616 return p;
55617diff -urNp linux-2.6.35.7/net/mac80211/tx.c linux-2.6.35.7/net/mac80211/tx.c
55618--- linux-2.6.35.7/net/mac80211/tx.c 2010-08-26 19:47:12.000000000 -0400
55619+++ linux-2.6.35.7/net/mac80211/tx.c 2010-09-17 20:12:09.000000000 -0400
56908@@ -173,7 +173,7 @@ static __le16 ieee80211_duration(struct 55620@@ -173,7 +173,7 @@ static __le16 ieee80211_duration(struct
56909 return cpu_to_le16(dur); 55621 return cpu_to_le16(dur);
56910 } 55622 }
@@ -56914,10 +55626,10 @@ diff -urNp linux-2.6.32.24/net/mac80211/tx.c linux-2.6.32.24/net/mac80211/tx.c
56914 struct net_device *dev) 55626 struct net_device *dev)
56915 { 55627 {
56916 return local == wdev_priv(dev->ieee80211_ptr); 55628 return local == wdev_priv(dev->ieee80211_ptr);
56917diff -urNp linux-2.6.32.24/net/mac80211/util.c linux-2.6.32.24/net/mac80211/util.c 55629diff -urNp linux-2.6.35.7/net/mac80211/util.c linux-2.6.35.7/net/mac80211/util.c
56918--- linux-2.6.32.24/net/mac80211/util.c 2010-08-13 16:24:37.000000000 -0400 55630--- linux-2.6.35.7/net/mac80211/util.c 2010-08-26 19:47:12.000000000 -0400
56919+++ linux-2.6.32.24/net/mac80211/util.c 2010-10-23 19:59:20.000000000 -0400 55631+++ linux-2.6.35.7/net/mac80211/util.c 2010-09-17 20:12:09.000000000 -0400
56920@@ -1042,7 +1042,7 @@ int ieee80211_reconfig(struct ieee80211_ 55632@@ -1097,7 +1097,7 @@ int ieee80211_reconfig(struct ieee80211_
56921 local->resuming = true; 55633 local->resuming = true;
56922 55634
56923 /* restart hardware */ 55635 /* restart hardware */
@@ -56926,10 +55638,10 @@ diff -urNp linux-2.6.32.24/net/mac80211/util.c linux-2.6.32.24/net/mac80211/util
56926 /* 55638 /*
56927 * Upon resume hardware can sometimes be goofy due to 55639 * Upon resume hardware can sometimes be goofy due to
56928 * various platform / driver / bus issues, so restarting 55640 * various platform / driver / bus issues, so restarting
56929diff -urNp linux-2.6.32.24/net/netfilter/Kconfig linux-2.6.32.24/net/netfilter/Kconfig 55641diff -urNp linux-2.6.35.7/net/netfilter/Kconfig linux-2.6.35.7/net/netfilter/Kconfig
56930--- linux-2.6.32.24/net/netfilter/Kconfig 2010-08-13 16:24:37.000000000 -0400 55642--- linux-2.6.35.7/net/netfilter/Kconfig 2010-08-26 19:47:12.000000000 -0400
56931+++ linux-2.6.32.24/net/netfilter/Kconfig 2010-10-23 19:59:20.000000000 -0400 55643+++ linux-2.6.35.7/net/netfilter/Kconfig 2010-09-28 18:10:38.000000000 -0400
56932@@ -635,6 +635,16 @@ config NETFILTER_XT_MATCH_ESP 55644@@ -693,6 +693,16 @@ config NETFILTER_XT_MATCH_ESP
56933 55645
56934 To compile it as a module, choose M here. If unsure, say N. 55646 To compile it as a module, choose M here. If unsure, say N.
56935 55647
@@ -56941,15 +55653,15 @@ diff -urNp linux-2.6.32.24/net/netfilter/Kconfig linux-2.6.32.24/net/netfilter/K
56941+ The gradm match allows to match on grsecurity RBAC being enabled. 55653+ The gradm match allows to match on grsecurity RBAC being enabled.
56942+ It is useful when iptables rules are applied early on bootup to 55654+ It is useful when iptables rules are applied early on bootup to
56943+ prevent connections to the machine (except from a trusted host) 55655+ prevent connections to the machine (except from a trusted host)
56944+ while the RBAC system is disabled. 55656+ while the RBAC system is disabled.
56945+ 55657+
56946 config NETFILTER_XT_MATCH_HASHLIMIT 55658 config NETFILTER_XT_MATCH_HASHLIMIT
56947 tristate '"hashlimit" match support' 55659 tristate '"hashlimit" match support'
56948 depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n) 55660 depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
56949diff -urNp linux-2.6.32.24/net/netfilter/Makefile linux-2.6.32.24/net/netfilter/Makefile 55661diff -urNp linux-2.6.35.7/net/netfilter/Makefile linux-2.6.35.7/net/netfilter/Makefile
56950--- linux-2.6.32.24/net/netfilter/Makefile 2010-08-13 16:24:37.000000000 -0400 55662--- linux-2.6.35.7/net/netfilter/Makefile 2010-08-26 19:47:12.000000000 -0400
56951+++ linux-2.6.32.24/net/netfilter/Makefile 2010-10-23 19:59:20.000000000 -0400 55663+++ linux-2.6.35.7/net/netfilter/Makefile 2010-09-28 18:05:52.000000000 -0400
56952@@ -68,6 +68,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CONNTRAC 55664@@ -71,6 +71,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CONNTRAC
56953 obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o 55665 obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o
56954 obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o 55666 obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
56955 obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o 55667 obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
@@ -56957,9 +55669,9 @@ diff -urNp linux-2.6.32.24/net/netfilter/Makefile linux-2.6.32.24/net/netfilter/
56957 obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o 55669 obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
56958 obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o 55670 obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
56959 obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o 55671 obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
56960diff -urNp linux-2.6.32.24/net/netfilter/xt_gradm.c linux-2.6.32.24/net/netfilter/xt_gradm.c 55672diff -urNp linux-2.6.35.7/net/netfilter/xt_gradm.c linux-2.6.35.7/net/netfilter/xt_gradm.c
56961--- linux-2.6.32.24/net/netfilter/xt_gradm.c 1969-12-31 19:00:00.000000000 -0500 55673--- linux-2.6.35.7/net/netfilter/xt_gradm.c 1969-12-31 19:00:00.000000000 -0500
56962+++ linux-2.6.32.24/net/netfilter/xt_gradm.c 2010-10-23 19:59:20.000000000 -0400 55674+++ linux-2.6.35.7/net/netfilter/xt_gradm.c 2010-09-28 18:05:52.000000000 -0400
56963@@ -0,0 +1,51 @@ 55675@@ -0,0 +1,51 @@
56964+/* 55676+/*
56965+ * gradm match for netfilter 55677+ * gradm match for netfilter
@@ -56977,7 +55689,7 @@ diff -urNp linux-2.6.32.24/net/netfilter/xt_gradm.c linux-2.6.32.24/net/netfilte
56977+#include <linux/netfilter/xt_gradm.h> 55689+#include <linux/netfilter/xt_gradm.h>
56978+ 55690+
56979+static bool 55691+static bool
56980+gradm_mt(const struct sk_buff *skb, const struct xt_match_param *par) 55692+gradm_mt(const struct sk_buff *skb, struct xt_action_param *par)
56981+{ 55693+{
56982+ const struct xt_gradm_mtinfo *info = par->matchinfo; 55694+ const struct xt_gradm_mtinfo *info = par->matchinfo;
56983+ bool retval = false; 55695+ bool retval = false;
@@ -57012,13 +55724,13 @@ diff -urNp linux-2.6.32.24/net/netfilter/xt_gradm.c linux-2.6.32.24/net/netfilte
57012+MODULE_LICENSE("GPL"); 55724+MODULE_LICENSE("GPL");
57013+MODULE_ALIAS("ipt_gradm"); 55725+MODULE_ALIAS("ipt_gradm");
57014+MODULE_ALIAS("ip6t_gradm"); 55726+MODULE_ALIAS("ip6t_gradm");
57015diff -urNp linux-2.6.32.24/net/netlink/af_netlink.c linux-2.6.32.24/net/netlink/af_netlink.c 55727diff -urNp linux-2.6.35.7/net/netlink/af_netlink.c linux-2.6.35.7/net/netlink/af_netlink.c
57016--- linux-2.6.32.24/net/netlink/af_netlink.c 2010-08-29 21:08:20.000000000 -0400 55728--- linux-2.6.35.7/net/netlink/af_netlink.c 2010-08-26 19:47:12.000000000 -0400
57017+++ linux-2.6.32.24/net/netlink/af_netlink.c 2010-10-23 19:59:20.000000000 -0400 55729+++ linux-2.6.35.7/net/netlink/af_netlink.c 2010-09-17 20:12:37.000000000 -0400
57018@@ -1964,13 +1964,21 @@ static int netlink_seq_show(struct seq_f 55730@@ -2001,13 +2001,21 @@ static int netlink_seq_show(struct seq_f
57019 struct netlink_sock *nlk = nlk_sk(s); 55731 struct netlink_sock *nlk = nlk_sk(s);
57020 55732
57021 seq_printf(seq, "%p %-3d %-6d %08x %-8d %-8d %p %-8d %-8d\n", 55733 seq_printf(seq, "%p %-3d %-6d %08x %-8d %-8d %p %-8d %-8d %-8lu\n",
57022+#ifdef CONFIG_GRKERNSEC_HIDESYM 55734+#ifdef CONFIG_GRKERNSEC_HIDESYM
57023+ NULL, 55735+ NULL,
57024+#else 55736+#else
@@ -57035,12 +55747,41 @@ diff -urNp linux-2.6.32.24/net/netlink/af_netlink.c linux-2.6.32.24/net/netlink/
57035 nlk->cb, 55747 nlk->cb,
57036+#endif 55748+#endif
57037 atomic_read(&s->sk_refcnt), 55749 atomic_read(&s->sk_refcnt),
57038 atomic_read(&s->sk_drops) 55750 atomic_read(&s->sk_drops),
57039 ); 55751 sock_i_ino(s)
57040diff -urNp linux-2.6.32.24/net/packet/af_packet.c linux-2.6.32.24/net/packet/af_packet.c 55752diff -urNp linux-2.6.35.7/net/packet/af_packet.c linux-2.6.35.7/net/packet/af_packet.c
57041--- linux-2.6.32.24/net/packet/af_packet.c 2010-08-13 16:24:37.000000000 -0400 55753--- linux-2.6.35.7/net/packet/af_packet.c 2010-08-26 19:47:12.000000000 -0400
57042+++ linux-2.6.32.24/net/packet/af_packet.c 2010-10-23 19:59:20.000000000 -0400 55754+++ linux-2.6.35.7/net/packet/af_packet.c 2010-10-11 22:41:44.000000000 -0400
57043@@ -2426,7 +2426,11 @@ static int packet_seq_show(struct seq_fi 55755@@ -1595,8 +1595,9 @@ static int packet_recvmsg(struct kiocb *
55756
55757 err = -EINVAL;
55758 vnet_hdr_len = sizeof(vnet_hdr);
55759- if ((len -= vnet_hdr_len) < 0)
55760+ if (len < vnet_hdr_len)
55761 goto out_free;
55762+ len -= vnet_hdr_len;
55763
55764 if (skb_is_gso(skb)) {
55765 struct skb_shared_info *sinfo = skb_shinfo(skb);
55766@@ -2093,7 +2094,7 @@ static int packet_getsockopt(struct sock
55767 case PACKET_HDRLEN:
55768 if (len > sizeof(int))
55769 len = sizeof(int);
55770- if (copy_from_user(&val, optval, len))
55771+ if (len > sizeof(val) || copy_from_user(&val, optval, len))
55772 return -EFAULT;
55773 switch (val) {
55774 case TPACKET_V1:
55775@@ -2125,7 +2126,7 @@ static int packet_getsockopt(struct sock
55776
55777 if (put_user(len, optlen))
55778 return -EFAULT;
55779- if (copy_to_user(optval, data, len))
55780+ if (len > sizeof(st) || copy_to_user(optval, data, len))
55781 return -EFAULT;
55782 return 0;
55783 }
55784@@ -2604,7 +2605,11 @@ static int packet_seq_show(struct seq_fi
57044 55785
57045 seq_printf(seq, 55786 seq_printf(seq,
57046 "%p %-6d %-4d %04x %-5d %1d %-6u %-6u %-6lu\n", 55787 "%p %-6d %-4d %04x %-5d %1d %-6u %-6u %-6lu\n",
@@ -57052,9 +55793,9 @@ diff -urNp linux-2.6.32.24/net/packet/af_packet.c linux-2.6.32.24/net/packet/af_
57052 atomic_read(&s->sk_refcnt), 55793 atomic_read(&s->sk_refcnt),
57053 s->sk_type, 55794 s->sk_type,
57054 ntohs(po->num), 55795 ntohs(po->num),
57055diff -urNp linux-2.6.32.24/net/phonet/af_phonet.c linux-2.6.32.24/net/phonet/af_phonet.c 55796diff -urNp linux-2.6.35.7/net/phonet/af_phonet.c linux-2.6.35.7/net/phonet/af_phonet.c
57056--- linux-2.6.32.24/net/phonet/af_phonet.c 2010-08-13 16:24:37.000000000 -0400 55797--- linux-2.6.35.7/net/phonet/af_phonet.c 2010-08-26 19:47:12.000000000 -0400
57057+++ linux-2.6.32.24/net/phonet/af_phonet.c 2010-10-23 19:59:20.000000000 -0400 55798+++ linux-2.6.35.7/net/phonet/af_phonet.c 2010-10-20 17:39:01.000000000 -0400
57058@@ -41,7 +41,7 @@ static struct phonet_protocol *phonet_pr 55799@@ -41,7 +41,7 @@ static struct phonet_protocol *phonet_pr
57059 { 55800 {
57060 struct phonet_protocol *pp; 55801 struct phonet_protocol *pp;
@@ -57063,8 +55804,8 @@ diff -urNp linux-2.6.32.24/net/phonet/af_phonet.c linux-2.6.32.24/net/phonet/af_
57063+ if (protocol < 0 || protocol >= PHONET_NPROTO) 55804+ if (protocol < 0 || protocol >= PHONET_NPROTO)
57064 return NULL; 55805 return NULL;
57065 55806
57066 spin_lock(&proto_tab_lock); 55807 rcu_read_lock();
57067@@ -398,7 +398,7 @@ int __init_or_module phonet_proto_regist 55808@@ -446,7 +446,7 @@ int __init_or_module phonet_proto_regist
57068 { 55809 {
57069 int err = 0; 55810 int err = 0;
57070 55811
@@ -57073,10 +55814,10 @@ diff -urNp linux-2.6.32.24/net/phonet/af_phonet.c linux-2.6.32.24/net/phonet/af_
57073 return -EINVAL; 55814 return -EINVAL;
57074 55815
57075 err = proto_register(pp->prot, 1); 55816 err = proto_register(pp->prot, 1);
57076diff -urNp linux-2.6.32.24/net/rds/page.c linux-2.6.32.24/net/rds/page.c 55817diff -urNp linux-2.6.35.7/net/rds/page.c linux-2.6.35.7/net/rds/page.c
57077--- linux-2.6.32.24/net/rds/page.c 2010-08-13 16:24:37.000000000 -0400 55818--- linux-2.6.35.7/net/rds/page.c 2010-08-26 19:47:12.000000000 -0400
57078+++ linux-2.6.32.24/net/rds/page.c 2010-10-23 19:59:20.000000000 -0400 55819+++ linux-2.6.35.7/net/rds/page.c 2010-10-19 18:14:31.000000000 -0400
57079@@ -56,30 +56,17 @@ int rds_page_copy_user(struct page *page 55820@@ -57,30 +57,17 @@ int rds_page_copy_user(struct page *page
57080 unsigned long ret; 55821 unsigned long ret;
57081 void *addr; 55822 void *addr;
57082 55823
@@ -57114,10 +55855,10 @@ diff -urNp linux-2.6.32.24/net/rds/page.c linux-2.6.32.24/net/rds/page.c
57114 } 55855 }
57115 EXPORT_SYMBOL_GPL(rds_page_copy_user); 55856 EXPORT_SYMBOL_GPL(rds_page_copy_user);
57116 55857
57117diff -urNp linux-2.6.32.24/net/rose/af_rose.c linux-2.6.32.24/net/rose/af_rose.c 55858diff -urNp linux-2.6.35.7/net/rose/af_rose.c linux-2.6.35.7/net/rose/af_rose.c
57118--- linux-2.6.32.24/net/rose/af_rose.c 2010-08-13 16:24:37.000000000 -0400 55859--- linux-2.6.35.7/net/rose/af_rose.c 2010-08-26 19:47:12.000000000 -0400
57119+++ linux-2.6.32.24/net/rose/af_rose.c 2010-10-23 19:59:20.000000000 -0400 55860+++ linux-2.6.35.7/net/rose/af_rose.c 2010-09-20 17:16:28.000000000 -0400
57120@@ -677,7 +677,7 @@ static int rose_bind(struct socket *sock 55861@@ -679,7 +679,7 @@ static int rose_bind(struct socket *sock
57121 if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis > 1) 55862 if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis > 1)
57122 return -EINVAL; 55863 return -EINVAL;
57123 55864
@@ -57126,7 +55867,7 @@ diff -urNp linux-2.6.32.24/net/rose/af_rose.c linux-2.6.32.24/net/rose/af_rose.c
57126 return -EINVAL; 55867 return -EINVAL;
57127 55868
57128 if ((dev = rose_dev_get(&addr->srose_addr)) == NULL) { 55869 if ((dev = rose_dev_get(&addr->srose_addr)) == NULL) {
57129@@ -737,7 +737,7 @@ static int rose_connect(struct socket *s 55870@@ -739,7 +739,7 @@ static int rose_connect(struct socket *s
57130 if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis > 1) 55871 if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis > 1)
57131 return -EINVAL; 55872 return -EINVAL;
57132 55873
@@ -57135,10 +55876,10 @@ diff -urNp linux-2.6.32.24/net/rose/af_rose.c linux-2.6.32.24/net/rose/af_rose.c
57135 return -EINVAL; 55876 return -EINVAL;
57136 55877
57137 /* Source + Destination digis should not exceed ROSE_MAX_DIGIS */ 55878 /* Source + Destination digis should not exceed ROSE_MAX_DIGIS */
57138diff -urNp linux-2.6.32.24/net/sctp/auth.c linux-2.6.32.24/net/sctp/auth.c 55879diff -urNp linux-2.6.35.7/net/sctp/auth.c linux-2.6.35.7/net/sctp/auth.c
57139--- linux-2.6.32.24/net/sctp/auth.c 2010-08-13 16:24:37.000000000 -0400 55880--- linux-2.6.35.7/net/sctp/auth.c 2010-08-26 19:47:12.000000000 -0400
57140+++ linux-2.6.32.24/net/sctp/auth.c 2010-10-23 19:59:20.000000000 -0400 55881+++ linux-2.6.35.7/net/sctp/auth.c 2010-09-28 18:50:22.000000000 -0400
57141@@ -542,16 +542,20 @@ struct sctp_hmac *sctp_auth_asoc_get_hma 55882@@ -543,16 +543,20 @@ struct sctp_hmac *sctp_auth_asoc_get_hma
57142 id = ntohs(hmacs->hmac_ids[i]); 55883 id = ntohs(hmacs->hmac_ids[i]);
57143 55884
57144 /* Check the id is in the supported range */ 55885 /* Check the id is in the supported range */
@@ -57161,10 +55902,10 @@ diff -urNp linux-2.6.32.24/net/sctp/auth.c linux-2.6.32.24/net/sctp/auth.c
57161 55902
57162 break; 55903 break;
57163 } 55904 }
57164diff -urNp linux-2.6.32.24/net/sctp/socket.c linux-2.6.32.24/net/sctp/socket.c 55905diff -urNp linux-2.6.35.7/net/sctp/socket.c linux-2.6.35.7/net/sctp/socket.c
57165--- linux-2.6.32.24/net/sctp/socket.c 2010-08-13 16:24:37.000000000 -0400 55906--- linux-2.6.35.7/net/sctp/socket.c 2010-08-26 19:47:12.000000000 -0400
57166+++ linux-2.6.32.24/net/sctp/socket.c 2010-10-23 19:59:20.000000000 -0400 55907+++ linux-2.6.35.7/net/sctp/socket.c 2010-09-17 20:12:09.000000000 -0400
57167@@ -1482,7 +1482,7 @@ SCTP_STATIC int sctp_sendmsg(struct kioc 55908@@ -1483,7 +1483,7 @@ SCTP_STATIC int sctp_sendmsg(struct kioc
57168 struct sctp_sndrcvinfo *sinfo; 55909 struct sctp_sndrcvinfo *sinfo;
57169 struct sctp_initmsg *sinit; 55910 struct sctp_initmsg *sinit;
57170 sctp_assoc_t associd = 0; 55911 sctp_assoc_t associd = 0;
@@ -57173,48 +55914,36 @@ diff -urNp linux-2.6.32.24/net/sctp/socket.c linux-2.6.32.24/net/sctp/socket.c
57173 int err; 55914 int err;
57174 sctp_scope_t scope; 55915 sctp_scope_t scope;
57175 long timeo; 55916 long timeo;
57176@@ -5802,7 +5802,6 @@ pp_found: 55917@@ -4387,7 +4387,7 @@ static int sctp_getsockopt_peer_addrs(st
57177 */ 55918 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len;
57178 int reuse = sk->sk_reuse; 55919 if (space_left < addrlen)
57179 struct sock *sk2; 55920 return -ENOMEM;
57180- struct hlist_node *node; 55921- if (copy_to_user(to, &temp, addrlen))
57181 55922+ if (addrlen > sizeof(temp) || copy_to_user(to, &temp, addrlen))
57182 SCTP_DEBUG_PRINTK("sctp_get_port() found a possible match\n"); 55923 return -EFAULT;
57183 if (pp->fastreuse && sk->sk_reuse && 55924 to += addrlen;
57184diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c 55925 cnt++;
57185--- linux-2.6.32.24/net/socket.c 2010-08-13 16:24:37.000000000 -0400 55926diff -urNp linux-2.6.35.7/net/socket.c linux-2.6.35.7/net/socket.c
57186+++ linux-2.6.32.24/net/socket.c 2010-10-23 19:59:20.000000000 -0400 55927--- linux-2.6.35.7/net/socket.c 2010-08-26 19:47:12.000000000 -0400
57187@@ -87,6 +87,7 @@ 55928+++ linux-2.6.35.7/net/socket.c 2010-10-20 17:37:57.000000000 -0400
57188 #include <linux/wireless.h> 55929@@ -88,6 +88,7 @@
57189 #include <linux/nsproxy.h> 55930 #include <linux/nsproxy.h>
57190 #include <linux/magic.h> 55931 #include <linux/magic.h>
55932 #include <linux/slab.h>
57191+#include <linux/in.h> 55933+#include <linux/in.h>
57192 55934
57193 #include <asm/uaccess.h> 55935 #include <asm/uaccess.h>
57194 #include <asm/unistd.h> 55936 #include <asm/unistd.h>
57195@@ -97,6 +98,21 @@ 55937@@ -105,6 +106,8 @@
57196 #include <net/sock.h> 55938 #include <linux/sockios.h>
57197 #include <linux/netfilter.h> 55939 #include <linux/atalk.h>
57198 55940
57199+extern void gr_attach_curr_ip(const struct sock *sk); 55941+#include <linux/grsock.h>
57200+extern int gr_handle_sock_all(const int family, const int type,
57201+ const int protocol);
57202+extern int gr_handle_sock_server(const struct sockaddr *sck);
57203+extern int gr_handle_sock_server_other(const struct sock *sck);
57204+extern int gr_handle_sock_client(const struct sockaddr *sck);
57205+extern int gr_search_connect(struct socket * sock,
57206+ struct sockaddr_in * addr);
57207+extern int gr_search_bind(struct socket * sock,
57208+ struct sockaddr_in * addr);
57209+extern int gr_search_listen(struct socket * sock);
57210+extern int gr_search_accept(struct socket * sock);
57211+extern int gr_search_socket(const int domain, const int type,
57212+ const int protocol);
57213+ 55942+
57214 static int sock_no_open(struct inode *irrelevant, struct file *dontcare); 55943 static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
57215 static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, 55944 static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
57216 unsigned long nr_segs, loff_t pos); 55945 unsigned long nr_segs, loff_t pos);
57217@@ -298,7 +314,7 @@ static int sockfs_get_sb(struct file_sys 55946@@ -322,7 +325,7 @@ static int sockfs_get_sb(struct file_sys
57218 mnt); 55947 mnt);
57219 } 55948 }
57220 55949
@@ -57223,7 +55952,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57223 55952
57224 static struct file_system_type sock_fs_type = { 55953 static struct file_system_type sock_fs_type = {
57225 .name = "sockfs", 55954 .name = "sockfs",
57226@@ -1154,6 +1170,8 @@ static int __sock_create(struct net *net 55955@@ -1162,6 +1165,8 @@ static int __sock_create(struct net *net
57227 return -EAFNOSUPPORT; 55956 return -EAFNOSUPPORT;
57228 if (type < 0 || type >= SOCK_MAX) 55957 if (type < 0 || type >= SOCK_MAX)
57229 return -EINVAL; 55958 return -EINVAL;
@@ -57232,7 +55961,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57232 55961
57233 /* Compatibility. 55962 /* Compatibility.
57234 55963
57235@@ -1283,6 +1301,16 @@ SYSCALL_DEFINE3(socket, int, family, int 55964@@ -1291,6 +1296,16 @@ SYSCALL_DEFINE3(socket, int, family, int
57236 if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) 55965 if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK))
57237 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; 55966 flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK;
57238 55967
@@ -57249,7 +55978,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57249 retval = sock_create(family, type, protocol, &sock); 55978 retval = sock_create(family, type, protocol, &sock);
57250 if (retval < 0) 55979 if (retval < 0)
57251 goto out; 55980 goto out;
57252@@ -1415,6 +1443,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct so 55981@@ -1403,6 +1418,14 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
57253 if (sock) { 55982 if (sock) {
57254 err = move_addr_to_kernel(umyaddr, addrlen, (struct sockaddr *)&address); 55983 err = move_addr_to_kernel(umyaddr, addrlen, (struct sockaddr *)&address);
57255 if (err >= 0) { 55984 if (err >= 0) {
@@ -57264,7 +55993,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57264 err = security_socket_bind(sock, 55993 err = security_socket_bind(sock,
57265 (struct sockaddr *)&address, 55994 (struct sockaddr *)&address,
57266 addrlen); 55995 addrlen);
57267@@ -1423,6 +1459,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct so 55996@@ -1411,6 +1434,7 @@ SYSCALL_DEFINE3(bind, int, fd, struct so
57268 (struct sockaddr *) 55997 (struct sockaddr *)
57269 &address, addrlen); 55998 &address, addrlen);
57270 } 55999 }
@@ -57272,7 +56001,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57272 fput_light(sock->file, fput_needed); 56001 fput_light(sock->file, fput_needed);
57273 } 56002 }
57274 return err; 56003 return err;
57275@@ -1446,10 +1483,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, ba 56004@@ -1434,10 +1458,20 @@ SYSCALL_DEFINE2(listen, int, fd, int, ba
57276 if ((unsigned)backlog > somaxconn) 56005 if ((unsigned)backlog > somaxconn)
57277 backlog = somaxconn; 56006 backlog = somaxconn;
57278 56007
@@ -57293,7 +56022,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57293 fput_light(sock->file, fput_needed); 56022 fput_light(sock->file, fput_needed);
57294 } 56023 }
57295 return err; 56024 return err;
57296@@ -1492,6 +1539,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct 56025@@ -1480,6 +1514,18 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
57297 newsock->type = sock->type; 56026 newsock->type = sock->type;
57298 newsock->ops = sock->ops; 56027 newsock->ops = sock->ops;
57299 56028
@@ -57312,7 +56041,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57312 /* 56041 /*
57313 * We don't need try_module_get here, as the listening socket (sock) 56042 * We don't need try_module_get here, as the listening socket (sock)
57314 * has the protocol module (sock->ops->owner) held. 56043 * has the protocol module (sock->ops->owner) held.
57315@@ -1534,6 +1593,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct 56044@@ -1518,6 +1564,8 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
57316 fd_install(newfd, newfile); 56045 fd_install(newfd, newfile);
57317 err = newfd; 56046 err = newfd;
57318 56047
@@ -57321,7 +56050,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57321 out_put: 56050 out_put:
57322 fput_light(sock->file, fput_needed); 56051 fput_light(sock->file, fput_needed);
57323 out: 56052 out:
57324@@ -1571,6 +1632,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct 56053@@ -1550,6 +1598,7 @@ SYSCALL_DEFINE3(connect, int, fd, struct
57325 int, addrlen) 56054 int, addrlen)
57326 { 56055 {
57327 struct socket *sock; 56056 struct socket *sock;
@@ -57329,7 +56058,7 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57329 struct sockaddr_storage address; 56058 struct sockaddr_storage address;
57330 int err, fput_needed; 56059 int err, fput_needed;
57331 56060
57332@@ -1581,6 +1643,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct 56061@@ -1560,6 +1609,17 @@ SYSCALL_DEFINE3(connect, int, fd, struct
57333 if (err < 0) 56062 if (err < 0)
57334 goto out_put; 56063 goto out_put;
57335 56064
@@ -57347,37 +56076,36 @@ diff -urNp linux-2.6.32.24/net/socket.c linux-2.6.32.24/net/socket.c
57347 err = 56076 err =
57348 security_socket_connect(sock, (struct sockaddr *)&address, addrlen); 56077 security_socket_connect(sock, (struct sockaddr *)&address, addrlen);
57349 if (err) 56078 if (err)
57350diff -urNp linux-2.6.32.24/net/sunrpc/sched.c linux-2.6.32.24/net/sunrpc/sched.c 56079diff -urNp linux-2.6.35.7/net/sunrpc/sched.c linux-2.6.35.7/net/sunrpc/sched.c
57351--- linux-2.6.32.24/net/sunrpc/sched.c 2010-08-13 16:24:37.000000000 -0400 56080--- linux-2.6.35.7/net/sunrpc/sched.c 2010-08-26 19:47:12.000000000 -0400
57352+++ linux-2.6.32.24/net/sunrpc/sched.c 2010-10-23 19:59:20.000000000 -0400 56081+++ linux-2.6.35.7/net/sunrpc/sched.c 2010-09-17 20:12:09.000000000 -0400
57353@@ -234,10 +234,10 @@ static int rpc_wait_bit_killable(void *w 56082@@ -234,9 +234,9 @@ static int rpc_wait_bit_killable(void *w
57354 #ifdef RPC_DEBUG 56083 #ifdef RPC_DEBUG
57355 static void rpc_task_set_debuginfo(struct rpc_task *task) 56084 static void rpc_task_set_debuginfo(struct rpc_task *task)
57356 { 56085 {
57357- static atomic_t rpc_pid; 56086- static atomic_t rpc_pid;
57358+ static atomic_unchecked_t rpc_pid; 56087+ static atomic_unchecked_t rpc_pid;
57359 56088
57360 task->tk_magic = RPC_TASK_MAGIC_ID;
57361- task->tk_pid = atomic_inc_return(&rpc_pid); 56089- task->tk_pid = atomic_inc_return(&rpc_pid);
57362+ task->tk_pid = atomic_inc_return_unchecked(&rpc_pid); 56090+ task->tk_pid = atomic_inc_return_unchecked(&rpc_pid);
57363 } 56091 }
57364 #else 56092 #else
57365 static inline void rpc_task_set_debuginfo(struct rpc_task *task) 56093 static inline void rpc_task_set_debuginfo(struct rpc_task *task)
57366diff -urNp linux-2.6.32.24/net/sunrpc/xprtrdma/svc_rdma.c linux-2.6.32.24/net/sunrpc/xprtrdma/svc_rdma.c 56094diff -urNp linux-2.6.35.7/net/sunrpc/xprtrdma/svc_rdma.c linux-2.6.35.7/net/sunrpc/xprtrdma/svc_rdma.c
57367--- linux-2.6.32.24/net/sunrpc/xprtrdma/svc_rdma.c 2010-08-13 16:24:37.000000000 -0400 56095--- linux-2.6.35.7/net/sunrpc/xprtrdma/svc_rdma.c 2010-08-26 19:47:12.000000000 -0400
57368+++ linux-2.6.32.24/net/sunrpc/xprtrdma/svc_rdma.c 2010-10-23 19:59:20.000000000 -0400 56096+++ linux-2.6.35.7/net/sunrpc/xprtrdma/svc_rdma.c 2010-09-17 20:12:37.000000000 -0400
57369@@ -105,7 +105,7 @@ static int read_reset_stat(ctl_table *ta 56097@@ -106,7 +106,7 @@ static int read_reset_stat(ctl_table *ta
57370 len -= *ppos; 56098 len -= *ppos;
57371 if (len > *lenp) 56099 if (len > *lenp)
57372 len = *lenp; 56100 len = *lenp;
57373- if (len && copy_to_user(buffer, str_buf, len)) 56101- if (len && copy_to_user(buffer, str_buf, len))
57374+ if (len > sizeof str_buf || (len && copy_to_user(buffer, str_buf, len))) 56102+ if (len > sizeof(str_buf) || (len && copy_to_user(buffer, str_buf, len)))
57375 return -EFAULT; 56103 return -EFAULT;
57376 *lenp = len; 56104 *lenp = len;
57377 *ppos += len; 56105 *ppos += len;
57378diff -urNp linux-2.6.32.24/net/sysctl_net.c linux-2.6.32.24/net/sysctl_net.c 56106diff -urNp linux-2.6.35.7/net/sysctl_net.c linux-2.6.35.7/net/sysctl_net.c
57379--- linux-2.6.32.24/net/sysctl_net.c 2010-08-13 16:24:37.000000000 -0400 56107--- linux-2.6.35.7/net/sysctl_net.c 2010-08-26 19:47:12.000000000 -0400
57380+++ linux-2.6.32.24/net/sysctl_net.c 2010-10-23 19:59:20.000000000 -0400 56108+++ linux-2.6.35.7/net/sysctl_net.c 2010-09-17 20:12:37.000000000 -0400
57381@@ -46,7 +46,7 @@ static int net_ctl_permissions(struct ct 56109@@ -46,7 +46,7 @@ static int net_ctl_permissions(struct ct
57382 struct ctl_table *table) 56110 struct ctl_table *table)
57383 { 56111 {
@@ -57387,10 +56115,10 @@ diff -urNp linux-2.6.32.24/net/sysctl_net.c linux-2.6.32.24/net/sysctl_net.c
57387 int mode = (table->mode >> 6) & 7; 56115 int mode = (table->mode >> 6) & 7;
57388 return (mode << 6) | (mode << 3) | mode; 56116 return (mode << 6) | (mode << 3) | mode;
57389 } 56117 }
57390diff -urNp linux-2.6.32.24/net/tipc/socket.c linux-2.6.32.24/net/tipc/socket.c 56118diff -urNp linux-2.6.35.7/net/tipc/socket.c linux-2.6.35.7/net/tipc/socket.c
57391--- linux-2.6.32.24/net/tipc/socket.c 2010-08-13 16:24:37.000000000 -0400 56119--- linux-2.6.35.7/net/tipc/socket.c 2010-08-26 19:47:12.000000000 -0400
57392+++ linux-2.6.32.24/net/tipc/socket.c 2010-10-23 19:59:20.000000000 -0400 56120+++ linux-2.6.35.7/net/tipc/socket.c 2010-09-17 20:12:09.000000000 -0400
57393@@ -1449,8 +1449,9 @@ static int connect(struct socket *sock, 56121@@ -1451,8 +1451,9 @@ static int connect(struct socket *sock,
57394 } else { 56122 } else {
57395 if (res == 0) 56123 if (res == 0)
57396 res = -ETIMEDOUT; 56124 res = -ETIMEDOUT;
@@ -57402,10 +56130,10 @@ diff -urNp linux-2.6.32.24/net/tipc/socket.c linux-2.6.32.24/net/tipc/socket.c
57402 sock->state = SS_DISCONNECTING; 56130 sock->state = SS_DISCONNECTING;
57403 } 56131 }
57404 56132
57405diff -urNp linux-2.6.32.24/net/unix/af_unix.c linux-2.6.32.24/net/unix/af_unix.c 56133diff -urNp linux-2.6.35.7/net/unix/af_unix.c linux-2.6.35.7/net/unix/af_unix.c
57406--- linux-2.6.32.24/net/unix/af_unix.c 2010-09-26 17:26:06.000000000 -0400 56134--- linux-2.6.35.7/net/unix/af_unix.c 2010-09-26 17:32:11.000000000 -0400
57407+++ linux-2.6.32.24/net/unix/af_unix.c 2010-10-23 19:59:20.000000000 -0400 56135+++ linux-2.6.35.7/net/unix/af_unix.c 2010-09-26 17:32:52.000000000 -0400
57408@@ -743,6 +743,12 @@ static struct sock *unix_find_other(stru 56136@@ -745,6 +745,12 @@ static struct sock *unix_find_other(stru
57409 err = -ECONNREFUSED; 56137 err = -ECONNREFUSED;
57410 if (!S_ISSOCK(inode->i_mode)) 56138 if (!S_ISSOCK(inode->i_mode))
57411 goto put_fail; 56139 goto put_fail;
@@ -57418,7 +56146,7 @@ diff -urNp linux-2.6.32.24/net/unix/af_unix.c linux-2.6.32.24/net/unix/af_unix.c
57418 u = unix_find_socket_byinode(net, inode); 56146 u = unix_find_socket_byinode(net, inode);
57419 if (!u) 56147 if (!u)
57420 goto put_fail; 56148 goto put_fail;
57421@@ -763,6 +769,13 @@ static struct sock *unix_find_other(stru 56149@@ -765,6 +771,13 @@ static struct sock *unix_find_other(stru
57422 if (u) { 56150 if (u) {
57423 struct dentry *dentry; 56151 struct dentry *dentry;
57424 dentry = unix_sk(u)->dentry; 56152 dentry = unix_sk(u)->dentry;
@@ -57432,7 +56160,7 @@ diff -urNp linux-2.6.32.24/net/unix/af_unix.c linux-2.6.32.24/net/unix/af_unix.c
57432 if (dentry) 56160 if (dentry)
57433 touch_atime(unix_sk(u)->mnt, dentry); 56161 touch_atime(unix_sk(u)->mnt, dentry);
57434 } else 56162 } else
57435@@ -848,11 +861,18 @@ static int unix_bind(struct socket *sock 56163@@ -850,11 +863,18 @@ static int unix_bind(struct socket *sock
57436 err = security_path_mknod(&nd.path, dentry, mode, 0); 56164 err = security_path_mknod(&nd.path, dentry, mode, 0);
57437 if (err) 56165 if (err)
57438 goto out_mknod_drop_write; 56166 goto out_mknod_drop_write;
@@ -57451,7 +56179,7 @@ diff -urNp linux-2.6.32.24/net/unix/af_unix.c linux-2.6.32.24/net/unix/af_unix.c
57451 mutex_unlock(&nd.path.dentry->d_inode->i_mutex); 56179 mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
57452 dput(nd.path.dentry); 56180 dput(nd.path.dentry);
57453 nd.path.dentry = dentry; 56181 nd.path.dentry = dentry;
57454@@ -870,6 +890,10 @@ out_mknod_drop_write: 56182@@ -872,6 +892,10 @@ out_mknod_drop_write:
57455 goto out_unlock; 56183 goto out_unlock;
57456 } 56184 }
57457 56185
@@ -57474,10 +56202,22 @@ diff -urNp linux-2.6.32.24/net/unix/af_unix.c linux-2.6.32.24/net/unix/af_unix.c
57474 atomic_read(&s->sk_refcnt), 56202 atomic_read(&s->sk_refcnt),
57475 0, 56203 0,
57476 s->sk_state == TCP_LISTEN ? __SO_ACCEPTCON : 0, 56204 s->sk_state == TCP_LISTEN ? __SO_ACCEPTCON : 0,
57477diff -urNp linux-2.6.32.24/net/wireless/wext.c linux-2.6.32.24/net/wireless/wext.c 56205diff -urNp linux-2.6.35.7/net/wireless/reg.c linux-2.6.35.7/net/wireless/reg.c
57478--- linux-2.6.32.24/net/wireless/wext.c 2010-09-20 17:26:42.000000000 -0400 56206--- linux-2.6.35.7/net/wireless/reg.c 2010-08-26 19:47:12.000000000 -0400
57479+++ linux-2.6.32.24/net/wireless/wext.c 2010-10-23 19:59:20.000000000 -0400 56207+++ linux-2.6.35.7/net/wireless/reg.c 2010-09-17 20:12:09.000000000 -0400
57480@@ -816,8 +816,7 @@ static int ioctl_standard_iw_point(struc 56208@@ -50,7 +50,7 @@
56209 printk(KERN_DEBUG format , ## args); \
56210 } while (0)
56211 #else
56212-#define REG_DBG_PRINT(args...)
56213+#define REG_DBG_PRINT(args...) do {} while (0)
56214 #endif
56215
56216 /* Receipt of information from last regulatory request */
56217diff -urNp linux-2.6.35.7/net/wireless/wext-core.c linux-2.6.35.7/net/wireless/wext-core.c
56218--- linux-2.6.35.7/net/wireless/wext-core.c 2010-09-20 17:33:09.000000000 -0400
56219+++ linux-2.6.35.7/net/wireless/wext-core.c 2010-09-23 19:57:26.000000000 -0400
56220@@ -744,8 +744,7 @@ static int ioctl_standard_iw_point(struc
57481 */ 56221 */
57482 56222
57483 /* Support for very large requests */ 56223 /* Support for very large requests */
@@ -57487,7 +56227,7 @@ diff -urNp linux-2.6.32.24/net/wireless/wext.c linux-2.6.32.24/net/wireless/wext
57487 /* Allow userspace to GET more than max so 56227 /* Allow userspace to GET more than max so
57488 * we can support any size GET requests. 56228 * we can support any size GET requests.
57489 * There is still a limit : -ENOMEM. 56229 * There is still a limit : -ENOMEM.
57490@@ -854,22 +853,6 @@ static int ioctl_standard_iw_point(struc 56230@@ -782,22 +781,6 @@ static int ioctl_standard_iw_point(struc
57491 } 56231 }
57492 } 56232 }
57493 56233
@@ -57510,10 +56250,10 @@ diff -urNp linux-2.6.32.24/net/wireless/wext.c linux-2.6.32.24/net/wireless/wext
57510 err = handler(dev, info, (union iwreq_data *) iwp, extra); 56250 err = handler(dev, info, (union iwreq_data *) iwp, extra);
57511 56251
57512 iwp->length += essid_compat; 56252 iwp->length += essid_compat;
57513diff -urNp linux-2.6.32.24/net/xfrm/xfrm_policy.c linux-2.6.32.24/net/xfrm/xfrm_policy.c 56253diff -urNp linux-2.6.35.7/net/xfrm/xfrm_policy.c linux-2.6.35.7/net/xfrm/xfrm_policy.c
57514--- linux-2.6.32.24/net/xfrm/xfrm_policy.c 2010-08-13 16:24:37.000000000 -0400 56254--- linux-2.6.35.7/net/xfrm/xfrm_policy.c 2010-08-26 19:47:12.000000000 -0400
57515+++ linux-2.6.32.24/net/xfrm/xfrm_policy.c 2010-10-23 19:59:20.000000000 -0400 56255+++ linux-2.6.35.7/net/xfrm/xfrm_policy.c 2010-09-17 20:12:09.000000000 -0400
57516@@ -1477,7 +1477,7 @@ free_dst: 56256@@ -1502,7 +1502,7 @@ free_dst:
57517 goto out; 56257 goto out;
57518 } 56258 }
57519 56259
@@ -57522,7 +56262,7 @@ diff -urNp linux-2.6.32.24/net/xfrm/xfrm_policy.c linux-2.6.32.24/net/xfrm/xfrm_
57522 xfrm_dst_alloc_copy(void **target, void *src, int size) 56262 xfrm_dst_alloc_copy(void **target, void *src, int size)
57523 { 56263 {
57524 if (!*target) { 56264 if (!*target) {
57525@@ -1489,7 +1489,7 @@ xfrm_dst_alloc_copy(void **target, void 56265@@ -1514,7 +1514,7 @@ xfrm_dst_alloc_copy(void **target, void
57526 return 0; 56266 return 0;
57527 } 56267 }
57528 56268
@@ -57531,7 +56271,7 @@ diff -urNp linux-2.6.32.24/net/xfrm/xfrm_policy.c linux-2.6.32.24/net/xfrm/xfrm_
57531 xfrm_dst_update_parent(struct dst_entry *dst, struct xfrm_selector *sel) 56271 xfrm_dst_update_parent(struct dst_entry *dst, struct xfrm_selector *sel)
57532 { 56272 {
57533 #ifdef CONFIG_XFRM_SUB_POLICY 56273 #ifdef CONFIG_XFRM_SUB_POLICY
57534@@ -1501,7 +1501,7 @@ xfrm_dst_update_parent(struct dst_entry 56274@@ -1526,7 +1526,7 @@ xfrm_dst_update_parent(struct dst_entry
57535 #endif 56275 #endif
57536 } 56276 }
57537 56277
@@ -57540,21 +56280,9 @@ diff -urNp linux-2.6.32.24/net/xfrm/xfrm_policy.c linux-2.6.32.24/net/xfrm/xfrm_
57540 xfrm_dst_update_origin(struct dst_entry *dst, struct flowi *fl) 56280 xfrm_dst_update_origin(struct dst_entry *dst, struct flowi *fl)
57541 { 56281 {
57542 #ifdef CONFIG_XFRM_SUB_POLICY 56282 #ifdef CONFIG_XFRM_SUB_POLICY
57543diff -urNp linux-2.6.32.24/samples/kobject/kset-example.c linux-2.6.32.24/samples/kobject/kset-example.c 56283diff -urNp linux-2.6.35.7/scripts/basic/fixdep.c linux-2.6.35.7/scripts/basic/fixdep.c
57544--- linux-2.6.32.24/samples/kobject/kset-example.c 2010-08-13 16:24:37.000000000 -0400 56284--- linux-2.6.35.7/scripts/basic/fixdep.c 2010-08-26 19:47:12.000000000 -0400
57545+++ linux-2.6.32.24/samples/kobject/kset-example.c 2010-10-23 19:59:20.000000000 -0400 56285+++ linux-2.6.35.7/scripts/basic/fixdep.c 2010-09-17 20:12:09.000000000 -0400
57546@@ -87,7 +87,7 @@ static ssize_t foo_attr_store(struct kob
57547 }
57548
57549 /* Our custom sysfs_ops that we will associate with our ktype later on */
57550-static struct sysfs_ops foo_sysfs_ops = {
57551+static const struct sysfs_ops foo_sysfs_ops = {
57552 .show = foo_attr_show,
57553 .store = foo_attr_store,
57554 };
57555diff -urNp linux-2.6.32.24/scripts/basic/fixdep.c linux-2.6.32.24/scripts/basic/fixdep.c
57556--- linux-2.6.32.24/scripts/basic/fixdep.c 2010-08-13 16:24:37.000000000 -0400
57557+++ linux-2.6.32.24/scripts/basic/fixdep.c 2010-10-23 19:59:20.000000000 -0400
57558@@ -222,9 +222,9 @@ static void use_config(char *m, int slen 56286@@ -222,9 +222,9 @@ static void use_config(char *m, int slen
57559 56287
57560 static void parse_config_file(char *map, size_t len) 56288 static void parse_config_file(char *map, size_t len)
@@ -57576,9 +56304,9 @@ diff -urNp linux-2.6.32.24/scripts/basic/fixdep.c linux-2.6.32.24/scripts/basic/
57576 56304
57577 if (*p != INT_CONF) { 56305 if (*p != INT_CONF) {
57578 fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n", 56306 fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
57579diff -urNp linux-2.6.32.24/scripts/kallsyms.c linux-2.6.32.24/scripts/kallsyms.c 56307diff -urNp linux-2.6.35.7/scripts/kallsyms.c linux-2.6.35.7/scripts/kallsyms.c
57580--- linux-2.6.32.24/scripts/kallsyms.c 2010-08-13 16:24:37.000000000 -0400 56308--- linux-2.6.35.7/scripts/kallsyms.c 2010-08-26 19:47:12.000000000 -0400
57581+++ linux-2.6.32.24/scripts/kallsyms.c 2010-10-23 19:59:20.000000000 -0400 56309+++ linux-2.6.35.7/scripts/kallsyms.c 2010-09-17 20:12:09.000000000 -0400
57582@@ -43,10 +43,10 @@ struct text_range { 56310@@ -43,10 +43,10 @@ struct text_range {
57583 56311
57584 static unsigned long long _text; 56312 static unsigned long long _text;
@@ -57594,9 +56322,9 @@ diff -urNp linux-2.6.32.24/scripts/kallsyms.c linux-2.6.32.24/scripts/kallsyms.c
57594 }; 56322 };
57595 #define text_range_text (&text_ranges[0]) 56323 #define text_range_text (&text_ranges[0])
57596 #define text_range_inittext (&text_ranges[1]) 56324 #define text_range_inittext (&text_ranges[1])
57597diff -urNp linux-2.6.32.24/scripts/mod/file2alias.c linux-2.6.32.24/scripts/mod/file2alias.c 56325diff -urNp linux-2.6.35.7/scripts/mod/file2alias.c linux-2.6.35.7/scripts/mod/file2alias.c
57598--- linux-2.6.32.24/scripts/mod/file2alias.c 2010-08-13 16:24:37.000000000 -0400 56326--- linux-2.6.35.7/scripts/mod/file2alias.c 2010-08-26 19:47:12.000000000 -0400
57599+++ linux-2.6.32.24/scripts/mod/file2alias.c 2010-10-23 19:59:20.000000000 -0400 56327+++ linux-2.6.35.7/scripts/mod/file2alias.c 2010-09-17 20:12:09.000000000 -0400
57600@@ -72,7 +72,7 @@ static void device_id_check(const char * 56328@@ -72,7 +72,7 @@ static void device_id_check(const char *
57601 unsigned long size, unsigned long id_size, 56329 unsigned long size, unsigned long id_size,
57602 void *symval) 56330 void *symval)
@@ -57613,9 +56341,9 @@ diff -urNp linux-2.6.32.24/scripts/mod/file2alias.c linux-2.6.32.24/scripts/mod/
57613- unsigned int bcdDevice_initial, int bcdDevice_initial_digits, 56341- unsigned int bcdDevice_initial, int bcdDevice_initial_digits,
57614+ unsigned int bcdDevice_initial, unsigned int bcdDevice_initial_digits, 56342+ unsigned int bcdDevice_initial, unsigned int bcdDevice_initial_digits,
57615 unsigned char range_lo, unsigned char range_hi, 56343 unsigned char range_lo, unsigned char range_hi,
57616 struct module *mod) 56344 unsigned char max, struct module *mod)
57617 { 56345 {
57618@@ -368,7 +368,7 @@ static void do_pnp_device_entry(void *sy 56346@@ -437,7 +437,7 @@ static void do_pnp_device_entry(void *sy
57619 for (i = 0; i < count; i++) { 56347 for (i = 0; i < count; i++) {
57620 const char *id = (char *)devs[i].id; 56348 const char *id = (char *)devs[i].id;
57621 char acpi_id[sizeof(devs[0].id)]; 56349 char acpi_id[sizeof(devs[0].id)];
@@ -57624,7 +56352,7 @@ diff -urNp linux-2.6.32.24/scripts/mod/file2alias.c linux-2.6.32.24/scripts/mod/
57624 56352
57625 buf_printf(&mod->dev_table_buf, 56353 buf_printf(&mod->dev_table_buf,
57626 "MODULE_ALIAS(\"pnp:d%s*\");\n", id); 56354 "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
57627@@ -398,7 +398,7 @@ static void do_pnp_card_entries(void *sy 56355@@ -467,7 +467,7 @@ static void do_pnp_card_entries(void *sy
57628 56356
57629 for (j = 0; j < PNP_MAX_DEVICES; j++) { 56357 for (j = 0; j < PNP_MAX_DEVICES; j++) {
57630 const char *id = (char *)card->devs[j].id; 56358 const char *id = (char *)card->devs[j].id;
@@ -57633,7 +56361,7 @@ diff -urNp linux-2.6.32.24/scripts/mod/file2alias.c linux-2.6.32.24/scripts/mod/
57633 int dup = 0; 56361 int dup = 0;
57634 56362
57635 if (!id[0]) 56363 if (!id[0])
57636@@ -424,7 +424,7 @@ static void do_pnp_card_entries(void *sy 56364@@ -493,7 +493,7 @@ static void do_pnp_card_entries(void *sy
57637 /* add an individual alias for every device entry */ 56365 /* add an individual alias for every device entry */
57638 if (!dup) { 56366 if (!dup) {
57639 char acpi_id[sizeof(card->devs[0].id)]; 56367 char acpi_id[sizeof(card->devs[0].id)];
@@ -57642,7 +56370,7 @@ diff -urNp linux-2.6.32.24/scripts/mod/file2alias.c linux-2.6.32.24/scripts/mod/
57642 56370
57643 buf_printf(&mod->dev_table_buf, 56371 buf_printf(&mod->dev_table_buf,
57644 "MODULE_ALIAS(\"pnp:d%s*\");\n", id); 56372 "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
57645@@ -699,7 +699,7 @@ static void dmi_ascii_filter(char *d, co 56373@@ -768,7 +768,7 @@ static void dmi_ascii_filter(char *d, co
57646 static int do_dmi_entry(const char *filename, struct dmi_system_id *id, 56374 static int do_dmi_entry(const char *filename, struct dmi_system_id *id,
57647 char *alias) 56375 char *alias)
57648 { 56376 {
@@ -57651,21 +56379,21 @@ diff -urNp linux-2.6.32.24/scripts/mod/file2alias.c linux-2.6.32.24/scripts/mod/
57651 56379
57652 sprintf(alias, "dmi*"); 56380 sprintf(alias, "dmi*");
57653 56381
57654diff -urNp linux-2.6.32.24/scripts/mod/modpost.c linux-2.6.32.24/scripts/mod/modpost.c 56382diff -urNp linux-2.6.35.7/scripts/mod/modpost.c linux-2.6.35.7/scripts/mod/modpost.c
57655--- linux-2.6.32.24/scripts/mod/modpost.c 2010-08-13 16:24:37.000000000 -0400 56383--- linux-2.6.35.7/scripts/mod/modpost.c 2010-08-26 19:47:12.000000000 -0400
57656+++ linux-2.6.32.24/scripts/mod/modpost.c 2010-10-23 19:59:20.000000000 -0400 56384+++ linux-2.6.35.7/scripts/mod/modpost.c 2010-09-17 20:12:09.000000000 -0400
57657@@ -835,6 +835,7 @@ enum mismatch { 56385@@ -846,6 +846,7 @@ enum mismatch {
57658 INIT_TO_EXIT, 56386 ANY_INIT_TO_ANY_EXIT,
57659 EXIT_TO_INIT, 56387 ANY_EXIT_TO_ANY_INIT,
57660 EXPORT_TO_INIT_EXIT, 56388 EXPORT_TO_INIT_EXIT,
57661+ DATA_TO_TEXT 56389+ DATA_TO_TEXT
57662 }; 56390 };
57663 56391
57664 struct sectioncheck { 56392 struct sectioncheck {
57665@@ -920,6 +921,12 @@ const struct sectioncheck sectioncheck[] 56393@@ -954,6 +955,12 @@ const struct sectioncheck sectioncheck[]
57666 .fromsec = { "__ksymtab*", NULL },
57667 .tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL }, 56394 .tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
57668 .mismatch = EXPORT_TO_INIT_EXIT 56395 .mismatch = EXPORT_TO_INIT_EXIT,
56396 .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
57669+}, 56397+},
57670+/* Do not reference code from writable data */ 56398+/* Do not reference code from writable data */
57671+{ 56399+{
@@ -57675,7 +56403,7 @@ diff -urNp linux-2.6.32.24/scripts/mod/modpost.c linux-2.6.32.24/scripts/mod/mod
57675 } 56403 }
57676 }; 56404 };
57677 56405
57678@@ -1024,10 +1031,10 @@ static Elf_Sym *find_elf_symbol(struct e 56406@@ -1060,10 +1067,10 @@ static Elf_Sym *find_elf_symbol(struct e
57679 continue; 56407 continue;
57680 if (ELF_ST_TYPE(sym->st_info) == STT_SECTION) 56408 if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
57681 continue; 56409 continue;
@@ -57688,10 +56416,10 @@ diff -urNp linux-2.6.32.24/scripts/mod/modpost.c linux-2.6.32.24/scripts/mod/mod
57688 if (d < 0) 56416 if (d < 0)
57689 d = addr - sym->st_value; 56417 d = addr - sym->st_value;
57690 if (d < distance) { 56418 if (d < distance) {
57691@@ -1268,6 +1275,14 @@ static void report_sec_mismatch(const ch 56419@@ -1306,6 +1313,14 @@ static void report_sec_mismatch(const ch
57692 "Fix this by removing the %sannotation of %s "
57693 "or drop the export.\n", 56420 "or drop the export.\n",
57694 tosym, sec2annotation(tosec), sec2annotation(tosec), tosym); 56421 tosym, sec2annotation(tosec), sec2annotation(tosec), tosym);
56422 break;
57695+ case DATA_TO_TEXT: 56423+ case DATA_TO_TEXT:
57696+/* 56424+/*
57697+ fprintf(stderr, 56425+ fprintf(stderr,
@@ -57700,10 +56428,10 @@ diff -urNp linux-2.6.32.24/scripts/mod/modpost.c linux-2.6.32.24/scripts/mod/mod
57700+ fromsym, to, sec2annotation(tosec), tosym, to_p); 56428+ fromsym, to, sec2annotation(tosec), tosym, to_p);
57701+*/ 56429+*/
57702+ break; 56430+ break;
57703 case NO_MISMATCH: 56431 }
57704 /* To get warnings on missing members */ 56432 fprintf(stderr, "\n");
57705 break; 56433 }
57706@@ -1651,7 +1666,7 @@ void __attribute__((format(printf, 2, 3) 56434@@ -1629,7 +1644,7 @@ void __attribute__((format(printf, 2, 3)
57707 va_end(ap); 56435 va_end(ap);
57708 } 56436 }
57709 56437
@@ -57712,7 +56440,7 @@ diff -urNp linux-2.6.32.24/scripts/mod/modpost.c linux-2.6.32.24/scripts/mod/mod
57712 { 56440 {
57713 if (buf->size - buf->pos < len) { 56441 if (buf->size - buf->pos < len) {
57714 buf->size += len + SZ; 56442 buf->size += len + SZ;
57715@@ -1863,7 +1878,7 @@ static void write_if_changed(struct buff 56443@@ -1841,7 +1856,7 @@ static void write_if_changed(struct buff
57716 if (fstat(fileno(file), &st) < 0) 56444 if (fstat(fileno(file), &st) < 0)
57717 goto close_write; 56445 goto close_write;
57718 56446
@@ -57721,9 +56449,9 @@ diff -urNp linux-2.6.32.24/scripts/mod/modpost.c linux-2.6.32.24/scripts/mod/mod
57721 goto close_write; 56449 goto close_write;
57722 56450
57723 tmp = NOFAIL(malloc(b->pos)); 56451 tmp = NOFAIL(malloc(b->pos));
57724diff -urNp linux-2.6.32.24/scripts/mod/modpost.h linux-2.6.32.24/scripts/mod/modpost.h 56452diff -urNp linux-2.6.35.7/scripts/mod/modpost.h linux-2.6.35.7/scripts/mod/modpost.h
57725--- linux-2.6.32.24/scripts/mod/modpost.h 2010-08-13 16:24:37.000000000 -0400 56453--- linux-2.6.35.7/scripts/mod/modpost.h 2010-08-26 19:47:12.000000000 -0400
57726+++ linux-2.6.32.24/scripts/mod/modpost.h 2010-10-23 19:59:20.000000000 -0400 56454+++ linux-2.6.35.7/scripts/mod/modpost.h 2010-09-17 20:12:09.000000000 -0400
57727@@ -92,15 +92,15 @@ void *do_nofail(void *ptr, const char *e 56455@@ -92,15 +92,15 @@ void *do_nofail(void *ptr, const char *e
57728 56456
57729 struct buffer { 56457 struct buffer {
@@ -57743,9 +56471,9 @@ diff -urNp linux-2.6.32.24/scripts/mod/modpost.h linux-2.6.32.24/scripts/mod/mod
57743 56471
57744 struct module { 56472 struct module {
57745 struct module *next; 56473 struct module *next;
57746diff -urNp linux-2.6.32.24/scripts/mod/sumversion.c linux-2.6.32.24/scripts/mod/sumversion.c 56474diff -urNp linux-2.6.35.7/scripts/mod/sumversion.c linux-2.6.35.7/scripts/mod/sumversion.c
57747--- linux-2.6.32.24/scripts/mod/sumversion.c 2010-08-13 16:24:37.000000000 -0400 56475--- linux-2.6.35.7/scripts/mod/sumversion.c 2010-08-26 19:47:12.000000000 -0400
57748+++ linux-2.6.32.24/scripts/mod/sumversion.c 2010-10-23 19:59:20.000000000 -0400 56476+++ linux-2.6.35.7/scripts/mod/sumversion.c 2010-09-17 20:12:09.000000000 -0400
57749@@ -455,7 +455,7 @@ static void write_version(const char *fi 56477@@ -455,7 +455,7 @@ static void write_version(const char *fi
57750 goto out; 56478 goto out;
57751 } 56479 }
@@ -57755,9 +56483,9 @@ diff -urNp linux-2.6.32.24/scripts/mod/sumversion.c linux-2.6.32.24/scripts/mod/
57755 warn("writing sum in %s failed: %s\n", 56483 warn("writing sum in %s failed: %s\n",
57756 filename, strerror(errno)); 56484 filename, strerror(errno));
57757 goto out; 56485 goto out;
57758diff -urNp linux-2.6.32.24/scripts/pnmtologo.c linux-2.6.32.24/scripts/pnmtologo.c 56486diff -urNp linux-2.6.35.7/scripts/pnmtologo.c linux-2.6.35.7/scripts/pnmtologo.c
57759--- linux-2.6.32.24/scripts/pnmtologo.c 2010-08-13 16:24:37.000000000 -0400 56487--- linux-2.6.35.7/scripts/pnmtologo.c 2010-08-26 19:47:12.000000000 -0400
57760+++ linux-2.6.32.24/scripts/pnmtologo.c 2010-10-23 19:59:20.000000000 -0400 56488+++ linux-2.6.35.7/scripts/pnmtologo.c 2010-09-17 20:12:09.000000000 -0400
57761@@ -237,14 +237,14 @@ static void write_header(void) 56489@@ -237,14 +237,14 @@ static void write_header(void)
57762 fprintf(out, " * Linux logo %s\n", logoname); 56490 fprintf(out, " * Linux logo %s\n", logoname);
57763 fputs(" */\n\n", out); 56491 fputs(" */\n\n", out);
@@ -57784,31 +56512,18 @@ diff -urNp linux-2.6.32.24/scripts/pnmtologo.c linux-2.6.32.24/scripts/pnmtologo
57784 logoname); 56512 logoname);
57785 write_hex_cnt = 0; 56513 write_hex_cnt = 0;
57786 for (i = 0; i < logo_clutsize; i++) { 56514 for (i = 0; i < logo_clutsize; i++) {
57787diff -urNp linux-2.6.32.24/security/capability.c linux-2.6.32.24/security/capability.c 56515diff -urNp linux-2.6.35.7/security/commoncap.c linux-2.6.35.7/security/commoncap.c
57788--- linux-2.6.32.24/security/capability.c 2010-08-13 16:24:37.000000000 -0400 56516--- linux-2.6.35.7/security/commoncap.c 2010-08-26 19:47:12.000000000 -0400
57789+++ linux-2.6.32.24/security/capability.c 2010-10-23 19:59:20.000000000 -0400 56517+++ linux-2.6.35.7/security/commoncap.c 2010-09-17 20:12:37.000000000 -0400
57790@@ -890,7 +890,7 @@ static void cap_audit_rule_free(void *ls 56518@@ -28,6 +28,7 @@
57791 }
57792 #endif /* CONFIG_AUDIT */
57793
57794-struct security_operations default_security_ops = {
57795+struct security_operations default_security_ops __read_only = {
57796 .name = "default",
57797 };
57798
57799diff -urNp linux-2.6.32.24/security/commoncap.c linux-2.6.32.24/security/commoncap.c
57800--- linux-2.6.32.24/security/commoncap.c 2010-08-13 16:24:37.000000000 -0400
57801+++ linux-2.6.32.24/security/commoncap.c 2010-10-23 19:59:20.000000000 -0400
57802@@ -27,7 +27,7 @@
57803 #include <linux/sched.h>
57804 #include <linux/prctl.h> 56519 #include <linux/prctl.h>
57805 #include <linux/securebits.h> 56520 #include <linux/securebits.h>
57806- 56521 #include <linux/syslog.h>
57807+#include <net/sock.h> 56522+#include <net/sock.h>
56523
57808 /* 56524 /*
57809 * If a non-root user executes a setuid-root binary in 56525 * If a non-root user executes a setuid-root binary in
57810 * !secure(SECURE_NOROOT) mode, then we raise capabilities. 56526@@ -51,9 +52,11 @@ static void warn_setuid_and_fcaps_mixed(
57811@@ -50,9 +50,11 @@ static void warn_setuid_and_fcaps_mixed(
57812 } 56527 }
57813 } 56528 }
57814 56529
@@ -57821,10 +56536,10 @@ diff -urNp linux-2.6.32.24/security/commoncap.c linux-2.6.32.24/security/commonc
57821 return 0; 56536 return 0;
57822 } 56537 }
57823 56538
57824diff -urNp linux-2.6.32.24/security/integrity/ima/ima_api.c linux-2.6.32.24/security/integrity/ima/ima_api.c 56539diff -urNp linux-2.6.35.7/security/integrity/ima/ima_api.c linux-2.6.35.7/security/integrity/ima/ima_api.c
57825--- linux-2.6.32.24/security/integrity/ima/ima_api.c 2010-08-13 16:24:37.000000000 -0400 56540--- linux-2.6.35.7/security/integrity/ima/ima_api.c 2010-08-26 19:47:12.000000000 -0400
57826+++ linux-2.6.32.24/security/integrity/ima/ima_api.c 2010-10-23 19:59:20.000000000 -0400 56541+++ linux-2.6.35.7/security/integrity/ima/ima_api.c 2010-09-17 20:12:09.000000000 -0400
57827@@ -74,7 +74,7 @@ void ima_add_violation(struct inode *ino 56542@@ -75,7 +75,7 @@ void ima_add_violation(struct inode *ino
57828 int result; 56543 int result;
57829 56544
57830 /* can overflow, only indicator */ 56545 /* can overflow, only indicator */
@@ -57833,10 +56548,10 @@ diff -urNp linux-2.6.32.24/security/integrity/ima/ima_api.c linux-2.6.32.24/secu
57833 56548
57834 entry = kmalloc(sizeof(*entry), GFP_KERNEL); 56549 entry = kmalloc(sizeof(*entry), GFP_KERNEL);
57835 if (!entry) { 56550 if (!entry) {
57836diff -urNp linux-2.6.32.24/security/integrity/ima/ima_fs.c linux-2.6.32.24/security/integrity/ima/ima_fs.c 56551diff -urNp linux-2.6.35.7/security/integrity/ima/ima_fs.c linux-2.6.35.7/security/integrity/ima/ima_fs.c
57837--- linux-2.6.32.24/security/integrity/ima/ima_fs.c 2010-08-13 16:24:37.000000000 -0400 56552--- linux-2.6.35.7/security/integrity/ima/ima_fs.c 2010-08-26 19:47:12.000000000 -0400
57838+++ linux-2.6.32.24/security/integrity/ima/ima_fs.c 2010-10-23 19:59:20.000000000 -0400 56553+++ linux-2.6.35.7/security/integrity/ima/ima_fs.c 2010-09-17 20:12:09.000000000 -0400
57839@@ -27,12 +27,12 @@ 56554@@ -28,12 +28,12 @@
57840 static int valid_policy = 1; 56555 static int valid_policy = 1;
57841 #define TMPBUFLEN 12 56556 #define TMPBUFLEN 12
57842 static ssize_t ima_show_htable_value(char __user *buf, size_t count, 56557 static ssize_t ima_show_htable_value(char __user *buf, size_t count,
@@ -57851,9 +56566,9 @@ diff -urNp linux-2.6.32.24/security/integrity/ima/ima_fs.c linux-2.6.32.24/secur
57851 return simple_read_from_buffer(buf, count, ppos, tmpbuf, len); 56566 return simple_read_from_buffer(buf, count, ppos, tmpbuf, len);
57852 } 56567 }
57853 56568
57854diff -urNp linux-2.6.32.24/security/integrity/ima/ima.h linux-2.6.32.24/security/integrity/ima/ima.h 56569diff -urNp linux-2.6.35.7/security/integrity/ima/ima.h linux-2.6.35.7/security/integrity/ima/ima.h
57855--- linux-2.6.32.24/security/integrity/ima/ima.h 2010-08-13 16:24:37.000000000 -0400 56570--- linux-2.6.35.7/security/integrity/ima/ima.h 2010-09-20 17:33:09.000000000 -0400
57856+++ linux-2.6.32.24/security/integrity/ima/ima.h 2010-10-23 19:59:20.000000000 -0400 56571+++ linux-2.6.35.7/security/integrity/ima/ima.h 2010-09-20 17:33:37.000000000 -0400
57857@@ -84,8 +84,8 @@ void ima_add_violation(struct inode *ino 56572@@ -84,8 +84,8 @@ void ima_add_violation(struct inode *ino
57858 extern spinlock_t ima_queue_lock; 56573 extern spinlock_t ima_queue_lock;
57859 56574
@@ -57865,10 +56580,10 @@ diff -urNp linux-2.6.32.24/security/integrity/ima/ima.h linux-2.6.32.24/security
57865 struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE]; 56580 struct hlist_head queue[IMA_MEASURE_HTABLE_SIZE];
57866 }; 56581 };
57867 extern struct ima_h_table ima_htable; 56582 extern struct ima_h_table ima_htable;
57868diff -urNp linux-2.6.32.24/security/integrity/ima/ima_queue.c linux-2.6.32.24/security/integrity/ima/ima_queue.c 56583diff -urNp linux-2.6.35.7/security/integrity/ima/ima_queue.c linux-2.6.35.7/security/integrity/ima/ima_queue.c
57869--- linux-2.6.32.24/security/integrity/ima/ima_queue.c 2010-08-13 16:24:37.000000000 -0400 56584--- linux-2.6.35.7/security/integrity/ima/ima_queue.c 2010-08-26 19:47:12.000000000 -0400
57870+++ linux-2.6.32.24/security/integrity/ima/ima_queue.c 2010-10-23 19:59:20.000000000 -0400 56585+++ linux-2.6.35.7/security/integrity/ima/ima_queue.c 2010-09-17 20:12:09.000000000 -0400
57871@@ -78,7 +78,7 @@ static int ima_add_digest_entry(struct i 56586@@ -79,7 +79,7 @@ static int ima_add_digest_entry(struct i
57872 INIT_LIST_HEAD(&qe->later); 56587 INIT_LIST_HEAD(&qe->later);
57873 list_add_tail_rcu(&qe->later, &ima_measurements); 56588 list_add_tail_rcu(&qe->later, &ima_measurements);
57874 56589
@@ -57877,9 +56592,9 @@ diff -urNp linux-2.6.32.24/security/integrity/ima/ima_queue.c linux-2.6.32.24/se
57877 key = ima_hash_key(entry->digest); 56592 key = ima_hash_key(entry->digest);
57878 hlist_add_head_rcu(&qe->hnext, &ima_htable.queue[key]); 56593 hlist_add_head_rcu(&qe->hnext, &ima_htable.queue[key]);
57879 return 0; 56594 return 0;
57880diff -urNp linux-2.6.32.24/security/Kconfig linux-2.6.32.24/security/Kconfig 56595diff -urNp linux-2.6.35.7/security/Kconfig linux-2.6.35.7/security/Kconfig
57881--- linux-2.6.32.24/security/Kconfig 2010-08-13 16:24:37.000000000 -0400 56596--- linux-2.6.35.7/security/Kconfig 2010-08-26 19:47:12.000000000 -0400
57882+++ linux-2.6.32.24/security/Kconfig 2010-10-23 19:59:20.000000000 -0400 56597+++ linux-2.6.35.7/security/Kconfig 2010-09-17 20:12:37.000000000 -0400
57883@@ -4,6 +4,505 @@ 56598@@ -4,6 +4,505 @@
57884 56599
57885 menu "Security options" 56600 menu "Security options"
@@ -58386,7 +57101,7 @@ diff -urNp linux-2.6.32.24/security/Kconfig linux-2.6.32.24/security/Kconfig
58386 config KEYS 57101 config KEYS
58387 bool "Enable access key retention support" 57102 bool "Enable access key retention support"
58388 help 57103 help
58389@@ -146,7 +645,7 @@ config INTEL_TXT 57104@@ -124,7 +623,7 @@ config INTEL_TXT
58390 config LSM_MMAP_MIN_ADDR 57105 config LSM_MMAP_MIN_ADDR
58391 int "Low address space for LSM to protect from user allocation" 57106 int "Low address space for LSM to protect from user allocation"
58392 depends on SECURITY && SECURITY_SELINUX 57107 depends on SECURITY && SECURITY_SELINUX
@@ -58395,9 +57110,9 @@ diff -urNp linux-2.6.32.24/security/Kconfig linux-2.6.32.24/security/Kconfig
58395 help 57110 help
58396 This is the portion of low virtual memory which should be protected 57111 This is the portion of low virtual memory which should be protected
58397 from userspace allocation. Keeping a user from writing to low pages 57112 from userspace allocation. Keeping a user from writing to low pages
58398diff -urNp linux-2.6.32.24/security/min_addr.c linux-2.6.32.24/security/min_addr.c 57113diff -urNp linux-2.6.35.7/security/min_addr.c linux-2.6.35.7/security/min_addr.c
58399--- linux-2.6.32.24/security/min_addr.c 2010-08-13 16:24:37.000000000 -0400 57114--- linux-2.6.35.7/security/min_addr.c 2010-08-26 19:47:12.000000000 -0400
58400+++ linux-2.6.32.24/security/min_addr.c 2010-10-23 19:59:20.000000000 -0400 57115+++ linux-2.6.35.7/security/min_addr.c 2010-09-17 20:12:37.000000000 -0400
58401@@ -14,6 +14,7 @@ unsigned long dac_mmap_min_addr = CONFIG 57116@@ -14,6 +14,7 @@ unsigned long dac_mmap_min_addr = CONFIG
58402 */ 57117 */
58403 static void update_mmap_min_addr(void) 57118 static void update_mmap_min_addr(void)
@@ -58414,52 +57129,42 @@ diff -urNp linux-2.6.32.24/security/min_addr.c linux-2.6.32.24/security/min_addr
58414 } 57129 }
58415 57130
58416 /* 57131 /*
58417diff -urNp linux-2.6.32.24/security/root_plug.c linux-2.6.32.24/security/root_plug.c 57132diff -urNp linux-2.6.35.7/security/security.c linux-2.6.35.7/security/security.c
58418--- linux-2.6.32.24/security/root_plug.c 2010-08-13 16:24:37.000000000 -0400 57133--- linux-2.6.35.7/security/security.c 2010-08-26 19:47:12.000000000 -0400
58419+++ linux-2.6.32.24/security/root_plug.c 2010-10-23 19:59:20.000000000 -0400 57134+++ linux-2.6.35.7/security/security.c 2010-09-17 20:12:37.000000000 -0400
58420@@ -70,7 +70,7 @@ static int rootplug_bprm_check_security 57135@@ -25,8 +25,8 @@ static __initdata char chosen_lsm[SECURI
58421 return 0; 57136 /* things that live in capability.c */
58422 } 57137 extern void __init security_fixup_ops(struct security_operations *ops);
58423 57138
58424-static struct security_operations rootplug_security_ops = { 57139-static struct security_operations *security_ops;
58425+static struct security_operations rootplug_security_ops __read_only = { 57140-static struct security_operations default_security_ops = {
58426 .bprm_check_security = rootplug_bprm_check_security, 57141+static struct security_operations *security_ops __read_only;
57142+static struct security_operations default_security_ops __read_only = {
57143 .name = "default",
58427 }; 57144 };
58428 57145
58429diff -urNp linux-2.6.32.24/security/security.c linux-2.6.32.24/security/security.c 57146@@ -67,7 +67,9 @@ int __init security_init(void)
58430--- linux-2.6.32.24/security/security.c 2010-08-13 16:24:37.000000000 -0400
58431+++ linux-2.6.32.24/security/security.c 2010-10-23 19:59:20.000000000 -0400
58432@@ -24,7 +24,7 @@ static __initdata char chosen_lsm[SECURI
58433 extern struct security_operations default_security_ops;
58434 extern void security_fixup_ops(struct security_operations *ops);
58435
58436-struct security_operations *security_ops; /* Initialized to NULL */
58437+struct security_operations *security_ops __read_only; /* Initialized to NULL */
58438 57147
58439 static inline int verify(struct security_operations *ops) 57148 void reset_security_ops(void)
58440 { 57149 {
58441@@ -106,7 +106,7 @@ int __init security_module_enable(struct 57150+ pax_open_kernel();
58442 * If there is already a security module registered with the kernel, 57151 security_ops = &default_security_ops;
58443 * an error will be returned. Otherwise %0 is returned on success. 57152+ pax_close_kernel();
58444 */ 57153 }
58445-int register_security(struct security_operations *ops) 57154
58446+int __init register_security(struct security_operations *ops) 57155 /* Save user chosen LSM */
58447 { 57156diff -urNp linux-2.6.35.7/security/selinux/hooks.c linux-2.6.35.7/security/selinux/hooks.c
58448 if (verify(ops)) { 57157--- linux-2.6.35.7/security/selinux/hooks.c 2010-08-26 19:47:12.000000000 -0400
58449 printk(KERN_DEBUG "%s could not verify " 57158+++ linux-2.6.35.7/security/selinux/hooks.c 2010-09-17 20:12:37.000000000 -0400
58450diff -urNp linux-2.6.32.24/security/selinux/hooks.c linux-2.6.32.24/security/selinux/hooks.c 57159@@ -93,7 +93,6 @@
58451--- linux-2.6.32.24/security/selinux/hooks.c 2010-08-13 16:24:37.000000000 -0400 57160 #define NUM_SEL_MNT_OPTS 5
58452+++ linux-2.6.32.24/security/selinux/hooks.c 2010-10-23 19:59:20.000000000 -0400 57161
58453@@ -131,7 +131,7 @@ int selinux_enabled = 1; 57162 extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm);
58454 * Minimal support for a secondary security module, 57163-extern struct security_operations *security_ops;
58455 * just to allow the use of the capability module.
58456 */
58457-static struct security_operations *secondary_ops;
58458+static struct security_operations *secondary_ops __read_only;
58459 57164
58460 /* Lists of inode and superblock security structures initialized 57165 /* SECMARK reference count */
58461 before the policy was loaded. */ 57166 atomic_t selinux_secmark_refcount = ATOMIC_INIT(0);
58462@@ -5450,7 +5450,7 @@ static int selinux_key_getsecurity(struc 57167@@ -5428,7 +5427,7 @@ static int selinux_key_getsecurity(struc
58463 57168
58464 #endif 57169 #endif
58465 57170
@@ -58468,20 +57173,10 @@ diff -urNp linux-2.6.32.24/security/selinux/hooks.c linux-2.6.32.24/security/sel
58468 .name = "selinux", 57173 .name = "selinux",
58469 57174
58470 .ptrace_access_check = selinux_ptrace_access_check, 57175 .ptrace_access_check = selinux_ptrace_access_check,
58471@@ -5834,7 +5834,9 @@ int selinux_disable(void) 57176diff -urNp linux-2.6.35.7/security/smack/smack_lsm.c linux-2.6.35.7/security/smack/smack_lsm.c
58472 avc_disable(); 57177--- linux-2.6.35.7/security/smack/smack_lsm.c 2010-08-26 19:47:12.000000000 -0400
58473 57178+++ linux-2.6.35.7/security/smack/smack_lsm.c 2010-09-17 20:12:09.000000000 -0400
58474 /* Reset security_ops to the secondary module, dummy or capability. */ 57179@@ -3064,7 +3064,7 @@ static int smack_inode_getsecctx(struct
58475+ pax_open_kernel();
58476 security_ops = secondary_ops;
58477+ pax_close_kernel();
58478
58479 /* Unregister netfilter hooks. */
58480 selinux_nf_ip_exit();
58481diff -urNp linux-2.6.32.24/security/smack/smack_lsm.c linux-2.6.32.24/security/smack/smack_lsm.c
58482--- linux-2.6.32.24/security/smack/smack_lsm.c 2010-08-13 16:24:37.000000000 -0400
58483+++ linux-2.6.32.24/security/smack/smack_lsm.c 2010-10-23 19:59:20.000000000 -0400
58484@@ -3073,7 +3073,7 @@ static int smack_inode_getsecctx(struct
58485 return 0; 57180 return 0;
58486 } 57181 }
58487 57182
@@ -58490,10 +57185,10 @@ diff -urNp linux-2.6.32.24/security/smack/smack_lsm.c linux-2.6.32.24/security/s
58490 .name = "smack", 57185 .name = "smack",
58491 57186
58492 .ptrace_access_check = smack_ptrace_access_check, 57187 .ptrace_access_check = smack_ptrace_access_check,
58493diff -urNp linux-2.6.32.24/security/tomoyo/tomoyo.c linux-2.6.32.24/security/tomoyo/tomoyo.c 57188diff -urNp linux-2.6.35.7/security/tomoyo/tomoyo.c linux-2.6.35.7/security/tomoyo/tomoyo.c
58494--- linux-2.6.32.24/security/tomoyo/tomoyo.c 2010-08-13 16:24:37.000000000 -0400 57189--- linux-2.6.35.7/security/tomoyo/tomoyo.c 2010-08-26 19:47:12.000000000 -0400
58495+++ linux-2.6.32.24/security/tomoyo/tomoyo.c 2010-10-23 19:59:20.000000000 -0400 57190+++ linux-2.6.35.7/security/tomoyo/tomoyo.c 2010-09-17 20:12:09.000000000 -0400
58496@@ -275,7 +275,7 @@ static int tomoyo_dentry_open(struct fil 57191@@ -235,7 +235,7 @@ static int tomoyo_sb_pivotroot(struct pa
58497 * tomoyo_security_ops is a "struct security_operations" which is used for 57192 * tomoyo_security_ops is a "struct security_operations" which is used for
58498 * registering TOMOYO. 57193 * registering TOMOYO.
58499 */ 57194 */
@@ -58502,10 +57197,10 @@ diff -urNp linux-2.6.32.24/security/tomoyo/tomoyo.c linux-2.6.32.24/security/tom
58502 .name = "tomoyo", 57197 .name = "tomoyo",
58503 .cred_alloc_blank = tomoyo_cred_alloc_blank, 57198 .cred_alloc_blank = tomoyo_cred_alloc_blank,
58504 .cred_prepare = tomoyo_cred_prepare, 57199 .cred_prepare = tomoyo_cred_prepare,
58505diff -urNp linux-2.6.32.24/sound/aoa/codecs/onyx.c linux-2.6.32.24/sound/aoa/codecs/onyx.c 57200diff -urNp linux-2.6.35.7/sound/aoa/codecs/onyx.c linux-2.6.35.7/sound/aoa/codecs/onyx.c
58506--- linux-2.6.32.24/sound/aoa/codecs/onyx.c 2010-08-13 16:24:37.000000000 -0400 57201--- linux-2.6.35.7/sound/aoa/codecs/onyx.c 2010-08-26 19:47:12.000000000 -0400
58507+++ linux-2.6.32.24/sound/aoa/codecs/onyx.c 2010-10-23 19:59:20.000000000 -0400 57202+++ linux-2.6.35.7/sound/aoa/codecs/onyx.c 2010-09-17 20:12:09.000000000 -0400
58508@@ -53,7 +53,7 @@ struct onyx { 57203@@ -54,7 +54,7 @@ struct onyx {
58509 spdif_locked:1, 57204 spdif_locked:1,
58510 analog_locked:1, 57205 analog_locked:1,
58511 original_mute:2; 57206 original_mute:2;
@@ -58514,7 +57209,7 @@ diff -urNp linux-2.6.32.24/sound/aoa/codecs/onyx.c linux-2.6.32.24/sound/aoa/cod
58514 struct codec_info *codec_info; 57209 struct codec_info *codec_info;
58515 57210
58516 /* mutex serializes concurrent access to the device 57211 /* mutex serializes concurrent access to the device
58517@@ -752,7 +752,7 @@ static int onyx_open(struct codec_info_i 57212@@ -753,7 +753,7 @@ static int onyx_open(struct codec_info_i
58518 struct onyx *onyx = cii->codec_data; 57213 struct onyx *onyx = cii->codec_data;
58519 57214
58520 mutex_lock(&onyx->mutex); 57215 mutex_lock(&onyx->mutex);
@@ -58523,7 +57218,7 @@ diff -urNp linux-2.6.32.24/sound/aoa/codecs/onyx.c linux-2.6.32.24/sound/aoa/cod
58523 mutex_unlock(&onyx->mutex); 57218 mutex_unlock(&onyx->mutex);
58524 57219
58525 return 0; 57220 return 0;
58526@@ -764,8 +764,7 @@ static int onyx_close(struct codec_info_ 57221@@ -765,8 +765,7 @@ static int onyx_close(struct codec_info_
58527 struct onyx *onyx = cii->codec_data; 57222 struct onyx *onyx = cii->codec_data;
58528 57223
58529 mutex_lock(&onyx->mutex); 57224 mutex_lock(&onyx->mutex);
@@ -58533,9 +57228,9 @@ diff -urNp linux-2.6.32.24/sound/aoa/codecs/onyx.c linux-2.6.32.24/sound/aoa/cod
58533 onyx->spdif_locked = onyx->analog_locked = 0; 57228 onyx->spdif_locked = onyx->analog_locked = 0;
58534 mutex_unlock(&onyx->mutex); 57229 mutex_unlock(&onyx->mutex);
58535 57230
58536diff -urNp linux-2.6.32.24/sound/core/control.c linux-2.6.32.24/sound/core/control.c 57231diff -urNp linux-2.6.35.7/sound/core/control.c linux-2.6.35.7/sound/core/control.c
58537--- linux-2.6.32.24/sound/core/control.c 2010-08-13 16:24:37.000000000 -0400 57232--- linux-2.6.35.7/sound/core/control.c 2010-08-26 19:47:12.000000000 -0400
58538+++ linux-2.6.32.24/sound/core/control.c 2010-10-23 19:59:20.000000000 -0400 57233+++ linux-2.6.35.7/sound/core/control.c 2010-10-12 10:28:04.000000000 -0400
58539@@ -31,6 +31,7 @@ 57234@@ -31,6 +31,7 @@
58540 57235
58541 /* max number of user-defined controls */ 57236 /* max number of user-defined controls */
@@ -58544,7 +57239,7 @@ diff -urNp linux-2.6.32.24/sound/core/control.c linux-2.6.32.24/sound/core/contr
58544 57239
58545 struct snd_kctl_ioctl { 57240 struct snd_kctl_ioctl {
58546 struct list_head list; /* list of all ioctls */ 57241 struct list_head list; /* list of all ioctls */
58547@@ -190,6 +191,10 @@ static struct snd_kcontrol *snd_ctl_new( 57242@@ -195,6 +196,10 @@ static struct snd_kcontrol *snd_ctl_new(
58548 57243
58549 if (snd_BUG_ON(!control || !control->count)) 57244 if (snd_BUG_ON(!control || !control->count))
58550 return NULL; 57245 return NULL;
@@ -58555,10 +57250,10 @@ diff -urNp linux-2.6.32.24/sound/core/control.c linux-2.6.32.24/sound/core/contr
58555 kctl = kzalloc(sizeof(*kctl) + sizeof(struct snd_kcontrol_volatile) * control->count, GFP_KERNEL); 57250 kctl = kzalloc(sizeof(*kctl) + sizeof(struct snd_kcontrol_volatile) * control->count, GFP_KERNEL);
58556 if (kctl == NULL) { 57251 if (kctl == NULL) {
58557 snd_printk(KERN_ERR "Cannot allocate control instance\n"); 57252 snd_printk(KERN_ERR "Cannot allocate control instance\n");
58558diff -urNp linux-2.6.32.24/sound/core/oss/pcm_oss.c linux-2.6.32.24/sound/core/oss/pcm_oss.c 57253diff -urNp linux-2.6.35.7/sound/core/oss/pcm_oss.c linux-2.6.35.7/sound/core/oss/pcm_oss.c
58559--- linux-2.6.32.24/sound/core/oss/pcm_oss.c 2010-08-13 16:24:37.000000000 -0400 57254--- linux-2.6.35.7/sound/core/oss/pcm_oss.c 2010-08-26 19:47:12.000000000 -0400
58560+++ linux-2.6.32.24/sound/core/oss/pcm_oss.c 2010-10-23 19:59:20.000000000 -0400 57255+++ linux-2.6.35.7/sound/core/oss/pcm_oss.c 2010-09-17 20:12:09.000000000 -0400
58561@@ -2949,8 +2949,8 @@ static void snd_pcm_oss_proc_done(struct 57256@@ -2966,8 +2966,8 @@ static void snd_pcm_oss_proc_done(struct
58562 } 57257 }
58563 } 57258 }
58564 #else /* !CONFIG_SND_VERBOSE_PROCFS */ 57259 #else /* !CONFIG_SND_VERBOSE_PROCFS */
@@ -58569,9 +57264,9 @@ diff -urNp linux-2.6.32.24/sound/core/oss/pcm_oss.c linux-2.6.32.24/sound/core/o
58569 #endif /* CONFIG_SND_VERBOSE_PROCFS */ 57264 #endif /* CONFIG_SND_VERBOSE_PROCFS */
58570 57265
58571 /* 57266 /*
58572diff -urNp linux-2.6.32.24/sound/core/seq/seq_lock.h linux-2.6.32.24/sound/core/seq/seq_lock.h 57267diff -urNp linux-2.6.35.7/sound/core/seq/seq_lock.h linux-2.6.35.7/sound/core/seq/seq_lock.h
58573--- linux-2.6.32.24/sound/core/seq/seq_lock.h 2010-08-13 16:24:37.000000000 -0400 57268--- linux-2.6.35.7/sound/core/seq/seq_lock.h 2010-08-26 19:47:12.000000000 -0400
58574+++ linux-2.6.32.24/sound/core/seq/seq_lock.h 2010-10-23 19:59:20.000000000 -0400 57269+++ linux-2.6.35.7/sound/core/seq/seq_lock.h 2010-09-17 20:12:09.000000000 -0400
58575@@ -23,10 +23,10 @@ void snd_use_lock_sync_helper(snd_use_lo 57270@@ -23,10 +23,10 @@ void snd_use_lock_sync_helper(snd_use_lo
58576 #else /* SMP || CONFIG_SND_DEBUG */ 57271 #else /* SMP || CONFIG_SND_DEBUG */
58577 57272
@@ -58587,10 +57282,10 @@ diff -urNp linux-2.6.32.24/sound/core/seq/seq_lock.h linux-2.6.32.24/sound/core/
58587 57282
58588 #endif /* SMP || CONFIG_SND_DEBUG */ 57283 #endif /* SMP || CONFIG_SND_DEBUG */
58589 57284
58590diff -urNp linux-2.6.32.24/sound/drivers/mts64.c linux-2.6.32.24/sound/drivers/mts64.c 57285diff -urNp linux-2.6.35.7/sound/drivers/mts64.c linux-2.6.35.7/sound/drivers/mts64.c
58591--- linux-2.6.32.24/sound/drivers/mts64.c 2010-08-13 16:24:37.000000000 -0400 57286--- linux-2.6.35.7/sound/drivers/mts64.c 2010-08-26 19:47:12.000000000 -0400
58592+++ linux-2.6.32.24/sound/drivers/mts64.c 2010-10-23 19:59:20.000000000 -0400 57287+++ linux-2.6.35.7/sound/drivers/mts64.c 2010-09-17 20:12:09.000000000 -0400
58593@@ -65,7 +65,7 @@ struct mts64 { 57288@@ -66,7 +66,7 @@ struct mts64 {
58594 struct pardevice *pardev; 57289 struct pardevice *pardev;
58595 int pardev_claimed; 57290 int pardev_claimed;
58596 57291
@@ -58599,7 +57294,7 @@ diff -urNp linux-2.6.32.24/sound/drivers/mts64.c linux-2.6.32.24/sound/drivers/m
58599 int current_midi_output_port; 57294 int current_midi_output_port;
58600 int current_midi_input_port; 57295 int current_midi_input_port;
58601 u8 mode[MTS64_NUM_INPUT_PORTS]; 57296 u8 mode[MTS64_NUM_INPUT_PORTS];
58602@@ -695,7 +695,7 @@ static int snd_mts64_rawmidi_open(struct 57297@@ -696,7 +696,7 @@ static int snd_mts64_rawmidi_open(struct
58603 { 57298 {
58604 struct mts64 *mts = substream->rmidi->private_data; 57299 struct mts64 *mts = substream->rmidi->private_data;
58605 57300
@@ -58608,7 +57303,7 @@ diff -urNp linux-2.6.32.24/sound/drivers/mts64.c linux-2.6.32.24/sound/drivers/m
58608 /* We don't need a spinlock here, because this is just called 57303 /* We don't need a spinlock here, because this is just called
58609 if the device has not been opened before. 57304 if the device has not been opened before.
58610 So there aren't any IRQs from the device */ 57305 So there aren't any IRQs from the device */
58611@@ -703,7 +703,7 @@ static int snd_mts64_rawmidi_open(struct 57306@@ -704,7 +704,7 @@ static int snd_mts64_rawmidi_open(struct
58612 57307
58613 msleep(50); 57308 msleep(50);
58614 } 57309 }
@@ -58617,7 +57312,7 @@ diff -urNp linux-2.6.32.24/sound/drivers/mts64.c linux-2.6.32.24/sound/drivers/m
58617 57312
58618 return 0; 57313 return 0;
58619 } 57314 }
58620@@ -713,8 +713,7 @@ static int snd_mts64_rawmidi_close(struc 57315@@ -714,8 +714,7 @@ static int snd_mts64_rawmidi_close(struc
58621 struct mts64 *mts = substream->rmidi->private_data; 57316 struct mts64 *mts = substream->rmidi->private_data;
58622 unsigned long flags; 57317 unsigned long flags;
58623 57318
@@ -58627,7 +57322,7 @@ diff -urNp linux-2.6.32.24/sound/drivers/mts64.c linux-2.6.32.24/sound/drivers/m
58627 /* We need the spinlock_irqsave here because we can still 57322 /* We need the spinlock_irqsave here because we can still
58628 have IRQs at this point */ 57323 have IRQs at this point */
58629 spin_lock_irqsave(&mts->lock, flags); 57324 spin_lock_irqsave(&mts->lock, flags);
58630@@ -723,8 +722,8 @@ static int snd_mts64_rawmidi_close(struc 57325@@ -724,8 +723,8 @@ static int snd_mts64_rawmidi_close(struc
58631 57326
58632 msleep(500); 57327 msleep(500);
58633 57328
@@ -58638,10 +57333,10 @@ diff -urNp linux-2.6.32.24/sound/drivers/mts64.c linux-2.6.32.24/sound/drivers/m
58638 57333
58639 return 0; 57334 return 0;
58640 } 57335 }
58641diff -urNp linux-2.6.32.24/sound/drivers/portman2x4.c linux-2.6.32.24/sound/drivers/portman2x4.c 57336diff -urNp linux-2.6.35.7/sound/drivers/portman2x4.c linux-2.6.35.7/sound/drivers/portman2x4.c
58642--- linux-2.6.32.24/sound/drivers/portman2x4.c 2010-08-13 16:24:37.000000000 -0400 57337--- linux-2.6.35.7/sound/drivers/portman2x4.c 2010-08-26 19:47:12.000000000 -0400
58643+++ linux-2.6.32.24/sound/drivers/portman2x4.c 2010-10-23 19:59:20.000000000 -0400 57338+++ linux-2.6.35.7/sound/drivers/portman2x4.c 2010-09-17 20:12:09.000000000 -0400
58644@@ -83,7 +83,7 @@ struct portman { 57339@@ -84,7 +84,7 @@ struct portman {
58645 struct pardevice *pardev; 57340 struct pardevice *pardev;
58646 int pardev_claimed; 57341 int pardev_claimed;
58647 57342
@@ -58650,9 +57345,9 @@ diff -urNp linux-2.6.32.24/sound/drivers/portman2x4.c linux-2.6.32.24/sound/driv
58650 int mode[PORTMAN_NUM_INPUT_PORTS]; 57345 int mode[PORTMAN_NUM_INPUT_PORTS];
58651 struct snd_rawmidi_substream *midi_input[PORTMAN_NUM_INPUT_PORTS]; 57346 struct snd_rawmidi_substream *midi_input[PORTMAN_NUM_INPUT_PORTS];
58652 }; 57347 };
58653diff -urNp linux-2.6.32.24/sound/oss/sb_audio.c linux-2.6.32.24/sound/oss/sb_audio.c 57348diff -urNp linux-2.6.35.7/sound/oss/sb_audio.c linux-2.6.35.7/sound/oss/sb_audio.c
58654--- linux-2.6.32.24/sound/oss/sb_audio.c 2010-08-13 16:24:37.000000000 -0400 57349--- linux-2.6.35.7/sound/oss/sb_audio.c 2010-08-26 19:47:12.000000000 -0400
58655+++ linux-2.6.32.24/sound/oss/sb_audio.c 2010-10-23 19:59:20.000000000 -0400 57350+++ linux-2.6.35.7/sound/oss/sb_audio.c 2010-09-17 20:12:09.000000000 -0400
58656@@ -901,7 +901,7 @@ sb16_copy_from_user(int dev, 57351@@ -901,7 +901,7 @@ sb16_copy_from_user(int dev,
58657 buf16 = (signed short *)(localbuf + localoffs); 57352 buf16 = (signed short *)(localbuf + localoffs);
58658 while (c) 57353 while (c)
@@ -58662,10 +57357,27 @@ diff -urNp linux-2.6.32.24/sound/oss/sb_audio.c linux-2.6.32.24/sound/oss/sb_aud
58662 if (copy_from_user(lbuf8, 57357 if (copy_from_user(lbuf8,
58663 userbuf+useroffs + p, 57358 userbuf+useroffs + p,
58664 locallen)) 57359 locallen))
58665diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_codec.c linux-2.6.32.24/sound/pci/ac97/ac97_codec.c 57360diff -urNp linux-2.6.35.7/sound/oss/soundcard.c linux-2.6.35.7/sound/oss/soundcard.c
58666--- linux-2.6.32.24/sound/pci/ac97/ac97_codec.c 2010-08-13 16:24:37.000000000 -0400 57361--- linux-2.6.35.7/sound/oss/soundcard.c 2010-08-26 19:47:12.000000000 -0400
58667+++ linux-2.6.32.24/sound/pci/ac97/ac97_codec.c 2010-10-23 19:59:20.000000000 -0400 57362+++ linux-2.6.35.7/sound/oss/soundcard.c 2010-10-11 22:44:36.000000000 -0400
58668@@ -1952,7 +1952,7 @@ static int snd_ac97_dev_disconnect(struc 57363@@ -389,11 +389,11 @@ static long sound_ioctl(struct file *fil
57364 case SND_DEV_DSP:
57365 case SND_DEV_DSP16:
57366 case SND_DEV_AUDIO:
57367- return audio_ioctl(dev, file, cmd, p);
57368+ ret = audio_ioctl(dev, file, cmd, p);
57369 break;
57370
57371 case SND_DEV_MIDIN:
57372- return MIDIbuf_ioctl(dev, file, cmd, p);
57373+ ret = MIDIbuf_ioctl(dev, file, cmd, p);
57374 break;
57375
57376 }
57377diff -urNp linux-2.6.35.7/sound/pci/ac97/ac97_codec.c linux-2.6.35.7/sound/pci/ac97/ac97_codec.c
57378--- linux-2.6.35.7/sound/pci/ac97/ac97_codec.c 2010-08-26 19:47:12.000000000 -0400
57379+++ linux-2.6.35.7/sound/pci/ac97/ac97_codec.c 2010-09-17 20:12:09.000000000 -0400
57380@@ -1962,7 +1962,7 @@ static int snd_ac97_dev_disconnect(struc
58669 } 57381 }
58670 57382
58671 /* build_ops to do nothing */ 57383 /* build_ops to do nothing */
@@ -58674,9 +57386,9 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_codec.c linux-2.6.32.24/sound/pci
58674 57386
58675 #ifdef CONFIG_SND_AC97_POWER_SAVE 57387 #ifdef CONFIG_SND_AC97_POWER_SAVE
58676 static void do_update_power(struct work_struct *work) 57388 static void do_update_power(struct work_struct *work)
58677diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci/ac97/ac97_patch.c 57389diff -urNp linux-2.6.35.7/sound/pci/ac97/ac97_patch.c linux-2.6.35.7/sound/pci/ac97/ac97_patch.c
58678--- linux-2.6.32.24/sound/pci/ac97/ac97_patch.c 2010-08-13 16:24:37.000000000 -0400 57390--- linux-2.6.35.7/sound/pci/ac97/ac97_patch.c 2010-08-26 19:47:12.000000000 -0400
58679+++ linux-2.6.32.24/sound/pci/ac97/ac97_patch.c 2010-10-23 19:59:20.000000000 -0400 57391+++ linux-2.6.35.7/sound/pci/ac97/ac97_patch.c 2010-09-17 20:12:09.000000000 -0400
58680@@ -371,7 +371,7 @@ static int patch_yamaha_ymf743_build_spd 57392@@ -371,7 +371,7 @@ static int patch_yamaha_ymf743_build_spd
58681 return 0; 57393 return 0;
58682 } 57394 }
@@ -58713,16 +57425,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58713 .build_specific = patch_wolfson_wm9704_specific, 57425 .build_specific = patch_wolfson_wm9704_specific,
58714 }; 57426 };
58715 57427
58716@@ -555,7 +555,7 @@ static int patch_wolfson_wm9705_specific 57428@@ -677,7 +677,7 @@ static int patch_wolfson_wm9711_specific
58717 return 0;
58718 }
58719
58720-static struct snd_ac97_build_ops patch_wolfson_wm9705_ops = {
58721+static const struct snd_ac97_build_ops patch_wolfson_wm9705_ops = {
58722 .build_specific = patch_wolfson_wm9705_specific,
58723 };
58724
58725@@ -692,7 +692,7 @@ static int patch_wolfson_wm9711_specific
58726 return 0; 57429 return 0;
58727 } 57430 }
58728 57431
@@ -58731,7 +57434,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58731 .build_specific = patch_wolfson_wm9711_specific, 57434 .build_specific = patch_wolfson_wm9711_specific,
58732 }; 57435 };
58733 57436
58734@@ -886,7 +886,7 @@ static void patch_wolfson_wm9713_resume 57437@@ -871,7 +871,7 @@ static void patch_wolfson_wm9713_resume
58735 } 57438 }
58736 #endif 57439 #endif
58737 57440
@@ -58740,7 +57443,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58740 .build_specific = patch_wolfson_wm9713_specific, 57443 .build_specific = patch_wolfson_wm9713_specific,
58741 .build_3d = patch_wolfson_wm9713_3d, 57444 .build_3d = patch_wolfson_wm9713_3d,
58742 #ifdef CONFIG_PM 57445 #ifdef CONFIG_PM
58743@@ -991,7 +991,7 @@ static int patch_sigmatel_stac97xx_speci 57446@@ -976,7 +976,7 @@ static int patch_sigmatel_stac97xx_speci
58744 return 0; 57447 return 0;
58745 } 57448 }
58746 57449
@@ -58749,7 +57452,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58749 .build_3d = patch_sigmatel_stac9700_3d, 57452 .build_3d = patch_sigmatel_stac9700_3d,
58750 .build_specific = patch_sigmatel_stac97xx_specific 57453 .build_specific = patch_sigmatel_stac97xx_specific
58751 }; 57454 };
58752@@ -1038,7 +1038,7 @@ static int patch_sigmatel_stac9708_speci 57455@@ -1023,7 +1023,7 @@ static int patch_sigmatel_stac9708_speci
58753 return patch_sigmatel_stac97xx_specific(ac97); 57456 return patch_sigmatel_stac97xx_specific(ac97);
58754 } 57457 }
58755 57458
@@ -58758,7 +57461,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58758 .build_3d = patch_sigmatel_stac9708_3d, 57461 .build_3d = patch_sigmatel_stac9708_3d,
58759 .build_specific = patch_sigmatel_stac9708_specific 57462 .build_specific = patch_sigmatel_stac9708_specific
58760 }; 57463 };
58761@@ -1267,7 +1267,7 @@ static int patch_sigmatel_stac9758_speci 57464@@ -1252,7 +1252,7 @@ static int patch_sigmatel_stac9758_speci
58762 return 0; 57465 return 0;
58763 } 57466 }
58764 57467
@@ -58767,7 +57470,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58767 .build_3d = patch_sigmatel_stac9700_3d, 57470 .build_3d = patch_sigmatel_stac9700_3d,
58768 .build_specific = patch_sigmatel_stac9758_specific 57471 .build_specific = patch_sigmatel_stac9758_specific
58769 }; 57472 };
58770@@ -1342,7 +1342,7 @@ static int patch_cirrus_build_spdif(stru 57473@@ -1327,7 +1327,7 @@ static int patch_cirrus_build_spdif(stru
58771 return 0; 57474 return 0;
58772 } 57475 }
58773 57476
@@ -58776,7 +57479,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58776 .build_spdif = patch_cirrus_build_spdif 57479 .build_spdif = patch_cirrus_build_spdif
58777 }; 57480 };
58778 57481
58779@@ -1399,7 +1399,7 @@ static int patch_conexant_build_spdif(st 57482@@ -1384,7 +1384,7 @@ static int patch_conexant_build_spdif(st
58780 return 0; 57483 return 0;
58781 } 57484 }
58782 57485
@@ -58785,7 +57488,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58785 .build_spdif = patch_conexant_build_spdif 57488 .build_spdif = patch_conexant_build_spdif
58786 }; 57489 };
58787 57490
58788@@ -1501,7 +1501,7 @@ static const struct snd_ac97_res_table a 57491@@ -1486,7 +1486,7 @@ static const struct snd_ac97_res_table a
58789 { AC97_VIDEO, 0x9f1f }, 57492 { AC97_VIDEO, 0x9f1f },
58790 { AC97_AUX, 0x9f1f }, 57493 { AC97_AUX, 0x9f1f },
58791 { AC97_PCM, 0x9f1f }, 57494 { AC97_PCM, 0x9f1f },
@@ -58794,7 +57497,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58794 }; 57497 };
58795 57498
58796 static int patch_ad1819(struct snd_ac97 * ac97) 57499 static int patch_ad1819(struct snd_ac97 * ac97)
58797@@ -1575,7 +1575,7 @@ static void patch_ad1881_chained(struct 57500@@ -1560,7 +1560,7 @@ static void patch_ad1881_chained(struct
58798 } 57501 }
58799 } 57502 }
58800 57503
@@ -58803,7 +57506,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58803 #ifdef CONFIG_PM 57506 #ifdef CONFIG_PM
58804 .resume = ad18xx_resume 57507 .resume = ad18xx_resume
58805 #endif 57508 #endif
58806@@ -1662,7 +1662,7 @@ static int patch_ad1885_specific(struct 57509@@ -1647,7 +1647,7 @@ static int patch_ad1885_specific(struct
58807 return 0; 57510 return 0;
58808 } 57511 }
58809 57512
@@ -58812,7 +57515,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58812 .build_specific = &patch_ad1885_specific, 57515 .build_specific = &patch_ad1885_specific,
58813 #ifdef CONFIG_PM 57516 #ifdef CONFIG_PM
58814 .resume = ad18xx_resume 57517 .resume = ad18xx_resume
58815@@ -1689,7 +1689,7 @@ static int patch_ad1886_specific(struct 57518@@ -1674,7 +1674,7 @@ static int patch_ad1886_specific(struct
58816 return 0; 57519 return 0;
58817 } 57520 }
58818 57521
@@ -58821,7 +57524,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58821 .build_specific = &patch_ad1886_specific, 57524 .build_specific = &patch_ad1886_specific,
58822 #ifdef CONFIG_PM 57525 #ifdef CONFIG_PM
58823 .resume = ad18xx_resume 57526 .resume = ad18xx_resume
58824@@ -1896,7 +1896,7 @@ static int patch_ad1981a_specific(struct 57527@@ -1881,7 +1881,7 @@ static int patch_ad1981a_specific(struct
58825 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); 57528 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
58826 } 57529 }
58827 57530
@@ -58830,7 +57533,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58830 .build_post_spdif = patch_ad198x_post_spdif, 57533 .build_post_spdif = patch_ad198x_post_spdif,
58831 .build_specific = patch_ad1981a_specific, 57534 .build_specific = patch_ad1981a_specific,
58832 #ifdef CONFIG_PM 57535 #ifdef CONFIG_PM
58833@@ -1951,7 +1951,7 @@ static int patch_ad1981b_specific(struct 57536@@ -1936,7 +1936,7 @@ static int patch_ad1981b_specific(struct
58834 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); 57537 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
58835 } 57538 }
58836 57539
@@ -58839,7 +57542,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58839 .build_post_spdif = patch_ad198x_post_spdif, 57542 .build_post_spdif = patch_ad198x_post_spdif,
58840 .build_specific = patch_ad1981b_specific, 57543 .build_specific = patch_ad1981b_specific,
58841 #ifdef CONFIG_PM 57544 #ifdef CONFIG_PM
58842@@ -2090,7 +2090,7 @@ static int patch_ad1888_specific(struct 57545@@ -2075,7 +2075,7 @@ static int patch_ad1888_specific(struct
58843 return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls)); 57546 return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls));
58844 } 57547 }
58845 57548
@@ -58848,7 +57551,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58848 .build_post_spdif = patch_ad198x_post_spdif, 57551 .build_post_spdif = patch_ad198x_post_spdif,
58849 .build_specific = patch_ad1888_specific, 57552 .build_specific = patch_ad1888_specific,
58850 #ifdef CONFIG_PM 57553 #ifdef CONFIG_PM
58851@@ -2139,7 +2139,7 @@ static int patch_ad1980_specific(struct 57554@@ -2124,7 +2124,7 @@ static int patch_ad1980_specific(struct
58852 return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1); 57555 return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1);
58853 } 57556 }
58854 57557
@@ -58857,7 +57560,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58857 .build_post_spdif = patch_ad198x_post_spdif, 57560 .build_post_spdif = patch_ad198x_post_spdif,
58858 .build_specific = patch_ad1980_specific, 57561 .build_specific = patch_ad1980_specific,
58859 #ifdef CONFIG_PM 57562 #ifdef CONFIG_PM
58860@@ -2254,7 +2254,7 @@ static int patch_ad1985_specific(struct 57563@@ -2239,7 +2239,7 @@ static int patch_ad1985_specific(struct
58861 ARRAY_SIZE(snd_ac97_ad1985_controls)); 57564 ARRAY_SIZE(snd_ac97_ad1985_controls));
58862 } 57565 }
58863 57566
@@ -58866,7 +57569,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58866 .build_post_spdif = patch_ad198x_post_spdif, 57569 .build_post_spdif = patch_ad198x_post_spdif,
58867 .build_specific = patch_ad1985_specific, 57570 .build_specific = patch_ad1985_specific,
58868 #ifdef CONFIG_PM 57571 #ifdef CONFIG_PM
58869@@ -2546,7 +2546,7 @@ static int patch_ad1986_specific(struct 57572@@ -2531,7 +2531,7 @@ static int patch_ad1986_specific(struct
58870 ARRAY_SIZE(snd_ac97_ad1985_controls)); 57573 ARRAY_SIZE(snd_ac97_ad1985_controls));
58871 } 57574 }
58872 57575
@@ -58875,7 +57578,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58875 .build_post_spdif = patch_ad198x_post_spdif, 57578 .build_post_spdif = patch_ad198x_post_spdif,
58876 .build_specific = patch_ad1986_specific, 57579 .build_specific = patch_ad1986_specific,
58877 #ifdef CONFIG_PM 57580 #ifdef CONFIG_PM
58878@@ -2651,7 +2651,7 @@ static int patch_alc650_specific(struct 57581@@ -2636,7 +2636,7 @@ static int patch_alc650_specific(struct
58879 return 0; 57582 return 0;
58880 } 57583 }
58881 57584
@@ -58884,7 +57587,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58884 .build_specific = patch_alc650_specific, 57587 .build_specific = patch_alc650_specific,
58885 .update_jacks = alc650_update_jacks 57588 .update_jacks = alc650_update_jacks
58886 }; 57589 };
58887@@ -2803,7 +2803,7 @@ static int patch_alc655_specific(struct 57590@@ -2788,7 +2788,7 @@ static int patch_alc655_specific(struct
58888 return 0; 57591 return 0;
58889 } 57592 }
58890 57593
@@ -58893,7 +57596,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58893 .build_specific = patch_alc655_specific, 57596 .build_specific = patch_alc655_specific,
58894 .update_jacks = alc655_update_jacks 57597 .update_jacks = alc655_update_jacks
58895 }; 57598 };
58896@@ -2915,7 +2915,7 @@ static int patch_alc850_specific(struct 57599@@ -2900,7 +2900,7 @@ static int patch_alc850_specific(struct
58897 return 0; 57600 return 0;
58898 } 57601 }
58899 57602
@@ -58902,7 +57605,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58902 .build_specific = patch_alc850_specific, 57605 .build_specific = patch_alc850_specific,
58903 .update_jacks = alc850_update_jacks 57606 .update_jacks = alc850_update_jacks
58904 }; 57607 };
58905@@ -2977,7 +2977,7 @@ static int patch_cm9738_specific(struct 57608@@ -2962,7 +2962,7 @@ static int patch_cm9738_specific(struct
58906 return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls)); 57609 return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls));
58907 } 57610 }
58908 57611
@@ -58911,7 +57614,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58911 .build_specific = patch_cm9738_specific, 57614 .build_specific = patch_cm9738_specific,
58912 .update_jacks = cm9738_update_jacks 57615 .update_jacks = cm9738_update_jacks
58913 }; 57616 };
58914@@ -3068,7 +3068,7 @@ static int patch_cm9739_post_spdif(struc 57617@@ -3053,7 +3053,7 @@ static int patch_cm9739_post_spdif(struc
58915 return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif)); 57618 return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif));
58916 } 57619 }
58917 57620
@@ -58920,7 +57623,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58920 .build_specific = patch_cm9739_specific, 57623 .build_specific = patch_cm9739_specific,
58921 .build_post_spdif = patch_cm9739_post_spdif, 57624 .build_post_spdif = patch_cm9739_post_spdif,
58922 .update_jacks = cm9739_update_jacks 57625 .update_jacks = cm9739_update_jacks
58923@@ -3242,7 +3242,7 @@ static int patch_cm9761_specific(struct 57626@@ -3227,7 +3227,7 @@ static int patch_cm9761_specific(struct
58924 return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls)); 57627 return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls));
58925 } 57628 }
58926 57629
@@ -58929,7 +57632,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58929 .build_specific = patch_cm9761_specific, 57632 .build_specific = patch_cm9761_specific,
58930 .build_post_spdif = patch_cm9761_post_spdif, 57633 .build_post_spdif = patch_cm9761_post_spdif,
58931 .update_jacks = cm9761_update_jacks 57634 .update_jacks = cm9761_update_jacks
58932@@ -3338,7 +3338,7 @@ static int patch_cm9780_specific(struct 57635@@ -3323,7 +3323,7 @@ static int patch_cm9780_specific(struct
58933 return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls)); 57636 return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls));
58934 } 57637 }
58935 57638
@@ -58938,7 +57641,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58938 .build_specific = patch_cm9780_specific, 57641 .build_specific = patch_cm9780_specific,
58939 .build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */ 57642 .build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */
58940 }; 57643 };
58941@@ -3458,7 +3458,7 @@ static int patch_vt1616_specific(struct 57644@@ -3443,7 +3443,7 @@ static int patch_vt1616_specific(struct
58942 return 0; 57645 return 0;
58943 } 57646 }
58944 57647
@@ -58947,7 +57650,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58947 .build_specific = patch_vt1616_specific 57650 .build_specific = patch_vt1616_specific
58948 }; 57651 };
58949 57652
58950@@ -3812,7 +3812,7 @@ static int patch_it2646_specific(struct 57653@@ -3797,7 +3797,7 @@ static int patch_it2646_specific(struct
58951 return 0; 57654 return 0;
58952 } 57655 }
58953 57656
@@ -58956,7 +57659,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58956 .build_specific = patch_it2646_specific, 57659 .build_specific = patch_it2646_specific,
58957 .update_jacks = it2646_update_jacks 57660 .update_jacks = it2646_update_jacks
58958 }; 57661 };
58959@@ -3846,7 +3846,7 @@ static int patch_si3036_specific(struct 57662@@ -3831,7 +3831,7 @@ static int patch_si3036_specific(struct
58960 return 0; 57663 return 0;
58961 } 57664 }
58962 57665
@@ -58965,7 +57668,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58965 .build_specific = patch_si3036_specific, 57668 .build_specific = patch_si3036_specific,
58966 }; 57669 };
58967 57670
58968@@ -3879,7 +3879,7 @@ static struct snd_ac97_res_table lm4550_ 57671@@ -3864,7 +3864,7 @@ static struct snd_ac97_res_table lm4550_
58969 { AC97_AUX, 0x1f1f }, 57672 { AC97_AUX, 0x1f1f },
58970 { AC97_PCM, 0x1f1f }, 57673 { AC97_PCM, 0x1f1f },
58971 { AC97_REC_GAIN, 0x0f0f }, 57674 { AC97_REC_GAIN, 0x0f0f },
@@ -58974,7 +57677,7 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58974 }; 57677 };
58975 57678
58976 static int patch_lm4550(struct snd_ac97 *ac97) 57679 static int patch_lm4550(struct snd_ac97 *ac97)
58977@@ -3913,7 +3913,7 @@ static int patch_ucb1400_specific(struct 57680@@ -3898,7 +3898,7 @@ static int patch_ucb1400_specific(struct
58978 return 0; 57681 return 0;
58979 } 57682 }
58980 57683
@@ -58983,10 +57686,10 @@ diff -urNp linux-2.6.32.24/sound/pci/ac97/ac97_patch.c linux-2.6.32.24/sound/pci
58983 .build_specific = patch_ucb1400_specific, 57686 .build_specific = patch_ucb1400_specific,
58984 }; 57687 };
58985 57688
58986diff -urNp linux-2.6.32.24/sound/pci/ens1370.c linux-2.6.32.24/sound/pci/ens1370.c 57689diff -urNp linux-2.6.35.7/sound/pci/ens1370.c linux-2.6.35.7/sound/pci/ens1370.c
58987--- linux-2.6.32.24/sound/pci/ens1370.c 2010-08-13 16:24:37.000000000 -0400 57690--- linux-2.6.35.7/sound/pci/ens1370.c 2010-08-26 19:47:12.000000000 -0400
58988+++ linux-2.6.32.24/sound/pci/ens1370.c 2010-10-23 19:59:20.000000000 -0400 57691+++ linux-2.6.35.7/sound/pci/ens1370.c 2010-09-17 20:12:09.000000000 -0400
58989@@ -452,7 +452,7 @@ static struct pci_device_id snd_audiopci 57692@@ -452,7 +452,7 @@ static DEFINE_PCI_DEVICE_TABLE(snd_audio
58990 { PCI_VDEVICE(ENSONIQ, 0x5880), 0, }, /* ES1373 - CT5880 */ 57693 { PCI_VDEVICE(ENSONIQ, 0x5880), 0, }, /* ES1373 - CT5880 */
58991 { PCI_VDEVICE(ECTIVA, 0x8938), 0, }, /* Ectiva EV1938 */ 57694 { PCI_VDEVICE(ECTIVA, 0x8938), 0, }, /* Ectiva EV1938 */
58992 #endif 57695 #endif
@@ -58995,10 +57698,10 @@ diff -urNp linux-2.6.32.24/sound/pci/ens1370.c linux-2.6.32.24/sound/pci/ens1370
58995 }; 57698 };
58996 57699
58997 MODULE_DEVICE_TABLE(pci, snd_audiopci_ids); 57700 MODULE_DEVICE_TABLE(pci, snd_audiopci_ids);
58998diff -urNp linux-2.6.32.24/sound/pci/hda/patch_intelhdmi.c linux-2.6.32.24/sound/pci/hda/patch_intelhdmi.c 57701diff -urNp linux-2.6.35.7/sound/pci/hda/patch_hdmi.c linux-2.6.35.7/sound/pci/hda/patch_hdmi.c
58999--- linux-2.6.32.24/sound/pci/hda/patch_intelhdmi.c 2010-08-13 16:24:37.000000000 -0400 57702--- linux-2.6.35.7/sound/pci/hda/patch_hdmi.c 2010-08-26 19:47:12.000000000 -0400
59000+++ linux-2.6.32.24/sound/pci/hda/patch_intelhdmi.c 2010-10-23 19:59:20.000000000 -0400 57703+++ linux-2.6.35.7/sound/pci/hda/patch_hdmi.c 2010-09-17 20:12:09.000000000 -0400
59001@@ -511,10 +511,10 @@ static void hdmi_non_intrinsic_event(str 57704@@ -670,10 +670,10 @@ static void hdmi_non_intrinsic_event(str
59002 cp_ready); 57705 cp_ready);
59003 57706
59004 /* TODO */ 57707 /* TODO */
@@ -59013,10 +57716,10 @@ diff -urNp linux-2.6.32.24/sound/pci/hda/patch_intelhdmi.c linux-2.6.32.24/sound
59013 } 57716 }
59014 57717
59015 57718
59016diff -urNp linux-2.6.32.24/sound/pci/intel8x0.c linux-2.6.32.24/sound/pci/intel8x0.c 57719diff -urNp linux-2.6.35.7/sound/pci/intel8x0.c linux-2.6.35.7/sound/pci/intel8x0.c
59017--- linux-2.6.32.24/sound/pci/intel8x0.c 2010-08-29 21:08:20.000000000 -0400 57720--- linux-2.6.35.7/sound/pci/intel8x0.c 2010-08-26 19:47:12.000000000 -0400
59018+++ linux-2.6.32.24/sound/pci/intel8x0.c 2010-10-23 19:59:20.000000000 -0400 57721+++ linux-2.6.35.7/sound/pci/intel8x0.c 2010-09-17 20:12:09.000000000 -0400
59019@@ -444,7 +444,7 @@ static struct pci_device_id snd_intel8x0 57722@@ -444,7 +444,7 @@ static DEFINE_PCI_DEVICE_TABLE(snd_intel
59020 { PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */ 57723 { PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */
59021 { PCI_VDEVICE(AMD, 0x7445), DEVICE_INTEL }, /* AMD768 */ 57724 { PCI_VDEVICE(AMD, 0x7445), DEVICE_INTEL }, /* AMD768 */
59022 { PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */ 57725 { PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */
@@ -59025,7 +57728,7 @@ diff -urNp linux-2.6.32.24/sound/pci/intel8x0.c linux-2.6.32.24/sound/pci/intel8
59025 }; 57728 };
59026 57729
59027 MODULE_DEVICE_TABLE(pci, snd_intel8x0_ids); 57730 MODULE_DEVICE_TABLE(pci, snd_intel8x0_ids);
59028@@ -2129,7 +2129,7 @@ static struct ac97_quirk ac97_quirks[] _ 57731@@ -2135,7 +2135,7 @@ static struct ac97_quirk ac97_quirks[] _
59029 .type = AC97_TUNE_HP_ONLY 57732 .type = AC97_TUNE_HP_ONLY
59030 }, 57733 },
59031 #endif 57734 #endif
@@ -59034,10 +57737,10 @@ diff -urNp linux-2.6.32.24/sound/pci/intel8x0.c linux-2.6.32.24/sound/pci/intel8
59034 }; 57737 };
59035 57738
59036 static int __devinit snd_intel8x0_mixer(struct intel8x0 *chip, int ac97_clock, 57739 static int __devinit snd_intel8x0_mixer(struct intel8x0 *chip, int ac97_clock,
59037diff -urNp linux-2.6.32.24/sound/pci/intel8x0m.c linux-2.6.32.24/sound/pci/intel8x0m.c 57740diff -urNp linux-2.6.35.7/sound/pci/intel8x0m.c linux-2.6.35.7/sound/pci/intel8x0m.c
59038--- linux-2.6.32.24/sound/pci/intel8x0m.c 2010-08-13 16:24:37.000000000 -0400 57741--- linux-2.6.35.7/sound/pci/intel8x0m.c 2010-08-26 19:47:12.000000000 -0400
59039+++ linux-2.6.32.24/sound/pci/intel8x0m.c 2010-10-23 19:59:20.000000000 -0400 57742+++ linux-2.6.35.7/sound/pci/intel8x0m.c 2010-09-17 20:12:09.000000000 -0400
59040@@ -239,7 +239,7 @@ static struct pci_device_id snd_intel8x0 57743@@ -239,7 +239,7 @@ static DEFINE_PCI_DEVICE_TABLE(snd_intel
59041 { PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */ 57744 { PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */
59042 { PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */ 57745 { PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */
59043 #endif 57746 #endif
@@ -59055,9 +57758,9 @@ diff -urNp linux-2.6.32.24/sound/pci/intel8x0m.c linux-2.6.32.24/sound/pci/intel
59055 }; 57758 };
59056 57759
59057 static int __devinit snd_intel8x0m_probe(struct pci_dev *pci, 57760 static int __devinit snd_intel8x0m_probe(struct pci_dev *pci,
59058diff -urNp linux-2.6.32.24/usr/gen_init_cpio.c linux-2.6.32.24/usr/gen_init_cpio.c 57761diff -urNp linux-2.6.35.7/usr/gen_init_cpio.c linux-2.6.35.7/usr/gen_init_cpio.c
59059--- linux-2.6.32.24/usr/gen_init_cpio.c 2010-08-13 16:24:37.000000000 -0400 57762--- linux-2.6.35.7/usr/gen_init_cpio.c 2010-08-26 19:47:12.000000000 -0400
59060+++ linux-2.6.32.24/usr/gen_init_cpio.c 2010-10-23 19:59:20.000000000 -0400 57763+++ linux-2.6.35.7/usr/gen_init_cpio.c 2010-09-17 20:12:09.000000000 -0400
59061@@ -299,7 +299,7 @@ static int cpio_mkfile(const char *name, 57764@@ -299,7 +299,7 @@ static int cpio_mkfile(const char *name,
59062 int retval; 57765 int retval;
59063 int rc = -1; 57766 int rc = -1;
@@ -59067,7 +57770,7 @@ diff -urNp linux-2.6.32.24/usr/gen_init_cpio.c linux-2.6.32.24/usr/gen_init_cpio
59067 57770
59068 mode |= S_IFREG; 57771 mode |= S_IFREG;
59069 57772
59070@@ -383,9 +383,10 @@ static char *cpio_replace_env(char *new_ 57773@@ -386,9 +386,10 @@ static char *cpio_replace_env(char *new_
59071 *env_var = *expanded = '\0'; 57774 *env_var = *expanded = '\0';
59072 strncat(env_var, start + 2, end - start - 2); 57775 strncat(env_var, start + 2, end - start - 2);
59073 strncat(expanded, new_location, start - new_location); 57776 strncat(expanded, new_location, start - new_location);
@@ -59080,10 +57783,10 @@ diff -urNp linux-2.6.32.24/usr/gen_init_cpio.c linux-2.6.32.24/usr/gen_init_cpio
59080 } else 57783 } else
59081 break; 57784 break;
59082 } 57785 }
59083diff -urNp linux-2.6.32.24/virt/kvm/kvm_main.c linux-2.6.32.24/virt/kvm/kvm_main.c 57786diff -urNp linux-2.6.35.7/virt/kvm/kvm_main.c linux-2.6.35.7/virt/kvm/kvm_main.c
59084--- linux-2.6.32.24/virt/kvm/kvm_main.c 2010-08-13 16:24:37.000000000 -0400 57787--- linux-2.6.35.7/virt/kvm/kvm_main.c 2010-09-26 17:32:11.000000000 -0400
59085+++ linux-2.6.32.24/virt/kvm/kvm_main.c 2010-10-23 19:59:20.000000000 -0400 57788+++ linux-2.6.35.7/virt/kvm/kvm_main.c 2010-09-26 22:02:10.000000000 -0400
59086@@ -1748,6 +1748,7 @@ static int kvm_vcpu_release(struct inode 57789@@ -1285,6 +1285,7 @@ static int kvm_vcpu_release(struct inode
59087 return 0; 57790 return 0;
59088 } 57791 }
59089 57792
@@ -59091,7 +57794,7 @@ diff -urNp linux-2.6.32.24/virt/kvm/kvm_main.c linux-2.6.32.24/virt/kvm/kvm_main
59091 static struct file_operations kvm_vcpu_fops = { 57794 static struct file_operations kvm_vcpu_fops = {
59092 .release = kvm_vcpu_release, 57795 .release = kvm_vcpu_release,
59093 .unlocked_ioctl = kvm_vcpu_ioctl, 57796 .unlocked_ioctl = kvm_vcpu_ioctl,
59094@@ -2344,6 +2345,7 @@ static int kvm_vm_mmap(struct file *file 57797@@ -1739,6 +1740,7 @@ static int kvm_vm_mmap(struct file *file
59095 return 0; 57798 return 0;
59096 } 57799 }
59097 57800
@@ -59099,7 +57802,7 @@ diff -urNp linux-2.6.32.24/virt/kvm/kvm_main.c linux-2.6.32.24/virt/kvm/kvm_main
59099 static struct file_operations kvm_vm_fops = { 57802 static struct file_operations kvm_vm_fops = {
59100 .release = kvm_vm_release, 57803 .release = kvm_vm_release,
59101 .unlocked_ioctl = kvm_vm_ioctl, 57804 .unlocked_ioctl = kvm_vm_ioctl,
59102@@ -2431,6 +2433,7 @@ out: 57805@@ -1836,6 +1838,7 @@ out:
59103 return r; 57806 return r;
59104 } 57807 }
59105 57808
@@ -59107,7 +57810,7 @@ diff -urNp linux-2.6.32.24/virt/kvm/kvm_main.c linux-2.6.32.24/virt/kvm/kvm_main
59107 static struct file_operations kvm_chardev_ops = { 57810 static struct file_operations kvm_chardev_ops = {
59108 .unlocked_ioctl = kvm_dev_ioctl, 57811 .unlocked_ioctl = kvm_dev_ioctl,
59109 .compat_ioctl = kvm_dev_ioctl, 57812 .compat_ioctl = kvm_dev_ioctl,
59110@@ -2440,6 +2443,9 @@ static struct miscdevice kvm_dev = { 57813@@ -1845,6 +1848,9 @@ static struct miscdevice kvm_dev = {
59111 KVM_MINOR, 57814 KVM_MINOR,
59112 "kvm", 57815 "kvm",
59113 &kvm_chardev_ops, 57816 &kvm_chardev_ops,
@@ -59117,7 +57820,7 @@ diff -urNp linux-2.6.32.24/virt/kvm/kvm_main.c linux-2.6.32.24/virt/kvm/kvm_main
59117 }; 57820 };
59118 57821
59119 static void hardware_enable(void *junk) 57822 static void hardware_enable(void *junk)
59120@@ -2494,7 +2500,7 @@ asmlinkage void kvm_handle_fault_on_rebo 57823@@ -1945,7 +1951,7 @@ asmlinkage void kvm_handle_fault_on_rebo
59121 if (kvm_rebooting) 57824 if (kvm_rebooting)
59122 /* spin while reset goes on */ 57825 /* spin while reset goes on */
59123 while (true) 57826 while (true)
@@ -59126,12 +57829,12 @@ diff -urNp linux-2.6.32.24/virt/kvm/kvm_main.c linux-2.6.32.24/virt/kvm/kvm_main
59126 /* Fault while not rebooting. We want the trace. */ 57829 /* Fault while not rebooting. We want the trace. */
59127 BUG(); 57830 BUG();
59128 } 57831 }
59129@@ -2714,7 +2720,7 @@ static void kvm_sched_out(struct preempt 57832@@ -2179,7 +2185,7 @@ static void kvm_sched_out(struct preempt
59130 kvm_arch_vcpu_put(vcpu); 57833 kvm_arch_vcpu_put(vcpu);
59131 } 57834 }
59132 57835
59133-int kvm_init(void *opaque, unsigned int vcpu_size, 57836-int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
59134+int kvm_init(const void *opaque, unsigned int vcpu_size, 57837+int kvm_init(const void *opaque, unsigned vcpu_size, unsigned vcpu_align,
59135 struct module *module) 57838 struct module *module)
59136 { 57839 {
59137 int r; 57840 int r;
diff --git a/main/linux-grsec/hv-grsec.patch b/main/linux-grsec/hv-grsec.patch
deleted file mode 100644
index 6fde341990..0000000000
--- a/main/linux-grsec/hv-grsec.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
2index b12237f..9d47edb 100644
3--- a/drivers/staging/hv/Hv.c
4+++ b/drivers/staging/hv/Hv.c
5@@ -133,7 +133,7 @@ static u64 HvDoHypercall(u64 Control, void *Input, void *Output)
6 u64 hvStatus = 0;
7 u64 inputAddress = (Input) ? virt_to_phys(Input) : 0;
8 u64 outputAddress = (Output) ? virt_to_phys(Output) : 0;
9- volatile void *hypercallPage = gHvContext.HypercallPage;
10+ volatile void *hypercallPage = ktva_ktla(gHvContext.HypercallPage);
11
12 DPRINT_DBG(VMBUS, "Hypercall <control %llx input phys %llx virt %p "
13 "output phys %llx virt %p hypercall %p>",
diff --git a/main/linux-grsec/kernelconfig.x86 b/main/linux-grsec/kernelconfig.x86
index a6dfc1cddc..a8abd7f623 100644
--- a/main/linux-grsec/kernelconfig.x86
+++ b/main/linux-grsec/kernelconfig.x86
@@ -1,12 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.32.24 3# Linux kernel version: 2.6.35.7
4# Mon Oct 25 09:47:44 2010 4# Tue Oct 26 10:47:49 2010
5# 5#
6# CONFIG_64BIT is not set 6# CONFIG_64BIT is not set
7CONFIG_X86_32=y 7CONFIG_X86_32=y
8# CONFIG_X86_64 is not set 8# CONFIG_X86_64 is not set
9CONFIG_X86=y 9CONFIG_X86=y
10CONFIG_INSTRUCTION_DECODER=y
10CONFIG_OUTPUT_FORMAT="elf32-i386" 11CONFIG_OUTPUT_FORMAT="elf32-i386"
11CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" 12CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
12CONFIG_GENERIC_TIME=y 13CONFIG_GENERIC_TIME=y
@@ -19,6 +20,8 @@ CONFIG_STACKTRACE_SUPPORT=y
19CONFIG_HAVE_LATENCYTOP_SUPPORT=y 20CONFIG_HAVE_LATENCYTOP_SUPPORT=y
20CONFIG_MMU=y 21CONFIG_MMU=y
21CONFIG_ZONE_DMA=y 22CONFIG_ZONE_DMA=y
23# CONFIG_NEED_DMA_MAP_STATE is not set
24CONFIG_NEED_SG_DMA_LENGTH=y
22CONFIG_GENERIC_ISA_DMA=y 25CONFIG_GENERIC_ISA_DMA=y
23CONFIG_GENERIC_IOMAP=y 26CONFIG_GENERIC_IOMAP=y
24CONFIG_GENERIC_BUG=y 27CONFIG_GENERIC_BUG=y
@@ -44,6 +47,7 @@ CONFIG_ARCH_POPULATES_NODE_MAP=y
44# CONFIG_AUDIT_ARCH is not set 47# CONFIG_AUDIT_ARCH is not set
45CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y 48CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
46CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y 49CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
50CONFIG_HAVE_EARLY_RES=y
47CONFIG_GENERIC_HARDIRQS=y 51CONFIG_GENERIC_HARDIRQS=y
48CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 52CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
49CONFIG_GENERIC_IRQ_PROBE=y 53CONFIG_GENERIC_IRQ_PROBE=y
@@ -53,6 +57,7 @@ CONFIG_X86_32_SMP=y
53CONFIG_X86_HT=y 57CONFIG_X86_HT=y
54CONFIG_X86_TRAMPOLINE=y 58CONFIG_X86_TRAMPOLINE=y
55CONFIG_X86_32_LAZY_GS=y 59CONFIG_X86_32_LAZY_GS=y
60CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx"
56CONFIG_KTIME_SCALAR=y 61CONFIG_KTIME_SCALAR=y
57CONFIG_ARCH_CPU_PROBE_RELEASE=y 62CONFIG_ARCH_CPU_PROBE_RELEASE=y
58CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 63CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -64,14 +69,17 @@ CONFIG_CONSTRUCTORS=y
64CONFIG_EXPERIMENTAL=y 69CONFIG_EXPERIMENTAL=y
65CONFIG_LOCK_KERNEL=y 70CONFIG_LOCK_KERNEL=y
66CONFIG_INIT_ENV_ARG_LIMIT=32 71CONFIG_INIT_ENV_ARG_LIMIT=32
72CONFIG_CROSS_COMPILE=""
67CONFIG_LOCALVERSION="" 73CONFIG_LOCALVERSION=""
68# CONFIG_LOCALVERSION_AUTO is not set 74# CONFIG_LOCALVERSION_AUTO is not set
69CONFIG_HAVE_KERNEL_GZIP=y 75CONFIG_HAVE_KERNEL_GZIP=y
70CONFIG_HAVE_KERNEL_BZIP2=y 76CONFIG_HAVE_KERNEL_BZIP2=y
71CONFIG_HAVE_KERNEL_LZMA=y 77CONFIG_HAVE_KERNEL_LZMA=y
78CONFIG_HAVE_KERNEL_LZO=y
72CONFIG_KERNEL_GZIP=y 79CONFIG_KERNEL_GZIP=y
73# CONFIG_KERNEL_BZIP2 is not set 80# CONFIG_KERNEL_BZIP2 is not set
74# CONFIG_KERNEL_LZMA is not set 81# CONFIG_KERNEL_LZMA is not set
82# CONFIG_KERNEL_LZO is not set
75CONFIG_SWAP=y 83CONFIG_SWAP=y
76CONFIG_SYSVIPC=y 84CONFIG_SYSVIPC=y
77CONFIG_SYSVIPC_SYSCTL=y 85CONFIG_SYSVIPC_SYSCTL=y
@@ -86,19 +94,16 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
86# 94#
87CONFIG_TREE_RCU=y 95CONFIG_TREE_RCU=y
88# CONFIG_TREE_PREEMPT_RCU is not set 96# CONFIG_TREE_PREEMPT_RCU is not set
97# CONFIG_TINY_RCU is not set
89# CONFIG_RCU_TRACE is not set 98# CONFIG_RCU_TRACE is not set
90CONFIG_RCU_FANOUT=32 99CONFIG_RCU_FANOUT=32
91# CONFIG_RCU_FANOUT_EXACT is not set 100# CONFIG_RCU_FANOUT_EXACT is not set
101CONFIG_RCU_FAST_NO_HZ=y
92# CONFIG_TREE_RCU_TRACE is not set 102# CONFIG_TREE_RCU_TRACE is not set
93CONFIG_IKCONFIG=m 103CONFIG_IKCONFIG=m
94CONFIG_IKCONFIG_PROC=y 104CONFIG_IKCONFIG_PROC=y
95CONFIG_LOG_BUF_SHIFT=14 105CONFIG_LOG_BUF_SHIFT=14
96CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y 106CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
97CONFIG_GROUP_SCHED=y
98CONFIG_FAIR_GROUP_SCHED=y
99# CONFIG_RT_GROUP_SCHED is not set
100CONFIG_USER_SCHED=y
101# CONFIG_CGROUP_SCHED is not set
102# CONFIG_CGROUPS is not set 107# CONFIG_CGROUPS is not set
103# CONFIG_SYSFS_DEPRECATED_V2 is not set 108# CONFIG_SYSFS_DEPRECATED_V2 is not set
104# CONFIG_RELAY is not set 109# CONFIG_RELAY is not set
@@ -108,6 +113,7 @@ CONFIG_INITRAMFS_SOURCE=""
108CONFIG_RD_GZIP=y 113CONFIG_RD_GZIP=y
109CONFIG_RD_BZIP2=y 114CONFIG_RD_BZIP2=y
110CONFIG_RD_LZMA=y 115CONFIG_RD_LZMA=y
116CONFIG_RD_LZO=y
111CONFIG_CC_OPTIMIZE_FOR_SIZE=y 117CONFIG_CC_OPTIMIZE_FOR_SIZE=y
112CONFIG_SYSCTL=y 118CONFIG_SYSCTL=y
113CONFIG_ANON_INODES=y 119CONFIG_ANON_INODES=y
@@ -144,16 +150,21 @@ CONFIG_SLUB=y
144# CONFIG_SLOB is not set 150# CONFIG_SLOB is not set
145CONFIG_PROFILING=y 151CONFIG_PROFILING=y
146CONFIG_OPROFILE=m 152CONFIG_OPROFILE=m
147# CONFIG_OPROFILE_IBS is not set
148# CONFIG_OPROFILE_EVENT_MULTIPLEX is not set 153# CONFIG_OPROFILE_EVENT_MULTIPLEX is not set
149CONFIG_HAVE_OPROFILE=y 154CONFIG_HAVE_OPROFILE=y
150CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y 155CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
156CONFIG_USER_RETURN_NOTIFIER=y
151CONFIG_HAVE_IOREMAP_PROT=y 157CONFIG_HAVE_IOREMAP_PROT=y
152CONFIG_HAVE_KPROBES=y 158CONFIG_HAVE_KPROBES=y
153CONFIG_HAVE_KRETPROBES=y 159CONFIG_HAVE_KRETPROBES=y
160CONFIG_HAVE_OPTPROBES=y
154CONFIG_HAVE_ARCH_TRACEHOOK=y 161CONFIG_HAVE_ARCH_TRACEHOOK=y
155CONFIG_HAVE_DMA_ATTRS=y 162CONFIG_HAVE_DMA_ATTRS=y
163CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
156CONFIG_HAVE_DMA_API_DEBUG=y 164CONFIG_HAVE_DMA_API_DEBUG=y
165CONFIG_HAVE_HW_BREAKPOINT=y
166CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
167CONFIG_HAVE_USER_RETURN_NOTIFIER=y
157 168
158# 169#
159# GCOV-based kernel profiling 170# GCOV-based kernel profiling
@@ -180,15 +191,43 @@ CONFIG_BLK_DEV_BSG=y
180# IO Schedulers 191# IO Schedulers
181# 192#
182CONFIG_IOSCHED_NOOP=y 193CONFIG_IOSCHED_NOOP=y
183CONFIG_IOSCHED_AS=m
184CONFIG_IOSCHED_DEADLINE=m 194CONFIG_IOSCHED_DEADLINE=m
185CONFIG_IOSCHED_CFQ=y 195CONFIG_IOSCHED_CFQ=y
186# CONFIG_DEFAULT_AS is not set
187# CONFIG_DEFAULT_DEADLINE is not set 196# CONFIG_DEFAULT_DEADLINE is not set
188CONFIG_DEFAULT_CFQ=y 197CONFIG_DEFAULT_CFQ=y
189# CONFIG_DEFAULT_NOOP is not set 198# CONFIG_DEFAULT_NOOP is not set
190CONFIG_DEFAULT_IOSCHED="cfq" 199CONFIG_DEFAULT_IOSCHED="cfq"
191CONFIG_PREEMPT_NOTIFIERS=y 200CONFIG_PREEMPT_NOTIFIERS=y
201CONFIG_PADATA=y
202# CONFIG_INLINE_SPIN_TRYLOCK is not set
203# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
204# CONFIG_INLINE_SPIN_LOCK is not set
205# CONFIG_INLINE_SPIN_LOCK_BH is not set
206# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
207# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
208CONFIG_INLINE_SPIN_UNLOCK=y
209# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
210CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
211# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
212# CONFIG_INLINE_READ_TRYLOCK is not set
213# CONFIG_INLINE_READ_LOCK is not set
214# CONFIG_INLINE_READ_LOCK_BH is not set
215# CONFIG_INLINE_READ_LOCK_IRQ is not set
216# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
217CONFIG_INLINE_READ_UNLOCK=y
218# CONFIG_INLINE_READ_UNLOCK_BH is not set
219CONFIG_INLINE_READ_UNLOCK_IRQ=y
220# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
221# CONFIG_INLINE_WRITE_TRYLOCK is not set
222# CONFIG_INLINE_WRITE_LOCK is not set
223# CONFIG_INLINE_WRITE_LOCK_BH is not set
224# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
225# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
226CONFIG_INLINE_WRITE_UNLOCK=y
227# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
228CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
229# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
230CONFIG_MUTEX_SPIN_ON_OWNER=y
192CONFIG_FREEZER=y 231CONFIG_FREEZER=y
193 232
194# 233#
@@ -216,6 +255,7 @@ CONFIG_LGUEST_GUEST=y
216CONFIG_PARAVIRT=y 255CONFIG_PARAVIRT=y
217# CONFIG_PARAVIRT_SPINLOCKS is not set 256# CONFIG_PARAVIRT_SPINLOCKS is not set
218CONFIG_PARAVIRT_CLOCK=y 257CONFIG_PARAVIRT_CLOCK=y
258CONFIG_NO_BOOTMEM=y
219# CONFIG_MEMTEST is not set 259# CONFIG_MEMTEST is not set
220# CONFIG_M386 is not set 260# CONFIG_M386 is not set
221# CONFIG_M486 is not set 261# CONFIG_M486 is not set
@@ -245,10 +285,9 @@ CONFIG_M586=y
245# CONFIG_GENERIC_CPU is not set 285# CONFIG_GENERIC_CPU is not set
246CONFIG_X86_GENERIC=y 286CONFIG_X86_GENERIC=y
247CONFIG_X86_CPU=y 287CONFIG_X86_CPU=y
248CONFIG_X86_L1_CACHE_BYTES=64 288CONFIG_X86_INTERNODE_CACHE_SHIFT=6
249CONFIG_X86_INTERNODE_CACHE_BYTES=64
250CONFIG_X86_CMPXCHG=y 289CONFIG_X86_CMPXCHG=y
251CONFIG_X86_L1_CACHE_SHIFT=5 290CONFIG_X86_L1_CACHE_SHIFT=6
252CONFIG_X86_XADD=y 291CONFIG_X86_XADD=y
253# CONFIG_X86_PPRO_FENCE is not set 292# CONFIG_X86_PPRO_FENCE is not set
254CONFIG_X86_WP_WORKS_OK=y 293CONFIG_X86_WP_WORKS_OK=y
@@ -318,8 +357,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
318CONFIG_ZONE_DMA_FLAG=1 357CONFIG_ZONE_DMA_FLAG=1
319CONFIG_BOUNCE=y 358CONFIG_BOUNCE=y
320CONFIG_VIRT_TO_BUS=y 359CONFIG_VIRT_TO_BUS=y
321CONFIG_HAVE_MLOCK=y
322CONFIG_HAVE_MLOCKED_PAGE_BIT=y
323CONFIG_MMU_NOTIFIER=y 360CONFIG_MMU_NOTIFIER=y
324# CONFIG_KSM is not set 361# CONFIG_KSM is not set
325CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 362CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
@@ -357,10 +394,12 @@ CONFIG_PM=y
357# CONFIG_PM_DEBUG is not set 394# CONFIG_PM_DEBUG is not set
358CONFIG_PM_SLEEP_SMP=y 395CONFIG_PM_SLEEP_SMP=y
359CONFIG_PM_SLEEP=y 396CONFIG_PM_SLEEP=y
397CONFIG_SUSPEND_NVS=y
360CONFIG_SUSPEND=y 398CONFIG_SUSPEND=y
361CONFIG_SUSPEND_FREEZER=y 399CONFIG_SUSPEND_FREEZER=y
362# CONFIG_HIBERNATION is not set 400# CONFIG_HIBERNATION is not set
363# CONFIG_PM_RUNTIME is not set 401# CONFIG_PM_RUNTIME is not set
402CONFIG_PM_OPS=y
364CONFIG_ACPI=y 403CONFIG_ACPI=y
365CONFIG_ACPI_SLEEP=y 404CONFIG_ACPI_SLEEP=y
366CONFIG_ACPI_PROCFS=y 405CONFIG_ACPI_PROCFS=y
@@ -385,6 +424,10 @@ CONFIG_ACPI_PCI_SLOT=m
385CONFIG_X86_PM_TIMER=y 424CONFIG_X86_PM_TIMER=y
386CONFIG_ACPI_CONTAINER=m 425CONFIG_ACPI_CONTAINER=m
387CONFIG_ACPI_SBS=m 426CONFIG_ACPI_SBS=m
427CONFIG_ACPI_HED=m
428CONFIG_ACPI_APEI=y
429CONFIG_ACPI_APEI_GHES=m
430CONFIG_ACPI_APEI_EINJ=m
388# CONFIG_SFI is not set 431# CONFIG_SFI is not set
389# CONFIG_APM is not set 432# CONFIG_APM is not set
390 433
@@ -410,6 +453,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
410# 453#
411# CPUFreq processor drivers 454# CPUFreq processor drivers
412# 455#
456CONFIG_X86_PCC_CPUFREQ=m
413CONFIG_X86_ACPI_CPUFREQ=m 457CONFIG_X86_ACPI_CPUFREQ=m
414CONFIG_X86_POWERNOW_K6=m 458CONFIG_X86_POWERNOW_K6=m
415CONFIG_X86_POWERNOW_K7=m 459CONFIG_X86_POWERNOW_K7=m
@@ -434,6 +478,7 @@ CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y
434CONFIG_CPU_IDLE=y 478CONFIG_CPU_IDLE=y
435CONFIG_CPU_IDLE_GOV_LADDER=y 479CONFIG_CPU_IDLE_GOV_LADDER=y
436CONFIG_CPU_IDLE_GOV_MENU=y 480CONFIG_CPU_IDLE_GOV_MENU=y
481CONFIG_INTEL_IDLE=m
437 482
438# 483#
439# Bus options (PCI etc.) 484# Bus options (PCI etc.)
@@ -448,6 +493,7 @@ CONFIG_PCI_BIOS=y
448CONFIG_PCI_DIRECT=y 493CONFIG_PCI_DIRECT=y
449CONFIG_PCI_MMCONFIG=y 494CONFIG_PCI_MMCONFIG=y
450CONFIG_PCI_DOMAINS=y 495CONFIG_PCI_DOMAINS=y
496CONFIG_PCI_CNB20LE_QUIRK=y
451CONFIG_PCIEPORTBUS=y 497CONFIG_PCIEPORTBUS=y
452CONFIG_HOTPLUG_PCI_PCIE=m 498CONFIG_HOTPLUG_PCI_PCIE=m
453# CONFIG_PCIEAER is not set 499# CONFIG_PCIEAER is not set
@@ -455,10 +501,10 @@ CONFIG_PCIEASPM=y
455# CONFIG_PCIEASPM_DEBUG is not set 501# CONFIG_PCIEASPM_DEBUG is not set
456CONFIG_ARCH_SUPPORTS_MSI=y 502CONFIG_ARCH_SUPPORTS_MSI=y
457# CONFIG_PCI_MSI is not set 503# CONFIG_PCI_MSI is not set
458CONFIG_PCI_LEGACY=y
459CONFIG_PCI_STUB=m 504CONFIG_PCI_STUB=m
460CONFIG_HT_IRQ=y 505CONFIG_HT_IRQ=y
461# CONFIG_PCI_IOV is not set 506# CONFIG_PCI_IOV is not set
507CONFIG_PCI_IOAPIC=y
462CONFIG_ISA_DMA_API=y 508CONFIG_ISA_DMA_API=y
463CONFIG_ISA=y 509CONFIG_ISA=y
464# CONFIG_EISA is not set 510# CONFIG_EISA is not set
@@ -468,10 +514,8 @@ CONFIG_SCx200HR_TIMER=m
468# CONFIG_OLPC is not set 514# CONFIG_OLPC is not set
469CONFIG_K8_NB=y 515CONFIG_K8_NB=y
470CONFIG_PCCARD=m 516CONFIG_PCCARD=m
471# CONFIG_PCMCIA_DEBUG is not set
472CONFIG_PCMCIA=m 517CONFIG_PCMCIA=m
473CONFIG_PCMCIA_LOAD_CIS=y 518CONFIG_PCMCIA_LOAD_CIS=y
474CONFIG_PCMCIA_IOCTL=y
475CONFIG_CARDBUS=y 519CONFIG_CARDBUS=y
476 520
477# 521#
@@ -488,7 +532,7 @@ CONFIG_I82092=m
488CONFIG_I82365=m 532CONFIG_I82365=m
489CONFIG_TCIC=m 533CONFIG_TCIC=m
490CONFIG_PCMCIA_PROBE=y 534CONFIG_PCMCIA_PROBE=y
491CONFIG_PCCARD_NONSTATIC=m 535CONFIG_PCCARD_NONSTATIC=y
492CONFIG_HOTPLUG_PCI=m 536CONFIG_HOTPLUG_PCI=m
493CONFIG_HOTPLUG_PCI_FAKE=m 537CONFIG_HOTPLUG_PCI_FAKE=m
494CONFIG_HOTPLUG_PCI_COMPAQ=m 538CONFIG_HOTPLUG_PCI_COMPAQ=m
@@ -515,7 +559,6 @@ CONFIG_NET=y
515# Networking options 559# Networking options
516# 560#
517CONFIG_PACKET=m 561CONFIG_PACKET=m
518CONFIG_PACKET_MMAP=y
519CONFIG_UNIX=y 562CONFIG_UNIX=y
520CONFIG_XFRM=y 563CONFIG_XFRM=y
521CONFIG_XFRM_USER=m 564CONFIG_XFRM_USER=m
@@ -542,6 +585,7 @@ CONFIG_NET_IPIP=m
542CONFIG_NET_IPGRE=m 585CONFIG_NET_IPGRE=m
543CONFIG_NET_IPGRE_BROADCAST=y 586CONFIG_NET_IPGRE_BROADCAST=y
544CONFIG_IP_MROUTE=y 587CONFIG_IP_MROUTE=y
588CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
545# CONFIG_IP_PIMSM_V1 is not set 589# CONFIG_IP_PIMSM_V1 is not set
546CONFIG_IP_PIMSM_V2=y 590CONFIG_IP_PIMSM_V2=y
547CONFIG_ARPD=y 591CONFIG_ARPD=y
@@ -573,7 +617,9 @@ CONFIG_TCP_CONG_ILLINOIS=m
573# CONFIG_DEFAULT_BIC is not set 617# CONFIG_DEFAULT_BIC is not set
574CONFIG_DEFAULT_CUBIC=y 618CONFIG_DEFAULT_CUBIC=y
575# CONFIG_DEFAULT_HTCP is not set 619# CONFIG_DEFAULT_HTCP is not set
620# CONFIG_DEFAULT_HYBLA is not set
576# CONFIG_DEFAULT_VEGAS is not set 621# CONFIG_DEFAULT_VEGAS is not set
622# CONFIG_DEFAULT_VENO is not set
577# CONFIG_DEFAULT_WESTWOOD is not set 623# CONFIG_DEFAULT_WESTWOOD is not set
578# CONFIG_DEFAULT_RENO is not set 624# CONFIG_DEFAULT_RENO is not set
579CONFIG_DEFAULT_TCP_CONG="cubic" 625CONFIG_DEFAULT_TCP_CONG="cubic"
@@ -594,11 +640,13 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
594CONFIG_INET6_XFRM_MODE_BEET=m 640CONFIG_INET6_XFRM_MODE_BEET=m
595CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m 641CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
596CONFIG_IPV6_SIT=m 642CONFIG_IPV6_SIT=m
643CONFIG_IPV6_SIT_6RD=y
597CONFIG_IPV6_NDISC_NODETYPE=y 644CONFIG_IPV6_NDISC_NODETYPE=y
598CONFIG_IPV6_TUNNEL=m 645CONFIG_IPV6_TUNNEL=m
599CONFIG_IPV6_MULTIPLE_TABLES=y 646CONFIG_IPV6_MULTIPLE_TABLES=y
600CONFIG_IPV6_SUBTREES=y 647CONFIG_IPV6_SUBTREES=y
601CONFIG_IPV6_MROUTE=y 648CONFIG_IPV6_MROUTE=y
649CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
602CONFIG_IPV6_PIMSM_V2=y 650CONFIG_IPV6_PIMSM_V2=y
603CONFIG_NETLABEL=y 651CONFIG_NETLABEL=y
604CONFIG_NETWORK_SECMARK=y 652CONFIG_NETWORK_SECMARK=y
@@ -617,6 +665,7 @@ CONFIG_NF_CONNTRACK=m
617CONFIG_NF_CT_ACCT=y 665CONFIG_NF_CT_ACCT=y
618CONFIG_NF_CONNTRACK_MARK=y 666CONFIG_NF_CONNTRACK_MARK=y
619CONFIG_NF_CONNTRACK_SECMARK=y 667CONFIG_NF_CONNTRACK_SECMARK=y
668CONFIG_NF_CONNTRACK_ZONES=y
620CONFIG_NF_CONNTRACK_EVENTS=y 669CONFIG_NF_CONNTRACK_EVENTS=y
621CONFIG_NF_CT_PROTO_DCCP=m 670CONFIG_NF_CT_PROTO_DCCP=m
622CONFIG_NF_CT_PROTO_GRE=m 671CONFIG_NF_CT_PROTO_GRE=m
@@ -634,9 +683,20 @@ CONFIG_NF_CONNTRACK_TFTP=m
634CONFIG_NF_CT_NETLINK=m 683CONFIG_NF_CT_NETLINK=m
635CONFIG_NETFILTER_TPROXY=m 684CONFIG_NETFILTER_TPROXY=m
636CONFIG_NETFILTER_XTABLES=m 685CONFIG_NETFILTER_XTABLES=m
686
687#
688# Xtables combined modules
689#
690CONFIG_NETFILTER_XT_MARK=m
691CONFIG_NETFILTER_XT_CONNMARK=m
692
693#
694# Xtables targets
695#
637CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 696CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
638CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 697CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
639CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m 698CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
699CONFIG_NETFILTER_XT_TARGET_CT=m
640CONFIG_NETFILTER_XT_TARGET_DSCP=m 700CONFIG_NETFILTER_XT_TARGET_DSCP=m
641CONFIG_NETFILTER_XT_TARGET_HL=m 701CONFIG_NETFILTER_XT_TARGET_HL=m
642CONFIG_NETFILTER_XT_TARGET_LED=m 702CONFIG_NETFILTER_XT_TARGET_LED=m
@@ -645,11 +705,16 @@ CONFIG_NETFILTER_XT_TARGET_NFLOG=m
645CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 705CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
646CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 706CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
647CONFIG_NETFILTER_XT_TARGET_RATEEST=m 707CONFIG_NETFILTER_XT_TARGET_RATEEST=m
708CONFIG_NETFILTER_XT_TARGET_TEE=m
648CONFIG_NETFILTER_XT_TARGET_TPROXY=m 709CONFIG_NETFILTER_XT_TARGET_TPROXY=m
649CONFIG_NETFILTER_XT_TARGET_TRACE=m 710CONFIG_NETFILTER_XT_TARGET_TRACE=m
650CONFIG_NETFILTER_XT_TARGET_SECMARK=m 711CONFIG_NETFILTER_XT_TARGET_SECMARK=m
651CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 712CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
652CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m 713CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
714
715#
716# Xtables matches
717#
653CONFIG_NETFILTER_XT_MATCH_CLUSTER=m 718CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
654CONFIG_NETFILTER_XT_MATCH_COMMENT=m 719CONFIG_NETFILTER_XT_MATCH_COMMENT=m
655CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m 720CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
@@ -669,6 +734,7 @@ CONFIG_NETFILTER_XT_MATCH_LIMIT=m
669CONFIG_NETFILTER_XT_MATCH_MAC=m 734CONFIG_NETFILTER_XT_MATCH_MAC=m
670CONFIG_NETFILTER_XT_MATCH_MARK=m 735CONFIG_NETFILTER_XT_MATCH_MARK=m
671CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m 736CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
737CONFIG_NETFILTER_XT_MATCH_OSF=m
672CONFIG_NETFILTER_XT_MATCH_OWNER=m 738CONFIG_NETFILTER_XT_MATCH_OWNER=m
673CONFIG_NETFILTER_XT_MATCH_POLICY=m 739CONFIG_NETFILTER_XT_MATCH_POLICY=m
674CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m 740CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
@@ -677,7 +743,6 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m
677CONFIG_NETFILTER_XT_MATCH_RATEEST=m 743CONFIG_NETFILTER_XT_MATCH_RATEEST=m
678CONFIG_NETFILTER_XT_MATCH_REALM=m 744CONFIG_NETFILTER_XT_MATCH_REALM=m
679CONFIG_NETFILTER_XT_MATCH_RECENT=m 745CONFIG_NETFILTER_XT_MATCH_RECENT=m
680# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
681CONFIG_NETFILTER_XT_MATCH_SCTP=m 746CONFIG_NETFILTER_XT_MATCH_SCTP=m
682CONFIG_NETFILTER_XT_MATCH_SOCKET=m 747CONFIG_NETFILTER_XT_MATCH_SOCKET=m
683CONFIG_NETFILTER_XT_MATCH_STATE=m 748CONFIG_NETFILTER_XT_MATCH_STATE=m
@@ -686,7 +751,6 @@ CONFIG_NETFILTER_XT_MATCH_STRING=m
686CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 751CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
687CONFIG_NETFILTER_XT_MATCH_TIME=m 752CONFIG_NETFILTER_XT_MATCH_TIME=m
688CONFIG_NETFILTER_XT_MATCH_U32=m 753CONFIG_NETFILTER_XT_MATCH_U32=m
689CONFIG_NETFILTER_XT_MATCH_OSF=m
690CONFIG_IP_VS=m 754CONFIG_IP_VS=m
691CONFIG_IP_VS_IPV6=y 755CONFIG_IP_VS_IPV6=y
692# CONFIG_IP_VS_DEBUG is not set 756# CONFIG_IP_VS_DEBUG is not set
@@ -700,6 +764,7 @@ CONFIG_IP_VS_PROTO_UDP=y
700CONFIG_IP_VS_PROTO_AH_ESP=y 764CONFIG_IP_VS_PROTO_AH_ESP=y
701CONFIG_IP_VS_PROTO_ESP=y 765CONFIG_IP_VS_PROTO_ESP=y
702CONFIG_IP_VS_PROTO_AH=y 766CONFIG_IP_VS_PROTO_AH=y
767CONFIG_IP_VS_PROTO_SCTP=y
703 768
704# 769#
705# IPVS scheduler 770# IPVS scheduler
@@ -842,8 +907,14 @@ CONFIG_ATM_LANE=m
842CONFIG_ATM_MPOA=m 907CONFIG_ATM_MPOA=m
843CONFIG_ATM_BR2684=m 908CONFIG_ATM_BR2684=m
844# CONFIG_ATM_BR2684_IPFILTER is not set 909# CONFIG_ATM_BR2684_IPFILTER is not set
910CONFIG_L2TP=m
911CONFIG_L2TP_DEBUGFS=m
912CONFIG_L2TP_V3=y
913CONFIG_L2TP_IP=m
914CONFIG_L2TP_ETH=m
845CONFIG_STP=m 915CONFIG_STP=m
846CONFIG_BRIDGE=m 916CONFIG_BRIDGE=m
917CONFIG_BRIDGE_IGMP_SNOOPING=y
847# CONFIG_NET_DSA is not set 918# CONFIG_NET_DSA is not set
848CONFIG_VLAN_8021Q=m 919CONFIG_VLAN_8021Q=m
849# CONFIG_VLAN_8021Q_GVRP is not set 920# CONFIG_VLAN_8021Q_GVRP is not set
@@ -926,6 +997,7 @@ CONFIG_NET_ACT_SKBEDIT=m
926# CONFIG_NET_CLS_IND is not set 997# CONFIG_NET_CLS_IND is not set
927CONFIG_NET_SCH_FIFO=y 998CONFIG_NET_SCH_FIFO=y
928# CONFIG_DCB is not set 999# CONFIG_DCB is not set
1000CONFIG_RPS=y
929 1001
930# 1002#
931# Network testing 1003# Network testing
@@ -942,11 +1014,14 @@ CONFIG_CAN_BCM=m
942CONFIG_CAN_VCAN=m 1014CONFIG_CAN_VCAN=m
943CONFIG_CAN_DEV=m 1015CONFIG_CAN_DEV=m
944# CONFIG_CAN_CALC_BITTIMING is not set 1016# CONFIG_CAN_CALC_BITTIMING is not set
1017CONFIG_CAN_MCP251X=m
1018CONFIG_CAN_JANZ_ICAN3=m
945CONFIG_CAN_SJA1000=m 1019CONFIG_CAN_SJA1000=m
946# CONFIG_CAN_SJA1000_ISA is not set 1020# CONFIG_CAN_SJA1000_ISA is not set
947CONFIG_CAN_SJA1000_PLATFORM=m 1021CONFIG_CAN_SJA1000_PLATFORM=m
948CONFIG_CAN_EMS_PCI=m 1022CONFIG_CAN_EMS_PCI=m
949CONFIG_CAN_KVASER_PCI=m 1023CONFIG_CAN_KVASER_PCI=m
1024CONFIG_CAN_PLX_PCI=m
950 1025
951# 1026#
952# CAN USB interfaces 1027# CAN USB interfaces
@@ -1012,6 +1087,7 @@ CONFIG_VIA_FIR=m
1012CONFIG_MCS_FIR=m 1087CONFIG_MCS_FIR=m
1013CONFIG_BT=m 1088CONFIG_BT=m
1014CONFIG_BT_L2CAP=m 1089CONFIG_BT_L2CAP=m
1090# CONFIG_BT_L2CAP_EXT_FEATURES is not set
1015CONFIG_BT_SCO=m 1091CONFIG_BT_SCO=m
1016CONFIG_BT_RFCOMM=m 1092CONFIG_BT_RFCOMM=m
1017CONFIG_BT_RFCOMM_TTY=y 1093CONFIG_BT_RFCOMM_TTY=y
@@ -1039,20 +1115,25 @@ CONFIG_BT_HCIBLUECARD=m
1039CONFIG_BT_HCIBTUART=m 1115CONFIG_BT_HCIBTUART=m
1040CONFIG_BT_HCIVHCI=m 1116CONFIG_BT_HCIVHCI=m
1041# CONFIG_BT_MRVL is not set 1117# CONFIG_BT_MRVL is not set
1118CONFIG_BT_ATH3K=m
1042CONFIG_AF_RXRPC=m 1119CONFIG_AF_RXRPC=m
1043# CONFIG_AF_RXRPC_DEBUG is not set 1120# CONFIG_AF_RXRPC_DEBUG is not set
1044CONFIG_RXKAD=m 1121CONFIG_RXKAD=m
1045CONFIG_FIB_RULES=y 1122CONFIG_FIB_RULES=y
1046CONFIG_WIRELESS=y 1123CONFIG_WIRELESS=y
1124CONFIG_WIRELESS_EXT=y
1125CONFIG_WEXT_CORE=y
1126CONFIG_WEXT_PROC=y
1127CONFIG_WEXT_SPY=y
1128CONFIG_WEXT_PRIV=y
1047CONFIG_CFG80211=m 1129CONFIG_CFG80211=m
1048# CONFIG_NL80211_TESTMODE is not set 1130# CONFIG_NL80211_TESTMODE is not set
1049# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set 1131# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
1050# CONFIG_CFG80211_REG_DEBUG is not set 1132# CONFIG_CFG80211_REG_DEBUG is not set
1051CONFIG_CFG80211_DEFAULT_PS=y 1133CONFIG_CFG80211_DEFAULT_PS=y
1052CONFIG_CFG80211_DEFAULT_PS_VALUE=1
1053# CONFIG_CFG80211_DEBUGFS is not set 1134# CONFIG_CFG80211_DEBUGFS is not set
1054CONFIG_WIRELESS_OLD_REGULATORY=y 1135# CONFIG_CFG80211_INTERNAL_REGDB is not set
1055CONFIG_WIRELESS_EXT=y 1136CONFIG_CFG80211_WEXT=y
1056CONFIG_WIRELESS_EXT_SYSFS=y 1137CONFIG_WIRELESS_EXT_SYSFS=y
1057CONFIG_LIB80211=m 1138CONFIG_LIB80211=m
1058CONFIG_LIB80211_CRYPT_WEP=m 1139CONFIG_LIB80211_CRYPT_WEP=m
@@ -1079,6 +1160,9 @@ CONFIG_NET_9P=m
1079CONFIG_NET_9P_VIRTIO=m 1160CONFIG_NET_9P_VIRTIO=m
1080CONFIG_NET_9P_RDMA=m 1161CONFIG_NET_9P_RDMA=m
1081# CONFIG_NET_9P_DEBUG is not set 1162# CONFIG_NET_9P_DEBUG is not set
1163CONFIG_CAIF=m
1164# CONFIG_CAIF_DEBUG is not set
1165CONFIG_CAIF_NETDEV=m
1082 1166
1083# 1167#
1084# Device Drivers 1168# Device Drivers
@@ -1121,6 +1205,7 @@ CONFIG_NFTL_RW=y
1121CONFIG_INFTL=m 1205CONFIG_INFTL=m
1122CONFIG_RFD_FTL=m 1206CONFIG_RFD_FTL=m
1123CONFIG_SSFDC=m 1207CONFIG_SSFDC=m
1208CONFIG_SM_FTL=m
1124CONFIG_MTD_OOPS=m 1209CONFIG_MTD_OOPS=m
1125 1210
1126# 1211#
@@ -1167,6 +1252,8 @@ CONFIG_MTD_SCB2_FLASH=m
1167CONFIG_MTD_NETtel=m 1252CONFIG_MTD_NETtel=m
1168CONFIG_MTD_L440GX=m 1253CONFIG_MTD_L440GX=m
1169CONFIG_MTD_PCI=m 1254CONFIG_MTD_PCI=m
1255CONFIG_MTD_PCMCIA=m
1256# CONFIG_MTD_PCMCIA_ANONYMOUS is not set
1170# CONFIG_MTD_GPIO_ADDR is not set 1257# CONFIG_MTD_GPIO_ADDR is not set
1171CONFIG_MTD_INTEL_VR_NOR=m 1258CONFIG_MTD_INTEL_VR_NOR=m
1172CONFIG_MTD_PLATRAM=m 1259CONFIG_MTD_PLATRAM=m
@@ -1202,11 +1289,16 @@ CONFIG_MTD_DOCPROBE_ADVANCED=y
1202CONFIG_MTD_DOCPROBE_ADDRESS=0x0000 1289CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
1203# CONFIG_MTD_DOCPROBE_HIGH is not set 1290# CONFIG_MTD_DOCPROBE_HIGH is not set
1204# CONFIG_MTD_DOCPROBE_55AA is not set 1291# CONFIG_MTD_DOCPROBE_55AA is not set
1292CONFIG_MTD_NAND_ECC=m
1293CONFIG_MTD_NAND_ECC_SMC=y
1205CONFIG_MTD_NAND=m 1294CONFIG_MTD_NAND=m
1206# CONFIG_MTD_NAND_VERIFY_WRITE is not set 1295# CONFIG_MTD_NAND_VERIFY_WRITE is not set
1207CONFIG_MTD_NAND_ECC_SMC=y 1296CONFIG_MTD_SM_COMMON=m
1208# CONFIG_MTD_NAND_MUSEUM_IDS is not set 1297# CONFIG_MTD_NAND_MUSEUM_IDS is not set
1298CONFIG_MTD_NAND_DENALI=m
1299CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR=0xFF108018
1209CONFIG_MTD_NAND_IDS=m 1300CONFIG_MTD_NAND_IDS=m
1301CONFIG_MTD_NAND_RICOH=m
1210CONFIG_MTD_NAND_DISKONCHIP=m 1302CONFIG_MTD_NAND_DISKONCHIP=m
1211# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set 1303# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
1212CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 1304CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
@@ -1273,6 +1365,7 @@ CONFIG_BLK_DEV_UMEM=m
1273# CONFIG_BLK_DEV_COW_COMMON is not set 1365# CONFIG_BLK_DEV_COW_COMMON is not set
1274CONFIG_BLK_DEV_LOOP=m 1366CONFIG_BLK_DEV_LOOP=m
1275CONFIG_BLK_DEV_CRYPTOLOOP=m 1367CONFIG_BLK_DEV_CRYPTOLOOP=m
1368# CONFIG_BLK_DEV_DRBD is not set
1276CONFIG_BLK_DEV_NBD=m 1369CONFIG_BLK_DEV_NBD=m
1277CONFIG_BLK_DEV_OSD=m 1370CONFIG_BLK_DEV_OSD=m
1278CONFIG_BLK_DEV_SX8=m 1371CONFIG_BLK_DEV_SX8=m
@@ -1288,6 +1381,9 @@ CONFIG_ATA_OVER_ETH=m
1288CONFIG_VIRTIO_BLK=m 1381CONFIG_VIRTIO_BLK=m
1289# CONFIG_BLK_DEV_HD is not set 1382# CONFIG_BLK_DEV_HD is not set
1290CONFIG_MISC_DEVICES=y 1383CONFIG_MISC_DEVICES=y
1384CONFIG_AD525X_DPOT=m
1385CONFIG_AD525X_DPOT_I2C=m
1386CONFIG_AD525X_DPOT_SPI=m
1291CONFIG_IBM_ASM=m 1387CONFIG_IBM_ASM=m
1292CONFIG_PHANTOM=m 1388CONFIG_PHANTOM=m
1293CONFIG_SGI_IOC4=m 1389CONFIG_SGI_IOC4=m
@@ -1295,9 +1391,15 @@ CONFIG_TIFM_CORE=m
1295CONFIG_TIFM_7XX1=m 1391CONFIG_TIFM_7XX1=m
1296CONFIG_ICS932S401=m 1392CONFIG_ICS932S401=m
1297CONFIG_ENCLOSURE_SERVICES=m 1393CONFIG_ENCLOSURE_SERVICES=m
1394CONFIG_CS5535_MFGPT=m
1395CONFIG_CS5535_MFGPT_DEFAULT_IRQ=7
1396CONFIG_CS5535_CLOCK_EVENT_SRC=m
1298CONFIG_HP_ILO=m 1397CONFIG_HP_ILO=m
1299CONFIG_DELL_LAPTOP=m
1300CONFIG_ISL29003=m 1398CONFIG_ISL29003=m
1399CONFIG_SENSORS_TSL2550=m
1400CONFIG_DS1682=m
1401CONFIG_TI_DAC7512=m
1402CONFIG_VMWARE_BALLOON=m
1301CONFIG_C2PORT=m 1403CONFIG_C2PORT=m
1302CONFIG_C2PORT_DURAMAR_2150=m 1404CONFIG_C2PORT_DURAMAR_2150=m
1303 1405
@@ -1312,12 +1414,16 @@ CONFIG_EEPROM_93CX6=m
1312CONFIG_CB710_CORE=m 1414CONFIG_CB710_CORE=m
1313# CONFIG_CB710_DEBUG is not set 1415# CONFIG_CB710_DEBUG is not set
1314CONFIG_CB710_DEBUG_ASSUMPTIONS=y 1416CONFIG_CB710_DEBUG_ASSUMPTIONS=y
1417CONFIG_IWMC3200TOP=m
1418# CONFIG_IWMC3200TOP_DEBUG is not set
1419# CONFIG_IWMC3200TOP_DEBUGFS is not set
1315CONFIG_HAVE_IDE=y 1420CONFIG_HAVE_IDE=y
1316# CONFIG_IDE is not set 1421# CONFIG_IDE is not set
1317 1422
1318# 1423#
1319# SCSI device support 1424# SCSI device support
1320# 1425#
1426CONFIG_SCSI_MOD=m
1321CONFIG_RAID_ATTRS=m 1427CONFIG_RAID_ATTRS=m
1322CONFIG_SCSI=m 1428CONFIG_SCSI=m
1323CONFIG_SCSI_DMA=y 1429CONFIG_SCSI_DMA=y
@@ -1362,7 +1468,9 @@ CONFIG_SCSI_CXGB3_ISCSI=m
1362CONFIG_SCSI_BNX2_ISCSI=m 1468CONFIG_SCSI_BNX2_ISCSI=m
1363# CONFIG_BE2ISCSI is not set 1469# CONFIG_BE2ISCSI is not set
1364CONFIG_BLK_DEV_3W_XXXX_RAID=m 1470CONFIG_BLK_DEV_3W_XXXX_RAID=m
1471CONFIG_SCSI_HPSA=m
1365CONFIG_SCSI_3W_9XXX=m 1472CONFIG_SCSI_3W_9XXX=m
1473CONFIG_SCSI_3W_SAS=m
1366CONFIG_SCSI_7000FASST=m 1474CONFIG_SCSI_7000FASST=m
1367CONFIG_SCSI_ACARD=m 1475CONFIG_SCSI_ACARD=m
1368CONFIG_SCSI_AHA152X=m 1476CONFIG_SCSI_AHA152X=m
@@ -1402,6 +1510,7 @@ CONFIG_SCSI_MPT2SAS_MAX_SGE=128
1402CONFIG_SCSI_HPTIOP=m 1510CONFIG_SCSI_HPTIOP=m
1403CONFIG_SCSI_BUSLOGIC=m 1511CONFIG_SCSI_BUSLOGIC=m
1404CONFIG_SCSI_FLASHPOINT=y 1512CONFIG_SCSI_FLASHPOINT=y
1513CONFIG_VMWARE_PVSCSI=m
1405CONFIG_LIBFC=m 1514CONFIG_LIBFC=m
1406CONFIG_LIBFCOE=m 1515CONFIG_LIBFCOE=m
1407CONFIG_FCOE=m 1516CONFIG_FCOE=m
@@ -1453,6 +1562,7 @@ CONFIG_SCSI_ULTRASTOR=m
1453CONFIG_SCSI_NSP32=m 1562CONFIG_SCSI_NSP32=m
1454CONFIG_SCSI_DEBUG=m 1563CONFIG_SCSI_DEBUG=m
1455# CONFIG_SCSI_PMCRAID is not set 1564# CONFIG_SCSI_PMCRAID is not set
1565CONFIG_SCSI_PM8001=m
1456CONFIG_SCSI_SRP=m 1566CONFIG_SCSI_SRP=m
1457# CONFIG_SCSI_BFA_FC is not set 1567# CONFIG_SCSI_BFA_FC is not set
1458CONFIG_SCSI_LOWLEVEL_PCMCIA=y 1568CONFIG_SCSI_LOWLEVEL_PCMCIA=y
@@ -1475,30 +1585,46 @@ CONFIG_ATA=m
1475CONFIG_ATA_VERBOSE_ERROR=y 1585CONFIG_ATA_VERBOSE_ERROR=y
1476CONFIG_ATA_ACPI=y 1586CONFIG_ATA_ACPI=y
1477CONFIG_SATA_PMP=y 1587CONFIG_SATA_PMP=y
1588
1589#
1590# Controllers with non-SFF native interface
1591#
1478CONFIG_SATA_AHCI=m 1592CONFIG_SATA_AHCI=m
1593CONFIG_SATA_AHCI_PLATFORM=m
1594CONFIG_SATA_INIC162X=m
1479CONFIG_SATA_SIL24=m 1595CONFIG_SATA_SIL24=m
1480CONFIG_ATA_SFF=y 1596CONFIG_ATA_SFF=y
1481CONFIG_SATA_SVW=m 1597
1598#
1599# SFF controllers with custom DMA interface
1600#
1601CONFIG_PDC_ADMA=m
1602CONFIG_SATA_QSTOR=m
1603CONFIG_SATA_SX4=m
1604CONFIG_ATA_BMDMA=y
1605
1606#
1607# SATA SFF controllers with BMDMA
1608#
1482CONFIG_ATA_PIIX=m 1609CONFIG_ATA_PIIX=m
1483CONFIG_SATA_MV=m 1610CONFIG_SATA_MV=m
1484CONFIG_SATA_NV=m 1611CONFIG_SATA_NV=m
1485CONFIG_PDC_ADMA=m
1486CONFIG_SATA_QSTOR=m
1487CONFIG_SATA_PROMISE=m 1612CONFIG_SATA_PROMISE=m
1488CONFIG_SATA_SX4=m
1489CONFIG_SATA_SIL=m 1613CONFIG_SATA_SIL=m
1490CONFIG_SATA_SIS=m 1614CONFIG_SATA_SIS=m
1615CONFIG_SATA_SVW=m
1491CONFIG_SATA_ULI=m 1616CONFIG_SATA_ULI=m
1492CONFIG_SATA_VIA=m 1617CONFIG_SATA_VIA=m
1493CONFIG_SATA_VITESSE=m 1618CONFIG_SATA_VITESSE=m
1494CONFIG_SATA_INIC162X=m 1619
1495CONFIG_PATA_ACPI=m 1620#
1621# PATA SFF controllers with BMDMA
1622#
1496CONFIG_PATA_ALI=m 1623CONFIG_PATA_ALI=m
1497CONFIG_PATA_AMD=m 1624CONFIG_PATA_AMD=m
1498CONFIG_PATA_ARTOP=m 1625CONFIG_PATA_ARTOP=m
1499CONFIG_PATA_ATP867X=m
1500CONFIG_PATA_ATIIXP=m 1626CONFIG_PATA_ATIIXP=m
1501CONFIG_PATA_CMD640_PCI=m 1627CONFIG_PATA_ATP867X=m
1502CONFIG_PATA_CMD64X=m 1628CONFIG_PATA_CMD64X=m
1503CONFIG_PATA_CS5520=m 1629CONFIG_PATA_CS5520=m
1504CONFIG_PATA_CS5530=m 1630CONFIG_PATA_CS5530=m
@@ -1506,43 +1632,54 @@ CONFIG_PATA_CS5535=m
1506CONFIG_PATA_CS5536=m 1632CONFIG_PATA_CS5536=m
1507CONFIG_PATA_CYPRESS=m 1633CONFIG_PATA_CYPRESS=m
1508CONFIG_PATA_EFAR=m 1634CONFIG_PATA_EFAR=m
1509CONFIG_ATA_GENERIC=m
1510CONFIG_PATA_HPT366=m 1635CONFIG_PATA_HPT366=m
1511CONFIG_PATA_HPT37X=m 1636CONFIG_PATA_HPT37X=m
1512CONFIG_PATA_HPT3X2N=m 1637CONFIG_PATA_HPT3X2N=m
1513CONFIG_PATA_HPT3X3=m 1638CONFIG_PATA_HPT3X3=m
1514CONFIG_PATA_HPT3X3_DMA=y 1639CONFIG_PATA_HPT3X3_DMA=y
1515CONFIG_PATA_ISAPNP=m
1516CONFIG_PATA_IT821X=m
1517CONFIG_PATA_IT8213=m 1640CONFIG_PATA_IT8213=m
1641CONFIG_PATA_IT821X=m
1518CONFIG_PATA_JMICRON=m 1642CONFIG_PATA_JMICRON=m
1519CONFIG_PATA_LEGACY=m
1520CONFIG_PATA_TRIFLEX=m
1521CONFIG_PATA_MARVELL=m 1643CONFIG_PATA_MARVELL=m
1522CONFIG_PATA_MPIIX=m
1523CONFIG_PATA_OLDPIIX=m
1524CONFIG_PATA_NETCELL=m 1644CONFIG_PATA_NETCELL=m
1525CONFIG_PATA_NINJA32=m 1645CONFIG_PATA_NINJA32=m
1526CONFIG_PATA_NS87410=m
1527CONFIG_PATA_NS87415=m 1646CONFIG_PATA_NS87415=m
1528CONFIG_PATA_OPTI=m 1647CONFIG_PATA_OLDPIIX=m
1529CONFIG_PATA_OPTIDMA=m 1648CONFIG_PATA_OPTIDMA=m
1530CONFIG_PATA_PCMCIA=m 1649CONFIG_PATA_PDC2027X=m
1531CONFIG_PATA_PDC_OLD=m 1650CONFIG_PATA_PDC_OLD=m
1532CONFIG_PATA_QDI=m
1533CONFIG_PATA_RADISYS=m 1651CONFIG_PATA_RADISYS=m
1534CONFIG_PATA_RDC=m 1652CONFIG_PATA_RDC=m
1535CONFIG_PATA_RZ1000=m
1536CONFIG_PATA_SC1200=m 1653CONFIG_PATA_SC1200=m
1654CONFIG_PATA_SCH=m
1537CONFIG_PATA_SERVERWORKS=m 1655CONFIG_PATA_SERVERWORKS=m
1538CONFIG_PATA_PDC2027X=m
1539CONFIG_PATA_SIL680=m 1656CONFIG_PATA_SIL680=m
1540CONFIG_PATA_SIS=m 1657CONFIG_PATA_SIS=m
1658CONFIG_PATA_TOSHIBA=m
1659CONFIG_PATA_TRIFLEX=m
1541CONFIG_PATA_VIA=m 1660CONFIG_PATA_VIA=m
1542CONFIG_PATA_WINBOND=m 1661CONFIG_PATA_WINBOND=m
1543CONFIG_PATA_WINBOND_VLB=m 1662
1663#
1664# PIO-only SFF controllers
1665#
1666CONFIG_PATA_CMD640_PCI=m
1667CONFIG_PATA_ISAPNP=m
1668CONFIG_PATA_MPIIX=m
1669CONFIG_PATA_NS87410=m
1670CONFIG_PATA_OPTI=m
1671CONFIG_PATA_PCMCIA=m
1544CONFIG_PATA_PLATFORM=m 1672CONFIG_PATA_PLATFORM=m
1545CONFIG_PATA_SCH=m 1673CONFIG_PATA_QDI=m
1674CONFIG_PATA_RZ1000=m
1675CONFIG_PATA_WINBOND_VLB=m
1676
1677#
1678# Generic fallback / legacy drivers
1679#
1680CONFIG_PATA_ACPI=m
1681CONFIG_ATA_GENERIC=m
1682CONFIG_PATA_LEGACY=m
1546CONFIG_MD=y 1683CONFIG_MD=y
1547CONFIG_BLK_DEV_MD=y 1684CONFIG_BLK_DEV_MD=y
1548# CONFIG_MD_AUTODETECT is not set 1685# CONFIG_MD_AUTODETECT is not set
@@ -1585,7 +1722,7 @@ CONFIG_FUSION_CTL=m
1585# 1722#
1586 1723
1587# 1724#
1588# See the help texts for more information. 1725# The newer stack is recommended.
1589# 1726#
1590CONFIG_FIREWIRE=m 1727CONFIG_FIREWIRE=m
1591CONFIG_FIREWIRE_OHCI=m 1728CONFIG_FIREWIRE_OHCI=m
@@ -1618,6 +1755,7 @@ CONFIG_IFB=m
1618CONFIG_DUMMY=m 1755CONFIG_DUMMY=m
1619CONFIG_BONDING=m 1756CONFIG_BONDING=m
1620CONFIG_MACVLAN=m 1757CONFIG_MACVLAN=m
1758CONFIG_MACVTAP=m
1621CONFIG_EQUALIZER=m 1759CONFIG_EQUALIZER=m
1622CONFIG_TUN=m 1760CONFIG_TUN=m
1623CONFIG_VETH=m 1761CONFIG_VETH=m
@@ -1651,6 +1789,7 @@ CONFIG_REALTEK_PHY=m
1651CONFIG_NATIONAL_PHY=m 1789CONFIG_NATIONAL_PHY=m
1652CONFIG_STE10XP=m 1790CONFIG_STE10XP=m
1653CONFIG_LSI_ET1011C_PHY=m 1791CONFIG_LSI_ET1011C_PHY=m
1792CONFIG_MICREL_PHY=m
1654CONFIG_MDIO_BITBANG=m 1793CONFIG_MDIO_BITBANG=m
1655CONFIG_MDIO_GPIO=m 1794CONFIG_MDIO_GPIO=m
1656CONFIG_NET_ETHERNET=y 1795CONFIG_NET_ETHERNET=y
@@ -1718,13 +1857,13 @@ CONFIG_PCNET32=m
1718CONFIG_AMD8111_ETH=m 1857CONFIG_AMD8111_ETH=m
1719CONFIG_ADAPTEC_STARFIRE=m 1858CONFIG_ADAPTEC_STARFIRE=m
1720CONFIG_AC3200=m 1859CONFIG_AC3200=m
1860CONFIG_KSZ884X_PCI=m
1721CONFIG_APRICOT=m 1861CONFIG_APRICOT=m
1722CONFIG_B44=m 1862CONFIG_B44=m
1723CONFIG_B44_PCI_AUTOSELECT=y 1863CONFIG_B44_PCI_AUTOSELECT=y
1724CONFIG_B44_PCICORE_AUTOSELECT=y 1864CONFIG_B44_PCICORE_AUTOSELECT=y
1725CONFIG_B44_PCI=y 1865CONFIG_B44_PCI=y
1726CONFIG_FORCEDETH=m 1866CONFIG_FORCEDETH=m
1727# CONFIG_FORCEDETH_NAPI is not set
1728CONFIG_CS89x0=m 1867CONFIG_CS89x0=m
1729CONFIG_E100=m 1868CONFIG_E100=m
1730CONFIG_FEALNX=m 1869CONFIG_FEALNX=m
@@ -1789,6 +1928,8 @@ CONFIG_CHELSIO_T1=m
1789CONFIG_CHELSIO_T1_1G=y 1928CONFIG_CHELSIO_T1_1G=y
1790CONFIG_CHELSIO_T3_DEPENDS=y 1929CONFIG_CHELSIO_T3_DEPENDS=y
1791CONFIG_CHELSIO_T3=m 1930CONFIG_CHELSIO_T3=m
1931CONFIG_CHELSIO_T4_DEPENDS=y
1932CONFIG_CHELSIO_T4=m
1792CONFIG_ENIC=m 1933CONFIG_ENIC=m
1793CONFIG_IXGBE=m 1934CONFIG_IXGBE=m
1794CONFIG_IXGBE_DCA=y 1935CONFIG_IXGBE_DCA=y
@@ -1805,27 +1946,16 @@ CONFIG_MLX4_CORE=m
1805CONFIG_MLX4_DEBUG=y 1946CONFIG_MLX4_DEBUG=y
1806CONFIG_TEHUTI=m 1947CONFIG_TEHUTI=m
1807CONFIG_BNX2X=m 1948CONFIG_BNX2X=m
1949CONFIG_QLCNIC=m
1808CONFIG_QLGE=m 1950CONFIG_QLGE=m
1809CONFIG_SFC=m 1951CONFIG_SFC=m
1810CONFIG_SFC_MTD=y 1952CONFIG_SFC_MTD=y
1811CONFIG_BE2NET=m 1953CONFIG_BE2NET=m
1812# CONFIG_TR is not set 1954# CONFIG_TR is not set
1813CONFIG_WLAN=y 1955CONFIG_WLAN=y
1814CONFIG_WLAN_PRE80211=y
1815CONFIG_STRIP=m
1816CONFIG_ARLAN=m
1817CONFIG_WAVELAN=m
1818CONFIG_PCMCIA_WAVELAN=m
1819CONFIG_PCMCIA_NETWAVE=m
1820CONFIG_WLAN_80211=y
1821CONFIG_PCMCIA_RAYCS=m 1956CONFIG_PCMCIA_RAYCS=m
1822CONFIG_LIBERTAS=m
1823CONFIG_LIBERTAS_USB=m
1824CONFIG_LIBERTAS_CS=m
1825CONFIG_LIBERTAS_SDIO=m
1826CONFIG_LIBERTAS_SPI=m
1827# CONFIG_LIBERTAS_DEBUG is not set
1828CONFIG_LIBERTAS_THINFIRM=m 1957CONFIG_LIBERTAS_THINFIRM=m
1958# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set
1829CONFIG_LIBERTAS_THINFIRM_USB=m 1959CONFIG_LIBERTAS_THINFIRM_USB=m
1830CONFIG_AIRO=m 1960CONFIG_AIRO=m
1831CONFIG_ATMEL=m 1961CONFIG_ATMEL=m
@@ -1843,44 +1973,18 @@ CONFIG_RTL8187_LEDS=y
1843CONFIG_ADM8211=m 1973CONFIG_ADM8211=m
1844CONFIG_MAC80211_HWSIM=m 1974CONFIG_MAC80211_HWSIM=m
1845CONFIG_MWL8K=m 1975CONFIG_MWL8K=m
1846CONFIG_P54_COMMON=m
1847CONFIG_P54_USB=m
1848CONFIG_P54_PCI=m
1849CONFIG_P54_SPI=m
1850CONFIG_P54_LEDS=y
1851CONFIG_ATH_COMMON=m 1976CONFIG_ATH_COMMON=m
1977# CONFIG_ATH_DEBUG is not set
1852CONFIG_ATH5K=m 1978CONFIG_ATH5K=m
1853# CONFIG_ATH5K_DEBUG is not set 1979# CONFIG_ATH5K_DEBUG is not set
1980CONFIG_ATH9K_HW=m
1981CONFIG_ATH9K_COMMON=m
1854CONFIG_ATH9K=m 1982CONFIG_ATH9K=m
1855# CONFIG_ATH9K_DEBUG is not set 1983# CONFIG_ATH9K_DEBUGFS is not set
1984CONFIG_ATH9K_HTC=m
1985# CONFIG_ATH9K_HTC_DEBUGFS is not set
1856CONFIG_AR9170_USB=m 1986CONFIG_AR9170_USB=m
1857CONFIG_AR9170_LEDS=y 1987CONFIG_AR9170_LEDS=y
1858CONFIG_IPW2100=m
1859CONFIG_IPW2100_MONITOR=y
1860# CONFIG_IPW2100_DEBUG is not set
1861CONFIG_IPW2200=m
1862CONFIG_IPW2200_MONITOR=y
1863CONFIG_IPW2200_RADIOTAP=y
1864CONFIG_IPW2200_PROMISCUOUS=y
1865CONFIG_IPW2200_QOS=y
1866# CONFIG_IPW2200_DEBUG is not set
1867CONFIG_LIBIPW=m
1868# CONFIG_LIBIPW_DEBUG is not set
1869CONFIG_IWLWIFI=m
1870# CONFIG_IWLWIFI_LEDS is not set
1871# CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT is not set
1872# CONFIG_IWLWIFI_DEBUG is not set
1873CONFIG_IWLAGN=m
1874CONFIG_IWL4965=y
1875CONFIG_IWL5000=y
1876CONFIG_IWL3945=m
1877# CONFIG_IWL3945_SPECTRUM_MEASUREMENT is not set
1878CONFIG_HOSTAP=m
1879CONFIG_HOSTAP_FIRMWARE=y
1880CONFIG_HOSTAP_FIRMWARE_NVRAM=y
1881CONFIG_HOSTAP_PLX=m
1882CONFIG_HOSTAP_PCI=m
1883CONFIG_HOSTAP_CS=m
1884CONFIG_B43=m 1988CONFIG_B43=m
1885CONFIG_B43_PCI_AUTOSELECT=y 1989CONFIG_B43_PCI_AUTOSELECT=y
1886CONFIG_B43_PCICORE_AUTOSELECT=y 1990CONFIG_B43_PCICORE_AUTOSELECT=y
@@ -1902,15 +2006,67 @@ CONFIG_B43LEGACY_PIO=y
1902CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y 2006CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
1903# CONFIG_B43LEGACY_DMA_MODE is not set 2007# CONFIG_B43LEGACY_DMA_MODE is not set
1904# CONFIG_B43LEGACY_PIO_MODE is not set 2008# CONFIG_B43LEGACY_PIO_MODE is not set
1905CONFIG_ZD1211RW=m 2009CONFIG_HOSTAP=m
1906# CONFIG_ZD1211RW_DEBUG is not set 2010CONFIG_HOSTAP_FIRMWARE=y
2011CONFIG_HOSTAP_FIRMWARE_NVRAM=y
2012CONFIG_HOSTAP_PLX=m
2013CONFIG_HOSTAP_PCI=m
2014CONFIG_HOSTAP_CS=m
2015CONFIG_IPW2100=m
2016CONFIG_IPW2100_MONITOR=y
2017# CONFIG_IPW2100_DEBUG is not set
2018CONFIG_IPW2200=m
2019CONFIG_IPW2200_MONITOR=y
2020CONFIG_IPW2200_RADIOTAP=y
2021CONFIG_IPW2200_PROMISCUOUS=y
2022CONFIG_IPW2200_QOS=y
2023# CONFIG_IPW2200_DEBUG is not set
2024CONFIG_LIBIPW=m
2025# CONFIG_LIBIPW_DEBUG is not set
2026CONFIG_IWLWIFI=m
2027# CONFIG_IWLWIFI_DEBUG is not set
2028CONFIG_IWLAGN=m
2029CONFIG_IWL4965=y
2030CONFIG_IWL5000=y
2031CONFIG_IWL3945=m
2032CONFIG_IWM=m
2033# CONFIG_IWM_DEBUG is not set
2034CONFIG_LIBERTAS=m
2035CONFIG_LIBERTAS_USB=m
2036CONFIG_LIBERTAS_CS=m
2037CONFIG_LIBERTAS_SDIO=m
2038CONFIG_LIBERTAS_SPI=m
2039# CONFIG_LIBERTAS_DEBUG is not set
2040CONFIG_LIBERTAS_MESH=y
2041CONFIG_HERMES=m
2042# CONFIG_HERMES_PRISM is not set
2043CONFIG_HERMES_CACHE_FW_ON_INIT=y
2044CONFIG_PLX_HERMES=m
2045CONFIG_TMD_HERMES=m
2046CONFIG_NORTEL_HERMES=m
2047CONFIG_PCMCIA_HERMES=m
2048CONFIG_PCMCIA_SPECTRUM=m
2049CONFIG_ORINOCO_USB=m
2050CONFIG_P54_COMMON=m
2051CONFIG_P54_USB=m
2052CONFIG_P54_PCI=m
2053CONFIG_P54_SPI=m
2054CONFIG_P54_LEDS=y
1907CONFIG_RT2X00=m 2055CONFIG_RT2X00=m
1908CONFIG_RT2400PCI=m 2056CONFIG_RT2400PCI=m
1909CONFIG_RT2500PCI=m 2057CONFIG_RT2500PCI=m
1910CONFIG_RT61PCI=m 2058CONFIG_RT61PCI=m
2059CONFIG_RT2800PCI_PCI=y
2060CONFIG_RT2800PCI=m
2061CONFIG_RT2800PCI_RT30XX=y
2062# CONFIG_RT2800PCI_RT35XX is not set
1911CONFIG_RT2500USB=m 2063CONFIG_RT2500USB=m
1912CONFIG_RT73USB=m 2064CONFIG_RT73USB=m
1913CONFIG_RT2800USB=m 2065CONFIG_RT2800USB=m
2066CONFIG_RT2800USB_RT30XX=y
2067# CONFIG_RT2800USB_RT35XX is not set
2068CONFIG_RT2800USB_UNKNOWN=y
2069CONFIG_RT2800_LIB=m
1914CONFIG_RT2X00_LIB_PCI=m 2070CONFIG_RT2X00_LIB_PCI=m
1915CONFIG_RT2X00_LIB_USB=m 2071CONFIG_RT2X00_LIB_USB=m
1916CONFIG_RT2X00_LIB=m 2072CONFIG_RT2X00_LIB=m
@@ -1919,21 +2075,14 @@ CONFIG_RT2X00_LIB_FIRMWARE=y
1919CONFIG_RT2X00_LIB_CRYPTO=y 2075CONFIG_RT2X00_LIB_CRYPTO=y
1920CONFIG_RT2X00_LIB_LEDS=y 2076CONFIG_RT2X00_LIB_LEDS=y
1921# CONFIG_RT2X00_DEBUG is not set 2077# CONFIG_RT2X00_DEBUG is not set
1922CONFIG_HERMES=m
1923CONFIG_HERMES_CACHE_FW_ON_INIT=y
1924CONFIG_PLX_HERMES=m
1925CONFIG_TMD_HERMES=m
1926CONFIG_NORTEL_HERMES=m
1927CONFIG_PCI_HERMES=m
1928CONFIG_PCMCIA_HERMES=m
1929CONFIG_PCMCIA_SPECTRUM=m
1930CONFIG_WL12XX=m 2078CONFIG_WL12XX=m
1931CONFIG_WL1251=m 2079CONFIG_WL1251=m
1932CONFIG_WL1251_SPI=m 2080CONFIG_WL1251_SPI=m
1933CONFIG_WL1251_SDIO=m 2081CONFIG_WL1251_SDIO=m
1934CONFIG_WL1271=m 2082CONFIG_WL1271=m
1935CONFIG_IWM=m 2083CONFIG_WL1271_SPI=m
1936# CONFIG_IWM_DEBUG is not set 2084CONFIG_ZD1211RW=m
2085# CONFIG_ZD1211RW_DEBUG is not set
1937 2086
1938# 2087#
1939# WiMAX Wireless Broadband devices 2088# WiMAX Wireless Broadband devices
@@ -1941,6 +2090,7 @@ CONFIG_IWM=m
1941CONFIG_WIMAX_I2400M=m 2090CONFIG_WIMAX_I2400M=m
1942CONFIG_WIMAX_I2400M_USB=m 2091CONFIG_WIMAX_I2400M_USB=m
1943CONFIG_WIMAX_I2400M_SDIO=m 2092CONFIG_WIMAX_I2400M_SDIO=m
2093CONFIG_WIMAX_IWMC3200_SDIO=y
1944CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 2094CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8
1945 2095
1946# 2096#
@@ -1955,6 +2105,7 @@ CONFIG_USB_NET_AX8817X=m
1955CONFIG_USB_NET_CDCETHER=m 2105CONFIG_USB_NET_CDCETHER=m
1956CONFIG_USB_NET_CDC_EEM=m 2106CONFIG_USB_NET_CDC_EEM=m
1957CONFIG_USB_NET_DM9601=m 2107CONFIG_USB_NET_DM9601=m
2108CONFIG_USB_NET_SMSC75XX=m
1958CONFIG_USB_NET_SMSC95XX=m 2109CONFIG_USB_NET_SMSC95XX=m
1959CONFIG_USB_NET_GL620A=m 2110CONFIG_USB_NET_GL620A=m
1960CONFIG_USB_NET_NET1080=m 2111CONFIG_USB_NET_NET1080=m
@@ -1972,6 +2123,8 @@ CONFIG_USB_NET_ZAURUS=m
1972CONFIG_USB_HSO=m 2123CONFIG_USB_HSO=m
1973CONFIG_USB_NET_INT51X1=m 2124CONFIG_USB_NET_INT51X1=m
1974CONFIG_USB_CDC_PHONET=m 2125CONFIG_USB_CDC_PHONET=m
2126CONFIG_USB_IPHETH=m
2127CONFIG_USB_SIERRA_NET=m
1975CONFIG_NET_PCMCIA=y 2128CONFIG_NET_PCMCIA=y
1976CONFIG_PCMCIA_3C589=m 2129CONFIG_PCMCIA_3C589=m
1977CONFIG_PCMCIA_3C574=m 2130CONFIG_PCMCIA_3C574=m
@@ -2046,6 +2199,11 @@ CONFIG_ATM_HE_USE_SUNI=y
2046CONFIG_ATM_SOLOS=m 2199CONFIG_ATM_SOLOS=m
2047CONFIG_IEEE802154_DRIVERS=m 2200CONFIG_IEEE802154_DRIVERS=m
2048CONFIG_IEEE802154_FAKEHARD=m 2201CONFIG_IEEE802154_FAKEHARD=m
2202
2203#
2204# CAIF transport drivers
2205#
2206CONFIG_CAIF_TTY=m
2049CONFIG_FDDI=y 2207CONFIG_FDDI=y
2050CONFIG_DEFXX=m 2208CONFIG_DEFXX=m
2051# CONFIG_DEFXX_MMIO is not set 2209# CONFIG_DEFXX_MMIO is not set
@@ -2080,22 +2238,6 @@ CONFIG_VIRTIO_NET=m
2080CONFIG_VMXNET3=m 2238CONFIG_VMXNET3=m
2081CONFIG_ISDN=y 2239CONFIG_ISDN=y
2082# CONFIG_ISDN_I4L is not set 2240# CONFIG_ISDN_I4L is not set
2083CONFIG_MISDN=m
2084CONFIG_MISDN_DSP=m
2085CONFIG_MISDN_L1OIP=m
2086
2087#
2088# mISDN hardware drivers
2089#
2090CONFIG_MISDN_HFCPCI=m
2091CONFIG_MISDN_HFCMULTI=m
2092CONFIG_MISDN_HFCUSB=m
2093CONFIG_MISDN_AVMFRITZ=m
2094# CONFIG_MISDN_SPEEDFAX is not set
2095# CONFIG_MISDN_INFINEON is not set
2096# CONFIG_MISDN_W6692 is not set
2097# CONFIG_MISDN_NETJET is not set
2098CONFIG_MISDN_IPAC=m
2099CONFIG_ISDN_CAPI=m 2241CONFIG_ISDN_CAPI=m
2100# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set 2242# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
2101# CONFIG_CAPI_TRACE is not set 2243# CONFIG_CAPI_TRACE is not set
@@ -2123,6 +2265,31 @@ CONFIG_ISDN_DIVAS_PRIPCI=y
2123CONFIG_ISDN_DIVAS_DIVACAPI=m 2265CONFIG_ISDN_DIVAS_DIVACAPI=m
2124CONFIG_ISDN_DIVAS_USERIDI=m 2266CONFIG_ISDN_DIVAS_USERIDI=m
2125CONFIG_ISDN_DIVAS_MAINT=m 2267CONFIG_ISDN_DIVAS_MAINT=m
2268CONFIG_ISDN_DRV_GIGASET=m
2269CONFIG_GIGASET_CAPI=y
2270# CONFIG_GIGASET_DUMMYLL is not set
2271CONFIG_GIGASET_BASE=m
2272CONFIG_GIGASET_M105=m
2273CONFIG_GIGASET_M101=m
2274# CONFIG_GIGASET_DEBUG is not set
2275CONFIG_HYSDN=m
2276CONFIG_HYSDN_CAPI=y
2277CONFIG_MISDN=m
2278CONFIG_MISDN_DSP=m
2279CONFIG_MISDN_L1OIP=m
2280
2281#
2282# mISDN hardware drivers
2283#
2284CONFIG_MISDN_HFCPCI=m
2285CONFIG_MISDN_HFCMULTI=m
2286CONFIG_MISDN_HFCUSB=m
2287CONFIG_MISDN_AVMFRITZ=m
2288# CONFIG_MISDN_SPEEDFAX is not set
2289# CONFIG_MISDN_INFINEON is not set
2290# CONFIG_MISDN_W6692 is not set
2291# CONFIG_MISDN_NETJET is not set
2292CONFIG_MISDN_IPAC=m
2126# CONFIG_PHONE is not set 2293# CONFIG_PHONE is not set
2127 2294
2128# 2295#
@@ -2131,6 +2298,7 @@ CONFIG_ISDN_DIVAS_MAINT=m
2131CONFIG_INPUT=y 2298CONFIG_INPUT=y
2132CONFIG_INPUT_FF_MEMLESS=m 2299CONFIG_INPUT_FF_MEMLESS=m
2133CONFIG_INPUT_POLLDEV=m 2300CONFIG_INPUT_POLLDEV=m
2301CONFIG_INPUT_SPARSEKMAP=m
2134 2302
2135# 2303#
2136# Userland interfaces 2304# Userland interfaces
@@ -2149,9 +2317,10 @@ CONFIG_INPUT_EVBUG=m
2149CONFIG_INPUT_KEYBOARD=y 2317CONFIG_INPUT_KEYBOARD=y
2150# CONFIG_KEYBOARD_ADP5588 is not set 2318# CONFIG_KEYBOARD_ADP5588 is not set
2151CONFIG_KEYBOARD_ATKBD=y 2319CONFIG_KEYBOARD_ATKBD=y
2152CONFIG_QT2160=m 2320# CONFIG_KEYBOARD_QT2160 is not set
2153CONFIG_KEYBOARD_LKKBD=m 2321CONFIG_KEYBOARD_LKKBD=m
2154CONFIG_KEYBOARD_GPIO=m 2322CONFIG_KEYBOARD_GPIO=m
2323CONFIG_KEYBOARD_TCA6416=m
2155CONFIG_KEYBOARD_MATRIX=m 2324CONFIG_KEYBOARD_MATRIX=m
2156CONFIG_KEYBOARD_LM8323=m 2325CONFIG_KEYBOARD_LM8323=m
2157# CONFIG_KEYBOARD_MAX7359 is not set 2326# CONFIG_KEYBOARD_MAX7359 is not set
@@ -2187,6 +2356,8 @@ CONFIG_TOUCHSCREEN_ADS7846=m
2187CONFIG_TOUCHSCREEN_AD7877=m 2356CONFIG_TOUCHSCREEN_AD7877=m
2188CONFIG_TOUCHSCREEN_AD7879_I2C=m 2357CONFIG_TOUCHSCREEN_AD7879_I2C=m
2189CONFIG_TOUCHSCREEN_AD7879=m 2358CONFIG_TOUCHSCREEN_AD7879=m
2359CONFIG_TOUCHSCREEN_DYNAPRO=m
2360CONFIG_TOUCHSCREEN_HAMPSHIRE=m
2190CONFIG_TOUCHSCREEN_EETI=m 2361CONFIG_TOUCHSCREEN_EETI=m
2191CONFIG_TOUCHSCREEN_FUJITSU=m 2362CONFIG_TOUCHSCREEN_FUJITSU=m
2192CONFIG_TOUCHSCREEN_GUNZE=m 2363CONFIG_TOUCHSCREEN_GUNZE=m
@@ -2219,9 +2390,16 @@ CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
2219CONFIG_TOUCHSCREEN_USB_GOTOP=y 2390CONFIG_TOUCHSCREEN_USB_GOTOP=y
2220CONFIG_TOUCHSCREEN_USB_JASTEC=y 2391CONFIG_TOUCHSCREEN_USB_JASTEC=y
2221CONFIG_TOUCHSCREEN_USB_E2I=y 2392CONFIG_TOUCHSCREEN_USB_E2I=y
2393CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y
2394CONFIG_TOUCHSCREEN_USB_ETT_TC5UH=y
2395CONFIG_TOUCHSCREEN_USB_NEXIO=y
2222CONFIG_TOUCHSCREEN_TOUCHIT213=m 2396CONFIG_TOUCHSCREEN_TOUCHIT213=m
2223CONFIG_TOUCHSCREEN_TSC2007=m 2397CONFIG_TOUCHSCREEN_TSC2007=m
2398CONFIG_TOUCHSCREEN_TPS6507X=m
2224CONFIG_INPUT_MISC=y 2399CONFIG_INPUT_MISC=y
2400CONFIG_INPUT_AD714X=m
2401CONFIG_INPUT_AD714X_I2C=m
2402CONFIG_INPUT_AD714X_SPI=m
2225CONFIG_INPUT_PCSPKR=m 2403CONFIG_INPUT_PCSPKR=m
2226CONFIG_INPUT_APANEL=m 2404CONFIG_INPUT_APANEL=m
2227CONFIG_INPUT_WISTRON_BTNS=m 2405CONFIG_INPUT_WISTRON_BTNS=m
@@ -2235,6 +2413,7 @@ CONFIG_INPUT_CM109=m
2235CONFIG_INPUT_UINPUT=m 2413CONFIG_INPUT_UINPUT=m
2236CONFIG_INPUT_WINBOND_CIR=m 2414CONFIG_INPUT_WINBOND_CIR=m
2237CONFIG_INPUT_PCF50633_PMU=m 2415CONFIG_INPUT_PCF50633_PMU=m
2416CONFIG_INPUT_PCF8574=m
2238CONFIG_INPUT_GPIO_ROTARY_ENCODER=m 2417CONFIG_INPUT_GPIO_ROTARY_ENCODER=m
2239 2418
2240# 2419#
@@ -2248,6 +2427,7 @@ CONFIG_SERIO_PARKBD=m
2248CONFIG_SERIO_PCIPS2=m 2427CONFIG_SERIO_PCIPS2=m
2249CONFIG_SERIO_LIBPS2=y 2428CONFIG_SERIO_LIBPS2=y
2250CONFIG_SERIO_RAW=m 2429CONFIG_SERIO_RAW=m
2430CONFIG_SERIO_ALTERA_PS2=m
2251# CONFIG_GAMEPORT is not set 2431# CONFIG_GAMEPORT is not set
2252 2432
2253# 2433#
@@ -2272,6 +2452,7 @@ CONFIG_SYNCLINK=m
2272CONFIG_SYNCLINKMP=m 2452CONFIG_SYNCLINKMP=m
2273CONFIG_SYNCLINK_GT=m 2453CONFIG_SYNCLINK_GT=m
2274CONFIG_N_HDLC=m 2454CONFIG_N_HDLC=m
2455# CONFIG_N_GSM is not set
2275CONFIG_RISCOM8=m 2456CONFIG_RISCOM8=m
2276CONFIG_SPECIALIX=m 2457CONFIG_SPECIALIX=m
2277CONFIG_STALDRV=y 2458CONFIG_STALDRV=y
@@ -2305,9 +2486,15 @@ CONFIG_SERIAL_8250_RSA=y
2305# Non-8250 serial port support 2486# Non-8250 serial port support
2306# 2487#
2307CONFIG_SERIAL_MAX3100=m 2488CONFIG_SERIAL_MAX3100=m
2489CONFIG_SERIAL_UARTLITE=m
2308CONFIG_SERIAL_CORE=y 2490CONFIG_SERIAL_CORE=y
2309CONFIG_SERIAL_CORE_CONSOLE=y 2491CONFIG_SERIAL_CORE_CONSOLE=y
2310CONFIG_SERIAL_JSM=m 2492CONFIG_SERIAL_JSM=m
2493CONFIG_SERIAL_TIMBERDALE=m
2494CONFIG_SERIAL_ALTERA_JTAGUART=m
2495CONFIG_SERIAL_ALTERA_UART=m
2496CONFIG_SERIAL_ALTERA_UART_MAXPORTS=4
2497CONFIG_SERIAL_ALTERA_UART_BAUDRATE=115200
2311CONFIG_UNIX98_PTYS=y 2498CONFIG_UNIX98_PTYS=y
2312# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 2499# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
2313# CONFIG_LEGACY_PTYS is not set 2500# CONFIG_LEGACY_PTYS is not set
@@ -2359,11 +2546,13 @@ CONFIG_TCG_ATMEL=m
2359CONFIG_TCG_INFINEON=m 2546CONFIG_TCG_INFINEON=m
2360CONFIG_TELCLOCK=m 2547CONFIG_TELCLOCK=m
2361CONFIG_DEVPORT=y 2548CONFIG_DEVPORT=y
2549CONFIG_RAMOOPS=m
2362CONFIG_I2C=m 2550CONFIG_I2C=m
2363CONFIG_I2C_BOARDINFO=y 2551CONFIG_I2C_BOARDINFO=y
2364CONFIG_I2C_COMPAT=y 2552CONFIG_I2C_COMPAT=y
2365CONFIG_I2C_CHARDEV=m 2553CONFIG_I2C_CHARDEV=m
2366CONFIG_I2C_HELPER_AUTO=y 2554CONFIG_I2C_HELPER_AUTO=y
2555CONFIG_I2C_SMBUS=m
2367CONFIG_I2C_ALGOBIT=m 2556CONFIG_I2C_ALGOBIT=m
2368CONFIG_I2C_ALGOPCA=m 2557CONFIG_I2C_ALGOPCA=m
2369 2558
@@ -2401,7 +2590,9 @@ CONFIG_I2C_SCMI=m
2401# 2590#
2402CONFIG_I2C_GPIO=m 2591CONFIG_I2C_GPIO=m
2403CONFIG_I2C_OCORES=m 2592CONFIG_I2C_OCORES=m
2593CONFIG_I2C_PCA_PLATFORM=m
2404CONFIG_I2C_SIMTEC=m 2594CONFIG_I2C_SIMTEC=m
2595CONFIG_I2C_XILINX=m
2405 2596
2406# 2597#
2407# External I2C/SMBus adapter drivers 2598# External I2C/SMBus adapter drivers
@@ -2412,30 +2603,17 @@ CONFIG_I2C_TAOS_EVM=m
2412CONFIG_I2C_TINY_USB=m 2603CONFIG_I2C_TINY_USB=m
2413 2604
2414# 2605#
2415# Graphics adapter I2C/DDC channel drivers
2416#
2417CONFIG_I2C_VOODOO3=m
2418
2419#
2420# Other I2C/SMBus bus drivers 2606# Other I2C/SMBus bus drivers
2421# 2607#
2422CONFIG_I2C_PCA_ISA=m 2608CONFIG_I2C_PCA_ISA=m
2423CONFIG_I2C_PCA_PLATFORM=m
2424CONFIG_I2C_STUB=m 2609CONFIG_I2C_STUB=m
2425CONFIG_SCx200_I2C=m 2610CONFIG_SCx200_I2C=m
2426CONFIG_SCx200_I2C_SCL=12 2611CONFIG_SCx200_I2C_SCL=12
2427CONFIG_SCx200_I2C_SDA=13 2612CONFIG_SCx200_I2C_SDA=13
2428CONFIG_SCx200_ACB=m 2613CONFIG_SCx200_ACB=m
2429
2430#
2431# Miscellaneous I2C Chip support
2432#
2433CONFIG_DS1682=m
2434CONFIG_SENSORS_TSL2550=m
2435# CONFIG_I2C_DEBUG_CORE is not set 2614# CONFIG_I2C_DEBUG_CORE is not set
2436# CONFIG_I2C_DEBUG_ALGO is not set 2615# CONFIG_I2C_DEBUG_ALGO is not set
2437# CONFIG_I2C_DEBUG_BUS is not set 2616# CONFIG_I2C_DEBUG_BUS is not set
2438# CONFIG_I2C_DEBUG_CHIP is not set
2439CONFIG_SPI=y 2617CONFIG_SPI=y
2440CONFIG_SPI_MASTER=y 2618CONFIG_SPI_MASTER=y
2441 2619
@@ -2446,6 +2624,9 @@ CONFIG_SPI_BITBANG=m
2446CONFIG_SPI_BUTTERFLY=m 2624CONFIG_SPI_BUTTERFLY=m
2447CONFIG_SPI_GPIO=m 2625CONFIG_SPI_GPIO=m
2448CONFIG_SPI_LM70_LLP=m 2626CONFIG_SPI_LM70_LLP=m
2627# CONFIG_SPI_XILINX is not set
2628CONFIG_SPI_DESIGNWARE=m
2629CONFIG_SPI_DW_PCI=m
2449 2630
2450# 2631#
2451# SPI Protocol Masters 2632# SPI Protocol Masters
@@ -2460,22 +2641,30 @@ CONFIG_SPI_TLE62X0=m
2460CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 2641CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
2461CONFIG_GPIOLIB=y 2642CONFIG_GPIOLIB=y
2462# CONFIG_GPIO_SYSFS is not set 2643# CONFIG_GPIO_SYSFS is not set
2644CONFIG_GPIO_MAX730X=m
2463 2645
2464# 2646#
2465# Memory mapped GPIO expanders: 2647# Memory mapped GPIO expanders:
2466# 2648#
2649CONFIG_GPIO_IT8761E=m
2650CONFIG_GPIO_SCH=m
2467 2651
2468# 2652#
2469# I2C GPIO expanders: 2653# I2C GPIO expanders:
2470# 2654#
2655CONFIG_GPIO_MAX7300=m
2471CONFIG_GPIO_MAX732X=m 2656CONFIG_GPIO_MAX732X=m
2472CONFIG_GPIO_PCA953X=m 2657CONFIG_GPIO_PCA953X=m
2473CONFIG_GPIO_PCF857X=m 2658CONFIG_GPIO_PCF857X=m
2659CONFIG_GPIO_ADP5588=m
2474 2660
2475# 2661#
2476# PCI GPIO expanders: 2662# PCI GPIO expanders:
2477# 2663#
2664CONFIG_GPIO_CS5535=m
2478# CONFIG_GPIO_LANGWELL is not set 2665# CONFIG_GPIO_LANGWELL is not set
2666CONFIG_GPIO_TIMBERDALE=y
2667CONFIG_GPIO_RDC321X=m
2479 2668
2480# 2669#
2481# SPI GPIO expanders: 2670# SPI GPIO expanders:
@@ -2488,6 +2677,11 @@ CONFIG_GPIO_MCP23S08=m
2488# AC97 GPIO expanders: 2677# AC97 GPIO expanders:
2489# 2678#
2490# CONFIG_GPIO_UCB1400 is not set 2679# CONFIG_GPIO_UCB1400 is not set
2680
2681#
2682# MODULbus GPIO expanders:
2683#
2684CONFIG_GPIO_JANZ_TTL=m
2491CONFIG_W1=m 2685CONFIG_W1=m
2492CONFIG_W1_CON=y 2686CONFIG_W1_CON=y
2493 2687
@@ -2512,7 +2706,7 @@ CONFIG_W1_SLAVE_BQ27000=m
2512CONFIG_POWER_SUPPLY=y 2706CONFIG_POWER_SUPPLY=y
2513# CONFIG_POWER_SUPPLY_DEBUG is not set 2707# CONFIG_POWER_SUPPLY_DEBUG is not set
2514CONFIG_PDA_POWER=m 2708CONFIG_PDA_POWER=m
2515CONFIG_WM8350_POWER=m 2709CONFIG_TEST_POWER=m
2516CONFIG_BATTERY_DS2760=m 2710CONFIG_BATTERY_DS2760=m
2517CONFIG_BATTERY_DS2782=m 2711CONFIG_BATTERY_DS2782=m
2518CONFIG_BATTERY_BQ27x00=m 2712CONFIG_BATTERY_BQ27x00=m
@@ -2536,11 +2730,13 @@ CONFIG_SENSORS_ADM1026=m
2536CONFIG_SENSORS_ADM1029=m 2730CONFIG_SENSORS_ADM1029=m
2537CONFIG_SENSORS_ADM1031=m 2731CONFIG_SENSORS_ADM1031=m
2538CONFIG_SENSORS_ADM9240=m 2732CONFIG_SENSORS_ADM9240=m
2733CONFIG_SENSORS_ADT7411=m
2539CONFIG_SENSORS_ADT7462=m 2734CONFIG_SENSORS_ADT7462=m
2540CONFIG_SENSORS_ADT7470=m 2735CONFIG_SENSORS_ADT7470=m
2541CONFIG_SENSORS_ADT7473=m
2542CONFIG_SENSORS_ADT7475=m 2736CONFIG_SENSORS_ADT7475=m
2737CONFIG_SENSORS_ASC7621=m
2543CONFIG_SENSORS_K8TEMP=m 2738CONFIG_SENSORS_K8TEMP=m
2739CONFIG_SENSORS_K10TEMP=m
2544CONFIG_SENSORS_ASB100=m 2740CONFIG_SENSORS_ASB100=m
2545CONFIG_SENSORS_ATXP1=m 2741CONFIG_SENSORS_ATXP1=m
2546CONFIG_SENSORS_DS1621=m 2742CONFIG_SENSORS_DS1621=m
@@ -2558,6 +2754,7 @@ CONFIG_SENSORS_IBMPEX=m
2558CONFIG_SENSORS_IT87=m 2754CONFIG_SENSORS_IT87=m
2559CONFIG_SENSORS_LM63=m 2755CONFIG_SENSORS_LM63=m
2560CONFIG_SENSORS_LM70=m 2756CONFIG_SENSORS_LM70=m
2757CONFIG_SENSORS_LM73=m
2561CONFIG_SENSORS_LM75=m 2758CONFIG_SENSORS_LM75=m
2562CONFIG_SENSORS_LM77=m 2759CONFIG_SENSORS_LM77=m
2563CONFIG_SENSORS_LM78=m 2760CONFIG_SENSORS_LM78=m
@@ -2580,13 +2777,18 @@ CONFIG_SENSORS_PCF8591=m
2580CONFIG_SENSORS_SHT15=m 2777CONFIG_SENSORS_SHT15=m
2581CONFIG_SENSORS_SIS5595=m 2778CONFIG_SENSORS_SIS5595=m
2582CONFIG_SENSORS_DME1737=m 2779CONFIG_SENSORS_DME1737=m
2780CONFIG_SENSORS_EMC1403=m
2583CONFIG_SENSORS_SMSC47M1=m 2781CONFIG_SENSORS_SMSC47M1=m
2584CONFIG_SENSORS_SMSC47M192=m 2782CONFIG_SENSORS_SMSC47M192=m
2585CONFIG_SENSORS_SMSC47B397=m 2783CONFIG_SENSORS_SMSC47B397=m
2586CONFIG_SENSORS_ADS7828=m 2784CONFIG_SENSORS_ADS7828=m
2785CONFIG_SENSORS_ADS7871=m
2786CONFIG_SENSORS_AMC6821=m
2587CONFIG_SENSORS_THMC50=m 2787CONFIG_SENSORS_THMC50=m
2788CONFIG_SENSORS_TMP102=m
2588CONFIG_SENSORS_TMP401=m 2789CONFIG_SENSORS_TMP401=m
2589CONFIG_SENSORS_TMP421=m 2790CONFIG_SENSORS_TMP421=m
2791CONFIG_SENSORS_VIA_CPUTEMP=m
2590CONFIG_SENSORS_VIA686A=m 2792CONFIG_SENSORS_VIA686A=m
2591CONFIG_SENSORS_VT1211=m 2793CONFIG_SENSORS_VT1211=m
2592CONFIG_SENSORS_VT8231=m 2794CONFIG_SENSORS_VT8231=m
@@ -2598,8 +2800,8 @@ CONFIG_SENSORS_W83L785TS=m
2598CONFIG_SENSORS_W83L786NG=m 2800CONFIG_SENSORS_W83L786NG=m
2599CONFIG_SENSORS_W83627HF=m 2801CONFIG_SENSORS_W83627HF=m
2600CONFIG_SENSORS_W83627EHF=m 2802CONFIG_SENSORS_W83627EHF=m
2601# CONFIG_SENSORS_WM8350 is not set
2602CONFIG_SENSORS_HDAPS=m 2803CONFIG_SENSORS_HDAPS=m
2804CONFIG_SENSORS_LIS3_I2C=m
2603CONFIG_SENSORS_APPLESMC=m 2805CONFIG_SENSORS_APPLESMC=m
2604 2806
2605# 2807#
@@ -2615,11 +2817,11 @@ CONFIG_WATCHDOG=y
2615# Watchdog Device Drivers 2817# Watchdog Device Drivers
2616# 2818#
2617CONFIG_SOFT_WATCHDOG=m 2819CONFIG_SOFT_WATCHDOG=m
2618CONFIG_WM8350_WATCHDOG=m
2619CONFIG_ACQUIRE_WDT=m 2820CONFIG_ACQUIRE_WDT=m
2620CONFIG_ADVANTECH_WDT=m 2821CONFIG_ADVANTECH_WDT=m
2621CONFIG_ALIM1535_WDT=m 2822CONFIG_ALIM1535_WDT=m
2622CONFIG_ALIM7101_WDT=m 2823CONFIG_ALIM7101_WDT=m
2824CONFIG_GEODE_WDT=m
2623CONFIG_SC520_WDT=m 2825CONFIG_SC520_WDT=m
2624# CONFIG_SBC_FITPC2_WATCHDOG is not set 2826# CONFIG_SBC_FITPC2_WATCHDOG is not set
2625CONFIG_EUROTECH_WDT=m 2827CONFIG_EUROTECH_WDT=m
@@ -2685,40 +2887,40 @@ CONFIG_SSB_SDIOHOST=y
2685# CONFIG_SSB_DEBUG is not set 2887# CONFIG_SSB_DEBUG is not set
2686CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y 2888CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
2687CONFIG_SSB_DRIVER_PCICORE=y 2889CONFIG_SSB_DRIVER_PCICORE=y
2688 2890CONFIG_MFD_SUPPORT=y
2689# 2891CONFIG_MFD_CORE=y
2690# Multifunction device drivers
2691#
2692CONFIG_MFD_CORE=m
2693CONFIG_MFD_SM501=m 2892CONFIG_MFD_SM501=m
2694# CONFIG_MFD_SM501_GPIO is not set 2893# CONFIG_MFD_SM501_GPIO is not set
2695CONFIG_HTC_PASIC3=m 2894CONFIG_HTC_PASIC3=m
2696CONFIG_UCB1400_CORE=m 2895CONFIG_UCB1400_CORE=m
2697CONFIG_TPS65010=m 2896CONFIG_TPS65010=m
2897CONFIG_TPS6507X=m
2698# CONFIG_MFD_TMIO is not set 2898# CONFIG_MFD_TMIO is not set
2699CONFIG_MFD_WM8400=m 2899CONFIG_MFD_WM8400=m
2700# CONFIG_MFD_WM831X is not set
2701CONFIG_MFD_WM8350=m
2702CONFIG_MFD_WM8350_I2C=m
2703CONFIG_MFD_PCF50633=m 2900CONFIG_MFD_PCF50633=m
2704# CONFIG_MFD_MC13783 is not set 2901# CONFIG_MFD_MC13783 is not set
2705CONFIG_PCF50633_ADC=m 2902CONFIG_PCF50633_ADC=m
2706CONFIG_PCF50633_GPIO=m 2903CONFIG_PCF50633_GPIO=m
2707CONFIG_AB3100_CORE=m 2904CONFIG_ABX500_CORE=y
2708CONFIG_AB3100_OTP=m
2709# CONFIG_EZX_PCAP is not set 2905# CONFIG_EZX_PCAP is not set
2906CONFIG_AB8500_CORE=y
2907CONFIG_MFD_TIMBERDALE=m
2908CONFIG_LPC_SCH=m
2909CONFIG_MFD_RDC321X=m
2910CONFIG_MFD_JANZ_CMODIO=m
2710CONFIG_REGULATOR=y 2911CONFIG_REGULATOR=y
2711# CONFIG_REGULATOR_DEBUG is not set 2912# CONFIG_REGULATOR_DEBUG is not set
2913# CONFIG_REGULATOR_DUMMY is not set
2712# CONFIG_REGULATOR_FIXED_VOLTAGE is not set 2914# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
2713CONFIG_REGULATOR_VIRTUAL_CONSUMER=m 2915CONFIG_REGULATOR_VIRTUAL_CONSUMER=m
2714CONFIG_REGULATOR_USERSPACE_CONSUMER=m 2916CONFIG_REGULATOR_USERSPACE_CONSUMER=m
2715CONFIG_REGULATOR_BQ24022=m 2917CONFIG_REGULATOR_BQ24022=m
2716CONFIG_REGULATOR_MAX1586=m 2918CONFIG_REGULATOR_MAX1586=m
2717CONFIG_REGULATOR_WM8350=m 2919CONFIG_REGULATOR_MAX8649=m
2920CONFIG_REGULATOR_MAX8660=m
2718CONFIG_REGULATOR_WM8400=m 2921CONFIG_REGULATOR_WM8400=m
2719CONFIG_REGULATOR_PCF50633=m 2922CONFIG_REGULATOR_PCF50633=m
2720CONFIG_REGULATOR_LP3971=m 2923CONFIG_REGULATOR_LP3971=m
2721CONFIG_REGULATOR_AB3100=m
2722# CONFIG_REGULATOR_TPS65023 is not set 2924# CONFIG_REGULATOR_TPS65023 is not set
2723# CONFIG_REGULATOR_TPS6507X is not set 2925# CONFIG_REGULATOR_TPS6507X is not set
2724CONFIG_MEDIA_SUPPORT=m 2926CONFIG_MEDIA_SUPPORT=m
@@ -2738,6 +2940,15 @@ CONFIG_VIDEO_MEDIA=m
2738# 2940#
2739CONFIG_VIDEO_SAA7146=m 2941CONFIG_VIDEO_SAA7146=m
2740CONFIG_VIDEO_SAA7146_VV=m 2942CONFIG_VIDEO_SAA7146_VV=m
2943CONFIG_IR_CORE=m
2944CONFIG_VIDEO_IR=m
2945CONFIG_RC_MAP=m
2946CONFIG_IR_NEC_DECODER=m
2947CONFIG_IR_RC5_DECODER=m
2948CONFIG_IR_RC6_DECODER=m
2949CONFIG_IR_JVC_DECODER=m
2950CONFIG_IR_SONY_DECODER=m
2951CONFIG_IR_IMON=m
2741# CONFIG_MEDIA_ATTACH is not set 2952# CONFIG_MEDIA_ATTACH is not set
2742CONFIG_MEDIA_TUNER=m 2953CONFIG_MEDIA_TUNER=m
2743# CONFIG_MEDIA_TUNER_CUSTOMISE is not set 2954# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
@@ -2758,15 +2969,16 @@ CONFIG_MEDIA_TUNER_XC5000=m
2758CONFIG_MEDIA_TUNER_MXL5005S=m 2969CONFIG_MEDIA_TUNER_MXL5005S=m
2759CONFIG_MEDIA_TUNER_MXL5007T=m 2970CONFIG_MEDIA_TUNER_MXL5007T=m
2760CONFIG_MEDIA_TUNER_MC44S803=m 2971CONFIG_MEDIA_TUNER_MC44S803=m
2972CONFIG_MEDIA_TUNER_MAX2165=m
2761CONFIG_VIDEO_V4L2=m 2973CONFIG_VIDEO_V4L2=m
2762CONFIG_VIDEOBUF_GEN=m 2974CONFIG_VIDEOBUF_GEN=m
2763CONFIG_VIDEOBUF_DMA_SG=m 2975CONFIG_VIDEOBUF_DMA_SG=m
2764CONFIG_VIDEOBUF_VMALLOC=m 2976CONFIG_VIDEOBUF_VMALLOC=m
2765CONFIG_VIDEOBUF_DVB=m 2977CONFIG_VIDEOBUF_DVB=m
2766CONFIG_VIDEO_BTCX=m 2978CONFIG_VIDEO_BTCX=m
2767CONFIG_VIDEO_IR=m
2768CONFIG_VIDEO_TVEEPROM=m 2979CONFIG_VIDEO_TVEEPROM=m
2769CONFIG_VIDEO_TUNER=m 2980CONFIG_VIDEO_TUNER=m
2981CONFIG_V4L2_MEM2MEM_DEV=m
2770CONFIG_VIDEO_CAPTURE_DRIVERS=y 2982CONFIG_VIDEO_CAPTURE_DRIVERS=y
2771# CONFIG_VIDEO_ADV_DEBUG is not set 2983# CONFIG_VIDEO_ADV_DEBUG is not set
2772# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set 2984# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
@@ -2814,8 +3026,10 @@ CONFIG_VIDEO_TCM825X=m
2814CONFIG_VIDEO_SAA7110=m 3026CONFIG_VIDEO_SAA7110=m
2815CONFIG_VIDEO_SAA711X=m 3027CONFIG_VIDEO_SAA711X=m
2816CONFIG_VIDEO_SAA717X=m 3028CONFIG_VIDEO_SAA717X=m
3029CONFIG_VIDEO_SAA7191=m
2817CONFIG_VIDEO_TVP514X=m 3030CONFIG_VIDEO_TVP514X=m
2818CONFIG_VIDEO_TVP5150=m 3031CONFIG_VIDEO_TVP5150=m
3032CONFIG_VIDEO_TVP7002=m
2819CONFIG_VIDEO_VPX3220=m 3033CONFIG_VIDEO_VPX3220=m
2820 3034
2821# 3035#
@@ -2837,15 +3051,18 @@ CONFIG_VIDEO_ADV7170=m
2837CONFIG_VIDEO_ADV7175=m 3051CONFIG_VIDEO_ADV7175=m
2838CONFIG_VIDEO_THS7303=m 3052CONFIG_VIDEO_THS7303=m
2839CONFIG_VIDEO_ADV7343=m 3053CONFIG_VIDEO_ADV7343=m
3054CONFIG_VIDEO_AK881X=m
2840 3055
2841# 3056#
2842# Video improvement chips 3057# Video improvement chips
2843# 3058#
2844CONFIG_VIDEO_UPD64031A=m 3059CONFIG_VIDEO_UPD64031A=m
2845CONFIG_VIDEO_UPD64083=m 3060CONFIG_VIDEO_UPD64083=m
2846CONFIG_VIDEO_VIVI=m
2847CONFIG_VIDEO_BT848=m 3061CONFIG_VIDEO_BT848=m
2848CONFIG_VIDEO_BT848_DVB=y 3062CONFIG_VIDEO_BT848_DVB=y
3063CONFIG_VIDEO_PMS=m
3064CONFIG_VIDEO_BWQCAM=m
3065CONFIG_VIDEO_CQCAM=m
2849CONFIG_VIDEO_SAA5246A=m 3066CONFIG_VIDEO_SAA5246A=m
2850CONFIG_VIDEO_SAA5249=m 3067CONFIG_VIDEO_SAA5249=m
2851CONFIG_VIDEO_ZORAN=m 3068CONFIG_VIDEO_ZORAN=m
@@ -2856,9 +3073,11 @@ CONFIG_VIDEO_ZORAN_DC10=m
2856CONFIG_VIDEO_ZORAN_LML33=m 3073CONFIG_VIDEO_ZORAN_LML33=m
2857CONFIG_VIDEO_ZORAN_LML33R10=m 3074CONFIG_VIDEO_ZORAN_LML33R10=m
2858CONFIG_VIDEO_ZORAN_AVS6EYES=m 3075CONFIG_VIDEO_ZORAN_AVS6EYES=m
3076CONFIG_VIDEO_MEYE=m
2859CONFIG_VIDEO_SAA7134=m 3077CONFIG_VIDEO_SAA7134=m
2860CONFIG_VIDEO_SAA7134_ALSA=m 3078CONFIG_VIDEO_SAA7134_ALSA=m
2861CONFIG_VIDEO_SAA7134_DVB=m 3079CONFIG_VIDEO_SAA7134_DVB=m
3080CONFIG_VIDEO_MXB=m
2862CONFIG_VIDEO_HEXIUM_ORION=m 3081CONFIG_VIDEO_HEXIUM_ORION=m
2863CONFIG_VIDEO_HEXIUM_GEMINI=m 3082CONFIG_VIDEO_HEXIUM_GEMINI=m
2864CONFIG_VIDEO_CX88=m 3083CONFIG_VIDEO_CX88=m
@@ -2872,16 +3091,20 @@ CONFIG_VIDEO_AU0828=m
2872CONFIG_VIDEO_IVTV=m 3091CONFIG_VIDEO_IVTV=m
2873CONFIG_VIDEO_FB_IVTV=m 3092CONFIG_VIDEO_FB_IVTV=m
2874CONFIG_VIDEO_CX18=m 3093CONFIG_VIDEO_CX18=m
3094CONFIG_VIDEO_CX18_ALSA=m
2875CONFIG_VIDEO_SAA7164=m 3095CONFIG_VIDEO_SAA7164=m
2876CONFIG_VIDEO_CAFE_CCIC=m 3096CONFIG_VIDEO_CAFE_CCIC=m
2877CONFIG_SOC_CAMERA=m 3097CONFIG_SOC_CAMERA=m
2878CONFIG_SOC_CAMERA_MT9M001=m 3098CONFIG_SOC_CAMERA_MT9M001=m
2879CONFIG_SOC_CAMERA_MT9M111=m 3099CONFIG_SOC_CAMERA_MT9M111=m
2880CONFIG_SOC_CAMERA_MT9T031=m 3100CONFIG_SOC_CAMERA_MT9T031=m
3101CONFIG_SOC_CAMERA_MT9T112=m
2881CONFIG_SOC_CAMERA_MT9V022=m 3102CONFIG_SOC_CAMERA_MT9V022=m
3103CONFIG_SOC_CAMERA_RJ54N1=m
2882CONFIG_SOC_CAMERA_TW9910=m 3104CONFIG_SOC_CAMERA_TW9910=m
2883CONFIG_SOC_CAMERA_PLATFORM=m 3105CONFIG_SOC_CAMERA_PLATFORM=m
2884CONFIG_SOC_CAMERA_OV772X=m 3106CONFIG_SOC_CAMERA_OV772X=m
3107CONFIG_SOC_CAMERA_OV9640=m
2885CONFIG_V4L_USB_DRIVERS=y 3108CONFIG_V4L_USB_DRIVERS=y
2886CONFIG_USB_VIDEO_CLASS=m 3109CONFIG_USB_VIDEO_CLASS=m
2887CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y 3110CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
@@ -2889,7 +3112,9 @@ CONFIG_USB_GSPCA=m
2889CONFIG_USB_M5602=m 3112CONFIG_USB_M5602=m
2890CONFIG_USB_STV06XX=m 3113CONFIG_USB_STV06XX=m
2891CONFIG_USB_GL860=m 3114CONFIG_USB_GL860=m
3115CONFIG_USB_GSPCA_BENQ=m
2892CONFIG_USB_GSPCA_CONEX=m 3116CONFIG_USB_GSPCA_CONEX=m
3117CONFIG_USB_GSPCA_CPIA1=m
2893CONFIG_USB_GSPCA_ETOMS=m 3118CONFIG_USB_GSPCA_ETOMS=m
2894CONFIG_USB_GSPCA_FINEPIX=m 3119CONFIG_USB_GSPCA_FINEPIX=m
2895CONFIG_USB_GSPCA_JEILINJ=m 3120CONFIG_USB_GSPCA_JEILINJ=m
@@ -2897,10 +3122,12 @@ CONFIG_USB_GSPCA_MARS=m
2897CONFIG_USB_GSPCA_MR97310A=m 3122CONFIG_USB_GSPCA_MR97310A=m
2898CONFIG_USB_GSPCA_OV519=m 3123CONFIG_USB_GSPCA_OV519=m
2899CONFIG_USB_GSPCA_OV534=m 3124CONFIG_USB_GSPCA_OV534=m
3125CONFIG_USB_GSPCA_OV534_9=m
2900CONFIG_USB_GSPCA_PAC207=m 3126CONFIG_USB_GSPCA_PAC207=m
3127CONFIG_USB_GSPCA_PAC7302=m
2901CONFIG_USB_GSPCA_PAC7311=m 3128CONFIG_USB_GSPCA_PAC7311=m
3129CONFIG_USB_GSPCA_SN9C2028=m
2902CONFIG_USB_GSPCA_SN9C20X=m 3130CONFIG_USB_GSPCA_SN9C20X=m
2903CONFIG_USB_GSPCA_SN9C20X_EVDEV=y
2904CONFIG_USB_GSPCA_SONIXB=m 3131CONFIG_USB_GSPCA_SONIXB=m
2905CONFIG_USB_GSPCA_SONIXJ=m 3132CONFIG_USB_GSPCA_SONIXJ=m
2906CONFIG_USB_GSPCA_SPCA500=m 3133CONFIG_USB_GSPCA_SPCA500=m
@@ -2912,6 +3139,7 @@ CONFIG_USB_GSPCA_SPCA561=m
2912CONFIG_USB_GSPCA_SQ905=m 3139CONFIG_USB_GSPCA_SQ905=m
2913CONFIG_USB_GSPCA_SQ905C=m 3140CONFIG_USB_GSPCA_SQ905C=m
2914CONFIG_USB_GSPCA_STK014=m 3141CONFIG_USB_GSPCA_STK014=m
3142CONFIG_USB_GSPCA_STV0680=m
2915CONFIG_USB_GSPCA_SUNPLUS=m 3143CONFIG_USB_GSPCA_SUNPLUS=m
2916CONFIG_USB_GSPCA_T613=m 3144CONFIG_USB_GSPCA_T613=m
2917CONFIG_USB_GSPCA_TV8532=m 3145CONFIG_USB_GSPCA_TV8532=m
@@ -2925,6 +3153,7 @@ CONFIG_VIDEO_HDPVR=m
2925CONFIG_VIDEO_EM28XX=m 3153CONFIG_VIDEO_EM28XX=m
2926CONFIG_VIDEO_EM28XX_ALSA=m 3154CONFIG_VIDEO_EM28XX_ALSA=m
2927CONFIG_VIDEO_EM28XX_DVB=m 3155CONFIG_VIDEO_EM28XX_DVB=m
3156CONFIG_VIDEO_TLG2300=m
2928CONFIG_VIDEO_CX231XX=m 3157CONFIG_VIDEO_CX231XX=m
2929CONFIG_VIDEO_CX231XX_ALSA=m 3158CONFIG_VIDEO_CX231XX_ALSA=m
2930CONFIG_VIDEO_CX231XX_DVB=m 3159CONFIG_VIDEO_CX231XX_DVB=m
@@ -2932,10 +3161,11 @@ CONFIG_VIDEO_USBVISION=m
2932CONFIG_USB_ET61X251=m 3161CONFIG_USB_ET61X251=m
2933CONFIG_USB_SN9C102=m 3162CONFIG_USB_SN9C102=m
2934CONFIG_USB_ZC0301=m 3163CONFIG_USB_ZC0301=m
2935CONFIG_USB_PWC_INPUT_EVDEV=y
2936CONFIG_USB_ZR364XX=m 3164CONFIG_USB_ZR364XX=m
2937CONFIG_USB_STKWEBCAM=m 3165CONFIG_USB_STKWEBCAM=m
2938CONFIG_USB_S2255=m 3166CONFIG_USB_S2255=m
3167CONFIG_V4L_MEM2MEM_DRIVERS=y
3168CONFIG_VIDEO_MEM2MEM_TESTDEV=m
2939CONFIG_RADIO_ADAPTERS=y 3169CONFIG_RADIO_ADAPTERS=y
2940CONFIG_RADIO_CADET=m 3170CONFIG_RADIO_CADET=m
2941CONFIG_RADIO_RTRACK=m 3171CONFIG_RADIO_RTRACK=m
@@ -2945,6 +3175,7 @@ CONFIG_RADIO_GEMTEK=m
2945CONFIG_RADIO_GEMTEK_PCI=m 3175CONFIG_RADIO_GEMTEK_PCI=m
2946CONFIG_RADIO_MAXIRADIO=m 3176CONFIG_RADIO_MAXIRADIO=m
2947CONFIG_RADIO_MAESTRO=m 3177CONFIG_RADIO_MAESTRO=m
3178CONFIG_RADIO_MIROPCM20=m
2948CONFIG_RADIO_SF16FMI=m 3179CONFIG_RADIO_SF16FMI=m
2949CONFIG_RADIO_SF16FMR2=m 3180CONFIG_RADIO_SF16FMR2=m
2950CONFIG_RADIO_TERRATEC=m 3181CONFIG_RADIO_TERRATEC=m
@@ -2957,6 +3188,9 @@ CONFIG_USB_DSBR=m
2957# CONFIG_RADIO_SI470X is not set 3188# CONFIG_RADIO_SI470X is not set
2958CONFIG_USB_MR800=m 3189CONFIG_USB_MR800=m
2959CONFIG_RADIO_TEA5764=m 3190CONFIG_RADIO_TEA5764=m
3191CONFIG_RADIO_SAA7706H=m
3192CONFIG_RADIO_TEF6862=m
3193CONFIG_RADIO_TIMBERDALE=m
2960CONFIG_DVB_MAX_ADAPTERS=8 3194CONFIG_DVB_MAX_ADAPTERS=8
2961# CONFIG_DVB_DYNAMIC_MINORS is not set 3195# CONFIG_DVB_DYNAMIC_MINORS is not set
2962CONFIG_DVB_CAPTURE_DRIVERS=y 3196CONFIG_DVB_CAPTURE_DRIVERS=y
@@ -3005,6 +3239,8 @@ CONFIG_DVB_USB_DTV5100=m
3005CONFIG_DVB_USB_AF9015=m 3239CONFIG_DVB_USB_AF9015=m
3006CONFIG_DVB_USB_CE6230=m 3240CONFIG_DVB_USB_CE6230=m
3007# CONFIG_DVB_USB_FRIIO is not set 3241# CONFIG_DVB_USB_FRIIO is not set
3242CONFIG_DVB_USB_EC168=m
3243CONFIG_DVB_USB_AZ6027=m
3008CONFIG_DVB_TTUSB_BUDGET=m 3244CONFIG_DVB_TTUSB_BUDGET=m
3009CONFIG_DVB_TTUSB_DEC=m 3245CONFIG_DVB_TTUSB_DEC=m
3010CONFIG_SMS_SIANO_MDTV=m 3246CONFIG_SMS_SIANO_MDTV=m
@@ -3042,6 +3278,7 @@ CONFIG_DVB_DM1105=m
3042# Supported FireWire (IEEE 1394) Adapters 3278# Supported FireWire (IEEE 1394) Adapters
3043# 3279#
3044CONFIG_DVB_FIREDTV=m 3280CONFIG_DVB_FIREDTV=m
3281CONFIG_DVB_FIREDTV_FIREWIRE=y
3045CONFIG_DVB_FIREDTV_IEEE1394=y 3282CONFIG_DVB_FIREDTV_IEEE1394=y
3046CONFIG_DVB_FIREDTV_INPUT=y 3283CONFIG_DVB_FIREDTV_INPUT=y
3047 3284
@@ -3051,6 +3288,18 @@ CONFIG_DVB_FIREDTV_INPUT=y
3051# CONFIG_DVB_PT1 is not set 3288# CONFIG_DVB_PT1 is not set
3052 3289
3053# 3290#
3291# Supported Mantis Adapters
3292#
3293CONFIG_MANTIS_CORE=m
3294CONFIG_DVB_MANTIS=m
3295CONFIG_DVB_HOPPER=m
3296
3297#
3298# Supported nGene Adapters
3299#
3300CONFIG_DVB_NGENE=m
3301
3302#
3054# Supported DVB Frontends 3303# Supported DVB Frontends
3055# 3304#
3056# CONFIG_DVB_FE_CUSTOMISE is not set 3305# CONFIG_DVB_FE_CUSTOMISE is not set
@@ -3079,6 +3328,8 @@ CONFIG_DVB_TDA826X=m
3079CONFIG_DVB_TUA6100=m 3328CONFIG_DVB_TUA6100=m
3080CONFIG_DVB_CX24116=m 3329CONFIG_DVB_CX24116=m
3081CONFIG_DVB_SI21XX=m 3330CONFIG_DVB_SI21XX=m
3331CONFIG_DVB_DS3000=m
3332CONFIG_DVB_MB86A16=m
3082CONFIG_DVB_SP8870=m 3333CONFIG_DVB_SP8870=m
3083CONFIG_DVB_SP887X=m 3334CONFIG_DVB_SP887X=m
3084CONFIG_DVB_CX22700=m 3335CONFIG_DVB_CX22700=m
@@ -3094,6 +3345,7 @@ CONFIG_DVB_DIB7000M=m
3094CONFIG_DVB_DIB7000P=m 3345CONFIG_DVB_DIB7000P=m
3095CONFIG_DVB_TDA10048=m 3346CONFIG_DVB_TDA10048=m
3096CONFIG_DVB_AF9013=m 3347CONFIG_DVB_AF9013=m
3348CONFIG_DVB_EC100=m
3097CONFIG_DVB_VES1820=m 3349CONFIG_DVB_VES1820=m
3098CONFIG_DVB_TDA10021=m 3350CONFIG_DVB_TDA10021=m
3099CONFIG_DVB_TDA10023=m 3351CONFIG_DVB_TDA10023=m
@@ -3110,11 +3362,13 @@ CONFIG_DVB_S5H1411=m
3110CONFIG_DVB_DIB8000=m 3362CONFIG_DVB_DIB8000=m
3111CONFIG_DVB_PLL=m 3363CONFIG_DVB_PLL=m
3112CONFIG_DVB_TUNER_DIB0070=m 3364CONFIG_DVB_TUNER_DIB0070=m
3365CONFIG_DVB_TUNER_DIB0090=m
3113CONFIG_DVB_LNBP21=m 3366CONFIG_DVB_LNBP21=m
3114CONFIG_DVB_ISL6405=m 3367CONFIG_DVB_ISL6405=m
3115CONFIG_DVB_ISL6421=m 3368CONFIG_DVB_ISL6421=m
3116CONFIG_DVB_ISL6423=m 3369CONFIG_DVB_ISL6423=m
3117CONFIG_DVB_LGS8GXX=m 3370CONFIG_DVB_LGS8GXX=m
3371CONFIG_DVB_ATBM8830=m
3118CONFIG_DAB=y 3372CONFIG_DAB=y
3119CONFIG_USB_DABUSB=m 3373CONFIG_USB_DABUSB=m
3120 3374
@@ -3133,12 +3387,14 @@ CONFIG_AGP_SWORKS=m
3133CONFIG_AGP_VIA=m 3387CONFIG_AGP_VIA=m
3134CONFIG_AGP_EFFICEON=m 3388CONFIG_AGP_EFFICEON=m
3135# CONFIG_VGA_ARB is not set 3389# CONFIG_VGA_ARB is not set
3390CONFIG_VGA_SWITCHEROO=y
3136CONFIG_DRM=m 3391CONFIG_DRM=m
3137CONFIG_DRM_KMS_HELPER=m 3392CONFIG_DRM_KMS_HELPER=m
3138CONFIG_DRM_TTM=m 3393CONFIG_DRM_TTM=m
3139CONFIG_DRM_TDFX=m 3394CONFIG_DRM_TDFX=m
3140CONFIG_DRM_R128=m 3395CONFIG_DRM_R128=m
3141CONFIG_DRM_RADEON=m 3396CONFIG_DRM_RADEON=m
3397# CONFIG_DRM_RADEON_KMS is not set
3142CONFIG_DRM_I810=m 3398CONFIG_DRM_I810=m
3143CONFIG_DRM_I830=m 3399CONFIG_DRM_I830=m
3144CONFIG_DRM_I915=m 3400CONFIG_DRM_I915=m
@@ -3225,6 +3481,7 @@ CONFIG_FB_SIS=m
3225CONFIG_FB_SIS_300=y 3481CONFIG_FB_SIS_300=y
3226CONFIG_FB_SIS_315=y 3482CONFIG_FB_SIS_315=y
3227CONFIG_FB_VIA=m 3483CONFIG_FB_VIA=m
3484# CONFIG_FB_VIA_DIRECT_PROCFS is not set
3228CONFIG_FB_NEOMAGIC=m 3485CONFIG_FB_NEOMAGIC=m
3229CONFIG_FB_KYRO=m 3486CONFIG_FB_KYRO=m
3230CONFIG_FB_3DFX=m 3487CONFIG_FB_3DFX=m
@@ -3252,18 +3509,22 @@ CONFIG_FB_MB862XX=m
3252CONFIG_FB_BROADSHEET=m 3509CONFIG_FB_BROADSHEET=m
3253CONFIG_BACKLIGHT_LCD_SUPPORT=y 3510CONFIG_BACKLIGHT_LCD_SUPPORT=y
3254CONFIG_LCD_CLASS_DEVICE=m 3511CONFIG_LCD_CLASS_DEVICE=m
3512CONFIG_LCD_L4F00242T03=m
3255CONFIG_LCD_LMS283GF05=m 3513CONFIG_LCD_LMS283GF05=m
3256CONFIG_LCD_LTV350QV=m 3514CONFIG_LCD_LTV350QV=m
3257CONFIG_LCD_ILI9320=m 3515CONFIG_LCD_ILI9320=m
3258CONFIG_LCD_TDO24M=m 3516CONFIG_LCD_TDO24M=m
3259CONFIG_LCD_VGG2432A4=m 3517CONFIG_LCD_VGG2432A4=m
3260CONFIG_LCD_PLATFORM=m 3518CONFIG_LCD_PLATFORM=m
3519CONFIG_LCD_S6E63M0=m
3261CONFIG_BACKLIGHT_CLASS_DEVICE=m 3520CONFIG_BACKLIGHT_CLASS_DEVICE=m
3262CONFIG_BACKLIGHT_GENERIC=m 3521CONFIG_BACKLIGHT_GENERIC=m
3263CONFIG_BACKLIGHT_PROGEAR=m 3522CONFIG_BACKLIGHT_PROGEAR=m
3264CONFIG_BACKLIGHT_CARILLO_RANCH=m 3523CONFIG_BACKLIGHT_CARILLO_RANCH=m
3265CONFIG_BACKLIGHT_MBP_NVIDIA=m 3524CONFIG_BACKLIGHT_MBP_NVIDIA=m
3266CONFIG_BACKLIGHT_SAHARA=m 3525CONFIG_BACKLIGHT_SAHARA=m
3526CONFIG_BACKLIGHT_ADP8860=m
3527CONFIG_BACKLIGHT_PCF50633=m
3267 3528
3268# 3529#
3269# Display device support 3530# Display device support
@@ -3347,8 +3608,6 @@ CONFIG_SND_AZT2320=m
3347CONFIG_SND_CMI8330=m 3608CONFIG_SND_CMI8330=m
3348CONFIG_SND_CS4231=m 3609CONFIG_SND_CS4231=m
3349CONFIG_SND_CS4236=m 3610CONFIG_SND_CS4236=m
3350CONFIG_SND_DT019X=m
3351CONFIG_SND_ES968=m
3352CONFIG_SND_ES1688=m 3611CONFIG_SND_ES1688=m
3353CONFIG_SND_ES18XX=m 3612CONFIG_SND_ES18XX=m
3354CONFIG_SND_SC6000=m 3613CONFIG_SND_SC6000=m
@@ -3357,6 +3616,7 @@ CONFIG_SND_GUSEXTREME=m
3357CONFIG_SND_GUSMAX=m 3616CONFIG_SND_GUSMAX=m
3358CONFIG_SND_INTERWAVE=m 3617CONFIG_SND_INTERWAVE=m
3359CONFIG_SND_INTERWAVE_STB=m 3618CONFIG_SND_INTERWAVE_STB=m
3619CONFIG_SND_JAZZ16=m
3360CONFIG_SND_OPL3SA2=m 3620CONFIG_SND_OPL3SA2=m
3361CONFIG_SND_OPTI92X_AD1848=m 3621CONFIG_SND_OPTI92X_AD1848=m
3362CONFIG_SND_OPTI92X_CS4231=m 3622CONFIG_SND_OPTI92X_CS4231=m
@@ -3376,6 +3636,7 @@ CONFIG_SND_AD1889=m
3376CONFIG_SND_ALS300=m 3636CONFIG_SND_ALS300=m
3377CONFIG_SND_ALS4000=m 3637CONFIG_SND_ALS4000=m
3378CONFIG_SND_ALI5451=m 3638CONFIG_SND_ALI5451=m
3639CONFIG_SND_ASIHPI=m
3379CONFIG_SND_ATIIXP=m 3640CONFIG_SND_ATIIXP=m
3380CONFIG_SND_ATIIXP_MODEM=m 3641CONFIG_SND_ATIIXP_MODEM=m
3381CONFIG_SND_AU8810=m 3642CONFIG_SND_AU8810=m
@@ -3415,12 +3676,14 @@ CONFIG_SND_ENS1370=m
3415CONFIG_SND_ENS1371=m 3676CONFIG_SND_ENS1371=m
3416CONFIG_SND_ES1938=m 3677CONFIG_SND_ES1938=m
3417CONFIG_SND_ES1968=m 3678CONFIG_SND_ES1968=m
3679CONFIG_SND_ES1968_INPUT=y
3418CONFIG_SND_FM801=m 3680CONFIG_SND_FM801=m
3419# CONFIG_SND_FM801_TEA575X_BOOL is not set 3681# CONFIG_SND_FM801_TEA575X_BOOL is not set
3420CONFIG_SND_HDA_INTEL=m 3682CONFIG_SND_HDA_INTEL=m
3421CONFIG_SND_HDA_HWDEP=y 3683CONFIG_SND_HDA_HWDEP=y
3422# CONFIG_SND_HDA_RECONFIG is not set 3684# CONFIG_SND_HDA_RECONFIG is not set
3423CONFIG_SND_HDA_INPUT_BEEP=y 3685CONFIG_SND_HDA_INPUT_BEEP=y
3686CONFIG_SND_HDA_INPUT_BEEP_MODE=0
3424CONFIG_SND_HDA_INPUT_JACK=y 3687CONFIG_SND_HDA_INPUT_JACK=y
3425# CONFIG_SND_HDA_PATCH_LOADER is not set 3688# CONFIG_SND_HDA_PATCH_LOADER is not set
3426CONFIG_SND_HDA_CODEC_REALTEK=y 3689CONFIG_SND_HDA_CODEC_REALTEK=y
@@ -3448,6 +3711,7 @@ CONFIG_SND_INTEL8X0M=m
3448CONFIG_SND_KORG1212=m 3711CONFIG_SND_KORG1212=m
3449CONFIG_SND_LX6464ES=m 3712CONFIG_SND_LX6464ES=m
3450CONFIG_SND_MAESTRO3=m 3713CONFIG_SND_MAESTRO3=m
3714CONFIG_SND_MAESTRO3_INPUT=y
3451CONFIG_SND_MIXART=m 3715CONFIG_SND_MIXART=m
3452CONFIG_SND_NM256=m 3716CONFIG_SND_NM256=m
3453CONFIG_SND_PCXHR=m 3717CONFIG_SND_PCXHR=m
@@ -3466,6 +3730,7 @@ CONFIG_SND_YMFPCI=m
3466CONFIG_SND_SPI=y 3730CONFIG_SND_SPI=y
3467CONFIG_SND_USB=y 3731CONFIG_SND_USB=y
3468CONFIG_SND_USB_AUDIO=m 3732CONFIG_SND_USB_AUDIO=m
3733CONFIG_SND_USB_UA101=m
3469CONFIG_SND_USB_USX2Y=m 3734CONFIG_SND_USB_USX2Y=m
3470CONFIG_SND_USB_CAIAQ=m 3735CONFIG_SND_USB_CAIAQ=m
3471# CONFIG_SND_USB_CAIAQ_INPUT is not set 3736# CONFIG_SND_USB_CAIAQ_INPUT is not set
@@ -3478,12 +3743,15 @@ CONFIG_SND_SOC_I2C_AND_SPI=m
3478CONFIG_SND_SOC_ALL_CODECS=m 3743CONFIG_SND_SOC_ALL_CODECS=m
3479CONFIG_SND_SOC_WM_HUBS=m 3744CONFIG_SND_SOC_WM_HUBS=m
3480CONFIG_SND_SOC_AD1836=m 3745CONFIG_SND_SOC_AD1836=m
3481CONFIG_SND_SOC_AD1938=m 3746CONFIG_SND_SOC_AD193X=m
3482CONFIG_SND_SOC_AD73311=m 3747CONFIG_SND_SOC_AD73311=m
3748CONFIG_SND_SOC_ADS117X=m
3483CONFIG_SND_SOC_AK4104=m 3749CONFIG_SND_SOC_AK4104=m
3484CONFIG_SND_SOC_AK4535=m 3750CONFIG_SND_SOC_AK4535=m
3485CONFIG_SND_SOC_AK4642=m 3751CONFIG_SND_SOC_AK4642=m
3752CONFIG_SND_SOC_AK4671=m
3486CONFIG_SND_SOC_CS4270=m 3753CONFIG_SND_SOC_CS4270=m
3754CONFIG_SND_SOC_DA7210=m
3487CONFIG_SND_SOC_L3=m 3755CONFIG_SND_SOC_L3=m
3488CONFIG_SND_SOC_PCM3008=m 3756CONFIG_SND_SOC_PCM3008=m
3489CONFIG_SND_SOC_SPDIF=m 3757CONFIG_SND_SOC_SPDIF=m
@@ -3491,13 +3759,15 @@ CONFIG_SND_SOC_SSM2602=m
3491CONFIG_SND_SOC_TLV320AIC23=m 3759CONFIG_SND_SOC_TLV320AIC23=m
3492CONFIG_SND_SOC_TLV320AIC26=m 3760CONFIG_SND_SOC_TLV320AIC26=m
3493CONFIG_SND_SOC_TLV320AIC3X=m 3761CONFIG_SND_SOC_TLV320AIC3X=m
3762CONFIG_SND_SOC_TLV320DAC33=m
3494CONFIG_SND_SOC_UDA134X=m 3763CONFIG_SND_SOC_UDA134X=m
3495CONFIG_SND_SOC_UDA1380=m 3764CONFIG_SND_SOC_UDA1380=m
3496CONFIG_SND_SOC_WM8350=m
3497CONFIG_SND_SOC_WM8400=m 3765CONFIG_SND_SOC_WM8400=m
3498CONFIG_SND_SOC_WM8510=m 3766CONFIG_SND_SOC_WM8510=m
3499CONFIG_SND_SOC_WM8523=m 3767CONFIG_SND_SOC_WM8523=m
3500CONFIG_SND_SOC_WM8580=m 3768CONFIG_SND_SOC_WM8580=m
3769CONFIG_SND_SOC_WM8711=m
3770CONFIG_SND_SOC_WM8727=m
3501CONFIG_SND_SOC_WM8728=m 3771CONFIG_SND_SOC_WM8728=m
3502CONFIG_SND_SOC_WM8731=m 3772CONFIG_SND_SOC_WM8731=m
3503CONFIG_SND_SOC_WM8750=m 3773CONFIG_SND_SOC_WM8750=m
@@ -3505,16 +3775,22 @@ CONFIG_SND_SOC_WM8753=m
3505CONFIG_SND_SOC_WM8776=m 3775CONFIG_SND_SOC_WM8776=m
3506CONFIG_SND_SOC_WM8900=m 3776CONFIG_SND_SOC_WM8900=m
3507CONFIG_SND_SOC_WM8903=m 3777CONFIG_SND_SOC_WM8903=m
3778CONFIG_SND_SOC_WM8904=m
3508CONFIG_SND_SOC_WM8940=m 3779CONFIG_SND_SOC_WM8940=m
3780CONFIG_SND_SOC_WM8955=m
3509CONFIG_SND_SOC_WM8960=m 3781CONFIG_SND_SOC_WM8960=m
3510CONFIG_SND_SOC_WM8961=m 3782CONFIG_SND_SOC_WM8961=m
3511CONFIG_SND_SOC_WM8971=m 3783CONFIG_SND_SOC_WM8971=m
3512CONFIG_SND_SOC_WM8974=m 3784CONFIG_SND_SOC_WM8974=m
3785CONFIG_SND_SOC_WM8978=m
3513CONFIG_SND_SOC_WM8988=m 3786CONFIG_SND_SOC_WM8988=m
3514CONFIG_SND_SOC_WM8990=m 3787CONFIG_SND_SOC_WM8990=m
3515CONFIG_SND_SOC_WM8993=m 3788CONFIG_SND_SOC_WM8993=m
3516CONFIG_SND_SOC_WM9081=m 3789CONFIG_SND_SOC_WM9081=m
3517CONFIG_SND_SOC_MAX9877=m 3790CONFIG_SND_SOC_MAX9877=m
3791CONFIG_SND_SOC_TPA6130A2=m
3792CONFIG_SND_SOC_WM2000=m
3793CONFIG_SND_SOC_WM9090=m
3518# CONFIG_SOUND_PRIME is not set 3794# CONFIG_SOUND_PRIME is not set
3519CONFIG_AC97_BUS=m 3795CONFIG_AC97_BUS=m
3520CONFIG_HID_SUPPORT=y 3796CONFIG_HID_SUPPORT=y
@@ -3537,26 +3813,42 @@ CONFIG_USB_MOUSE=m
3537# 3813#
3538# Special HID drivers 3814# Special HID drivers
3539# 3815#
3816CONFIG_HID_3M_PCT=m
3540# CONFIG_HID_A4TECH is not set 3817# CONFIG_HID_A4TECH is not set
3541# CONFIG_HID_APPLE is not set 3818# CONFIG_HID_APPLE is not set
3542# CONFIG_HID_BELKIN is not set 3819# CONFIG_HID_BELKIN is not set
3820CONFIG_HID_CANDO=m
3543# CONFIG_HID_CHERRY is not set 3821# CONFIG_HID_CHERRY is not set
3544# CONFIG_HID_CHICONY is not set 3822# CONFIG_HID_CHICONY is not set
3823CONFIG_HID_PRODIKEYS=m
3545# CONFIG_HID_CYPRESS is not set 3824# CONFIG_HID_CYPRESS is not set
3546# CONFIG_HID_DRAGONRISE is not set 3825# CONFIG_HID_DRAGONRISE is not set
3826CONFIG_HID_EGALAX=m
3547# CONFIG_HID_EZKEY is not set 3827# CONFIG_HID_EZKEY is not set
3548# CONFIG_HID_KYE is not set 3828# CONFIG_HID_KYE is not set
3549# CONFIG_HID_GYRATION is not set 3829# CONFIG_HID_GYRATION is not set
3550# CONFIG_HID_TWINHAN is not set 3830# CONFIG_HID_TWINHAN is not set
3551# CONFIG_HID_KENSINGTON is not set 3831# CONFIG_HID_KENSINGTON is not set
3552# CONFIG_HID_LOGITECH is not set 3832# CONFIG_HID_LOGITECH is not set
3833CONFIG_HID_MAGICMOUSE=m
3553# CONFIG_HID_MICROSOFT is not set 3834# CONFIG_HID_MICROSOFT is not set
3835CONFIG_HID_MOSART=m
3554# CONFIG_HID_MONTEREY is not set 3836# CONFIG_HID_MONTEREY is not set
3555# CONFIG_HID_NTRIG is not set 3837# CONFIG_HID_NTRIG is not set
3838CONFIG_HID_ORTEK=m
3556# CONFIG_HID_PANTHERLORD is not set 3839# CONFIG_HID_PANTHERLORD is not set
3557# CONFIG_HID_PETALYNX is not set 3840# CONFIG_HID_PETALYNX is not set
3841CONFIG_HID_PICOLCD=m
3842CONFIG_HID_PICOLCD_FB=y
3843CONFIG_HID_PICOLCD_BACKLIGHT=y
3844CONFIG_HID_PICOLCD_LCD=y
3845CONFIG_HID_PICOLCD_LEDS=y
3846CONFIG_HID_QUANTA=m
3847CONFIG_HID_ROCCAT=m
3848CONFIG_HID_ROCCAT_KONE=m
3558# CONFIG_HID_SAMSUNG is not set 3849# CONFIG_HID_SAMSUNG is not set
3559# CONFIG_HID_SONY is not set 3850# CONFIG_HID_SONY is not set
3851CONFIG_HID_STANTUM=m
3560# CONFIG_HID_SUNPLUS is not set 3852# CONFIG_HID_SUNPLUS is not set
3561# CONFIG_HID_GREENASIA is not set 3853# CONFIG_HID_GREENASIA is not set
3562# CONFIG_HID_SMARTJOYPLUS is not set 3854# CONFIG_HID_SMARTJOYPLUS is not set
@@ -3564,6 +3856,7 @@ CONFIG_USB_MOUSE=m
3564# CONFIG_HID_THRUSTMASTER is not set 3856# CONFIG_HID_THRUSTMASTER is not set
3565# CONFIG_HID_WACOM is not set 3857# CONFIG_HID_WACOM is not set
3566# CONFIG_HID_ZEROPLUS is not set 3858# CONFIG_HID_ZEROPLUS is not set
3859CONFIG_HID_ZYDACRON=m
3567CONFIG_USB_SUPPORT=y 3860CONFIG_USB_SUPPORT=y
3568CONFIG_USB_ARCH_HAS_HCD=y 3861CONFIG_USB_ARCH_HAS_HCD=y
3569CONFIG_USB_ARCH_HAS_OHCI=y 3862CONFIG_USB_ARCH_HAS_OHCI=y
@@ -3578,8 +3871,6 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
3578CONFIG_USB_DEVICEFS=y 3871CONFIG_USB_DEVICEFS=y
3579CONFIG_USB_DEVICE_CLASS=y 3872CONFIG_USB_DEVICE_CLASS=y
3580# CONFIG_USB_DYNAMIC_MINORS is not set 3873# CONFIG_USB_DYNAMIC_MINORS is not set
3581# CONFIG_USB_SUSPEND is not set
3582# CONFIG_USB_OTG is not set
3583# CONFIG_USB_OTG_WHITELIST is not set 3874# CONFIG_USB_OTG_WHITELIST is not set
3584# CONFIG_USB_OTG_BLACKLIST_HUB is not set 3875# CONFIG_USB_OTG_BLACKLIST_HUB is not set
3585CONFIG_USB_MON=m 3876CONFIG_USB_MON=m
@@ -3685,11 +3976,13 @@ CONFIG_USB_SERIAL_KLSI=m
3685CONFIG_USB_SERIAL_KOBIL_SCT=m 3976CONFIG_USB_SERIAL_KOBIL_SCT=m
3686CONFIG_USB_SERIAL_MCT_U232=m 3977CONFIG_USB_SERIAL_MCT_U232=m
3687CONFIG_USB_SERIAL_MOS7720=m 3978CONFIG_USB_SERIAL_MOS7720=m
3979CONFIG_USB_SERIAL_MOS7715_PARPORT=y
3688CONFIG_USB_SERIAL_MOS7840=m 3980CONFIG_USB_SERIAL_MOS7840=m
3689CONFIG_USB_SERIAL_MOTOROLA=m 3981CONFIG_USB_SERIAL_MOTOROLA=m
3690CONFIG_USB_SERIAL_NAVMAN=m 3982CONFIG_USB_SERIAL_NAVMAN=m
3691CONFIG_USB_SERIAL_PL2303=m 3983CONFIG_USB_SERIAL_PL2303=m
3692CONFIG_USB_SERIAL_OTI6858=m 3984CONFIG_USB_SERIAL_OTI6858=m
3985CONFIG_USB_SERIAL_QCAUX=m
3693CONFIG_USB_SERIAL_QUALCOMM=m 3986CONFIG_USB_SERIAL_QUALCOMM=m
3694CONFIG_USB_SERIAL_SPCP8X5=m 3987CONFIG_USB_SERIAL_SPCP8X5=m
3695CONFIG_USB_SERIAL_HP4X=m 3988CONFIG_USB_SERIAL_HP4X=m
@@ -3701,9 +3994,12 @@ CONFIG_USB_SERIAL_SYMBOL=m
3701CONFIG_USB_SERIAL_TI=m 3994CONFIG_USB_SERIAL_TI=m
3702CONFIG_USB_SERIAL_CYBERJACK=m 3995CONFIG_USB_SERIAL_CYBERJACK=m
3703CONFIG_USB_SERIAL_XIRCOM=m 3996CONFIG_USB_SERIAL_XIRCOM=m
3997CONFIG_USB_SERIAL_WWAN=m
3704CONFIG_USB_SERIAL_OPTION=m 3998CONFIG_USB_SERIAL_OPTION=m
3705CONFIG_USB_SERIAL_OMNINET=m 3999CONFIG_USB_SERIAL_OMNINET=m
3706CONFIG_USB_SERIAL_OPTICON=m 4000CONFIG_USB_SERIAL_OPTICON=m
4001CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
4002CONFIG_USB_SERIAL_ZIO=m
3707CONFIG_USB_SERIAL_DEBUG=m 4003CONFIG_USB_SERIAL_DEBUG=m
3708 4004
3709# 4005#
@@ -3716,7 +4012,6 @@ CONFIG_USB_SEVSEG=m
3716CONFIG_USB_RIO500=m 4012CONFIG_USB_RIO500=m
3717# CONFIG_USB_LEGOTOWER is not set 4013# CONFIG_USB_LEGOTOWER is not set
3718CONFIG_USB_LCD=m 4014CONFIG_USB_LCD=m
3719# CONFIG_USB_BERRY_CHARGE is not set
3720CONFIG_USB_LED=m 4015CONFIG_USB_LED=m
3721CONFIG_USB_CYPRESS_CY7C63=m 4016CONFIG_USB_CYPRESS_CY7C63=m
3722CONFIG_USB_CYTHERM=m 4017CONFIG_USB_CYTHERM=m
@@ -3730,7 +4025,6 @@ CONFIG_USB_LD=m
3730CONFIG_USB_IOWARRIOR=m 4025CONFIG_USB_IOWARRIOR=m
3731CONFIG_USB_TEST=m 4026CONFIG_USB_TEST=m
3732CONFIG_USB_ISIGHTFW=m 4027CONFIG_USB_ISIGHTFW=m
3733# CONFIG_USB_VST is not set
3734CONFIG_USB_ATM=m 4028CONFIG_USB_ATM=m
3735CONFIG_USB_SPEEDTOUCH=m 4029CONFIG_USB_SPEEDTOUCH=m
3736CONFIG_USB_CXACRU=m 4030CONFIG_USB_CXACRU=m
@@ -3767,11 +4061,9 @@ CONFIG_MMC_TEST=m
3767# 4061#
3768CONFIG_MMC_SDHCI=m 4062CONFIG_MMC_SDHCI=m
3769CONFIG_MMC_SDHCI_PCI=m 4063CONFIG_MMC_SDHCI_PCI=m
3770CONFIG_MMC_RICOH_MMC=m 4064CONFIG_MMC_RICOH_MMC=y
3771CONFIG_MMC_SDHCI_PLTFM=m 4065CONFIG_MMC_SDHCI_PLTFM=m
3772CONFIG_MMC_WBSD=m 4066CONFIG_MMC_WBSD=m
3773# CONFIG_MMC_AT91 is not set
3774# CONFIG_MMC_ATMELMCI is not set
3775CONFIG_MMC_TIFM_SD=m 4067CONFIG_MMC_TIFM_SD=m
3776CONFIG_MMC_SDRICOH_CS=m 4068CONFIG_MMC_SDRICOH_CS=m
3777CONFIG_MMC_CB710=m 4069CONFIG_MMC_CB710=m
@@ -3797,6 +4089,7 @@ CONFIG_LEDS_CLASS=m
3797# LED drivers 4089# LED drivers
3798# 4090#
3799CONFIG_LEDS_NET48XX=m 4091CONFIG_LEDS_NET48XX=m
4092CONFIG_LEDS_NET5501=m
3800CONFIG_LEDS_WRAP=m 4093CONFIG_LEDS_WRAP=m
3801CONFIG_LEDS_ALIX2=m 4094CONFIG_LEDS_ALIX2=m
3802CONFIG_LEDS_PCA9532=m 4095CONFIG_LEDS_PCA9532=m
@@ -3805,14 +4098,17 @@ CONFIG_LEDS_GPIO_PLATFORM=y
3805CONFIG_LEDS_LP3944=m 4098CONFIG_LEDS_LP3944=m
3806CONFIG_LEDS_CLEVO_MAIL=m 4099CONFIG_LEDS_CLEVO_MAIL=m
3807CONFIG_LEDS_PCA955X=m 4100CONFIG_LEDS_PCA955X=m
3808CONFIG_LEDS_WM8350=m
3809CONFIG_LEDS_DAC124S085=m 4101CONFIG_LEDS_DAC124S085=m
4102CONFIG_LEDS_REGULATOR=m
3810CONFIG_LEDS_BD2802=m 4103CONFIG_LEDS_BD2802=m
4104CONFIG_LEDS_INTEL_SS4200=m
4105CONFIG_LEDS_LT3593=m
4106CONFIG_LEDS_DELL_NETBOOKS=m
4107CONFIG_LEDS_TRIGGERS=y
3811 4108
3812# 4109#
3813# LED Triggers 4110# LED Triggers
3814# 4111#
3815CONFIG_LEDS_TRIGGERS=y
3816CONFIG_LEDS_TRIGGER_TIMER=m 4112CONFIG_LEDS_TRIGGER_TIMER=m
3817CONFIG_LEDS_TRIGGER_HEARTBEAT=m 4113CONFIG_LEDS_TRIGGER_HEARTBEAT=m
3818CONFIG_LEDS_TRIGGER_BACKLIGHT=m 4114CONFIG_LEDS_TRIGGER_BACKLIGHT=m
@@ -3835,6 +4131,7 @@ CONFIG_INFINIBAND_AMSO1100=m
3835# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set 4131# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
3836CONFIG_INFINIBAND_CXGB3=m 4132CONFIG_INFINIBAND_CXGB3=m
3837# CONFIG_INFINIBAND_CXGB3_DEBUG is not set 4133# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
4134CONFIG_INFINIBAND_CXGB4=m
3838CONFIG_MLX4_INFINIBAND=m 4135CONFIG_MLX4_INFINIBAND=m
3839CONFIG_INFINIBAND_NES=m 4136CONFIG_INFINIBAND_NES=m
3840# CONFIG_INFINIBAND_NES_DEBUG is not set 4137# CONFIG_INFINIBAND_NES_DEBUG is not set
@@ -3870,6 +4167,7 @@ CONFIG_RTC_DRV_PCF8563=m
3870CONFIG_RTC_DRV_PCF8583=m 4167CONFIG_RTC_DRV_PCF8583=m
3871CONFIG_RTC_DRV_M41T80=m 4168CONFIG_RTC_DRV_M41T80=m
3872CONFIG_RTC_DRV_M41T80_WDT=y 4169CONFIG_RTC_DRV_M41T80_WDT=y
4170CONFIG_RTC_DRV_BQ32K=m
3873CONFIG_RTC_DRV_S35390A=m 4171CONFIG_RTC_DRV_S35390A=m
3874CONFIG_RTC_DRV_FM3130=m 4172CONFIG_RTC_DRV_FM3130=m
3875CONFIG_RTC_DRV_RX8581=m 4173CONFIG_RTC_DRV_RX8581=m
@@ -3899,22 +4197,25 @@ CONFIG_RTC_DRV_STK17TA8=m
3899CONFIG_RTC_DRV_M48T86=m 4197CONFIG_RTC_DRV_M48T86=m
3900CONFIG_RTC_DRV_M48T35=m 4198CONFIG_RTC_DRV_M48T35=m
3901CONFIG_RTC_DRV_M48T59=m 4199CONFIG_RTC_DRV_M48T59=m
4200CONFIG_RTC_DRV_MSM6242=m
3902CONFIG_RTC_DRV_BQ4802=m 4201CONFIG_RTC_DRV_BQ4802=m
4202CONFIG_RTC_DRV_RP5C01=m
3903CONFIG_RTC_DRV_V3020=m 4203CONFIG_RTC_DRV_V3020=m
3904CONFIG_RTC_DRV_WM8350=m
3905CONFIG_RTC_DRV_PCF50633=m 4204CONFIG_RTC_DRV_PCF50633=m
3906CONFIG_RTC_DRV_AB3100=m 4205CONFIG_RTC_DRV_AB8500=m
3907 4206
3908# 4207#
3909# on-CPU RTC drivers 4208# on-CPU RTC drivers
3910# 4209#
3911CONFIG_DMADEVICES=y 4210CONFIG_DMADEVICES=y
4211# CONFIG_DMADEVICES_DEBUG is not set
3912 4212
3913# 4213#
3914# DMA Devices 4214# DMA Devices
3915# 4215#
3916CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH=y 4216CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH=y
3917CONFIG_INTEL_IOATDMA=m 4217CONFIG_INTEL_IOATDMA=m
4218CONFIG_TIMB_DMA=m
3918CONFIG_DMA_ENGINE=y 4219CONFIG_DMA_ENGINE=y
3919 4220
3920# 4221#
@@ -3934,57 +4235,44 @@ CONFIG_UIO=m
3934CONFIG_UIO_CIF=m 4235CONFIG_UIO_CIF=m
3935CONFIG_UIO_PDRV=m 4236CONFIG_UIO_PDRV=m
3936CONFIG_UIO_PDRV_GENIRQ=m 4237CONFIG_UIO_PDRV_GENIRQ=m
3937CONFIG_UIO_SMX=m
3938CONFIG_UIO_AEC=m 4238CONFIG_UIO_AEC=m
3939CONFIG_UIO_SERCOS3=m 4239CONFIG_UIO_SERCOS3=m
3940# CONFIG_UIO_PCI_GENERIC is not set 4240# CONFIG_UIO_PCI_GENERIC is not set
3941 4241CONFIG_UIO_NETX=m
3942#
3943# TI VLYNQ
3944#
3945CONFIG_STAGING=y 4242CONFIG_STAGING=y
3946# CONFIG_STAGING_EXCLUDE_BUILD is not set 4243# CONFIG_STAGING_EXCLUDE_BUILD is not set
3947# CONFIG_ET131X is not set 4244# CONFIG_ET131X is not set
3948# CONFIG_SLICOSS is not set 4245# CONFIG_SLICOSS is not set
3949# CONFIG_VIDEO_GO7007 is not set 4246# CONFIG_VIDEO_GO7007 is not set
3950# CONFIG_VIDEO_CX25821 is not set 4247# CONFIG_VIDEO_CX25821 is not set
4248# CONFIG_VIDEO_TM6000 is not set
3951# CONFIG_USB_IP_COMMON is not set 4249# CONFIG_USB_IP_COMMON is not set
3952# CONFIG_W35UND is not set 4250# CONFIG_W35UND is not set
3953# CONFIG_PRISM2_USB is not set 4251# CONFIG_PRISM2_USB is not set
3954# CONFIG_ECHO is not set 4252# CONFIG_ECHO is not set
3955# CONFIG_POCH is not set
3956# CONFIG_OTUS is not set 4253# CONFIG_OTUS is not set
3957# CONFIG_RT2860 is not set 4254# CONFIG_RT2860 is not set
3958# CONFIG_RT2870 is not set 4255# CONFIG_RT2870 is not set
3959# CONFIG_RT3090 is not set
3960# CONFIG_COMEDI is not set 4256# CONFIG_COMEDI is not set
3961# CONFIG_ASUS_OLED is not set 4257# CONFIG_ASUS_OLED is not set
3962# CONFIG_PANEL is not set 4258# CONFIG_PANEL is not set
3963# CONFIG_ALTERA_PCIE_CHDMA is not set 4259# CONFIG_R8187SE is not set
3964# CONFIG_RTL8187SE is not set
3965# CONFIG_RTL8192SU is not set 4260# CONFIG_RTL8192SU is not set
4261# CONFIG_RTL8192U is not set
3966# CONFIG_RTL8192E is not set 4262# CONFIG_RTL8192E is not set
3967# CONFIG_TRANZPORT is not set 4263# CONFIG_TRANZPORT is not set
3968
3969#
3970# Android
3971#
3972
3973#
3974# Qualcomm MSM Camera And Video
3975#
3976
3977#
3978# Camera Sensor Selection
3979#
3980# CONFIG_INPUT_GPIO is not set
3981# CONFIG_DST is not set
3982# CONFIG_POHMELFS is not set 4264# CONFIG_POHMELFS is not set
3983# CONFIG_B3DFG is not set
3984# CONFIG_IDE_PHISON is not set 4265# CONFIG_IDE_PHISON is not set
3985# CONFIG_PLAN9AUTH is not set
3986# CONFIG_LINE6_USB is not set 4266# CONFIG_LINE6_USB is not set
3987# CONFIG_DRM_RADEON_KMS is not set 4267# CONFIG_DRM_VMWGFX is not set
4268CONFIG_DRM_NOUVEAU=m
4269CONFIG_DRM_NOUVEAU_BACKLIGHT=y
4270CONFIG_DRM_NOUVEAU_DEBUG=y
4271
4272#
4273# I2C encoder or helper chips
4274#
4275# CONFIG_DRM_I2C_CH7006 is not set
3988# CONFIG_USB_SERIAL_QUATECH2 is not set 4276# CONFIG_USB_SERIAL_QUATECH2 is not set
3989# CONFIG_USB_SERIAL_QUATECH_USB2 is not set 4277# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
3990# CONFIG_VT6655 is not set 4278# CONFIG_VT6655 is not set
@@ -3994,6 +4282,7 @@ CONFIG_HYPERV=m
3994CONFIG_HYPERV_STORAGE=m 4282CONFIG_HYPERV_STORAGE=m
3995CONFIG_HYPERV_BLOCK=m 4283CONFIG_HYPERV_BLOCK=m
3996CONFIG_HYPERV_NET=m 4284CONFIG_HYPERV_NET=m
4285CONFIG_HYPERV_UTILS=m
3997# CONFIG_VME_BUS is not set 4286# CONFIG_VME_BUS is not set
3998 4287
3999# 4288#
@@ -4001,9 +4290,28 @@ CONFIG_HYPERV_NET=m
4001# 4290#
4002# CONFIG_RAR_REGISTER is not set 4291# CONFIG_RAR_REGISTER is not set
4003# CONFIG_IIO is not set 4292# CONFIG_IIO is not set
4293# CONFIG_RAMZSWAP is not set
4294# CONFIG_WLAGS49_H2 is not set
4295# CONFIG_WLAGS49_H25 is not set
4296# CONFIG_BATMAN_ADV is not set
4297# CONFIG_SAMSUNG_LAPTOP is not set
4298# CONFIG_FB_SM7XX is not set
4299# CONFIG_DT3155 is not set
4300# CONFIG_VIDEO_DT3155 is not set
4301# CONFIG_CRYSTALHD is not set
4302# CONFIG_CXT1E1 is not set
4303
4304#
4305# Texas Instruments shared transport line discipline
4306#
4307# CONFIG_TI_ST is not set
4308# CONFIG_ST_BT is not set
4309# CONFIG_ADIS16255 is not set
4310# CONFIG_FB_XGI is not set
4004CONFIG_X86_PLATFORM_DEVICES=y 4311CONFIG_X86_PLATFORM_DEVICES=y
4005CONFIG_ACER_WMI=m 4312CONFIG_ACER_WMI=m
4006CONFIG_ASUS_LAPTOP=m 4313CONFIG_ASUS_LAPTOP=m
4314CONFIG_DELL_LAPTOP=m
4007CONFIG_DELL_WMI=m 4315CONFIG_DELL_WMI=m
4008CONFIG_FUJITSU_LAPTOP=m 4316CONFIG_FUJITSU_LAPTOP=m
4009# CONFIG_FUJITSU_LAPTOP_DEBUG is not set 4317# CONFIG_FUJITSU_LAPTOP_DEBUG is not set
@@ -4015,6 +4323,7 @@ CONFIG_COMPAL_LAPTOP=m
4015CONFIG_SONY_LAPTOP=m 4323CONFIG_SONY_LAPTOP=m
4016# CONFIG_SONYPI_COMPAT is not set 4324# CONFIG_SONYPI_COMPAT is not set
4017CONFIG_THINKPAD_ACPI=m 4325CONFIG_THINKPAD_ACPI=m
4326CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y
4018# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set 4327# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
4019# CONFIG_THINKPAD_ACPI_DEBUG is not set 4328# CONFIG_THINKPAD_ACPI_DEBUG is not set
4020# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set 4329# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set
@@ -4022,10 +4331,14 @@ CONFIG_THINKPAD_ACPI_VIDEO=y
4022CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y 4331CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
4023CONFIG_INTEL_MENLOW=m 4332CONFIG_INTEL_MENLOW=m
4024CONFIG_EEEPC_LAPTOP=m 4333CONFIG_EEEPC_LAPTOP=m
4334CONFIG_EEEPC_WMI=m
4025CONFIG_ACPI_WMI=m 4335CONFIG_ACPI_WMI=m
4336CONFIG_MSI_WMI=m
4026CONFIG_ACPI_ASUS=m 4337CONFIG_ACPI_ASUS=m
4027# CONFIG_TOPSTAR_LAPTOP is not set 4338# CONFIG_TOPSTAR_LAPTOP is not set
4028CONFIG_ACPI_TOSHIBA=m 4339CONFIG_ACPI_TOSHIBA=m
4340CONFIG_TOSHIBA_BT_RFKILL=m
4341CONFIG_ACPI_CMPC=m
4029 4342
4030# 4343#
4031# Firmware Drivers 4344# Firmware Drivers
@@ -4087,7 +4400,6 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
4087CONFIG_OCFS2_FS_STATS=y 4400CONFIG_OCFS2_FS_STATS=y
4088CONFIG_OCFS2_DEBUG_MASKLOG=y 4401CONFIG_OCFS2_DEBUG_MASKLOG=y
4089# CONFIG_OCFS2_DEBUG_FS is not set 4402# CONFIG_OCFS2_DEBUG_FS is not set
4090CONFIG_OCFS2_FS_POSIX_ACL=y
4091CONFIG_BTRFS_FS=m 4403CONFIG_BTRFS_FS=m
4092CONFIG_BTRFS_FS_POSIX_ACL=y 4404CONFIG_BTRFS_FS_POSIX_ACL=y
4093CONFIG_NILFS2_FS=m 4405CONFIG_NILFS2_FS=m
@@ -4099,6 +4411,7 @@ CONFIG_INOTIFY_USER=y
4099CONFIG_QUOTA=y 4411CONFIG_QUOTA=y
4100CONFIG_QUOTA_NETLINK_INTERFACE=y 4412CONFIG_QUOTA_NETLINK_INTERFACE=y
4101# CONFIG_PRINT_QUOTA_WARNING is not set 4413# CONFIG_PRINT_QUOTA_WARNING is not set
4414# CONFIG_QUOTA_DEBUG is not set
4102CONFIG_QUOTA_TREE=m 4415CONFIG_QUOTA_TREE=m
4103CONFIG_QFMT_V1=m 4416CONFIG_QFMT_V1=m
4104CONFIG_QFMT_V2=m 4417CONFIG_QFMT_V2=m
@@ -4184,8 +4497,10 @@ CONFIG_UBIFS_FS=m
4184CONFIG_UBIFS_FS_LZO=y 4497CONFIG_UBIFS_FS_LZO=y
4185CONFIG_UBIFS_FS_ZLIB=y 4498CONFIG_UBIFS_FS_ZLIB=y
4186# CONFIG_UBIFS_FS_DEBUG is not set 4499# CONFIG_UBIFS_FS_DEBUG is not set
4500CONFIG_LOGFS=m
4187CONFIG_CRAMFS=m 4501CONFIG_CRAMFS=m
4188CONFIG_SQUASHFS=m 4502CONFIG_SQUASHFS=m
4503# CONFIG_SQUASHFS_XATTRS is not set
4189# CONFIG_SQUASHFS_EMBEDDED is not set 4504# CONFIG_SQUASHFS_EMBEDDED is not set
4190CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 4505CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
4191# CONFIG_VXFS_FS is not set 4506# CONFIG_VXFS_FS is not set
@@ -4225,6 +4540,8 @@ CONFIG_SUNRPC_XPRT_RDMA=m
4225CONFIG_RPCSEC_GSS_KRB5=m 4540CONFIG_RPCSEC_GSS_KRB5=m
4226# CONFIG_RPCSEC_GSS_SPKM3 is not set 4541# CONFIG_RPCSEC_GSS_SPKM3 is not set
4227# CONFIG_SMB_FS is not set 4542# CONFIG_SMB_FS is not set
4543CONFIG_CEPH_FS=m
4544# CONFIG_CEPH_FS_PRETTYDEBUG is not set
4228CONFIG_CIFS=m 4545CONFIG_CIFS=m
4229# CONFIG_CIFS_STATS is not set 4546# CONFIG_CIFS_STATS is not set
4230# CONFIG_CIFS_WEAK_PW_HASH is not set 4547# CONFIG_CIFS_WEAK_PW_HASH is not set
@@ -4317,11 +4634,12 @@ CONFIG_FRAME_WARN=1024
4317CONFIG_DEBUG_FS=y 4634CONFIG_DEBUG_FS=y
4318# CONFIG_HEADERS_CHECK is not set 4635# CONFIG_HEADERS_CHECK is not set
4319# CONFIG_DEBUG_KERNEL is not set 4636# CONFIG_DEBUG_KERNEL is not set
4320# CONFIG_DEBUG_BUGVERBOSE is not set 4637CONFIG_DEBUG_BUGVERBOSE=y
4321# CONFIG_DEBUG_MEMORY_INIT is not set 4638# CONFIG_DEBUG_MEMORY_INIT is not set
4322CONFIG_ARCH_WANT_FRAME_POINTERS=y 4639CONFIG_ARCH_WANT_FRAME_POINTERS=y
4323CONFIG_FRAME_POINTER=y 4640CONFIG_FRAME_POINTER=y
4324# CONFIG_RCU_CPU_STALL_DETECTOR is not set 4641# CONFIG_RCU_CPU_STALL_DETECTOR is not set
4642# CONFIG_LKDTM is not set
4325# CONFIG_LATENCYTOP is not set 4643# CONFIG_LATENCYTOP is not set
4326CONFIG_SYSCTL_SYSCALL_CHECK=y 4644CONFIG_SYSCTL_SYSCALL_CHECK=y
4327CONFIG_USER_STACKTRACE_SUPPORT=y 4645CONFIG_USER_STACKTRACE_SUPPORT=y
@@ -4340,6 +4658,7 @@ CONFIG_TRACING_SUPPORT=y
4340# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set 4658# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set
4341# CONFIG_DYNAMIC_DEBUG is not set 4659# CONFIG_DYNAMIC_DEBUG is not set
4342# CONFIG_DMA_API_DEBUG is not set 4660# CONFIG_DMA_API_DEBUG is not set
4661# CONFIG_ATOMIC64_SELFTEST is not set
4343# CONFIG_SAMPLES is not set 4662# CONFIG_SAMPLES is not set
4344CONFIG_HAVE_ARCH_KGDB=y 4663CONFIG_HAVE_ARCH_KGDB=y
4345CONFIG_HAVE_ARCH_KMEMCHECK=y 4664CONFIG_HAVE_ARCH_KMEMCHECK=y
@@ -4508,9 +4827,13 @@ CONFIG_SECURITY=y
4508CONFIG_SECURITYFS=y 4827CONFIG_SECURITYFS=y
4509# CONFIG_SECURITY_NETWORK is not set 4828# CONFIG_SECURITY_NETWORK is not set
4510# CONFIG_SECURITY_PATH is not set 4829# CONFIG_SECURITY_PATH is not set
4511CONFIG_SECURITY_FILE_CAPABILITIES=y
4512# CONFIG_SECURITY_TOMOYO is not set 4830# CONFIG_SECURITY_TOMOYO is not set
4513# CONFIG_IMA is not set 4831# CONFIG_IMA is not set
4832# CONFIG_DEFAULT_SECURITY_SELINUX is not set
4833# CONFIG_DEFAULT_SECURITY_SMACK is not set
4834# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
4835CONFIG_DEFAULT_SECURITY_DAC=y
4836CONFIG_DEFAULT_SECURITY=""
4514CONFIG_XOR_BLOCKS=m 4837CONFIG_XOR_BLOCKS=m
4515CONFIG_ASYNC_CORE=m 4838CONFIG_ASYNC_CORE=m
4516CONFIG_ASYNC_MEMCPY=m 4839CONFIG_ASYNC_MEMCPY=m
@@ -4538,8 +4861,10 @@ CONFIG_CRYPTO_RNG2=y
4538CONFIG_CRYPTO_PCOMP=y 4861CONFIG_CRYPTO_PCOMP=y
4539CONFIG_CRYPTO_MANAGER=m 4862CONFIG_CRYPTO_MANAGER=m
4540CONFIG_CRYPTO_MANAGER2=y 4863CONFIG_CRYPTO_MANAGER2=y
4864# CONFIG_CRYPTO_MANAGER_TESTS is not set
4541CONFIG_CRYPTO_GF128MUL=m 4865CONFIG_CRYPTO_GF128MUL=m
4542CONFIG_CRYPTO_NULL=m 4866CONFIG_CRYPTO_NULL=m
4867CONFIG_CRYPTO_PCRYPT=m
4543CONFIG_CRYPTO_WORKQUEUE=y 4868CONFIG_CRYPTO_WORKQUEUE=y
4544CONFIG_CRYPTO_CRYPTD=m 4869CONFIG_CRYPTO_CRYPTD=m
4545CONFIG_CRYPTO_AUTHENC=m 4870CONFIG_CRYPTO_AUTHENC=m
@@ -4634,10 +4959,12 @@ CONFIG_HAVE_KVM=y
4634CONFIG_HAVE_KVM_IRQCHIP=y 4959CONFIG_HAVE_KVM_IRQCHIP=y
4635CONFIG_HAVE_KVM_EVENTFD=y 4960CONFIG_HAVE_KVM_EVENTFD=y
4636CONFIG_KVM_APIC_ARCHITECTURE=y 4961CONFIG_KVM_APIC_ARCHITECTURE=y
4962CONFIG_KVM_MMIO=y
4637CONFIG_VIRTUALIZATION=y 4963CONFIG_VIRTUALIZATION=y
4638CONFIG_KVM=m 4964CONFIG_KVM=m
4639CONFIG_KVM_INTEL=m 4965CONFIG_KVM_INTEL=m
4640CONFIG_KVM_AMD=m 4966CONFIG_KVM_AMD=m
4967CONFIG_VHOST_NET=m
4641CONFIG_LGUEST=m 4968CONFIG_LGUEST=m
4642CONFIG_VIRTIO=y 4969CONFIG_VIRTIO=y
4643CONFIG_VIRTIO_RING=y 4970CONFIG_VIRTIO_RING=y
@@ -4662,10 +4989,11 @@ CONFIG_LIBCRC32C=m
4662CONFIG_ZLIB_INFLATE=y 4989CONFIG_ZLIB_INFLATE=y
4663CONFIG_ZLIB_DEFLATE=m 4990CONFIG_ZLIB_DEFLATE=m
4664CONFIG_LZO_COMPRESS=m 4991CONFIG_LZO_COMPRESS=m
4665CONFIG_LZO_DECOMPRESS=m 4992CONFIG_LZO_DECOMPRESS=y
4666CONFIG_DECOMPRESS_GZIP=y 4993CONFIG_DECOMPRESS_GZIP=y
4667CONFIG_DECOMPRESS_BZIP2=y 4994CONFIG_DECOMPRESS_BZIP2=y
4668CONFIG_DECOMPRESS_LZMA=y 4995CONFIG_DECOMPRESS_LZMA=y
4996CONFIG_DECOMPRESS_LZO=y
4669CONFIG_GENERIC_ALLOCATOR=y 4997CONFIG_GENERIC_ALLOCATOR=y
4670CONFIG_REED_SOLOMON=m 4998CONFIG_REED_SOLOMON=m
4671CONFIG_REED_SOLOMON_DEC16=y 4999CONFIG_REED_SOLOMON_DEC16=y
@@ -4673,6 +5001,7 @@ CONFIG_TEXTSEARCH=y
4673CONFIG_TEXTSEARCH_KMP=m 5001CONFIG_TEXTSEARCH_KMP=m
4674CONFIG_TEXTSEARCH_BM=m 5002CONFIG_TEXTSEARCH_BM=m
4675CONFIG_TEXTSEARCH_FSM=m 5003CONFIG_TEXTSEARCH_FSM=m
5004CONFIG_BTREE=y
4676CONFIG_HAS_IOMEM=y 5005CONFIG_HAS_IOMEM=y
4677CONFIG_HAS_IOPORT=y 5006CONFIG_HAS_IOPORT=y
4678CONFIG_HAS_DMA=y 5007CONFIG_HAS_DMA=y
diff --git a/main/linux-grsec/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch b/main/linux-grsec/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
deleted file mode 100644
index a4f94d7fa4..0000000000
--- a/main/linux-grsec/x86-setup-When-restoring-the-screen-update-boot_params-screen_info.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From f1f6baf8f1df29be38003089787e378567ce0086 Mon Sep 17 00:00:00 2001
2From: H. Peter Anvin <hpa@zytor.com>
3Date: Wed, 17 Feb 2010 18:32:06 -0800
4Subject: [PATCH] x86, setup: When restoring the screen, update boot_params.screen_info
5
6When we restore the screen content after a mode change, we return the
7cursor to its former position. However, we need to also update
8boot_params.screen_info accordingly, so that the decompression code
9knows where on the screen the cursor is. Just in case the video BIOS
10does something extra screwy, read the cursor position back from the
11BIOS instead of relying on it doing the right thing.
12
13While we're at it, make sure we cap the cursor position to the new
14screen coordinates.
15
16Reported-by: Wim Osterholt <wim@djo.tudelft.nl>
17Bugzilla-Reference: http://bugzilla.kernel.org/show_bug.cgi?id=15329
18Signed-off-by: H. Peter Anvin <hpa@zytor.com>
19---
20 arch/x86/boot/video.c | 7 +++++++
21 1 files changed, 7 insertions(+), 0 deletions(-)
22
23diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c
24index f767164..43eda28 100644
25--- a/arch/x86/boot/video.c
26+++ b/arch/x86/boot/video.c
27@@ -298,11 +298,18 @@ static void restore_screen(void)
28 }
29
30 /* Restore cursor position */
31+ if (saved.curx >= xs)
32+ saved.curx = xs-1;
33+ if (saved.cury >= ys)
34+ saved.cury = ys-1;
35+
36 initregs(&ireg);
37 ireg.ah = 0x02; /* Set cursor position */
38 ireg.dh = saved.cury;
39 ireg.dl = saved.curx;
40 intcall(0x10, &ireg, NULL);
41+
42+ store_cursor_position();
43 }
44
45 void set_video(void)
46--
471.7.1
48
diff --git a/main/linux-grsec/xfrm-cache-size-revert.patch b/main/linux-grsec/xfrm-cache-size-revert.patch
deleted file mode 100644
index c8fcbd0d79..0000000000
--- a/main/linux-grsec/xfrm-cache-size-revert.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
2index 74fb2eb..e158860 100644
3--- a/net/ipv4/xfrm4_policy.c
4+++ b/net/ipv4/xfrm4_policy.c
5@@ -308,7 +308,6 @@ void __init xfrm4_init(int rt_max_size)
6 * That will let us store an ipsec connection per route table entry,
7 * and start cleaning when were 1/2 full
8 */
9- xfrm4_dst_ops.gc_thresh = rt_max_size/2;
10 #ifdef CONFIG_SYSCTL
11 sysctl_hdr = register_net_sysctl_table(&init_net, net_ipv4_ctl_path,
12 xfrm4_policy_table);
diff --git a/main/linux-grsec/xfrm-fix-policy-unreferencing-on-larval-drop.patch b/main/linux-grsec/xfrm-fix-policy-unreferencing-on-larval-drop.patch
deleted file mode 100644
index 25dc0dcdc2..0000000000
--- a/main/linux-grsec/xfrm-fix-policy-unreferencing-on-larval-drop.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
2index 31f4ba4..f4ea3a0 100644
3--- a/net/xfrm/xfrm_policy.c
4+++ b/net/xfrm/xfrm_policy.c
5@@ -1805,7 +1805,7 @@ restart:
6 /* EREMOTE tells the caller to generate
7 * a one-shot blackhole route. */
8 dst_release(dst);
9- xfrm_pols_put(pols, num_pols);
10+ xfrm_pols_put(pols, drop_pols);
11 XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTNOSTATES);
12 return -EREMOTE;
13 }
14