aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-12-19 13:41:41 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2011-12-19 13:52:20 +0100
commitc5d59580c308763d163d2bfb374b796ae68a3748 (patch)
tree3ce80d188b977f297f53240bec2495e2cdc86c1a /main/linux-grsec
parent1d14f37cea33666974d6adf5d93daba1542bf7f5 (diff)
downloadaports-c5d59580c308763d163d2bfb374b796ae68a3748.tar.bz2
aports-c5d59580c308763d163d2bfb374b796ae68a3748.tar.xz
main/linux-grsec: fix mtu regression and fix via cpu support
Diffstat (limited to 'main/linux-grsec')
-rw-r--r--main/linux-grsec/APKBUILD7
-rw-r--r--main/linux-grsec/linux-3.0.x-regression-with-ipv4-routes-having-mtu.patch53
-rw-r--r--main/linux-grsec/x86-centaur-enable-cx8-for-via-eden-too.patch38
3 files changed, 97 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 82023d60ed..f52c9d6d69 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -4,7 +4,7 @@ _flavor=grsec
pkgname=linux-${_flavor}
pkgver=3.0.12
_kernver=3.0
-pkgrel=2
+pkgrel=3
pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net
depends="mkinitfs linux-firmware"
@@ -20,6 +20,9 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$_kernver.tar.bz2
0001-ip_gre-dont-increase-dev-needed_headroom-on-a-live-d.patch
0004-arp-flush-arp-cache-on-device-change.patch
+ x86-centaur-enable-cx8-for-via-eden-too.patch
+ linux-3.0.x-regression-with-ipv4-routes-having-mtu.patch
+
kernelconfig.x86
kernelconfig.x86_64
"
@@ -144,5 +147,7 @@ a129184102c16a4ee39afe50cae43efd grsecurity-2.2.2-3.0.12-unofficial.patch
c41cf0ee9794f393423c6b2093072260 grsec-timblogiw-noconst.patch
ebb99ef6ad8cd2d9fd8f49d5c5849057 0001-ip_gre-dont-increase-dev-needed_headroom-on-a-live-d.patch
776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
+f3eda7112ef074a4121ec6de943c63ee x86-centaur-enable-cx8-for-via-eden-too.patch
+62cc7d7b5ba7ef05b72ff91c0411c189 linux-3.0.x-regression-with-ipv4-routes-having-mtu.patch
587b1fb2f6a5c9ba714900b856f57f09 kernelconfig.x86
99836ffe918bbdef7da1a56a3d075c7a kernelconfig.x86_64"
diff --git a/main/linux-grsec/linux-3.0.x-regression-with-ipv4-routes-having-mtu.patch b/main/linux-grsec/linux-3.0.x-regression-with-ipv4-routes-having-mtu.patch
new file mode 100644
index 0000000000..7ca4147826
--- /dev/null
+++ b/main/linux-grsec/linux-3.0.x-regression-with-ipv4-routes-having-mtu.patch
@@ -0,0 +1,53 @@
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c
+index f30112f..26a6249 100644
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -1841,6 +1841,22 @@ static unsigned int ipv4_mtu(const struct dst_entry *dst)
+ return mtu;
+ }
+
++static void __rt_init_metrics(struct rtable *rt, struct fib_info *fi,
++ struct inet_peer *peer)
++{
++ if (peer && fi->fib_metrics == (u32 *) dst_default_metrics) {
++ dst_init_metrics(&rt->dst, peer->metrics, false);
++ return;
++ }
++
++ if (fi->fib_metrics != (u32 *) dst_default_metrics) {
++ rt->fi = fi;
++ atomic_inc(&fi->fib_clntref);
++ }
++
++ dst_init_metrics(&rt->dst, fi->fib_metrics, true);
++}
++
+ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
+ struct fib_info *fi)
+ {
+@@ -1859,7 +1875,8 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
+ if (inet_metrics_new(peer))
+ memcpy(peer->metrics, fi->fib_metrics,
+ sizeof(u32) * RTAX_MAX);
+- dst_init_metrics(&rt->dst, peer->metrics, false);
++
++ __rt_init_metrics(rt, fi, peer);
+
+ check_peer_pmtu(&rt->dst, peer);
+ if (peer->redirect_genid != redirect_genid)
+@@ -1869,13 +1886,8 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
+ rt->rt_gateway = peer->redirect_learned.a4;
+ rt->rt_flags |= RTCF_REDIRECTED;
+ }
+- } else {
+- if (fi->fib_metrics != (u32 *) dst_default_metrics) {
+- rt->fi = fi;
+- atomic_inc(&fi->fib_clntref);
+- }
+- dst_init_metrics(&rt->dst, fi->fib_metrics, true);
+- }
++ } else
++ __rt_init_metrics(rt, fi, NULL);
+ }
+
+ static void rt_set_nexthop(struct rtable *rt, const struct flowi4 *fl4,
diff --git a/main/linux-grsec/x86-centaur-enable-cx8-for-via-eden-too.patch b/main/linux-grsec/x86-centaur-enable-cx8-for-via-eden-too.patch
new file mode 100644
index 0000000000..37e3e3bdb0
--- /dev/null
+++ b/main/linux-grsec/x86-centaur-enable-cx8-for-via-eden-too.patch
@@ -0,0 +1,38 @@
+From: Timo Teräs <timo.teras@iki.fi>
+Date: Thu, 15 Dec 2011 15:11:28 +0000 (+0200)
+Subject: x86, centaur: Enable cx8 for VIA Eden too
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftip%2Ftip.git;a=commitdiff_plain;h=cb3f718de8301a969f8169d7d4160e73baff0b86
+
+x86, centaur: Enable cx8 for VIA Eden too
+
+My box with following cpuinfo needs the cx8 enabling still:
+
+vendor_id : CentaurHauls
+cpu family : 6
+model : 13
+model name : VIA Eden Processor 1200MHz
+stepping : 0
+cpu MHz : 1199.940
+cache size : 128 KB
+
+This fixes valgrind to work on my box (it requires and checks
+cx8 from cpuinfo).
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+Link: http://lkml.kernel.org/r/1323961888-10223-1-git-send-email-timo.teras@iki.fi
+Signed-off-by: H. Peter Anvin <hpa@zytor.com>
+---
+
+diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c
+index e58d978..159103c 100644
+--- a/arch/x86/kernel/cpu/centaur.c
++++ b/arch/x86/kernel/cpu/centaur.c
+@@ -278,7 +278,7 @@ static void __cpuinit init_c3(struct cpuinfo_x86 *c)
+ }
+ #ifdef CONFIG_X86_32
+ /* Cyrix III family needs CX8 & PGE explicitly enabled. */
+- if (c->x86_model >= 6 && c->x86_model <= 9) {
++ if (c->x86_model >= 6 && c->x86_model <= 13) {
+ rdmsr(MSR_VIA_FCR, lo, hi);
+ lo |= (1<<1 | 1<<7);
+ wrmsr(MSR_VIA_FCR, lo, hi);