summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2015-11-17 11:56:18 +0100
committerTudor Florea <tudor.florea@enea.com>2015-11-17 15:14:49 +0100
commitdc78ea51a05eec3a9b54e6d398c65133ce4f8fa3 (patch)
tree0e20ec5e5cd58460abefce57f9c2e73b8b28ef45
parent555a4f68e8ead9c1360510d48f911de891fef8f5 (diff)
downloadmeta-enea-bsp-ppc-dc78ea51a05eec3a9b54e6d398c65133ce4f8fa3.tar.gz
add the linux-qoriq-prt kernel recipe from meta-fsl-ppc
New kernel recipes are defined in the meta-enea-bsp-<arch> layers now. Movin the recipe together with patches from meta-fsl-ppc. Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-rw-r--r--recipes-kernel/linux/files/Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch41
-rw-r--r--recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch80
-rw-r--r--recipes-kernel/linux/linux-qoriq-prt_3.12.bb10
3 files changed, 131 insertions, 0 deletions
diff --git a/recipes-kernel/linux/files/Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch b/recipes-kernel/linux/files/Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch
new file mode 100644
index 0000000..7d16535
--- /dev/null
+++ b/recipes-kernel/linux/files/Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch
@@ -0,0 +1,41 @@
1CVE-2014-5077 Kernel/SCTP: fix a NULL pointer dereference
2
3A NULL pointer dereference flaw was found in the way the
4Linux kernel's Stream Control Transmission Protocol
5(SCTP) implementation handled simultaneous connections
6between the same hosts. A remote attacker could use this
7flaw to crash the system.
8
9Upstream-Status: Backport (from v3.16, commit 1be9a950c646c)
10
11References:
12 - https://access.redhat.com/security/cve/CVE-2014-5077
13 - http://patchwork.ozlabs.org/patch/372475/
14
15Fixes: 730fc3d05cd4 ("[SCTP]: Implete SCTP-AUTH parameter processing")
16Reported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
17Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
18Tested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
19Cc: Vlad Yasevich <vyasevich@gmail.com>
20Acked-by: Vlad Yasevich <vyasevich@gmail.com>
21Signed-off-by: David S. Miller <davem@davemloft.net>
22Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com>
23---
24 net/sctp/associola.c | 1 +
25 1 file changed, 1 insertion(+)
26
27diff --git a/net/sctp/associola.c b/net/sctp/associola.c
28index 9de23a2..06a9ee6 100644
29--- a/net/sctp/associola.c
30+++ b/net/sctp/associola.c
31@@ -1097,6 +1097,7 @@ void sctp_assoc_update(struct sctp_association *asoc,
32 asoc->c = new->c;
33 asoc->peer.rwnd = new->peer.rwnd;
34 asoc->peer.sack_needed = new->peer.sack_needed;
35+ asoc->peer.auth_capable = new->peer.auth_capable;
36 asoc->peer.i = new->peer.i;
37 sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL,
38 asoc->peer.i.initial_tsn, GFP_ATOMIC);
39--
401.9.1
41
diff --git a/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch b/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch
new file mode 100644
index 0000000..2fdcc9f
--- /dev/null
+++ b/recipes-kernel/linux/files/powerpc-Fix-64-bit-builds-with-binutils-2.24.patch
@@ -0,0 +1,80 @@
1From 7998eb3dc700aaf499f93f50b3d77da834ef9e1d Mon Sep 17 00:00:00 2001
2From: Guenter Roeck <linux@roeck-us.net>
3Date: Thu, 15 May 2014 09:33:42 -0700
4Subject: powerpc: Fix 64 bit builds with binutils 2.24
5
6Upstream-Status: Backport
7
8With binutils 2.24, various 64 bit builds fail with relocation errors
9such as
10
11arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
12 (.text+0x165ee): relocation truncated to fit: R_PPC64_ADDR16_HI
13 against symbol `interrupt_base_book3e' defined in .text section
14 in arch/powerpc/kernel/built-in.o
15arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
16 (.text+0x16602): relocation truncated to fit: R_PPC64_ADDR16_HI
17 against symbol `interrupt_end_book3e' defined in .text section
18 in arch/powerpc/kernel/built-in.o
19
20The assembler maintainer says:
21
22 I changed the ABI, something that had to be done but unfortunately
23 happens to break the booke kernel code. When building up a 64-bit
24 value with lis, ori, shl, oris, ori or similar sequences, you now
25 should use @high and @higha in place of @h and @ha. @h and @ha
26 (and their associated relocs R_PPC64_ADDR16_HI and R_PPC64_ADDR16_HA)
27 now report overflow if the value is out of 32-bit signed range.
28 ie. @h and @ha assume you're building a 32-bit value. This is needed
29 to report out-of-range -mcmodel=medium toc pointer offsets in @toc@h
30 and @toc@ha expressions, and for consistency I did the same for all
31 other @h and @ha relocs.
32
33Replacing @h with @high in one strategic location fixes the relocation
34errors. This has to be done conditionally since the assembler either
35supports @h or @high but not both.
36
37Cc: <stable@vger.kernel.org>
38Signed-off-by: Guenter Roeck <linux@roeck-us.net>
39Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
40
41diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
42index 4c0cedf..ce4c68a 100644
43--- a/arch/powerpc/Makefile
44+++ b/arch/powerpc/Makefile
45@@ -150,7 +150,9 @@ endif
46
47 CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
48
49-KBUILD_CPPFLAGS += -Iarch/$(ARCH)
50+asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
51+
52+KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr)
53 KBUILD_AFLAGS += -Iarch/$(ARCH)
54 KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
55 CPP = $(CC) -E $(KBUILD_CFLAGS)
56diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
57index 6586a40..cded7c1 100644
58--- a/arch/powerpc/include/asm/ppc_asm.h
59+++ b/arch/powerpc/include/asm/ppc_asm.h
60@@ -318,11 +318,16 @@ n:
61 addi reg,reg,(name - 0b)@l;
62
63 #ifdef __powerpc64__
64+#ifdef HAVE_AS_ATHIGH
65+#define __AS_ATHIGH high
66+#else
67+#define __AS_ATHIGH h
68+#endif
69 #define LOAD_REG_IMMEDIATE(reg,expr) \
70 lis reg,(expr)@highest; \
71 ori reg,reg,(expr)@higher; \
72 rldicr reg,reg,32,31; \
73- oris reg,reg,(expr)@h; \
74+ oris reg,reg,(expr)@__AS_ATHIGH; \
75 ori reg,reg,(expr)@l;
76
77 #define LOAD_REG_ADDR(reg,name) \
78--
79cgit v0.10.1
80
diff --git a/recipes-kernel/linux/linux-qoriq-prt_3.12.bb b/recipes-kernel/linux/linux-qoriq-prt_3.12.bb
new file mode 100644
index 0000000..810fbc3
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq-prt_3.12.bb
@@ -0,0 +1,10 @@
1require recipes-kernel/linux/linux-qoriq-common.inc
2require recipes-kernel/linux/linux-qoriq.inc
3
4
5SRC_URI += "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \
6 file://powerpc-Fix-64-bit-builds-with-binutils-2.24.patch \
7 file://Fix-CVE-2014-5077-sctp-inherit-auth-capable-on-INIT-collisions.patch \
8"
9SRCREV = "c29fe1a733308cbe592b3af054a97be1b91cf2dd"
10