core/linux-oak to 3.18.0-4

This commit is contained in:
Kevin Mihelich 2016-12-21 02:20:21 +00:00
parent 8848cbc7ec
commit e95f36a6fd
12 changed files with 37 additions and 133 deletions

View file

@ -1,8 +1,7 @@
From 0a848d6d2b6985c20911d9328e7fad09a6b88668 Mon Sep 17 00:00:00 2001
From 23133db85174d33389eae98c13e2f65c9ef05215 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 10 May 2016 23:30:01 +0200
Subject: [PATCH 01/10] kbuild: move -Wunused-const-variable to W=1 warning
level
Subject: [PATCH 1/9] kbuild: move -Wunused-const-variable to W=1 warning level
gcc-6 started warning by default about variables that are not
used anywhere and that are marked 'const', generating many

View file

@ -1,7 +1,7 @@
From 6b11431f4bbb6fbc475959734b809b3805568eb1 Mon Sep 17 00:00:00 2001
From 8acfd757d3588f137cf17812065f44ac37092af8 Mon Sep 17 00:00:00 2001
From: Firo Yang <firogm@gmail.com>
Date: Thu, 11 Jun 2015 09:41:10 +0800
Subject: [PATCH 02/10] md: fix a build warning
Subject: [PATCH 2/9] md: fix a build warning
Warning like this:

View file

@ -1,7 +1,7 @@
From 4a1b921c63087b9822ede699690035bdd67d27a3 Mon Sep 17 00:00:00 2001
From a136038ea86b72511873cbeff7bbdd9593d86d17 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 14 Mar 2016 15:18:36 +0100
Subject: [PATCH 03/10] ath9k: fix buffer overrun for ar9287
Subject: [PATCH 3/9] ath9k: fix buffer overrun for ar9287
Code that was added back in 2.6.38 has an obvious overflow
when accessing a static array, and at the time it was added

View file

@ -1,8 +1,7 @@
From 0d0312ba7971d1489acba061eb08c180468e4c08 Mon Sep 17 00:00:00 2001
From 105567d05a8f1f25a9241e9e464fd3ff9c811642 Mon Sep 17 00:00:00 2001
From: David Miller <davem@davemloft.net>
Date: Tue, 7 Apr 2015 23:05:42 -0400
Subject: [PATCH 04/10] netfilter: Fix switch statement warnings with recent
gcc.
Subject: [PATCH 4/9] netfilter: Fix switch statement warnings with recent gcc.
More recent GCC warns about two kinds of switch statement uses:

View file

@ -1,8 +1,8 @@
From f9c2562565b02c6abea430003b3d338f4bda954e Mon Sep 17 00:00:00 2001
From 0d93c60e0137b227cf26c139b9560243baab07ec Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen.5i5j@gmail.com>
Date: Wed, 24 Dec 2014 23:04:54 +0800
Subject: [PATCH 05/10] netfilter: nfnetlink_cthelper: Remove 'const' and '&'
to avoid warnings
Subject: [PATCH 5/9] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to
avoid warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

View file

@ -1,7 +1,7 @@
From c31761d2a734b0e954a0e0cfb4405f2c9b39129f Mon Sep 17 00:00:00 2001
From 46c3c433ed22addff1b8dc3a820381d0a166f668 Mon Sep 17 00:00:00 2001
From: "David S. Miller" <davem@davemloft.net>
Date: Mon, 27 Apr 2015 13:20:34 -0400
Subject: [PATCH 06/10] netfilter; Add some missing default cases to switch
Subject: [PATCH 6/9] netfilter; Add some missing default cases to switch
statements in nft_reject.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8

View file

@ -1,7 +1,7 @@
From 615070e7e686b5b87ec2d121528049056fda0dba Mon Sep 17 00:00:00 2001
From cb4a97a3f63b9d08d8cc87d843123ca16da98be0 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 29 Oct 2016 12:04:40 -0600
Subject: [PATCH 07/10] usbtv: remove unused variable
Subject: [PATCH 7/9] usbtv: remove unused variable
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
---

View file

@ -1,7 +1,7 @@
From 9c89cd2d47daeb945a2d7ca844d317b8a640de59 Mon Sep 17 00:00:00 2001
From 4cd89a74933fab10ac1f72601b05ce45dce6356f Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Thu, 26 May 2016 06:29:07 -0600
Subject: [PATCH 08/10] add extra errata 843419 build flags
Subject: [PATCH 8/9] add extra errata 843419 build flags
---
arch/arm64/Makefile | 1 +

View file

@ -1,7 +1,7 @@
From d5962d619b422fe4b511ad2779a5ccf152052ace Mon Sep 17 00:00:00 2001
From dc5f66d51c1959806cddf9d05093fb75273f887a Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 5 Nov 2016 15:28:36 -0600
Subject: [PATCH 09/10] Downgrade mmc1 speed
Subject: [PATCH 9/9] Downgrade mmc1 speed
200MHz causes errors reading the card and filesystem corruption.

View file

@ -1,92 +0,0 @@
From 0e15824efa64015c4dfd5bc6f6b3263c17df892b Mon Sep 17 00:00:00 2001
From: Philip Pettersson <philip.pettersson@gmail.com>
Date: Wed, 30 Nov 2016 14:55:36 -0800
Subject: [PATCH 10/10] packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to a use-after-free on a function pointer in the
struct timer_list when the socket is closed as the previously
initialized timer will not be deleted.
The bug is fixed by taking lock_sock(sk) in packet_setsockopt when
changing the packet version while also taking the lock at the start
of packet_set_ring.
Fixes: f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation.")
Signed-off-by: Philip Pettersson <philip.pettersson@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/packet/af_packet.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 463daaf..a84a444 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3273,19 +3273,25 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
if (optlen != sizeof(val))
return -EINVAL;
- if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
- return -EBUSY;
if (copy_from_user(&val, optval, sizeof(val)))
return -EFAULT;
switch (val) {
case TPACKET_V1:
case TPACKET_V2:
case TPACKET_V3:
- po->tp_version = val;
- return 0;
+ break;
default:
return -EINVAL;
}
+ lock_sock(sk);
+ if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
+ ret = -EBUSY;
+ } else {
+ po->tp_version = val;
+ ret = 0;
+ }
+ release_sock(sk);
+ return ret;
}
case PACKET_RESERVE:
{
@@ -3748,6 +3754,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
/* Added to avoid minimal code churn */
struct tpacket_req *req = &req_u->req;
+ lock_sock(sk);
/* Opening a Tx-ring is NOT supported in TPACKET_V3 */
if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
WARN(1, "Tx-ring is not supported.\n");
@@ -3829,7 +3836,6 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
goto out;
}
- lock_sock(sk);
/* Detach socket from network */
spin_lock(&po->bind_lock);
@@ -3878,11 +3884,11 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
if (!tx_ring)
prb_shutdown_retire_blk_timer(po, tx_ring, rb_queue);
}
- release_sock(sk);
if (pg_vec)
free_pg_vec(pg_vec, order, req->tp_block_nr);
out:
+ release_sock(sk);
return err;
}
--
2.10.2

View file

@ -7,8 +7,8 @@ pkgbase=linux-oak
_kernelname=${pkgbase#linux}
_desc="Oak Chromebooks"
pkgver=3.18.0
pkgrel=3
_commit=0c37f85cfae2614d52043bc81e18ec8b0d90f2ac
pkgrel=4
_commit=320656588dd8db8eb9de891aa27631bcdf64b3b8
arch=('aarch64')
url="https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.18"
license=('GPL2')
@ -24,24 +24,22 @@ source=("https://chromium.googlesource.com/chromiumos/third_party/kernel/+archiv
'0007-usbtv-remove-unused-variable.patch'
'0008-add-extra-errata-843419-build-flags.patch'
'0009-Downgrade-mmc1-speed.patch'
'0010-packet-fix-race-condition-in-packet_set_ring.patch'
'config'
'kernel.its'
'kernel.keyblock'
'kernel_data_key.vbprivk'
'cmdline')
md5sums=('060d2548f591ebc92eb48280dbb96b69'
'3bcbd8becb5622468a75c7f2348d8938'
'8d35566f341fcd923b3d7e4ef92780de'
'c84aa3ed9adf76f38e6ebd0b1f2b1496'
'f348a307ddaefc27b5e968036d72ab67'
'c3e27a7320de37385f5a37b0a7954688'
'7a01e84202e480e212bbf834ecb81571'
'2d3b5be0987a8bc75cbdd3693de6c179'
'6b5247e9a9d140340c6c75915e421564'
'5d571665968468755fa16e6f576a0740'
'b87b734d28cd1b0b509d6ef11d030887'
'8b704f6a698b019c48c7483a297f9bda'
md5sums=('7cd05873a3784f25af47155cb3f1d936'
'651be13e7d7f49db4bfe0ef5f21ffee3'
'843053a21da143004ae06ce7ef8f85e1'
'e4fd093922d688d35a0c6f1a045b75f5'
'234d57c4e23e091600dceb8831a42c62'
'f32a108e5bb0f8a1a0e8089cc7e6d445'
'3b08c86ebec9efcc6ed761a7aa3fb61a'
'92b754e3b482dfed1d3224d033cb2e6d'
'6426e55bd8d4a416bd3e937aef4ea4f4'
'cb5d65e711aa4410f5ab7646632b8a21'
'1122992a2e14b7a97673fa0cc172647e'
'aef13cb59516e9313cb8947350f717d6'
'61c5ff73c136ed07a7aadbf58db3d96a'
'584777ae88bce2c5659960151b64c7d8'
@ -57,7 +55,6 @@ prepare() {
git apply 0007-usbtv-remove-unused-variable.patch
git apply 0008-add-extra-errata-843419-build-flags.patch
git apply 0009-Downgrade-mmc1-speed.patch
git apply 0010-packet-fix-race-condition-in-packet_set_ring.patch
cp config .config

View file

@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 3.18.0-3 Kernel Configuration
# Linux/arm64 3.18.0-4 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
@ -291,9 +291,9 @@ CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_CFQ_GROUP_IOSCHED=y
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
# CONFIG_DEFAULT_CFQ is not set
CONFIG_DEFAULT_NOOP=y
CONFIG_DEFAULT_IOSCHED="noop"
CONFIG_PADATA=y
CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
@ -2812,6 +2812,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_MEDIATEK_VPU=y
CONFIG_VIDEO_MEDIATEK_MDP=y
CONFIG_VIDEO_MEDIATEK_VCODEC=y
CONFIG_VIDEO_MEDIATEK_JPEG=y
# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set
# CONFIG_VIDEO_SH_VEU is not set
CONFIG_V4L_TEST_DRIVERS=y