diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-03 08:56:46 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-23 12:46:16 +0000 |
commit | f1a8748d47bb439b75474fda4775cb2678c62115 (patch) | |
tree | 399352870a0059ce10f6fbb2095752b07348ded1 | |
parent | f26561cbd8a3662cd3522a98845a124d4a1fbb89 (diff) | |
download | alpine_aports-f1a8748d47bb439b75474fda4775cb2678c62115.tar.bz2 alpine_aports-f1a8748d47bb439b75474fda4775cb2678c62115.tar.xz alpine_aports-f1a8748d47bb439b75474fda4775cb2678c62115.zip |
main/linux-grsec: upgrade to 3.10.14 and fix pie patch
(cherry picked from commit 180068fed1b09ed0e8dcaa485a65dfc0f0eb5265)
-rw-r--r-- | main/linux-grsec/APKBUILD | 20 | ||||
-rw-r--r-- | main/linux-grsec/fix-memory-map-for-PIE-applications.patch | 2 | ||||
-rw-r--r-- | main/linux-grsec/grsecurity-2.9.1-3.10.14-unofficial.patch (renamed from main/linux-grsec/grsecurity-2.9.1-3.10.13-unofficial.patch) | 389 |
3 files changed, 37 insertions, 374 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD index 7a5a132334..263348831a 100644 --- a/main/linux-grsec/APKBUILD +++ b/main/linux-grsec/APKBUILD | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | _flavor=grsec | 3 | _flavor=grsec |
4 | pkgname=linux-${_flavor} | 4 | pkgname=linux-${_flavor} |
5 | pkgver=3.10.13 | 5 | pkgver=3.10.14 |
6 | case $pkgver in | 6 | case $pkgver in |
7 | *.*.*) _kernver=${pkgver%.*};; | 7 | *.*.*) _kernver=${pkgver%.*};; |
8 | *.*) _kernver=${pkgver};; | 8 | *.*) _kernver=${pkgver};; |
@@ -150,38 +150,38 @@ dev() { | |||
150 | } | 150 | } |
151 | 151 | ||
152 | md5sums="4f25cd5bec5f8d5a7d935b3f2ccb8481 linux-3.10.tar.xz | 152 | md5sums="4f25cd5bec5f8d5a7d935b3f2ccb8481 linux-3.10.tar.xz |
153 | 573f2c972015880ba5d52e5b123b37d7 patch-3.10.13.xz | 153 | 3c2ce4933f210fef16664dfa16028de1 patch-3.10.14.xz |
154 | da8e2ebd1ebc0d1e17e7312851d53727 grsecurity-2.9.1-3.10.13-unofficial.patch | 154 | 8a8f3b99d0072aa72681711dab25848b grsecurity-2.9.1-3.10.14-unofficial.patch |
155 | a16f11b12381efb3bec79b9bfb329836 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch | 155 | a16f11b12381efb3bec79b9bfb329836 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch |
156 | 656ae7b10dd2f18dbfa1011041d08d60 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch | 156 | 656ae7b10dd2f18dbfa1011041d08d60 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch |
157 | aa454ffb96428586447775c21449e284 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch | 157 | aa454ffb96428586447775c21449e284 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch |
158 | 2a12a3717052e878c0cd42aa935bfcf4 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch | 158 | 2a12a3717052e878c0cd42aa935bfcf4 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch |
159 | 6ce5fed63aad3f1a1ff1b9ba7b741822 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch | 159 | 6ce5fed63aad3f1a1ff1b9ba7b741822 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch |
160 | 1a5800a2122ba0cc0d06733cb3bb8b8f 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch | 160 | 1a5800a2122ba0cc0d06733cb3bb8b8f 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch |
161 | 6564cb3165cdf3d0dc0910251d62fd62 fix-memory-map-for-PIE-applications.patch | 161 | c6a4ae7e8ca6159e1631545515805216 fix-memory-map-for-PIE-applications.patch |
162 | 866e6c4daed45d563829804f8ad50ed9 kernelconfig.x86 | 162 | 866e6c4daed45d563829804f8ad50ed9 kernelconfig.x86 |
163 | 272aaddd0a19a5052208bc25551995a3 kernelconfig.x86_64" | 163 | 272aaddd0a19a5052208bc25551995a3 kernelconfig.x86_64" |
164 | sha256sums="df27fa92d27a9c410bfe6c4a89f141638500d7eadcca5cce578954efc2ad3544 linux-3.10.tar.xz | 164 | sha256sums="df27fa92d27a9c410bfe6c4a89f141638500d7eadcca5cce578954efc2ad3544 linux-3.10.tar.xz |
165 | cf8ec5b47c904f66f715e7ccd5051e15fe9f931fec03847a86d552caf8848be8 patch-3.10.13.xz | 165 | fd5fac477f69b5e3c6506fa04f81157aa753538dca017ef23b26ca36e65df38e patch-3.10.14.xz |
166 | f011a28165e304933cb2254e095af73be7dced6c2d066a06480a9fe1529d9d8f grsecurity-2.9.1-3.10.13-unofficial.patch | 166 | 4e61ce7226f2424999e26ccdbdb806f60c6941b63f5be82fc586fa5b8a863107 grsecurity-2.9.1-3.10.14-unofficial.patch |
167 | 6af3757ac36a6cd3cda7b0a71b08143726383b19261294a569ad7f4042c72df3 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch | 167 | 6af3757ac36a6cd3cda7b0a71b08143726383b19261294a569ad7f4042c72df3 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch |
168 | dc8e82108615657f1fb9d641efd42255a5761c06edde1b00a41ae0d314d548f0 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch | 168 | dc8e82108615657f1fb9d641efd42255a5761c06edde1b00a41ae0d314d548f0 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch |
169 | 0985caa0f3ee8ed0959aeaa4214f5f8057ae8e61d50dcae39194912d31e14892 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch | 169 | 0985caa0f3ee8ed0959aeaa4214f5f8057ae8e61d50dcae39194912d31e14892 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch |
170 | 260fd1807838b68305a96992bf7d3302a2a8ef3a3b08fe079ba9a07e6422f736 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch | 170 | 260fd1807838b68305a96992bf7d3302a2a8ef3a3b08fe079ba9a07e6422f736 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch |
171 | ae32bb72afa170e6c3788c564b342763aba5945afacc1e2ebfc096adf50d77a3 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch | 171 | ae32bb72afa170e6c3788c564b342763aba5945afacc1e2ebfc096adf50d77a3 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch |
172 | fc613ac466610b866b721c41836fd5bfb2d4b75bceb67972dc6369d7f62ff47e 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch | 172 | fc613ac466610b866b721c41836fd5bfb2d4b75bceb67972dc6369d7f62ff47e 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch |
173 | 090e3e8ebcf0f8649042e1b8411722c9ee77e2da111ff84a2ed1d379f0266415 fix-memory-map-for-PIE-applications.patch | 173 | 500f3577310be52e87b9fecdc2e9c4ca43210fd97d69089f9005d484563f74c7 fix-memory-map-for-PIE-applications.patch |
174 | 7fd28634998ef1fddafed5f2516e902924245d2464b9e86476bfaa55ccfc3bc3 kernelconfig.x86 | 174 | 7fd28634998ef1fddafed5f2516e902924245d2464b9e86476bfaa55ccfc3bc3 kernelconfig.x86 |
175 | f2843ae4f9b3e3c27f3138ce4b740c2803bdab0c7a910c662d951843803b9554 kernelconfig.x86_64" | 175 | f2843ae4f9b3e3c27f3138ce4b740c2803bdab0c7a910c662d951843803b9554 kernelconfig.x86_64" |
176 | sha512sums="5fb109fcbd59bf3dffc911b853894f0a84afa75151368f783a1252c5ff60c7a1504de216c0012be446df983e2dea400ad8eeed3ce04f24dc61d0ef76c174dc35 linux-3.10.tar.xz | 176 | sha512sums="5fb109fcbd59bf3dffc911b853894f0a84afa75151368f783a1252c5ff60c7a1504de216c0012be446df983e2dea400ad8eeed3ce04f24dc61d0ef76c174dc35 linux-3.10.tar.xz |
177 | 482b143ba25e4dc5e73f1ffb40194ba7863215ef5a83743a2a37d74d76f7e9267faa92fa92da441b10973be2156b80afdfa64a00ba24b0fd80dec7e223b0c6bc patch-3.10.13.xz | 177 | 8bd9af04acec2998d5a6d99e63a84c35802e4affeead51d15cf024020bc326507fee7c59179157b5bd42f5e0633c39ea8f123f02c0262aa50042fea57ed7390d patch-3.10.14.xz |
178 | 9121b6c40e92e3df4418d050bb525f0c5e1df201b5ff225c7568844179eb87a221af4e7431abfa2eeec0e149094042c30b2a8aca60b3cba369b099b6d69e472f grsecurity-2.9.1-3.10.13-unofficial.patch | 178 | 7d17742f5dcce1975dfa9d24fa9e665e9e48dcb3acc962a7699923bdb92477f1b2e352b0e946de664e76ab72798cad77e1d2eafc2e6dc167e3dee2bf91d866e5 grsecurity-2.9.1-3.10.14-unofficial.patch |
179 | 81e78593288e8b0fd2c03ea9fc1450323887707f087e911f172450a122bc9b591ee83394836789730d951aeec13d0b75a64e1c05f04364abf8f80d883ddc4a02 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch | 179 | 81e78593288e8b0fd2c03ea9fc1450323887707f087e911f172450a122bc9b591ee83394836789730d951aeec13d0b75a64e1c05f04364abf8f80d883ddc4a02 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch |
180 | 51ecb15b669f6a82940a13a38939116e003bf5dfd24496771c8279e907b72adcc63d607f0340a2940d757e12ddadb7d45c7af78ae311d284935a6296dbcac00c 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch | 180 | 51ecb15b669f6a82940a13a38939116e003bf5dfd24496771c8279e907b72adcc63d607f0340a2940d757e12ddadb7d45c7af78ae311d284935a6296dbcac00c 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch |
181 | 57d0a8bd35d19cf657ded58efe24517d2252aec6984040713ba173a34edb5887ececaa2985076bc6a149eaa57639fd98a042c1c2d226ed4ad8dd5ed0e230717e 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch | 181 | 57d0a8bd35d19cf657ded58efe24517d2252aec6984040713ba173a34edb5887ececaa2985076bc6a149eaa57639fd98a042c1c2d226ed4ad8dd5ed0e230717e 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch |
182 | d2f578ad1d6e1fe52b55863e5bf338ae8201b828a498ec3e42e549c55295d3d1c6c3adfa9e226d711e3486628ed56ab996484e219d79ac4b0c0ec684ebd380aa 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch | 182 | d2f578ad1d6e1fe52b55863e5bf338ae8201b828a498ec3e42e549c55295d3d1c6c3adfa9e226d711e3486628ed56ab996484e219d79ac4b0c0ec684ebd380aa 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch |
183 | 28a33e644bf2faf99c8dd6dbccfe14e140dfdd8824a8fb2d58aa7deb9e572f130d92b6b35ee181084050d82166bdf2e498a451a2a538a67b7ab84204405d2d87 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch | 183 | 28a33e644bf2faf99c8dd6dbccfe14e140dfdd8824a8fb2d58aa7deb9e572f130d92b6b35ee181084050d82166bdf2e498a451a2a538a67b7ab84204405d2d87 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch |
184 | 249140374c19a5599876268ff5b3cda2e136681aee103b4a9fff5d7d346f8e3295a907fb43db0701b8a9fece64c299ad2abac0434259cce6631307ce84090205 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch | 184 | 249140374c19a5599876268ff5b3cda2e136681aee103b4a9fff5d7d346f8e3295a907fb43db0701b8a9fece64c299ad2abac0434259cce6631307ce84090205 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch |
185 | 101aec800e6390f2dee26b496a033b325fb00108e72fc01b3cf6719b1d256526fbc8e7448b3a06b03ce02233b86703f1f2f31267c8e1a7f28a8f47235eaa0b4a fix-memory-map-for-PIE-applications.patch | 185 | 4665c56ae1bbac311f9205d64918e84ee8b01d47d6e2396ff6b8adfb10aada7f7254531ce62e31edbb65c2a54a830f09ad05d314dfcd75d6272f4068945ad7c7 fix-memory-map-for-PIE-applications.patch |
186 | 1721542ff111c8ec550323dae6f6174131db180668cbf14f01dc4c76ffbbb479715919a80c35d8c8ac22a6479dd3b42700be6ddc5ef2a8b6a62de811c7ae86df kernelconfig.x86 | 186 | 1721542ff111c8ec550323dae6f6174131db180668cbf14f01dc4c76ffbbb479715919a80c35d8c8ac22a6479dd3b42700be6ddc5ef2a8b6a62de811c7ae86df kernelconfig.x86 |
187 | d49bf57bd0aae17d762d87d5bf983e48219d71ca44bc0c3120db94d357192c07146a8938cef9d435218e4bb748691ec426387545837be637d47e45cdc4482d71 kernelconfig.x86_64" | 187 | d49bf57bd0aae17d762d87d5bf983e48219d71ca44bc0c3120db94d357192c07146a8938cef9d435218e4bb748691ec426387545837be637d47e45cdc4482d71 kernelconfig.x86_64" |
diff --git a/main/linux-grsec/fix-memory-map-for-PIE-applications.patch b/main/linux-grsec/fix-memory-map-for-PIE-applications.patch index 0ef81cf93f..e38716f77b 100644 --- a/main/linux-grsec/fix-memory-map-for-PIE-applications.patch +++ b/main/linux-grsec/fix-memory-map-for-PIE-applications.patch | |||
@@ -58,7 +58,7 @@ index 6f036ed..06419af 100644 | |||
58 | - load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr); | 58 | - load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr); |
59 | + load_bias = (get_random_int() & STACK_RND_MASK) << PAGE_SHIFT; | 59 | + load_bias = (get_random_int() & STACK_RND_MASK) << PAGE_SHIFT; |
60 | #endif | 60 | #endif |
61 | + load_bias = ELF_PAGESTART(vaddr + load_bias); | 61 | + load_bias = ELF_PAGESTART(load_bias - vaddr); |
62 | 62 | ||
63 | #ifdef CONFIG_PAX_RANDMMAP | 63 | #ifdef CONFIG_PAX_RANDMMAP |
64 | /* PaX: randomize base address at the default exe base if requested */ | 64 | /* PaX: randomize base address at the default exe base if requested */ |
diff --git a/main/linux-grsec/grsecurity-2.9.1-3.10.13-unofficial.patch b/main/linux-grsec/grsecurity-2.9.1-3.10.14-unofficial.patch index 53756c632e..386c1a5258 100644 --- a/main/linux-grsec/grsecurity-2.9.1-3.10.13-unofficial.patch +++ b/main/linux-grsec/grsecurity-2.9.1-3.10.14-unofficial.patch | |||
@@ -281,7 +281,7 @@ index 2fe6e76..889ee23 100644 | |||
281 | 281 | ||
282 | pcd. [PARIDE] | 282 | pcd. [PARIDE] |
283 | diff --git a/Makefile b/Makefile | 283 | diff --git a/Makefile b/Makefile |
284 | index 25d38b7..7582631 100644 | 284 | index 129c49f..643835b 100644 |
285 | --- a/Makefile | 285 | --- a/Makefile |
286 | +++ b/Makefile | 286 | +++ b/Makefile |
287 | @@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 287 | @@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
@@ -38926,7 +38926,7 @@ index 3c59584..500f2e9 100644 | |||
38926 | 38926 | ||
38927 | return ret; | 38927 | return ret; |
38928 | diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c | 38928 | diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c |
38929 | index e5e32869..1678f36 100644 | 38929 | index c8d16a6..ca71b5e 100644 |
38930 | --- a/drivers/gpu/drm/i915/i915_irq.c | 38930 | --- a/drivers/gpu/drm/i915/i915_irq.c |
38931 | +++ b/drivers/gpu/drm/i915/i915_irq.c | 38931 | +++ b/drivers/gpu/drm/i915/i915_irq.c |
38932 | @@ -670,7 +670,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) | 38932 | @@ -670,7 +670,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) |
@@ -38956,7 +38956,7 @@ index e5e32869..1678f36 100644 | |||
38956 | 38956 | ||
38957 | /* disable master interrupt before clearing iir */ | 38957 | /* disable master interrupt before clearing iir */ |
38958 | de_ier = I915_READ(DEIER); | 38958 | de_ier = I915_READ(DEIER); |
38959 | @@ -2089,7 +2089,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev) | 38959 | @@ -2135,7 +2135,7 @@ static void ironlake_irq_preinstall(struct drm_device *dev) |
38960 | { | 38960 | { |
38961 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 38961 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
38962 | 38962 | ||
@@ -38965,7 +38965,7 @@ index e5e32869..1678f36 100644 | |||
38965 | 38965 | ||
38966 | I915_WRITE(HWSTAM, 0xeffe); | 38966 | I915_WRITE(HWSTAM, 0xeffe); |
38967 | 38967 | ||
38968 | @@ -2124,7 +2124,7 @@ static void valleyview_irq_preinstall(struct drm_device *dev) | 38968 | @@ -2170,7 +2170,7 @@ static void valleyview_irq_preinstall(struct drm_device *dev) |
38969 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 38969 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
38970 | int pipe; | 38970 | int pipe; |
38971 | 38971 | ||
@@ -38974,7 +38974,7 @@ index e5e32869..1678f36 100644 | |||
38974 | 38974 | ||
38975 | /* VLV magic */ | 38975 | /* VLV magic */ |
38976 | I915_WRITE(VLV_IMR, 0); | 38976 | I915_WRITE(VLV_IMR, 0); |
38977 | @@ -2411,7 +2411,7 @@ static void i8xx_irq_preinstall(struct drm_device * dev) | 38977 | @@ -2457,7 +2457,7 @@ static void i8xx_irq_preinstall(struct drm_device * dev) |
38978 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 38978 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
38979 | int pipe; | 38979 | int pipe; |
38980 | 38980 | ||
@@ -38983,7 +38983,7 @@ index e5e32869..1678f36 100644 | |||
38983 | 38983 | ||
38984 | for_each_pipe(pipe) | 38984 | for_each_pipe(pipe) |
38985 | I915_WRITE(PIPESTAT(pipe), 0); | 38985 | I915_WRITE(PIPESTAT(pipe), 0); |
38986 | @@ -2490,7 +2490,7 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg) | 38986 | @@ -2536,7 +2536,7 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg) |
38987 | I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | | 38987 | I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | |
38988 | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; | 38988 | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; |
38989 | 38989 | ||
@@ -38992,7 +38992,7 @@ index e5e32869..1678f36 100644 | |||
38992 | 38992 | ||
38993 | iir = I915_READ16(IIR); | 38993 | iir = I915_READ16(IIR); |
38994 | if (iir == 0) | 38994 | if (iir == 0) |
38995 | @@ -2565,7 +2565,7 @@ static void i915_irq_preinstall(struct drm_device * dev) | 38995 | @@ -2611,7 +2611,7 @@ static void i915_irq_preinstall(struct drm_device * dev) |
38996 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 38996 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
38997 | int pipe; | 38997 | int pipe; |
38998 | 38998 | ||
@@ -39001,7 +39001,7 @@ index e5e32869..1678f36 100644 | |||
39001 | 39001 | ||
39002 | if (I915_HAS_HOTPLUG(dev)) { | 39002 | if (I915_HAS_HOTPLUG(dev)) { |
39003 | I915_WRITE(PORT_HOTPLUG_EN, 0); | 39003 | I915_WRITE(PORT_HOTPLUG_EN, 0); |
39004 | @@ -2664,7 +2664,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg) | 39004 | @@ -2710,7 +2710,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg) |
39005 | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; | 39005 | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; |
39006 | int pipe, ret = IRQ_NONE; | 39006 | int pipe, ret = IRQ_NONE; |
39007 | 39007 | ||
@@ -39010,7 +39010,7 @@ index e5e32869..1678f36 100644 | |||
39010 | 39010 | ||
39011 | iir = I915_READ(IIR); | 39011 | iir = I915_READ(IIR); |
39012 | do { | 39012 | do { |
39013 | @@ -2791,7 +2791,7 @@ static void i965_irq_preinstall(struct drm_device * dev) | 39013 | @@ -2837,7 +2837,7 @@ static void i965_irq_preinstall(struct drm_device * dev) |
39014 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 39014 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
39015 | int pipe; | 39015 | int pipe; |
39016 | 39016 | ||
@@ -39019,7 +39019,7 @@ index e5e32869..1678f36 100644 | |||
39019 | 39019 | ||
39020 | I915_WRITE(PORT_HOTPLUG_EN, 0); | 39020 | I915_WRITE(PORT_HOTPLUG_EN, 0); |
39021 | I915_WRITE(PORT_HOTPLUG_STAT, I915_READ(PORT_HOTPLUG_STAT)); | 39021 | I915_WRITE(PORT_HOTPLUG_STAT, I915_READ(PORT_HOTPLUG_STAT)); |
39022 | @@ -2898,7 +2898,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) | 39022 | @@ -2944,7 +2944,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) |
39023 | I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | | 39023 | I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | |
39024 | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; | 39024 | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; |
39025 | 39025 | ||
@@ -39929,67 +39929,10 @@ index 8c04943..4370ed9 100644 | |||
39929 | err = drm_debugfs_create_files(dc->debugfs_files, | 39929 | err = drm_debugfs_create_files(dc->debugfs_files, |
39930 | ARRAY_SIZE(debugfs_files), | 39930 | ARRAY_SIZE(debugfs_files), |
39931 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | 39931 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c |
39932 | index ed626e0..5340852 100644 | 39932 | index ca959cf..f6c5f7d 100644 |
39933 | --- a/drivers/hid/hid-core.c | 39933 | --- a/drivers/hid/hid-core.c |
39934 | +++ b/drivers/hid/hid-core.c | 39934 | +++ b/drivers/hid/hid-core.c |
39935 | @@ -759,6 +759,56 @@ int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size) | 39935 | @@ -2340,7 +2340,7 @@ EXPORT_SYMBOL_GPL(hid_ignore); |
39936 | } | ||
39937 | EXPORT_SYMBOL_GPL(hid_parse_report); | ||
39938 | |||
39939 | +static const char * const hid_report_names[] = { | ||
39940 | + "HID_INPUT_REPORT", | ||
39941 | + "HID_OUTPUT_REPORT", | ||
39942 | + "HID_FEATURE_REPORT", | ||
39943 | +}; | ||
39944 | +/** | ||
39945 | + * hid_validate_report - validate existing device report | ||
39946 | + * | ||
39947 | + * @device: hid device | ||
39948 | + * @type: which report type to examine | ||
39949 | + * @id: which report ID to examine (0 for first) | ||
39950 | + * @fields: expected number of fields | ||
39951 | + * @report_counts: expected number of values per field | ||
39952 | + * | ||
39953 | + * Validate the report details after parsing. | ||
39954 | + */ | ||
39955 | +struct hid_report *hid_validate_report(struct hid_device *hid, | ||
39956 | + unsigned int type, unsigned int id, | ||
39957 | + unsigned int fields, | ||
39958 | + unsigned int report_counts) | ||
39959 | +{ | ||
39960 | + struct hid_report *report; | ||
39961 | + unsigned int i; | ||
39962 | + | ||
39963 | + if (type > HID_FEATURE_REPORT) { | ||
39964 | + hid_err(hid, "invalid HID report %u\n", type); | ||
39965 | + return NULL; | ||
39966 | + } | ||
39967 | + | ||
39968 | + report = hid->report_enum[type].report_id_hash[id]; | ||
39969 | + if (!report) { | ||
39970 | + hid_err(hid, "missing %s %u\n", hid_report_names[type], id); | ||
39971 | + return NULL; | ||
39972 | + } | ||
39973 | + if (report->maxfield < fields) { | ||
39974 | + hid_err(hid, "not enough fields in %s %u\n", | ||
39975 | + hid_report_names[type], id); | ||
39976 | + return NULL; | ||
39977 | + } | ||
39978 | + for (i = 0; i < fields; i++) { | ||
39979 | + if (report->field[i]->report_count < report_counts) { | ||
39980 | + hid_err(hid, "not enough values in %s %u fields\n", | ||
39981 | + hid_report_names[type], id); | ||
39982 | + return NULL; | ||
39983 | + } | ||
39984 | + } | ||
39985 | + return report; | ||
39986 | +} | ||
39987 | +EXPORT_SYMBOL_GPL(hid_validate_report); | ||
39988 | + | ||
39989 | /** | ||
39990 | * hid_open_report - open a driver-specific device report | ||
39991 | * | ||
39992 | @@ -2284,7 +2334,7 @@ EXPORT_SYMBOL_GPL(hid_ignore); | ||
39993 | 39936 | ||
39994 | int hid_add_device(struct hid_device *hdev) | 39937 | int hid_add_device(struct hid_device *hdev) |
39995 | { | 39938 | { |
@@ -39998,7 +39941,7 @@ index ed626e0..5340852 100644 | |||
39998 | int ret; | 39941 | int ret; |
39999 | 39942 | ||
40000 | if (WARN_ON(hdev->status & HID_STAT_ADDED)) | 39943 | if (WARN_ON(hdev->status & HID_STAT_ADDED)) |
40001 | @@ -2318,7 +2368,7 @@ int hid_add_device(struct hid_device *hdev) | 39944 | @@ -2374,7 +2374,7 @@ int hid_add_device(struct hid_device *hdev) |
40002 | /* XXX hack, any other cleaner solution after the driver core | 39945 | /* XXX hack, any other cleaner solution after the driver core |
40003 | * is converted to allow more than 20 bytes as the device name? */ | 39946 | * is converted to allow more than 20 bytes as the device name? */ |
40004 | dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus, | 39947 | dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus, |
@@ -40007,228 +39950,13 @@ index ed626e0..5340852 100644 | |||
40007 | 39950 | ||
40008 | hid_debug_register(hdev, dev_name(&hdev->dev)); | 39951 | hid_debug_register(hdev, dev_name(&hdev->dev)); |
40009 | ret = device_add(&hdev->dev); | 39952 | ret = device_add(&hdev->dev); |
40010 | diff --git a/drivers/hid/hid-lenovo-tpkbd.c b/drivers/hid/hid-lenovo-tpkbd.c | ||
40011 | index 07837f5..b697ada 100644 | ||
40012 | --- a/drivers/hid/hid-lenovo-tpkbd.c | ||
40013 | +++ b/drivers/hid/hid-lenovo-tpkbd.c | ||
40014 | @@ -341,6 +341,11 @@ static int tpkbd_probe_tp(struct hid_device *hdev) | ||
40015 | char *name_mute, *name_micmute; | ||
40016 | int ret; | ||
40017 | |||
40018 | + /* Validate required reports. */ | ||
40019 | + if (!hid_validate_report(hdev, HID_OUTPUT_REPORT, 4, 4, 1) || | ||
40020 | + !hid_validate_report(hdev, HID_OUTPUT_REPORT, 3, 1, 2)) | ||
40021 | + return -ENODEV; | ||
40022 | + | ||
40023 | if (sysfs_create_group(&hdev->dev.kobj, | ||
40024 | &tpkbd_attr_group_pointer)) { | ||
40025 | hid_warn(hdev, "Could not create sysfs group\n"); | ||
40026 | diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c | ||
40027 | index b3cd150..9805197 100644 | ||
40028 | --- a/drivers/hid/hid-lg2ff.c | ||
40029 | +++ b/drivers/hid/hid-lg2ff.c | ||
40030 | @@ -64,26 +64,13 @@ int lg2ff_init(struct hid_device *hid) | ||
40031 | struct hid_report *report; | ||
40032 | struct hid_input *hidinput = list_entry(hid->inputs.next, | ||
40033 | struct hid_input, list); | ||
40034 | - struct list_head *report_list = | ||
40035 | - &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
40036 | struct input_dev *dev = hidinput->input; | ||
40037 | int error; | ||
40038 | |||
40039 | - if (list_empty(report_list)) { | ||
40040 | - hid_err(hid, "no output report found\n"); | ||
40041 | + /* Check that the report looks ok */ | ||
40042 | + report = hid_validate_report(hid, HID_OUTPUT_REPORT, 0, 1, 7); | ||
40043 | + if (!report) | ||
40044 | return -ENODEV; | ||
40045 | - } | ||
40046 | - | ||
40047 | - report = list_entry(report_list->next, struct hid_report, list); | ||
40048 | - | ||
40049 | - if (report->maxfield < 1) { | ||
40050 | - hid_err(hid, "output report is empty\n"); | ||
40051 | - return -ENODEV; | ||
40052 | - } | ||
40053 | - if (report->field[0]->report_count < 7) { | ||
40054 | - hid_err(hid, "not enough values in the field\n"); | ||
40055 | - return -ENODEV; | ||
40056 | - } | ||
40057 | |||
40058 | lg2ff = kmalloc(sizeof(struct lg2ff_device), GFP_KERNEL); | ||
40059 | if (!lg2ff) | ||
40060 | diff --git a/drivers/hid/hid-lg3ff.c b/drivers/hid/hid-lg3ff.c | ||
40061 | index e52f181..53ac79b 100644 | ||
40062 | --- a/drivers/hid/hid-lg3ff.c | ||
40063 | +++ b/drivers/hid/hid-lg3ff.c | ||
40064 | @@ -66,10 +66,11 @@ static int hid_lg3ff_play(struct input_dev *dev, void *data, | ||
40065 | int x, y; | ||
40066 | |||
40067 | /* | ||
40068 | - * Maxusage should always be 63 (maximum fields) | ||
40069 | - * likely a better way to ensure this data is clean | ||
40070 | + * Available values in the field should always be 63, but we only use up to | ||
40071 | + * 35. Instead, clear the entire area, however big it is. | ||
40072 | */ | ||
40073 | - memset(report->field[0]->value, 0, sizeof(__s32)*report->field[0]->maxusage); | ||
40074 | + memset(report->field[0]->value, 0, | ||
40075 | + sizeof(__s32) * report->field[0]->report_count); | ||
40076 | |||
40077 | switch (effect->type) { | ||
40078 | case FF_CONSTANT: | ||
40079 | @@ -129,32 +130,14 @@ static const signed short ff3_joystick_ac[] = { | ||
40080 | int lg3ff_init(struct hid_device *hid) | ||
40081 | { | ||
40082 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
40083 | - struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
40084 | struct input_dev *dev = hidinput->input; | ||
40085 | - struct hid_report *report; | ||
40086 | - struct hid_field *field; | ||
40087 | const signed short *ff_bits = ff3_joystick_ac; | ||
40088 | int error; | ||
40089 | int i; | ||
40090 | |||
40091 | - /* Find the report to use */ | ||
40092 | - if (list_empty(report_list)) { | ||
40093 | - hid_err(hid, "No output report found\n"); | ||
40094 | - return -1; | ||
40095 | - } | ||
40096 | - | ||
40097 | /* Check that the report looks ok */ | ||
40098 | - report = list_entry(report_list->next, struct hid_report, list); | ||
40099 | - if (!report) { | ||
40100 | - hid_err(hid, "NULL output report\n"); | ||
40101 | - return -1; | ||
40102 | - } | ||
40103 | - | ||
40104 | - field = report->field[0]; | ||
40105 | - if (!field) { | ||
40106 | - hid_err(hid, "NULL field\n"); | ||
40107 | - return -1; | ||
40108 | - } | ||
40109 | + if (!hid_validate_report(hid, HID_OUTPUT_REPORT, 0, 1, 35)) | ||
40110 | + return -ENODEV; | ||
40111 | |||
40112 | /* Assume single fixed device G940 */ | ||
40113 | for (i = 0; ff_bits[i] >= 0; i++) | ||
40114 | diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c | ||
40115 | index 0ddae2a..8b89f0f 100644 | ||
40116 | --- a/drivers/hid/hid-lg4ff.c | ||
40117 | +++ b/drivers/hid/hid-lg4ff.c | ||
40118 | @@ -484,34 +484,16 @@ static enum led_brightness lg4ff_led_get_brightness(struct led_classdev *led_cde | ||
40119 | int lg4ff_init(struct hid_device *hid) | ||
40120 | { | ||
40121 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
40122 | - struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
40123 | struct input_dev *dev = hidinput->input; | ||
40124 | - struct hid_report *report; | ||
40125 | - struct hid_field *field; | ||
40126 | struct lg4ff_device_entry *entry; | ||
40127 | struct lg_drv_data *drv_data; | ||
40128 | struct usb_device_descriptor *udesc; | ||
40129 | int error, i, j; | ||
40130 | __u16 bcdDevice, rev_maj, rev_min; | ||
40131 | |||
40132 | - /* Find the report to use */ | ||
40133 | - if (list_empty(report_list)) { | ||
40134 | - hid_err(hid, "No output report found\n"); | ||
40135 | - return -1; | ||
40136 | - } | ||
40137 | - | ||
40138 | /* Check that the report looks ok */ | ||
40139 | - report = list_entry(report_list->next, struct hid_report, list); | ||
40140 | - if (!report) { | ||
40141 | - hid_err(hid, "NULL output report\n"); | ||
40142 | + if (!hid_validate_report(hid, HID_OUTPUT_REPORT, 0, 1, 7)) | ||
40143 | return -1; | ||
40144 | - } | ||
40145 | - | ||
40146 | - field = report->field[0]; | ||
40147 | - if (!field) { | ||
40148 | - hid_err(hid, "NULL field\n"); | ||
40149 | - return -1; | ||
40150 | - } | ||
40151 | |||
40152 | /* Check what wheel has been connected */ | ||
40153 | for (i = 0; i < ARRAY_SIZE(lg4ff_devices); i++) { | ||
40154 | diff --git a/drivers/hid/hid-lgff.c b/drivers/hid/hid-lgff.c | ||
40155 | index d7ea8c8..a84fb40 100644 | ||
40156 | --- a/drivers/hid/hid-lgff.c | ||
40157 | +++ b/drivers/hid/hid-lgff.c | ||
40158 | @@ -128,27 +128,14 @@ static void hid_lgff_set_autocenter(struct input_dev *dev, u16 magnitude) | ||
40159 | int lgff_init(struct hid_device* hid) | ||
40160 | { | ||
40161 | struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); | ||
40162 | - struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
40163 | struct input_dev *dev = hidinput->input; | ||
40164 | - struct hid_report *report; | ||
40165 | - struct hid_field *field; | ||
40166 | const signed short *ff_bits = ff_joystick; | ||
40167 | int error; | ||
40168 | int i; | ||
40169 | |||
40170 | - /* Find the report to use */ | ||
40171 | - if (list_empty(report_list)) { | ||
40172 | - hid_err(hid, "No output report found\n"); | ||
40173 | - return -1; | ||
40174 | - } | ||
40175 | - | ||
40176 | /* Check that the report looks ok */ | ||
40177 | - report = list_entry(report_list->next, struct hid_report, list); | ||
40178 | - field = report->field[0]; | ||
40179 | - if (!field) { | ||
40180 | - hid_err(hid, "NULL field\n"); | ||
40181 | - return -1; | ||
40182 | - } | ||
40183 | + if (!hid_validate_report(hid, HID_OUTPUT_REPORT, 0, 1, 7)) | ||
40184 | + return -ENODEV; | ||
40185 | |||
40186 | for (i = 0; i < ARRAY_SIZE(devices); i++) { | ||
40187 | if (dev->id.vendor == devices[i].idVendor && | ||
40188 | diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c | ||
40189 | index 5207591a..6c9197f 100644 | ||
40190 | --- a/drivers/hid/hid-logitech-dj.c | ||
40191 | +++ b/drivers/hid/hid-logitech-dj.c | ||
40192 | @@ -421,7 +421,7 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, | ||
40193 | struct hid_report *report; | ||
40194 | struct hid_report_enum *output_report_enum; | ||
40195 | u8 *data = (u8 *)(&dj_report->device_index); | ||
40196 | - int i; | ||
40197 | + unsigned int i, length; | ||
40198 | |||
40199 | output_report_enum = &hdev->report_enum[HID_OUTPUT_REPORT]; | ||
40200 | report = output_report_enum->report_id_hash[REPORT_ID_DJ_SHORT]; | ||
40201 | @@ -431,7 +431,9 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, | ||
40202 | return -ENODEV; | ||
40203 | } | ||
40204 | |||
40205 | - for (i = 0; i < report->field[0]->report_count; i++) | ||
40206 | + length = min_t(size_t, sizeof(*dj_report) - 1, | ||
40207 | + report->field[0]->report_count); | ||
40208 | + for (i = 0; i < length; i++) | ||
40209 | report->field[0]->value[i] = data[i]; | ||
40210 | |||
40211 | hid_hw_request(hdev, report, HID_REQ_SET_REPORT); | ||
40212 | @@ -738,6 +740,12 @@ static int logi_dj_probe(struct hid_device *hdev, | ||
40213 | goto hid_parse_fail; | ||
40214 | } | ||
40215 | |||
40216 | + if (!hid_validate_report(hdev, HID_OUTPUT_REPORT, REPORT_ID_DJ_SHORT, | ||
40217 | + 1, 3)) { | ||
40218 | + retval = -ENODEV; | ||
40219 | + goto hid_parse_fail; | ||
40220 | + } | ||
40221 | + | ||
40222 | /* Starts the usb device and connects to upper interfaces hiddev and | ||
40223 | * hidraw */ | ||
40224 | retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT); | ||
40225 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | 39953 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c |
40226 | index d39a5ce..4892dfc 100644 | 39954 | index b6701ce..720a166 100644 |
40227 | --- a/drivers/hid/hid-multitouch.c | 39955 | --- a/drivers/hid/hid-multitouch.c |
40228 | +++ b/drivers/hid/hid-multitouch.c | 39956 | +++ b/drivers/hid/hid-multitouch.c |
40229 | @@ -330,9 +330,18 @@ static void mt_feature_mapping(struct hid_device *hdev, | 39957 | @@ -325,12 +325,21 @@ static void mt_feature_mapping(struct hid_device *hdev, |
40230 | break; | 39958 | dev_err(&hdev->dev, "HID_DG_INPUTMODE out of range\n"); |
40231 | } | 39959 | break; |
40232 | } | 39960 | } |
40233 | + /* Ignore if value index is out of bounds. */ | 39961 | + /* Ignore if value index is out of bounds. */ |
40234 | + if (td->inputmode_index < 0 || | 39962 | + if (td->inputmode_index < 0 || |
@@ -40237,6 +39965,9 @@ index d39a5ce..4892dfc 100644 | |||
40237 | + td->inputmode = -1; | 39965 | + td->inputmode = -1; |
40238 | + } | 39966 | + } |
40239 | 39967 | ||
39968 | td->inputmode = field->report->id; | ||
39969 | td->inputmode_index = usage->usage_index; | ||
39970 | |||
40240 | break; | 39971 | break; |
40241 | case HID_DG_CONTACTMAX: | 39972 | case HID_DG_CONTACTMAX: |
40242 | + /* Ignore if value count is out of bounds. */ | 39973 | + /* Ignore if value count is out of bounds. */ |
@@ -40245,7 +39976,7 @@ index d39a5ce..4892dfc 100644 | |||
40245 | td->maxcontact_report_id = field->report->id; | 39976 | td->maxcontact_report_id = field->report->id; |
40246 | td->maxcontacts = field->value[0]; | 39977 | td->maxcontacts = field->value[0]; |
40247 | if (!td->maxcontacts && | 39978 | if (!td->maxcontacts && |
40248 | @@ -743,15 +752,21 @@ static void mt_touch_report(struct hid_device *hid, struct hid_report *report) | 39979 | @@ -745,15 +754,21 @@ static void mt_touch_report(struct hid_device *hid, struct hid_report *report) |
40249 | unsigned count; | 39980 | unsigned count; |
40250 | int r, n; | 39981 | int r, n; |
40251 | 39982 | ||
@@ -40272,22 +40003,6 @@ index d39a5ce..4892dfc 100644 | |||
40272 | } | 40003 | } |
40273 | 40004 | ||
40274 | for (r = 0; r < report->maxfield; r++) { | 40005 | for (r = 0; r < report->maxfield; r++) { |
40275 | diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-steelseries.c | ||
40276 | index d164911..ef42e86 100644 | ||
40277 | --- a/drivers/hid/hid-steelseries.c | ||
40278 | +++ b/drivers/hid/hid-steelseries.c | ||
40279 | @@ -249,6 +249,11 @@ static int steelseries_srws1_probe(struct hid_device *hdev, | ||
40280 | goto err_free; | ||
40281 | } | ||
40282 | |||
40283 | + if (!hid_validate_report(hdev, HID_OUTPUT_REPORT, 0, 1, 16)) { | ||
40284 | + ret = -ENODEV; | ||
40285 | + goto err_free; | ||
40286 | + } | ||
40287 | + | ||
40288 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); | ||
40289 | if (ret) { | ||
40290 | hid_err(hdev, "hw start failed\n"); | ||
40291 | diff --git a/drivers/hid/hid-wiimote-debug.c b/drivers/hid/hid-wiimote-debug.c | 40006 | diff --git a/drivers/hid/hid-wiimote-debug.c b/drivers/hid/hid-wiimote-debug.c |
40292 | index 90124ff..3761764 100644 | 40007 | index 90124ff..3761764 100644 |
40293 | --- a/drivers/hid/hid-wiimote-debug.c | 40008 | --- a/drivers/hid/hid-wiimote-debug.c |
@@ -40301,35 +40016,6 @@ index 90124ff..3761764 100644 | |||
40301 | return -EFAULT; | 40016 | return -EFAULT; |
40302 | 40017 | ||
40303 | *off += size; | 40018 | *off += size; |
40304 | diff --git a/drivers/hid/hid-zpff.c b/drivers/hid/hid-zpff.c | ||
40305 | index 6ec28a3..b124991 100644 | ||
40306 | --- a/drivers/hid/hid-zpff.c | ||
40307 | +++ b/drivers/hid/hid-zpff.c | ||
40308 | @@ -68,22 +68,12 @@ static int zpff_init(struct hid_device *hid) | ||
40309 | struct hid_report *report; | ||
40310 | struct hid_input *hidinput = list_entry(hid->inputs.next, | ||
40311 | struct hid_input, list); | ||
40312 | - struct list_head *report_list = | ||
40313 | - &hid->report_enum[HID_OUTPUT_REPORT].report_list; | ||
40314 | struct input_dev *dev = hidinput->input; | ||
40315 | int error; | ||
40316 | |||
40317 | - if (list_empty(report_list)) { | ||
40318 | - hid_err(hid, "no output report found\n"); | ||
40319 | + report = hid_validate_report(hid, HID_OUTPUT_REPORT, 0, 4, 1); | ||
40320 | + if (!report) | ||
40321 | return -ENODEV; | ||
40322 | - } | ||
40323 | - | ||
40324 | - report = list_entry(report_list->next, struct hid_report, list); | ||
40325 | - | ||
40326 | - if (report->maxfield < 4) { | ||
40327 | - hid_err(hid, "not enough fields in report\n"); | ||
40328 | - return -ENODEV; | ||
40329 | - } | ||
40330 | |||
40331 | zpff = kzalloc(sizeof(struct zpff_device), GFP_KERNEL); | ||
40332 | if (!zpff) | ||
40333 | diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c | 40019 | diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c |
40334 | index fc307e0..2b255e8 100644 | 40020 | index fc307e0..2b255e8 100644 |
40335 | --- a/drivers/hid/uhid.c | 40021 | --- a/drivers/hid/uhid.c |
@@ -75576,21 +75262,6 @@ index 0000000..e7ffaaf | |||
75576 | + const int protocol); | 75262 | + const int protocol); |
75577 | + | 75263 | + |
75578 | +#endif | 75264 | +#endif |
75579 | diff --git a/include/linux/hid.h b/include/linux/hid.h | ||
75580 | index ff545cc..76e41d8 100644 | ||
75581 | --- a/include/linux/hid.h | ||
75582 | +++ b/include/linux/hid.h | ||
75583 | @@ -749,6 +749,10 @@ void hid_output_report(struct hid_report *report, __u8 *data); | ||
75584 | struct hid_device *hid_allocate_device(void); | ||
75585 | struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id); | ||
75586 | int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size); | ||
75587 | +struct hid_report *hid_validate_report(struct hid_device *hid, | ||
75588 | + unsigned int type, unsigned int id, | ||
75589 | + unsigned int fields, | ||
75590 | + unsigned int report_counts); | ||
75591 | int hid_open_report(struct hid_device *device); | ||
75592 | int hid_check_keys_pressed(struct hid_device *hid); | ||
75593 | int hid_connect(struct hid_device *hid, unsigned int connect_mask); | ||
75594 | diff --git a/include/linux/highmem.h b/include/linux/highmem.h | 75265 | diff --git a/include/linux/highmem.h b/include/linux/highmem.h |
75595 | index 7fb31da..08b5114 100644 | 75266 | index 7fb31da..08b5114 100644 |
75596 | --- a/include/linux/highmem.h | 75267 | --- a/include/linux/highmem.h |
@@ -80612,7 +80283,7 @@ index 8d6e145..33e0b1e 100644 | |||
80612 | current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; | 80283 | current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; |
80613 | set_fs(fs); | 80284 | set_fs(fs); |
80614 | diff --git a/kernel/audit.c b/kernel/audit.c | 80285 | diff --git a/kernel/audit.c b/kernel/audit.c |
80615 | index 91e53d0..d9e3ec4 100644 | 80286 | index 7b0e23a..861041e 100644 |
80616 | --- a/kernel/audit.c | 80287 | --- a/kernel/audit.c |
80617 | +++ b/kernel/audit.c | 80288 | +++ b/kernel/audit.c |
80618 | @@ -118,7 +118,7 @@ u32 audit_sig_sid = 0; | 80289 | @@ -118,7 +118,7 @@ u32 audit_sig_sid = 0; |
@@ -84778,7 +84449,7 @@ index e8b3350..d83d44e 100644 | |||
84778 | .priority = CPU_PRI_MIGRATION, | 84449 | .priority = CPU_PRI_MIGRATION, |
84779 | }; | 84450 | }; |
84780 | diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c | 84451 | diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c |
84781 | index 03b73be..9422b9f 100644 | 84452 | index 009a62b..ae011f8 100644 |
84782 | --- a/kernel/sched/fair.c | 84453 | --- a/kernel/sched/fair.c |
84783 | +++ b/kernel/sched/fair.c | 84454 | +++ b/kernel/sched/fair.c |
84784 | @@ -831,7 +831,7 @@ void task_numa_fault(int node, int pages, bool migrated) | 84455 | @@ -831,7 +831,7 @@ void task_numa_fault(int node, int pages, bool migrated) |
@@ -85561,7 +85232,7 @@ index f11d83b..d016d91 100644 | |||
85561 | .clock_get = alarm_clock_get, | 85232 | .clock_get = alarm_clock_get, |
85562 | .timer_create = alarm_timer_create, | 85233 | .timer_create = alarm_timer_create, |
85563 | diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c | 85234 | diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c |
85564 | index baeeb5c..c22704a 100644 | 85235 | index fcc261c..119dc3b 100644 |
85565 | --- a/kernel/time/timekeeping.c | 85236 | --- a/kernel/time/timekeeping.c |
85566 | +++ b/kernel/time/timekeeping.c | 85237 | +++ b/kernel/time/timekeeping.c |
85567 | @@ -15,6 +15,7 @@ | 85238 | @@ -15,6 +15,7 @@ |
@@ -91535,18 +91206,10 @@ index 1c91f0d3..485470a 100644 | |||
91535 | } | 91206 | } |
91536 | } | 91207 | } |
91537 | diff --git a/mm/swap.c b/mm/swap.c | 91208 | diff --git a/mm/swap.c b/mm/swap.c |
91538 | index dfd7d71..ccdf688 100644 | 91209 | index 9f2225f..393d519 100644 |
91539 | --- a/mm/swap.c | 91210 | --- a/mm/swap.c |
91540 | +++ b/mm/swap.c | 91211 | +++ b/mm/swap.c |
91541 | @@ -31,6 +31,7 @@ | 91212 | @@ -74,6 +74,8 @@ static void __put_compound_page(struct page *page) |
91542 | #include <linux/memcontrol.h> | ||
91543 | #include <linux/gfp.h> | ||
91544 | #include <linux/uio.h> | ||
91545 | +#include <linux/hugetlb.h> | ||
91546 | |||
91547 | #include "internal.h" | ||
91548 | |||
91549 | @@ -73,6 +74,8 @@ static void __put_compound_page(struct page *page) | ||
91550 | 91213 | ||
91551 | __page_cache_release(page); | 91214 | __page_cache_release(page); |
91552 | dtor = get_compound_page_dtor(page); | 91215 | dtor = get_compound_page_dtor(page); |