diff options
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/0003-use-static-inline-in-ARM-lifeboot.h.patch | 39 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/CVE-2016-0758.patch | 98 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/CVE-2016-2053.patch | 133 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/fix-the-compile-issue-under-gcc6.patch | 103 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/modify-defconfig-t1040-nr-cpus.patch | 33 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/only-set-vmpic_msi_feature-if-CONFIG_EPAPR_PARAVIRT-.patch | 32 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/powerpc-64e-Convert-cmpi-to-cmpwi-in-head_64.S.patch | 57 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/powerpc-fsl-Fix-build-of-the-dtb-embedded-kernel-images.patch | 45 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-qoriq/powerpc-vdso64-Use-double-word-compare-on-pointers.patch | 67 | ||||
-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 @@ | |||
1 | From 16b34c08f43c6e65f21a8cab536c497edb6c886e Mon Sep 17 00:00:00 2001 | ||
2 | From: Chunrong Guo <B40290@freescale.com> | ||
3 | Date: Thu, 8 Oct 2015 22:48:22 -0500 | ||
4 | Subject: [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 | |||
11 | diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h | ||
12 | index 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 | } | ||
24 | diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h | ||
25 | index 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 | -- | ||
38 | 2.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 @@ | |||
1 | From af00ae6ef5a2c73f21ba215c476570b7772a14fb Mon Sep 17 00:00:00 2001 | ||
2 | From: David Howells <dhowells@redhat.com> | ||
3 | Date: Tue, 23 Feb 2016 11:03:12 +0000 | ||
4 | Subject: KEYS: Fix ASN.1 indefinite length object parsing | ||
5 | |||
6 | commit 23c8a812dc3c621009e4f0e5342aa4e2ede1ceaa upstream. | ||
7 | |||
8 | This fixes CVE-2016-0758. | ||
9 | |||
10 | In the ASN.1 decoder, when the length field of an ASN.1 value is extracted, | ||
11 | it isn't validated against the remaining amount of data before being added | ||
12 | to the cursor. With a sufficiently large size indicated, the check: | ||
13 | |||
14 | datalen - dp < 2 | ||
15 | |||
16 | may then fail due to integer overflow. | ||
17 | |||
18 | Fix this by checking the length indicated against the amount of remaining | ||
19 | data in both places a definite length is determined. | ||
20 | |||
21 | Whilst 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 | |||
36 | CVE: CVE-2016-0758. | ||
37 | Upstream-Status: Backport [backported from kernel.org 3.16 branch] | ||
38 | |||
39 | Signed-off-by: David Howells <dhowells@redhat.com> | ||
40 | Reviewed-by: Mimi Zohar <zohar@linux.vnet.ibm.com> | ||
41 | Acked-by: David Woodhouse <David.Woodhouse@intel.com> | ||
42 | Acked-by: Peter Jones <pjones@redhat.com> | ||
43 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
44 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
45 | --- | ||
46 | lib/asn1_decoder.c | 16 +++++++++------- | ||
47 | 1 file changed, 9 insertions(+), 7 deletions(-) | ||
48 | |||
49 | diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c | ||
50 | index 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 | -- | ||
97 | cgit 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 @@ | |||
1 | From 15430f775ee686b61569a0c3e74cf0b2ad57c8eb Mon Sep 17 00:00:00 2001 | ||
2 | From: David Howells <dhowells@redhat.com> | ||
3 | Date: Wed, 5 Aug 2015 12:54:46 +0100 | ||
4 | Subject: ASN.1: Fix non-match detection failure on data overrun | ||
5 | |||
6 | commit 0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f upstream. | ||
7 | |||
8 | If the ASN.1 decoder is asked to parse a sequence of objects, non-optional | ||
9 | matches get skipped if there's no more data to be had rather than a | ||
10 | data-overrun error being reported. | ||
11 | |||
12 | This is due to the code segment that decides whether to skip optional | ||
13 | matches (ie. matches that could get ignored because an element is marked | ||
14 | OPTIONAL in the grammar) due to a lack of data also skips non-optional | ||
15 | elements if the data pointer has reached the end of the buffer. | ||
16 | |||
17 | This can be tested with the data decoder for the new RSA akcipher algorithm | ||
18 | that takes three non-optional integers. Currently, it skips the last | ||
19 | integer if there is insufficient data. | ||
20 | |||
21 | Without the fix, #defining DEBUG in asn1_decoder.c will show something | ||
22 | like: | ||
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 | |||
39 | The next_op line for pc=8/13 should be followed by a match line. | ||
40 | |||
41 | This is not exploitable for X.509 certificates by means of shortening the | ||
42 | message 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 | |||
60 | This is not exploitable for PKCS#7 messages by means of removal of elements | ||
61 | from 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 | |||
89 | This can also be tested by snipping objects off of the end of the ASN.1 stream | ||
90 | such that mandatory tags are removed - or even from the end of internal | ||
91 | SEQUENCEs. If any mandatory tag is missing, the error EBADMSG *should* be | ||
92 | produced. Without this patch ERANGE or ENOPKG might be produced or the parse | ||
93 | may apparently succeed, perhaps with ENOKEY or EKEYREJECTED being produced | ||
94 | later, depending on what gets snipped. | ||
95 | |||
96 | Just snipping off the final BIT_STRING or OCTET_STRING from either sample | ||
97 | should be a start since both are mandatory and neither will cause an EBADMSG | ||
98 | without the patches | ||
99 | |||
100 | CVE: CVE-2016-2053 | ||
101 | Upstream-Status: Backport [kernel.org linux-stable 3.16 branch] | ||
102 | |||
103 | Reported-by: Marcel Holtmann <marcel@holtmann.org> | ||
104 | Signed-off-by: David Howells <dhowells@redhat.com> | ||
105 | Tested-by: Marcel Holtmann <marcel@holtmann.org> | ||
106 | Reviewed-by: David Woodhouse <David.Woodhouse@intel.com> | ||
107 | Cc: Moritz Muehlenhoff <jmm@inutil.org> | ||
108 | [ luis: backported to 3.16: adjusted context ] | ||
109 | Signed-off-by: Luis Henriques <luis.henriques@canonical.com> | ||
110 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
111 | --- | ||
112 | lib/asn1_decoder.c | 5 ++--- | ||
113 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
114 | |||
115 | diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c | ||
116 | index 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 | -- | ||
132 | cgit 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 @@ | |||
1 | Fix the compile issue under gcc6 | ||
2 | |||
3 | Fix 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 | |||
7 | Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com> | ||
8 | |||
9 | Upstream-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 | |||
16 | diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile | ||
17 | index 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 | ||
29 | diff --git a/include/linux/compiler-gcc6.h b/include/linux/compiler-gcc6.h | ||
30 | new file mode 100644 | ||
31 | index 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 | -- | ||
102 | 2.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 @@ | |||
1 | From 8545129540a5862b22aad03badb2a9f93bf29117 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bob Cochran <yocto@mindchasers.com> | ||
3 | Date: Mon, 3 Nov 2014 22:45:35 -0500 | ||
4 | Subject: [meta-fsl-ppc][PATCH] linux-qoriq: Change defconfig for T1040 to | ||
5 | match number of CPUS | ||
6 | |||
7 | Having a number higher than necessary for NR_CPUS wastes memory by | ||
8 | instantiating unnecessary structures in RAM. An example is in the DPAA where | ||
9 | DPAA_ETH_TX_QUEUES is defined based on NR_CPUS and used to create | ||
10 | dozens of extra qman_fq structures. Using the prior value of 24, which was | ||
11 | left over from the T4240 created an additonal 60 frame queue structures alone. | ||
12 | |||
13 | This has been tested on t1040rdb-64b. . | ||
14 | |||
15 | Signed-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 | |||
20 | diff --git a/arch/powerpc/configs/corenet32_fmanv3l_smp_defconfig b/arch/powerpc/configs/corenet32_fmanv3l_smp_defconfig | ||
21 | index 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 | -- | ||
33 | 1.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 @@ | |||
1 | From 15895f6880829ee502f0a48412173fb452b23c0b Mon Sep 17 00:00:00 2001 | ||
2 | From: Ting Liu <ting.liu@nxp.com> | ||
3 | Date: Fri, 17 Jun 2016 10:57:35 +0800 | ||
4 | Subject: [PATCH] only set vmpic_msi_feature if CONFIG_EPAPR_PARAVIRT defined | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Ting Liu <ting.liu@nxp.com> | ||
9 | --- | ||
10 | arch/powerpc/sysdev/fsl_msi.c | 2 ++ | ||
11 | 1 file changed, 2 insertions(+) | ||
12 | |||
13 | diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c | ||
14 | index 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 | -- | ||
31 | 1.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 @@ | |||
1 | From f87f253bac3ce4a4eb2a60a1ae604d74e65f9042 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nicholas Piggin <npiggin@gmail.com> | ||
3 | Date: Thu, 24 Nov 2016 00:02:07 +1100 | ||
4 | Subject: [PATCH] powerpc/64e: Convert cmpi to cmpwi in head_64.S | ||
5 | |||
6 | From 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 | |||
17 | In this case, cmpwi is called for, so this is just a build fix for | ||
18 | new toolchains. | ||
19 | |||
20 | Cc: stable@vger.kernel.org # v3.0+ | ||
21 | Signed-off-by: Nicholas Piggin <npiggin@gmail.com> | ||
22 | Signed-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 | |||
27 | diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S | ||
28 | index 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 | -- | ||
56 | 2.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 @@ | |||
1 | From 4680c9d50637f78338e786c920aef6c171c7cc00 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alessio Igor Bogani <alessio.bogani@elettra.eu> | ||
3 | Date: Mon, 18 Apr 2016 08:36:19 +0200 | ||
4 | Subject: powerpc/fsl: Fix build of the dtb embedded kernel images | ||
5 | |||
6 | Commit dc37374b9c833 ("powerpc/fsl: Move Freescale device tree files | ||
7 | into fsl folder") moved a lot of device tree files into fsl directory, | ||
8 | fixing Makefile for cuImage target only. Unfortunately there are other | ||
9 | targets which require embedding a device tree into the kernel image | ||
10 | (e.g. dtbImage.%). So use a more generic approach. | ||
11 | |||
12 | Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> | ||
13 | [scottwood: cleaned up commit message] | ||
14 | Signed-off-by: Scott Wood <oss@buserror.net> | ||
15 | --- | ||
16 | arch/powerpc/boot/Makefile | 6 +++--- | ||
17 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile | ||
20 | index 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 | -- | ||
44 | cgit 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 @@ | |||
1 | From 5045ea37377ce8cca6890d32b127ad6770e6dce5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anton Blanchard <anton@samba.org> | ||
3 | Date: Sun, 25 Sep 2016 17:16:53 +1000 | ||
4 | Subject: [PATCH] powerpc/vdso64: Use double word compare on pointers | ||
5 | |||
6 | __kernel_get_syscall_map() and __kernel_clock_getres() use cmpli to | ||
7 | check if the passed in pointer is non zero. cmpli maps to a 32 bit | ||
8 | compare on binutils, so we ignore the top 32 bits. | ||
9 | |||
10 | A simple test case can be created by passing in a bogus pointer with | ||
11 | the bottom 32 bits clear. Using a clk_id that is handled by the VDSO, | ||
12 | then 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 | |||
17 | And we get: | ||
18 | |||
19 | 0 | ||
20 | -1 | ||
21 | |||
22 | The bigger issue is if we pass a valid pointer with the bottom 32 bits | ||
23 | clear, in this case we will return success but won't write any data | ||
24 | to the pointer. | ||
25 | |||
26 | I stumbled across this issue because the LLVM integrated assembler | ||
27 | doesn't accept cmpli with 3 arguments. Fix this by converting them to | ||
28 | cmpldi. | ||
29 | |||
30 | Fixes: a7f290dad32e ("[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel") | ||
31 | Cc: stable@vger.kernel.org # v2.6.15+ | ||
32 | Signed-off-by: Anton Blanchard <anton@samba.org> | ||
33 | Signed-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 | |||
39 | diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S | ||
40 | index 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 | ||
52 | diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S | ||
53 | index 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 | -- | ||
66 | 2.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" | |||
7 | LICENSE = "GPLv2" | 7 | LICENSE = "GPLv2" |
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
9 | 9 | ||
10 | SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;nobranch=1 \ | 10 | SRC_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 | " |
21 | SRCREV = "1ae843c08261402b2c35d83422e4fa1e313611f4" | 12 | SRCREV = "ec61f521be6a22b100aabc0e2726c670aec3c845" |
22 | 13 | ||
23 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |
24 | 15 | ||