summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2015-10-06 23:13:52 +0100
committerBen Hutchings <ben@decadent.org.uk>2015-10-06 23:13:52 +0100
commit48bbfe3b4fa2a92fc3d65ed2e80702b01a38997a (patch)
tree25a0f0a839d54acc2e2ab685ebea60e33462fb79 /debian/patches
parent74a655e99ee11fd1a71f698b77c505c32632abb6 (diff)
Update to 4.3-rc4
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/bugfix/all/Initialize-msg-shm-IPC-objects-before-doing-ipc_addi.patch117
-rw-r--r--debian/patches/bugfix/mips/bpf-avoid-unreachable-code-on-little-endian.patch49
-rw-r--r--debian/patches/bugfix/mips/bpf-fix-build-on-pre-r2-little-endian-cpus.patch117
-rw-r--r--debian/patches/series3
4 files changed, 0 insertions, 286 deletions
diff --git a/debian/patches/bugfix/all/Initialize-msg-shm-IPC-objects-before-doing-ipc_addi.patch b/debian/patches/bugfix/all/Initialize-msg-shm-IPC-objects-before-doing-ipc_addi.patch
deleted file mode 100644
index b4964de99..000000000
--- a/debian/patches/bugfix/all/Initialize-msg-shm-IPC-objects-before-doing-ipc_addi.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From: Linus Torvalds <torvalds@linux-foundation.org>
-Date: Wed, 30 Sep 2015 12:48:40 -0400
-Subject: Initialize msg/shm IPC objects before doing ipc_addid()
-Origin: https://git.kernel.org/linus/b9a532277938798b53178d5a66af6e2915cb27cf
-
-As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
-having initialized the IPC object state. Yes, we initialize the IPC
-object in a locked state, but with all the lockless RCU lookup work,
-that IPC object lock no longer means that the state cannot be seen.
-
-We already did this for the IPC semaphore code (see commit e8577d1f0329:
-"ipc/sem.c: fully initialize sem_array before making it visible") but we
-clearly forgot about msg and shm.
-
-Reported-by: Dmitry Vyukov <dvyukov@google.com>
-Cc: Manfred Spraul <manfred@colorfullife.com>
-Cc: Davidlohr Bueso <dbueso@suse.de>
-Cc: stable@vger.kernel.org
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
----
- ipc/msg.c | 14 +++++++-------
- ipc/shm.c | 13 +++++++------
- ipc/util.c | 8 ++++----
- 3 files changed, 18 insertions(+), 17 deletions(-)
-
-diff --git a/ipc/msg.c b/ipc/msg.c
-index 66c4f56..1471db9 100644
---- a/ipc/msg.c
-+++ b/ipc/msg.c
-@@ -137,13 +137,6 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)
- return retval;
- }
-
-- /* ipc_addid() locks msq upon success. */
-- id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni);
-- if (id < 0) {
-- ipc_rcu_putref(msq, msg_rcu_free);
-- return id;
-- }
--
- msq->q_stime = msq->q_rtime = 0;
- msq->q_ctime = get_seconds();
- msq->q_cbytes = msq->q_qnum = 0;
-@@ -153,6 +146,13 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)
- INIT_LIST_HEAD(&msq->q_receivers);
- INIT_LIST_HEAD(&msq->q_senders);
-
-+ /* ipc_addid() locks msq upon success. */
-+ id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni);
-+ if (id < 0) {
-+ ipc_rcu_putref(msq, msg_rcu_free);
-+ return id;
-+ }
-+
- ipc_unlock_object(&msq->q_perm);
- rcu_read_unlock();
-
-diff --git a/ipc/shm.c b/ipc/shm.c
-index 222131e..4178727 100644
---- a/ipc/shm.c
-+++ b/ipc/shm.c
-@@ -551,12 +551,6 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
- if (IS_ERR(file))
- goto no_file;
-
-- id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
-- if (id < 0) {
-- error = id;
-- goto no_id;
-- }
--
- shp->shm_cprid = task_tgid_vnr(current);
- shp->shm_lprid = 0;
- shp->shm_atim = shp->shm_dtim = 0;
-@@ -565,6 +559,13 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
- shp->shm_nattch = 0;
- shp->shm_file = file;
- shp->shm_creator = current;
-+
-+ id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
-+ if (id < 0) {
-+ error = id;
-+ goto no_id;
-+ }
-+
- list_add(&shp->shm_clist, &current->sysvshm.shm_clist);
-
- /*
-diff --git a/ipc/util.c b/ipc/util.c
-index be42300..0f401d9 100644
---- a/ipc/util.c
-+++ b/ipc/util.c
-@@ -237,6 +237,10 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
- rcu_read_lock();
- spin_lock(&new->lock);
-
-+ current_euid_egid(&euid, &egid);
-+ new->cuid = new->uid = euid;
-+ new->gid = new->cgid = egid;
-+
- id = idr_alloc(&ids->ipcs_idr, new,
- (next_id < 0) ? 0 : ipcid_to_idx(next_id), 0,
- GFP_NOWAIT);
-@@ -249,10 +253,6 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
-
- ids->in_use++;
-
-- current_euid_egid(&euid, &egid);
-- new->cuid = new->uid = euid;
-- new->gid = new->cgid = egid;
--
- if (next_id < 0) {
- new->seq = ids->seq++;
- if (ids->seq > IPCID_SEQ_MAX)
---
-2.6.0
-
diff --git a/debian/patches/bugfix/mips/bpf-avoid-unreachable-code-on-little-endian.patch b/debian/patches/bugfix/mips/bpf-avoid-unreachable-code-on-little-endian.patch
deleted file mode 100644
index cb57993a4..000000000
--- a/debian/patches/bugfix/mips/bpf-avoid-unreachable-code-on-little-endian.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From: Aurelien Jarno <aurelien@aurel32.net>
-Date: Fri, 4 Sep 2015 16:32:17 +0200
-Subject: [1/2] MIPS: BPF: Avoid unreachable code on little endian
-Origin: https://git.kernel.org/linus/faa9724a674e5e52316bb0d173aed16bd17d536c
-
-On little endian, avoid generating the big endian version of the code
-by using #else in addition to #ifdef #endif. Also fix one alignment
-issue wrt delay slot.
-
-Cc: Ralf Baechle <ralf@linux-mips.org>
-Cc: Markos Chandras <markos.chandras@imgtec.com>
-Cc: stable@vger.kernel.org # v4.2+
-Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
----
- arch/mips/net/bpf_jit_asm.S | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/arch/mips/net/bpf_jit_asm.S b/arch/mips/net/bpf_jit_asm.S
-index e927260..4f54cb1 100644
---- a/arch/mips/net/bpf_jit_asm.S
-+++ b/arch/mips/net/bpf_jit_asm.S
-@@ -151,9 +151,10 @@ NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp)
- wsbh t0, $r_s0
- jr $r_ra
- rotr $r_A, t0, 16
--#endif
-+#else
- jr $r_ra
-- move $r_A, $r_s0
-+ move $r_A, $r_s0
-+#endif
-
- END(bpf_slow_path_word)
-
-@@ -162,9 +163,10 @@ NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp)
- #ifdef CONFIG_CPU_LITTLE_ENDIAN
- jr $r_ra
- wsbh $r_A, $r_s0
--#endif
-+#else
- jr $r_ra
- move $r_A, $r_s0
-+#endif
-
- END(bpf_slow_path_half)
-
---
-2.1.4
-
diff --git a/debian/patches/bugfix/mips/bpf-fix-build-on-pre-r2-little-endian-cpus.patch b/debian/patches/bugfix/mips/bpf-fix-build-on-pre-r2-little-endian-cpus.patch
deleted file mode 100644
index 548136e14..000000000
--- a/debian/patches/bugfix/mips/bpf-fix-build-on-pre-r2-little-endian-cpus.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From: Aurelien Jarno <aurelien@aurel32.net>
-Date: Sat, 5 Sep 2015 17:02:59 +0200
-Subject: [2/2] MIPS: BPF: Fix build on pre-R2 little endian CPUs
-Origin: https://git.kernel.org/linus/b259e51f2e29390518021f9b8df55a3de42f371b
-
-The rotr, seh and wsbh instructions have been introduced with the R2
-ISA. Thus the current BPF code fails to build on pre-R2 little endian
-CPUs:
-
- CC arch/mips/net/bpf_jit.o
- AS arch/mips/net/bpf_jit_asm.o
- /home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S: Assembler messages:
- /home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:67: Error: opcode not supported on this processor: mips32 (mips32) `wsbh $8,$19'
- /home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:68: Error: opcode not supported on this processor: mips32 (mips32) `rotr $19,$8,16'
- /home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:83: Error: opcode not supported on this processor: mips32 (mips32) `wsbh $8,$19'
- /home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:84: Error: opcode not supported on this processor: mips32 (mips32) `seh $19,$8'
- /home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:151: Error: opcode not supported on this processor: mips32 (mips32) `wsbh $8,$12'
- /home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:153: Error: opcode not supported on this processor: mips32 (mips32) `rotr $19,$8,16'
- /home/aurel32/linux-4.2/arch/mips/net/bpf_jit_asm.S:164: Error: opcode not supported on this processor: mips32 (mips32) `wsbh $19,$12'
- /home/aurel32/linux-4.2/scripts/Makefile.build:294: recipe for target 'arch/mips/net/bpf_jit_asm.o' failed
-
-Fix that by providing equivalent code for these CPUs.
-
-Cc: Ralf Baechle <ralf@linux-mips.org>
-Cc: Markos Chandras <markos.chandras@imgtec.com>
-Cc: stable@vger.kernel.org # v4.2+
-Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
----
- arch/mips/net/bpf_jit_asm.S | 42 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 42 insertions(+)
-
-diff --git a/arch/mips/net/bpf_jit_asm.S b/arch/mips/net/bpf_jit_asm.S
-index 4f54cb1..dabf417 100644
---- a/arch/mips/net/bpf_jit_asm.S
-+++ b/arch/mips/net/bpf_jit_asm.S
-@@ -64,8 +64,20 @@ sk_load_word_positive:
- PTR_ADDU t1, $r_skb_data, offset
- lw $r_A, 0(t1)
- #ifdef CONFIG_CPU_LITTLE_ENDIAN
-+# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
- wsbh t0, $r_A
- rotr $r_A, t0, 16
-+# else
-+ sll t0, $r_A, 24
-+ srl t1, $r_A, 24
-+ srl t2, $r_A, 8
-+ or t0, t0, t1
-+ andi t2, t2, 0xff00
-+ andi t1, $r_A, 0xff00
-+ or t0, t0, t2
-+ sll t1, t1, 8
-+ or $r_A, t0, t1
-+# endif
- #endif
- jr $r_ra
- move $r_ret, zero
-@@ -80,8 +92,16 @@ sk_load_half_positive:
- PTR_ADDU t1, $r_skb_data, offset
- lh $r_A, 0(t1)
- #ifdef CONFIG_CPU_LITTLE_ENDIAN
-+# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
- wsbh t0, $r_A
- seh $r_A, t0
-+# else
-+ sll t0, $r_A, 24
-+ andi t1, $r_A, 0xff00
-+ sra t0, t0, 16
-+ srl t1, t1, 8
-+ or $r_A, t0, t1
-+# endif
- #endif
- jr $r_ra
- move $r_ret, zero
-@@ -148,9 +168,22 @@ sk_load_byte_positive:
- NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp)
- bpf_slow_path_common(4)
- #ifdef CONFIG_CPU_LITTLE_ENDIAN
-+# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
- wsbh t0, $r_s0
- jr $r_ra
- rotr $r_A, t0, 16
-+# else
-+ sll t0, $r_s0, 24
-+ srl t1, $r_s0, 24
-+ srl t2, $r_s0, 8
-+ or t0, t0, t1
-+ andi t2, t2, 0xff00
-+ andi t1, $r_s0, 0xff00
-+ or t0, t0, t2
-+ sll t1, t1, 8
-+ jr $r_ra
-+ or $r_A, t0, t1
-+# endif
- #else
- jr $r_ra
- move $r_A, $r_s0
-@@ -161,8 +194,17 @@ NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp)
- NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp)
- bpf_slow_path_common(2)
- #ifdef CONFIG_CPU_LITTLE_ENDIAN
-+# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
- jr $r_ra
- wsbh $r_A, $r_s0
-+# else
-+ sll t0, $r_s0, 8
-+ andi t1, $r_s0, 0xff00
-+ andi t0, t0, 0xff00
-+ srl t1, t1, 8
-+ jr $r_ra
-+ or $r_A, t0, t1
-+# endif
- #else
- jr $r_ra
- move $r_A, $r_s0
---
-2.1.4
-
diff --git a/debian/patches/series b/debian/patches/series
index a98812733..dbbf9cbdd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -46,8 +46,6 @@ debian/qxl-disable-modeset-by-default.patch
# Arch bug fixes
bugfix/mips/disable-advansys.patch
-bugfix/mips/bpf-avoid-unreachable-code-on-little-endian.patch
-bugfix/mips/bpf-fix-build-on-pre-r2-little-endian-cpus.patch
bugfix/arm64/arm64-add-missing-dts-entry-for-X-Gene-platform.patch
bugfix/arm64/arm64-removed-using-of-the-mask-attribute-in-the-dts.patch
@@ -85,5 +83,4 @@ bugfix/all/media-uvcvideo-disable-hardware-timestamps-by-defaul.patch
bugfix/arm/arm-dts-fix-makefile-target-for-sun4i-a10-itead-itea.patch
bugfix/mips/mips-io-define-ioremap_uc.patch
bugfix/all/ovl-conditionally-use-o_largefile-in-ovl_copy_up.patch
-bugfix/all/Initialize-msg-shm-IPC-objects-before-doing-ipc_addi.patch
bugfix/x86/crypto-x86-camellia_aesni_avx-fix-cpu-feature-checks.patch