summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorChunrong Guo <chunrong.guo@nxp.com>2017-07-28 15:44:05 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2017-08-07 11:42:29 -0300
commiteaf83c21dba9b7c951883a7f229a88262a1bcbe9 (patch)
tree748586f3260bcae4685923ccdcd9c95d2ddb07e7 /recipes-kernel
parent8fdc958527d13b07185c1824fc8df072811c66de (diff)
downloadmeta-freescale-eaf83c21dba9b7c951883a7f229a88262a1bcbe9.tar.gz
linux: upgrade to v4.4
*include the following changes ec61f52 - irqchip/gicv3: Remove disabling redistributor and group1 non-secure interrupts 7f4242d - arm64: dts: update the cpu idle node ab7df6a - arm: dma-mapping: export arch_setup_dma_ops() 9d921e8 - gianfar_ptp: replace get_of_u32 with of_property_read_u32 ec491e1 - arm64: dts: ls2088ardb: Update nodes for QSPI 69fe6d7 - mtd: spi-nor: Fix the wrong setting for SPI_NOR_DDR_QUAD_READ 13694ee - arm: config: Remove CONFIG_MTD_CFI_BE_BYTE_SWAP in multi_v7_defconfig 9153b91 - arm: dts: Add big-endian for IFC on LS1021A 765159b - armv8: dts: Add big-endian for IFC on LS1043A/LS1046A dec2400 - arm64: configs: Remove CONFIG_MTD_CFI_BE_BYTE_SWAP in lsdk.config b1ce954 - driver: mtd: update struct map_info's swap as per map requirement dea4d1b - phy: allow 10G fixed PHY support e16454a - net: phy: add 10000 as valid speed for fixed-link 57e8edd - crypto: caam/qi2 - setup CG only if supported b4b138a - crypto: caam/qi2 - add dpseci capabilities support 110fc6b - serial: fsl_lpuart: Remove the alias node dependence 4f43ea0 - pcie-ep: Fix the memory leak issue 4a14d8f - pci-ep/ls1046a: Add new interface to show the transfer data 3da05d2 - pci-ep/ls1046a: Instead of the __get_free_pages with dma_alloc_coherent 270c4da - pci-ep/ls1046a: Add new input parameter to set transfer data c4b6a9a - pci-ep/ls1046a: Remove the BARs set step 22b58f3 - pci-ep/ls1046a: Correct LUT offset for different LS platform cc463ba - pci/layerscape: add msi trigger function 284f305 - pci/layerscape: fix compile issue 04f2757 - pci/layerscape: Add PCIe endpoint driver faad801 - ls1088a: dts: Added reboot node 8b5f765 - crypto: caam/qi - abort algorithm setup on DPAA2 parts 574f783 - arm64: defconfig: enable CONFIG_GPIO_MPC8XXX 2fb5946 - crypto: caam/qi2 - fix authenc givencrypt shared descriptor da6f201 - arm64: dts: ls2088a: add cpu idle support 943127c - arm64: dts: ls1088a: add cpu idle support 4884a91 - arm64: dts: ls1043a: add cpu idle support 9b01166 - arm64: dts: ls1012a: add cpu idle support 4878b3b - staging: fsl-dpaa2/eth: Set Tx timestamp support correctly cde1f46 - dpaa_eth: move global variable 'clock' into ptp_priv_s struct 7579dc5 - config: arm32: enable necessary options for KVM and containers 2b8471d - dts: ls1046aqds: add "simple-bus" and ranges to fpga bde83bb - usb: dts: for fix usb port faile issue on ls1021atwr 206cee8 - usb: dwc3 : Add support for USB snooping 6ee3ba2 - usb: host: xhci: add a new quirk XHCI_NO_64BIT_SUPPORT 7532a3a - fmd: use ptp-timer for Fman RTC node name c95fecc - dpaa_eth: use ptp-timer phandle instead of ptimer-handle 43ea287 - arm64: dts: ls1088ardb: correct the base address of watchdog d1d561b - arm64: dts: add qmda note in ls1043/ls1046 dts. 1f984eb - arm64:configs: Enable CEPH_FS and XFS_FS in lsdk.config 63543be - crypto: caam/qi2: add support for TLS 1.0 record 508ce50 - caam/qi - add support for TLS 1.0 record 68054f6 - crypto: caam - add support for MOVEB command 4aa26bc - crypto: caam/qi - explicitly set dma_ops 9ba9074 - crypto: caam/qi - fix AD length endianness in S/G entry 41b5850 - crypto: caam/qi - use QBMan (NXP) SDK driver db3e005 - dpa_eth: remove unused code a648124 - dpaa_eth: ceetm: adapt to net/sched API changes e5435d5 - fsl_qbman: set dma_ops e954a2f - staging: fsl-dpaa2/eth: Update tx_shaping max burst size 7644da1 - staging: fsl-dpaa2/eth: Fix kfree bug 47d6760 - cpufreq: qoriq: enhance bus frequency calculation 53cc39e - arm64: lsdk.config: Enable CONFIG_OVERLAY_FS in kernel e394bc8 - driver: mtd: ifc: update bufnum mask for ver >= 2.0.0 67565eb - driver: mtd: ifc: Initialize SRAM for all version >= 1.0 3c9e9ac - Add dspi node for fsl-ls1046a-qds-sdk dts 9990039 - crypto: backport TLS implementation to v4.4 API Signed-off-by: Chunrong Guo <B40290@freescale.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch39
-rw-r--r--recipes-kernel/linux/linux-qoriq/CVE-2016-0758.patch98
-rw-r--r--recipes-kernel/linux/linux-qoriq/CVE-2016-2053.patch133
-rw-r--r--recipes-kernel/linux/linux-qoriq/fix-the-compile-issue-under-gcc6.patch103
-rw-r--r--recipes-kernel/linux/linux-qoriq/modify-defconfig-t1040-nr-cpus.patch33
-rw-r--r--recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch32
-rw-r--r--recipes-kernel/linux/linux-qoriq/powerpc-64e-Convert-cmpi-to-cmpwi-in-head_64.S.patch57
-rw-r--r--recipes-kernel/linux/linux-qoriq/powerpc-fsl-Fix-build-of-the-dtb-embedded-kernel-images.patch45
-rw-r--r--recipes-kernel/linux/linux-qoriq/powerpc-vdso64-Use-double-word-compare-on-pointers.patch67
-rw-r--r--recipes-kernel/linux/linux-qoriq_4.4.bb (renamed from recipes-kernel/linux/linux-qoriq_4.1.bb)13
10 files changed, 2 insertions, 618 deletions
diff --git a/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch b/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch
deleted file mode 100644
index 161bada6..00000000
--- a/recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 16b34c08f43c6e65f21a8cab536c497edb6c886e Mon Sep 17 00:00:00 2001
2From: Chunrong Guo <B40290@freescale.com>
3Date: Thu, 8 Oct 2015 22:48:22 -0500
4Subject: [PATCH] use static inline in ARM lifeboot.h
5
6---
7 drivers/input/mouse/sentelic.h | 2 +-
8 drivers/input/mouse/trackpoint.h | 2 +-
9 2 files changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h
12index aa697ec..9e69e94 100644
13--- a/drivers/input/mouse/sentelic.h
14+++ b/drivers/input/mouse/sentelic.h
15@@ -123,7 +123,7 @@ struct fsp_data {
16 extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
17 extern int fsp_init(struct psmouse *psmouse);
18 #else
19-inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
20+static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
21 {
22 return -ENOSYS;
23 }
24diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h
25index ecd0547..693735c 100644
26--- a/drivers/input/mouse/trackpoint.h
27+++ b/drivers/input/mouse/trackpoint.h
28@@ -147,7 +147,7 @@ struct trackpoint_data
29 #ifdef CONFIG_MOUSE_PS2_TRACKPOINT
30 int trackpoint_detect(struct psmouse *psmouse, bool set_properties);
31 #else
32-inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
33+static inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
34 {
35 return -ENOSYS;
36 }
37--
382.3.3
39
diff --git a/recipes-kernel/linux/linux-qoriq/CVE-2016-0758.patch b/recipes-kernel/linux/linux-qoriq/CVE-2016-0758.patch
deleted file mode 100644
index 5447552f..00000000
--- a/recipes-kernel/linux/linux-qoriq/CVE-2016-0758.patch
+++ /dev/null
@@ -1,98 +0,0 @@
1From af00ae6ef5a2c73f21ba215c476570b7772a14fb Mon Sep 17 00:00:00 2001
2From: David Howells <dhowells@redhat.com>
3Date: Tue, 23 Feb 2016 11:03:12 +0000
4Subject: KEYS: Fix ASN.1 indefinite length object parsing
5
6commit 23c8a812dc3c621009e4f0e5342aa4e2ede1ceaa upstream.
7
8This fixes CVE-2016-0758.
9
10In the ASN.1 decoder, when the length field of an ASN.1 value is extracted,
11it isn't validated against the remaining amount of data before being added
12to the cursor. With a sufficiently large size indicated, the check:
13
14 datalen - dp < 2
15
16may then fail due to integer overflow.
17
18Fix this by checking the length indicated against the amount of remaining
19data in both places a definite length is determined.
20
21Whilst we're at it, make the following changes:
22
23 (1) Check the maximum size of extended length does not exceed the capacity
24 of the variable it's being stored in (len) rather than the type that
25 variable is assumed to be (size_t).
26
27 (2) Compare the EOC tag to the symbolic constant ASN1_EOC rather than the
28 integer 0.
29
30 (3) To reduce confusion, move the initialisation of len outside of:
31
32 for (len = 0; n > 0; n--) {
33
34 since it doesn't have anything to do with the loop counter n.
35
36CVE: CVE-2016-0758.
37Upstream-Status: Backport [backported from kernel.org 3.16 branch]
38
39Signed-off-by: David Howells <dhowells@redhat.com>
40Reviewed-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
41Acked-by: David Woodhouse <David.Woodhouse@intel.com>
42Acked-by: Peter Jones <pjones@redhat.com>
43Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
44Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
45---
46 lib/asn1_decoder.c | 16 +++++++++-------
47 1 file changed, 9 insertions(+), 7 deletions(-)
48
49diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
50index d60ce8a..806c5b6 100644
51--- a/lib/asn1_decoder.c
52+++ b/lib/asn1_decoder.c
53@@ -69,7 +69,7 @@ next_tag:
54
55 /* Extract a tag from the data */
56 tag = data[dp++];
57- if (tag == 0) {
58+ if (tag == ASN1_EOC) {
59 /* It appears to be an EOC. */
60 if (data[dp++] != 0)
61 goto invalid_eoc;
62@@ -91,10 +91,8 @@ next_tag:
63
64 /* Extract the length */
65 len = data[dp++];
66- if (len <= 0x7f) {
67- dp += len;
68- goto next_tag;
69- }
70+ if (len <= 0x7f)
71+ goto check_length;
72
73 if (unlikely(len == ASN1_INDEFINITE_LENGTH)) {
74 /* Indefinite length */
75@@ -105,14 +103,18 @@ next_tag:
76 }
77
78 n = len - 0x80;
79- if (unlikely(n > sizeof(size_t) - 1))
80+ if (unlikely(n > sizeof(len) - 1))
81 goto length_too_long;
82 if (unlikely(n > datalen - dp))
83 goto data_overrun_error;
84- for (len = 0; n > 0; n--) {
85+ len = 0;
86+ for (; n > 0; n--) {
87 len <<= 8;
88 len |= data[dp++];
89 }
90+check_length:
91+ if (len > datalen - dp)
92+ goto data_overrun_error;
93 dp += len;
94 goto next_tag;
95
96--
97cgit v0.12
98
diff --git a/recipes-kernel/linux/linux-qoriq/CVE-2016-2053.patch b/recipes-kernel/linux/linux-qoriq/CVE-2016-2053.patch
deleted file mode 100644
index 778a99fd..00000000
--- a/recipes-kernel/linux/linux-qoriq/CVE-2016-2053.patch
+++ /dev/null
@@ -1,133 +0,0 @@
1From 15430f775ee686b61569a0c3e74cf0b2ad57c8eb Mon Sep 17 00:00:00 2001
2From: David Howells <dhowells@redhat.com>
3Date: Wed, 5 Aug 2015 12:54:46 +0100
4Subject: ASN.1: Fix non-match detection failure on data overrun
5
6commit 0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f upstream.
7
8If the ASN.1 decoder is asked to parse a sequence of objects, non-optional
9matches get skipped if there's no more data to be had rather than a
10data-overrun error being reported.
11
12This is due to the code segment that decides whether to skip optional
13matches (ie. matches that could get ignored because an element is marked
14OPTIONAL in the grammar) due to a lack of data also skips non-optional
15elements if the data pointer has reached the end of the buffer.
16
17This can be tested with the data decoder for the new RSA akcipher algorithm
18that takes three non-optional integers. Currently, it skips the last
19integer if there is insufficient data.
20
21Without the fix, #defining DEBUG in asn1_decoder.c will show something
22like:
23
24 next_op: pc=0/13 dp=0/270 C=0 J=0
25 - match? 30 30 00
26 - TAG: 30 266 CONS
27 next_op: pc=2/13 dp=4/270 C=1 J=0
28 - match? 02 02 00
29 - TAG: 02 257
30 - LEAF: 257
31 next_op: pc=5/13 dp=265/270 C=1 J=0
32 - match? 02 02 00
33 - TAG: 02 3
34 - LEAF: 3
35 next_op: pc=8/13 dp=270/270 C=1 J=0
36 next_op: pc=11/13 dp=270/270 C=1 J=0
37 - end cons t=4 dp=270 l=270/270
38
39The next_op line for pc=8/13 should be followed by a match line.
40
41This is not exploitable for X.509 certificates by means of shortening the
42message and fixing up the ASN.1 CONS tags because:
43
44 (1) The relevant records being built up are cleared before use.
45
46 (2) If the message is shortened sufficiently to remove the public key, the
47 ASN.1 parse of the RSA key will fail quickly due to a lack of data.
48
49 (3) Extracted signature data is either turned into MPIs (which cope with a
50 0 length) or is simpler integers specifying algoritms and suchlike
51 (which can validly be 0); and
52
53 (4) The AKID and SKID extensions are optional and their removal is handled
54 without risking passing a NULL to asymmetric_key_generate_id().
55
56 (5) If the certificate is truncated sufficiently to remove the subject,
57 issuer or serialNumber then the ASN.1 decoder will fail with a 'Cons
58 stack underflow' return.
59
60This is not exploitable for PKCS#7 messages by means of removal of elements
61from such a message from the tail end of a sequence:
62
63 (1) Any shortened X.509 certs embedded in the PKCS#7 message are survivable
64 as detailed above.
65
66 (2) The message digest content isn't used if it shows a NULL pointer,
67 similarly, the authattrs aren't used if that shows a NULL pointer.
68
69 (3) A missing signature results in a NULL MPI - which the MPI routines deal
70 with.
71
72 (4) If data is NULL, it is expected that the message has detached content and
73 that is handled appropriately.
74
75 (5) If the serialNumber is excised, the unconditional action associated
76 with it will pick up the containing SEQUENCE instead, so no NULL
77 pointer will be seen here.
78
79 If both the issuer and the serialNumber are excised, the ASN.1 decode
80 will fail with an 'Unexpected tag' return.
81
82 In either case, there's no way to get to asymmetric_key_generate_id()
83 with a NULL pointer.
84
85 (6) Other fields are decoded to simple integers. Shortening the message
86 to omit an algorithm ID field will cause checks on this to fail early
87 in the verification process.
88
89This can also be tested by snipping objects off of the end of the ASN.1 stream
90such that mandatory tags are removed - or even from the end of internal
91SEQUENCEs. If any mandatory tag is missing, the error EBADMSG *should* be
92produced. Without this patch ERANGE or ENOPKG might be produced or the parse
93may apparently succeed, perhaps with ENOKEY or EKEYREJECTED being produced
94later, depending on what gets snipped.
95
96Just snipping off the final BIT_STRING or OCTET_STRING from either sample
97should be a start since both are mandatory and neither will cause an EBADMSG
98without the patches
99
100CVE: CVE-2016-2053
101Upstream-Status: Backport [kernel.org linux-stable 3.16 branch]
102
103Reported-by: Marcel Holtmann <marcel@holtmann.org>
104Signed-off-by: David Howells <dhowells@redhat.com>
105Tested-by: Marcel Holtmann <marcel@holtmann.org>
106Reviewed-by: David Woodhouse <David.Woodhouse@intel.com>
107Cc: Moritz Muehlenhoff <jmm@inutil.org>
108[ luis: backported to 3.16: adjusted context ]
109Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
110Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
111---
112 lib/asn1_decoder.c | 5 ++---
113 1 file changed, 2 insertions(+), 3 deletions(-)
114
115diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
116index 1a000bb..d60ce8a 100644
117--- a/lib/asn1_decoder.c
118+++ b/lib/asn1_decoder.c
119@@ -208,9 +208,8 @@ next_op:
120 unsigned char tmp;
121
122 /* Skip conditional matches if possible */
123- if ((op & ASN1_OP_MATCH__COND &&
124- flags & FLAG_MATCHED) ||
125- dp == datalen) {
126+ if ((op & ASN1_OP_MATCH__COND && flags & FLAG_MATCHED) ||
127+ (op & ASN1_OP_MATCH__SKIP && dp == datalen)) {
128 pc += asn1_op_lengths[op];
129 goto next_op;
130 }
131--
132cgit v0.12
133
diff --git a/recipes-kernel/linux/linux-qoriq/fix-the-compile-issue-under-gcc6.patch b/recipes-kernel/linux/linux-qoriq/fix-the-compile-issue-under-gcc6.patch
deleted file mode 100644
index 910ef188..00000000
--- a/recipes-kernel/linux/linux-qoriq/fix-the-compile-issue-under-gcc6.patch
+++ /dev/null
@@ -1,103 +0,0 @@
1Fix the compile issue under gcc6
2
3Fix the following build error:
4| .../include/linux/compiler-gcc.h:106:30: fatal error: linux/compiler-gcc6.h: No such file or directory
5| #include gcc_header(__GNUC__)
6
7Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
8
9Upstream-Status: Pending
10---
11 arch/powerpc/kernel/Makefile | 2 --
12 include/linux/compiler-gcc6.h | 66 +++++++++++++++++++++++++++++++++++++++++++
13 2 files changed, 66 insertions(+), 2 deletions(-)
14 create mode 100644 include/linux/compiler-gcc6.h
15
16diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
17index c326675..45f0494 100644
18--- a/arch/powerpc/kernel/Makefile
19+++ b/arch/powerpc/kernel/Makefile
20@@ -4,8 +4,6 @@
21
22 CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
23
24-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
25-
26 ifeq ($(CONFIG_PPC64),y)
27 CFLAGS_prom_init.o += $(NO_MINIMAL_TOC)
28 endif
29diff --git a/include/linux/compiler-gcc6.h b/include/linux/compiler-gcc6.h
30new file mode 100644
31index 0000000..cdd1cc2
32--- /dev/null
33+++ b/include/linux/compiler-gcc6.h
34@@ -0,0 +1,66 @@
35+#ifndef __LINUX_COMPILER_H
36+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
37+#endif
38+
39+#define __used __attribute__((__used__))
40+#define __must_check __attribute__((warn_unused_result))
41+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
42+
43+/* Mark functions as cold. gcc will assume any path leading to a call
44+ to them will be unlikely. This means a lot of manual unlikely()s
45+ are unnecessary now for any paths leading to the usual suspects
46+ like BUG(), printk(), panic() etc. [but let's keep them for now for
47+ older compilers]
48+
49+ Early snapshots of gcc 4.3 don't support this and we can't detect this
50+ in the preprocessor, but we can live with this because they're unreleased.
51+ Maketime probing would be overkill here.
52+
53+ gcc also has a __attribute__((__hot__)) to move hot functions into
54+ a special section, but I don't see any sense in this right now in
55+ the kernel context */
56+#define __cold __attribute__((__cold__))
57+
58+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
59+
60+#ifndef __CHECKER__
61+# define __compiletime_warning(message) __attribute__((warning(message)))
62+# define __compiletime_error(message) __attribute__((error(message)))
63+#endif /* __CHECKER__ */
64+
65+/*
66+ * Mark a position in code as unreachable. This can be used to
67+ * suppress control flow warnings after asm blocks that transfer
68+ * control elsewhere.
69+ *
70+ * Early snapshots of gcc 4.5 don't support this and we can't detect
71+ * this in the preprocessor, but we can live with this because they're
72+ * unreleased. Really, we need to have autoconf for the kernel.
73+ */
74+#define unreachable() __builtin_unreachable()
75+
76+/* Mark a function definition as prohibited from being cloned. */
77+#define __noclone __attribute__((__noclone__))
78+
79+/*
80+ * Tell the optimizer that something else uses this function or variable.
81+ */
82+#define __visible __attribute__((externally_visible))
83+
84+/*
85+ * GCC 'asm goto' miscompiles certain code sequences:
86+ *
87+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
88+ *
89+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
90+ * Fixed in GCC 4.8.2 and later versions.
91+ *
92+ * (asm goto is automatically volatile - the naming reflects this.)
93+ */
94+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
95+
96+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
97+#define __HAVE_BUILTIN_BSWAP32__
98+#define __HAVE_BUILTIN_BSWAP64__
99+#define __HAVE_BUILTIN_BSWAP16__
100+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
101--
1022.5.0
103
diff --git a/recipes-kernel/linux/linux-qoriq/modify-defconfig-t1040-nr-cpus.patch b/recipes-kernel/linux/linux-qoriq/modify-defconfig-t1040-nr-cpus.patch
deleted file mode 100644
index 7d109edb..00000000
--- a/recipes-kernel/linux/linux-qoriq/modify-defconfig-t1040-nr-cpus.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 8545129540a5862b22aad03badb2a9f93bf29117 Mon Sep 17 00:00:00 2001
2From: Bob Cochran <yocto@mindchasers.com>
3Date: Mon, 3 Nov 2014 22:45:35 -0500
4Subject: [meta-fsl-ppc][PATCH] linux-qoriq: Change defconfig for T1040 to
5 match number of CPUS
6
7Having a number higher than necessary for NR_CPUS wastes memory by
8instantiating unnecessary structures in RAM. An example is in the DPAA where
9DPAA_ETH_TX_QUEUES is defined based on NR_CPUS and used to create
10dozens of extra qman_fq structures. Using the prior value of 24, which was
11left over from the T4240 created an additonal 60 frame queue structures alone.
12
13This has been tested on t1040rdb-64b. .
14
15Signed-off-by: Bob Cochran <yocto@mindchasers.com>
16---
17 arch/powerpc/configs/corenet32_fmanv3l_smp_defconfig | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20diff --git a/arch/powerpc/configs/corenet32_fmanv3l_smp_defconfig b/arch/powerpc/configs/corenet32_fmanv3l_smp_defconfig
21index a401e7c..5542248 100644
22--- a/arch/powerpc/configs/corenet32_fmanv3l_smp_defconfig
23+++ b/arch/powerpc/configs/corenet32_fmanv3l_smp_defconfig
24@@ -1,6 +1,6 @@
25 CONFIG_PPC_85xx=y
26 CONFIG_SMP=y
27-CONFIG_NR_CPUS=8
28+CONFIG_NR_CPUS=4
29 CONFIG_EXPERIMENTAL=y
30 CONFIG_SYSVIPC=y
31 CONFIG_POSIX_MQUEUE=y
32--
331.7.9.5
diff --git a/recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch b/recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch
deleted file mode 100644
index 5f3220d9..00000000
--- a/recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 15895f6880829ee502f0a48412173fb452b23c0b Mon Sep 17 00:00:00 2001
2From: Ting Liu <ting.liu@nxp.com>
3Date: Fri, 17 Jun 2016 10:57:35 +0800
4Subject: [PATCH] only set vmpic_msi_feature if CONFIG_EPAPR_PARAVIRT defined
5
6Upstream-Status: Pending
7
8Signed-off-by: Ting Liu <ting.liu@nxp.com>
9---
10 arch/powerpc/sysdev/fsl_msi.c | 2 ++
11 1 file changed, 2 insertions(+)
12
13diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
14index 963661a..95d7111 100644
15--- a/arch/powerpc/sysdev/fsl_msi.c
16+++ b/arch/powerpc/sysdev/fsl_msi.c
17@@ -658,10 +658,12 @@ static const struct fsl_msi_feature ipic_msi_feature = {
18 .msiir_offset = 0x38,
19 };
20
21+#ifdef CONFIG_EPAPR_PARAVIRT
22 static const struct fsl_msi_feature vmpic_msi_feature = {
23 .fsl_pic_ip = FSL_PIC_IP_VMPIC,
24 .msiir_offset = 0,
25 };
26+#endif
27
28 static const struct of_device_id fsl_of_msi_ids[] = {
29 {
30--
311.9.2
32
diff --git a/recipes-kernel/linux/linux-qoriq/powerpc-64e-Convert-cmpi-to-cmpwi-in-head_64.S.patch b/recipes-kernel/linux/linux-qoriq/powerpc-64e-Convert-cmpi-to-cmpwi-in-head_64.S.patch
deleted file mode 100644
index 710b2122..00000000
--- a/recipes-kernel/linux/linux-qoriq/powerpc-64e-Convert-cmpi-to-cmpwi-in-head_64.S.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From f87f253bac3ce4a4eb2a60a1ae604d74e65f9042 Mon Sep 17 00:00:00 2001
2From: Nicholas Piggin <npiggin@gmail.com>
3Date: Thu, 24 Nov 2016 00:02:07 +1100
4Subject: [PATCH] powerpc/64e: Convert cmpi to cmpwi in head_64.S
5
6From 80f23935cadb ("powerpc: Convert cmp to cmpd in idle enter sequence"):
7
8 PowerPC's "cmp" instruction has four operands. Normally people write
9 "cmpw" or "cmpd" for the second cmp operand 0 or 1. But, frequently
10 people forget, and write "cmp" with just three operands.
11
12 With older binutils this is silently accepted as if this was "cmpw",
13 while often "cmpd" is wanted. With newer binutils GAS will complain
14 about this for 64-bit code. For 32-bit code it still silently assumes
15 "cmpw" is what is meant.
16
17In this case, cmpwi is called for, so this is just a build fix for
18new toolchains.
19
20Cc: stable@vger.kernel.org # v3.0+
21Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
22Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
23---
24 arch/powerpc/kernel/head_64.S | 8 ++++----
25 1 file changed, 4 insertions(+), 4 deletions(-)
26
27diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
28index 451a8e1..bdb4612 100644
29--- a/arch/powerpc/kernel/head_64.S
30+++ b/arch/powerpc/kernel/head_64.S
31@@ -221,9 +221,9 @@ booting_thread_hwid:
32 */
33 _GLOBAL(book3e_start_thread)
34 LOAD_REG_IMMEDIATE(r5, MSR_KERNEL)
35- cmpi 0, r3, 0
36+ cmpwi r3, 0
37 beq 10f
38- cmpi 0, r3, 1
39+ cmpwi r3, 1
40 beq 11f
41 /* If the thread id is invalid, just exit. */
42 b 13f
43@@ -248,9 +248,9 @@ _GLOBAL(book3e_start_thread)
44 * r3 = the thread physical id
45 */
46 _GLOBAL(book3e_stop_thread)
47- cmpi 0, r3, 0
48+ cmpwi r3, 0
49 beq 10f
50- cmpi 0, r3, 1
51+ cmpwi r3, 1
52 beq 10f
53 /* If the thread id is invalid, just exit. */
54 b 13f
55--
562.7.4
57
diff --git a/recipes-kernel/linux/linux-qoriq/powerpc-fsl-Fix-build-of-the-dtb-embedded-kernel-images.patch b/recipes-kernel/linux/linux-qoriq/powerpc-fsl-Fix-build-of-the-dtb-embedded-kernel-images.patch
deleted file mode 100644
index 1103f0c2..00000000
--- a/recipes-kernel/linux/linux-qoriq/powerpc-fsl-Fix-build-of-the-dtb-embedded-kernel-images.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 4680c9d50637f78338e786c920aef6c171c7cc00 Mon Sep 17 00:00:00 2001
2From: Alessio Igor Bogani <alessio.bogani@elettra.eu>
3Date: Mon, 18 Apr 2016 08:36:19 +0200
4Subject: powerpc/fsl: Fix build of the dtb embedded kernel images
5
6Commit dc37374b9c833 ("powerpc/fsl: Move Freescale device tree files
7into fsl folder") moved a lot of device tree files into fsl directory,
8fixing Makefile for cuImage target only. Unfortunately there are other
9targets which require embedding a device tree into the kernel image
10(e.g. dtbImage.%). So use a more generic approach.
11
12Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
13[scottwood: cleaned up commit message]
14Signed-off-by: Scott Wood <oss@buserror.net>
15---
16 arch/powerpc/boot/Makefile | 6 +++---
17 1 file changed, 3 insertions(+), 3 deletions(-)
18
19diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
20index 6116510..8fe78a3 100644
21--- a/arch/powerpc/boot/Makefile
22+++ b/arch/powerpc/boot/Makefile
23@@ -362,9 +362,6 @@ $(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
24 $(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
25 $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb)
26
27-$(obj)/cuImage.%: vmlinux $(obj)/fsl/%.dtb $(wrapperbits)
28- $(call if_changed,wrap,cuboot-$*,,$(obj)/fsl/$*.dtb)
29-
30 $(obj)/simpleImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
31 $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
32
33@@ -381,6 +378,9 @@ $(obj)/treeImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
34 $(obj)/%.dtb: $(src)/dts/%.dts FORCE
35 $(call if_changed_dep,dtc)
36
37+$(obj)/%.dtb: $(src)/dts/fsl/%.dts FORCE
38+ $(call if_changed_dep,dtc)
39+
40 # If there isn't a platform selected then just strip the vmlinux.
41 ifeq (,$(image-y))
42 image-y := vmlinux.strip
43--
44cgit v0.12
45
diff --git a/recipes-kernel/linux/linux-qoriq/powerpc-vdso64-Use-double-word-compare-on-pointers.patch b/recipes-kernel/linux/linux-qoriq/powerpc-vdso64-Use-double-word-compare-on-pointers.patch
deleted file mode 100644
index 9fa40de4..00000000
--- a/recipes-kernel/linux/linux-qoriq/powerpc-vdso64-Use-double-word-compare-on-pointers.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1From 5045ea37377ce8cca6890d32b127ad6770e6dce5 Mon Sep 17 00:00:00 2001
2From: Anton Blanchard <anton@samba.org>
3Date: Sun, 25 Sep 2016 17:16:53 +1000
4Subject: [PATCH] powerpc/vdso64: Use double word compare on pointers
5
6__kernel_get_syscall_map() and __kernel_clock_getres() use cmpli to
7check if the passed in pointer is non zero. cmpli maps to a 32 bit
8compare on binutils, so we ignore the top 32 bits.
9
10A simple test case can be created by passing in a bogus pointer with
11the bottom 32 bits clear. Using a clk_id that is handled by the VDSO,
12then one that is handled by the kernel shows the problem:
13
14 printf("%d\n", clock_getres(CLOCK_REALTIME, (void *)0x100000000));
15 printf("%d\n", clock_getres(CLOCK_BOOTTIME, (void *)0x100000000));
16
17And we get:
18
19 0
20 -1
21
22The bigger issue is if we pass a valid pointer with the bottom 32 bits
23clear, in this case we will return success but won't write any data
24to the pointer.
25
26I stumbled across this issue because the LLVM integrated assembler
27doesn't accept cmpli with 3 arguments. Fix this by converting them to
28cmpldi.
29
30Fixes: a7f290dad32e ("[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel")
31Cc: stable@vger.kernel.org # v2.6.15+
32Signed-off-by: Anton Blanchard <anton@samba.org>
33Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
34---
35 arch/powerpc/kernel/vdso64/datapage.S | 2 +-
36 arch/powerpc/kernel/vdso64/gettimeofday.S | 2 +-
37 2 files changed, 2 insertions(+), 2 deletions(-)
38
39diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S
40index 184a6ba..abf17fe 100644
41--- a/arch/powerpc/kernel/vdso64/datapage.S
42+++ b/arch/powerpc/kernel/vdso64/datapage.S
43@@ -59,7 +59,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
44 bl V_LOCAL_FUNC(__get_datapage)
45 mtlr r12
46 addi r3,r3,CFG_SYSCALL_MAP64
47- cmpli cr0,r4,0
48+ cmpldi cr0,r4,0
49 crclr cr0*4+so
50 beqlr
51 li r0,NR_syscalls
52diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
53index a76b4af..3820213 100644
54--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
55+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
56@@ -145,7 +145,7 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
57 bne cr0,99f
58
59 li r3,0
60- cmpli cr0,r4,0
61+ cmpldi cr0,r4,0
62 crclr cr0*4+so
63 beqlr
64 lis r5,CLOCK_REALTIME_RES@h
65--
662.7.4
67
diff --git a/recipes-kernel/linux/linux-qoriq_4.1.bb b/recipes-kernel/linux/linux-qoriq_4.4.bb
index 02680e9c..6feca8f1 100644
--- a/recipes-kernel/linux/linux-qoriq_4.1.bb
+++ b/recipes-kernel/linux/linux-qoriq_4.4.bb
@@ -7,18 +7,9 @@ SECTION = "kernel"
7LICENSE = "GPLv2" 7LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" 8LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
9 9
10SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ 10SRC_URI = "git://github.com/qoriq-open-source/linux.git;nobranch=1 \
11 file://modify-defconfig-t1040-nr-cpus.patch \
12 file://0003-use-static-inline-in-ARM-lifeboot.h.patch \
13 file://fix-the-compile-issue-under-gcc6.patch \
14 file://only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch \
15 file://powerpc-fsl-Fix-build-of-the-dtb-embedded-kernel-images.patch \
16 file://CVE-2016-2053.patch \
17 file://CVE-2016-0758.patch \
18 file://powerpc-64e-Convert-cmpi-to-cmpwi-in-head_64.S.patch \
19 file://powerpc-vdso64-Use-double-word-compare-on-pointers.patch \
20" 11"
21SRCREV = "1ae843c08261402b2c35d83422e4fa1e313611f4" 12SRCREV = "ec61f521be6a22b100aabc0e2726c670aec3c845"
22 13
23S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
24 15