core/linux-raspberrypi-latest to 3.9.2

This commit is contained in:
moonman 2013-05-14 02:57:13 -06:00
parent 40ee35d609
commit a0cd20e9b9
6 changed files with 7 additions and 6076 deletions

View file

@ -1,62 +0,0 @@
From 599be431332e31a25ebe203155fa18d34781c3d3 Mon Sep 17 00:00:00 2001
From: Arianna Avanzini <avanzini.arianna@gmail.com>
Date: Tue, 5 Mar 2013 10:41:49 +0100
Subject: [PATCH] block, bfq: attempt to fix use-after-free which affects SLUB
behavior (3.3.0 to 3.8.0)
It may happen that a call to bfq_del_bfqq_busy() puts the last
reference taken on a queue and frees it. Subsequent accesses to that
same queue would result in a use-after-free. Make sure that a queue
that has just been deleted from busy is no more touched.
---
block/bfq-iosched.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 9378b7d..e9a6514 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -1244,14 +1244,23 @@ static void __bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq)
__bfq_bfqd_reset_active(bfqd);
+ /*
+ * If this bfqq is shared between multiple processes, check
+ * to make sure that those processes are still issuing I/Os
+ * within the mean seek distance. If not, it may be time to
+ * break the queues apart again.
+ */
+ if (bfq_bfqq_coop(bfqq) && BFQQ_SEEKY(bfqq))
+ bfq_mark_bfqq_split_coop(bfqq);
+
if (RB_EMPTY_ROOT(&bfqq->sort_list)) {
- bfq_del_bfqq_busy(bfqd, bfqq, 1);
/*
* overloading budget_timeout field to store when
* the queue remains with no backlog, used by
* the weight-raising mechanism
*/
bfqq->budget_timeout = jiffies ;
+ bfq_del_bfqq_busy(bfqd, bfqq, 1);
} else {
bfq_activate_bfqq(bfqd, bfqq);
/*
@@ -1259,15 +1268,6 @@ static void __bfq_bfqq_expire(struct bfq_data *bfqd, struct bfq_queue *bfqq)
*/
bfq_rq_pos_tree_add(bfqd, bfqq);
}
-
- /*
- * If this bfqq is shared between multiple processes, check
- * to make sure that those processes are still issuing I/Os
- * within the mean seek distance. If not, it may be time to
- * break the queues apart again.
- */
- if (bfq_bfqq_coop(bfqq) && BFQQ_SEEKY(bfqq))
- bfq_mark_bfqq_split_coop(bfqq);
}
/**
--
1.8.1.4

View file

@ -1,55 +0,0 @@
From cb439ee574d4496ca0d14566e7c4bbf4fe20cbf4 Mon Sep 17 00:00:00 2001
From: Arianna Avanzini <avanzini.arianna@gmail.com>
Date: Fri, 3 May 2013 20:45:49 +0200
Subject: [PATCH] block, bfq: use the uninitialized_var() macro when needed
It may happen that a variable is initialized in a function that is
called by the function that defined it. Use the uninitialized_var()
macro in these cases.
---
block/bfq-iosched.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index c9d57b0..b94aa24 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -3023,7 +3023,7 @@ static ssize_t \
__FUNC(struct elevator_queue *e, const char *page, size_t count) \
{ \
struct bfq_data *bfqd = e->elevator_data; \
- unsigned long __data; \
+ unsigned long uninitialized_var(__data); \
int ret = bfq_var_store(&__data, (page), count); \
if (__data < (MIN)) \
__data = (MIN); \
@@ -3083,7 +3083,7 @@ static ssize_t bfq_max_budget_store(struct elevator_queue *e,
const char *page, size_t count)
{
struct bfq_data *bfqd = e->elevator_data;
- unsigned long __data;
+ unsigned long uninitialized_var(__data);
int ret = bfq_var_store(&__data, (page), count);
if (__data == 0)
@@ -3103,7 +3103,7 @@ static ssize_t bfq_timeout_sync_store(struct elevator_queue *e,
const char *page, size_t count)
{
struct bfq_data *bfqd = e->elevator_data;
- unsigned long __data;
+ unsigned long uninitialized_var(__data);
int ret = bfq_var_store(&__data, (page), count);
if (__data < 1)
@@ -3122,7 +3122,7 @@ static ssize_t bfq_low_latency_store(struct elevator_queue *e,
const char *page, size_t count)
{
struct bfq_data *bfqd = e->elevator_data;
- unsigned long __data;
+ unsigned long uninitialized_var(__data);
int ret = bfq_var_store(&__data, (page), count);
if (__data > 1)
--
1.8.1.4

View file

@ -1,93 +0,0 @@
From bfbdf60074337d435f84bb3947c7ed4738405945 Mon Sep 17 00:00:00 2001
From: ponce <matteo.bernardini@gmail.com>
Date: Sat, 4 May 2013 08:44:53 +0200
Subject: [PATCH 1/2] block: cgroups, kconfig, build bits for BFQ-v6-3.9
Update Kconfig.iosched and do the related Makefile changes to include
kernel configuration options for BFQ. Also add the bfqio controller
to the cgroups subsystem.
---
block/Kconfig.iosched | 25 +++++++++++++++++++++++++
block/Makefile | 1 +
include/linux/cgroup_subsys.h | 6 ++++++
3 files changed, 32 insertions(+)
diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched
index 421bef9..695e064 100644
--- a/block/Kconfig.iosched
+++ b/block/Kconfig.iosched
@@ -39,6 +39,27 @@ config CFQ_GROUP_IOSCHED
---help---
Enable group IO scheduling in CFQ.
+config IOSCHED_BFQ
+ tristate "BFQ I/O scheduler"
+ default n
+ ---help---
+ The BFQ I/O scheduler tries to distribute bandwidth among
+ all processes according to their weights.
+ It aims at distributing the bandwidth as desired, independently of
+ the disk parameters and with any workload. It also tries to
+ guarantee low latency to interactive and soft real-time
+ applications. If compiled built-in (saying Y here), BFQ can
+ be configured to support hierarchical scheduling.
+
+config CGROUP_BFQIO
+ bool "BFQ hierarchical scheduling support"
+ depends on CGROUPS && IOSCHED_BFQ=y
+ default n
+ ---help---
+ Enable hierarchical scheduling in BFQ, using the cgroups
+ filesystem interface. The name of the subsystem will be
+ bfqio.
+
choice
prompt "Default I/O scheduler"
default DEFAULT_CFQ
@@ -52,6 +73,9 @@ choice
config DEFAULT_CFQ
bool "CFQ" if IOSCHED_CFQ=y
+ config DEFAULT_BFQ
+ bool "BFQ" if IOSCHED_BFQ=y
+
config DEFAULT_NOOP
bool "No-op"
@@ -61,6 +85,7 @@ config DEFAULT_IOSCHED
string
default "deadline" if DEFAULT_DEADLINE
default "cfq" if DEFAULT_CFQ
+ default "bfq" if DEFAULT_BFQ
default "noop" if DEFAULT_NOOP
endmenu
diff --git a/block/Makefile b/block/Makefile
index 39b76ba..c0d20fa 100644
--- a/block/Makefile
+++ b/block/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_BLK_DEV_THROTTLING) += blk-throttle.o
obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o
obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o
+obj-$(CONFIG_IOSCHED_BFQ) += bfq-iosched.o
obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o
obj-$(CONFIG_BLK_DEV_INTEGRITY) += blk-integrity.o
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h
index f204a7a..b999bfa 100644
--- a/include/linux/cgroup_subsys.h
+++ b/include/linux/cgroup_subsys.h
@@ -78,3 +78,9 @@ SUBSYS(hugetlb)
#endif
/* */
+
+#ifdef CONFIG_CGROUP_BFQIO
+SUBSYS(bfqio)
+#endif
+
+/* */
--
1.8.2

View file

@ -8,9 +8,9 @@ pkgname=('linux-raspberrypi-latest' 'linux-headers-raspberrypi-latest')
# pkgname=linux-custom # Build kernel with a different name
_kernelname=${pkgname#linux}
_basekernel=3.9
pkgver=${_basekernel}.1
pkgver=${_basekernel}.2
pkgrel=1
bfqver=v6
bfqver=v6r1
arch=('arm armv6h')
url="http://www.kernel.org/"
license=('GPL2')
@ -23,9 +23,7 @@ source=('config'
'boot-uncompressed.txt'
'imagetool-uncompressed.py'
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/$(echo $_basekernel |cut -c 1-3).0-${bfqver}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-$(echo $_basekernel | cut -c 1-3).patch"
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/$(echo $_basekernel |cut -c 1-3).0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-$(echo $_basekernel |cut -c 1-3).patch"
"http://dl.dropbox.com/u/15043728/ArchLinuxArm/kernels/0001-block-bfq-attempt-to-fix-use-after-free-which-3.3.0-to-3.8.0.patch"
'0001-block-bfq-use-the-uninitialized_var-macro-when-neede.patch')
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/$(echo $_basekernel |cut -c 1-3).0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-$(echo $_basekernel |cut -c 1-3).patch")
md5sums=('ab8ba3443399f12cb76bac844f87af9b'
'9d3c56a4b999c8bfbd4018089a62f662'
@ -33,10 +31,8 @@ md5sums=('ab8ba3443399f12cb76bac844f87af9b'
'9335d1263fd426215db69841a380ea26'
'a00e424e2fbb8c5a5f77ba2c4871bed4'
'2f82dbe5752af65ff409d737caf11954'
'eca0d65e1fa790c334ad93f40adf545e'
'ba6027b85b363ddb5a736e6d63503657'
'5c76a198d2242acd66fc4a0a3f955461'
'984207865dd160368d16f30004522468')
'62dff7101a1381d33faf2e1f101ba684'
'2c719719165dccf5fc52705e59797d26')
build() {
git clone --branch=rpi-3.9.y --depth=1 https://github.com/raspberrypi/linux.git
@ -54,8 +50,6 @@ msg "Patches:"
msg2 "Add BFQ patches"
patch -Np1 -i "${srcdir}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-$(echo $_basekernel | cut -c 1-3).patch"
patch -Np1 -i "${srcdir}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-$(echo $_basekernel |cut -c 1-3).patch"
patch -Np1 -i "${srcdir}/0001-block-bfq-attempt-to-fix-use-after-free-which-3.3.0-to-3.8.0.patch"
patch -Np1 -i "${srcdir}/0001-block-bfq-use-the-uninitialized_var-macro-when-neede.patch"
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git

View file

@ -1,8 +1,8 @@
# arg 1: the new package version
# arg 2: the old package version
KERNEL_NAME=-raspberrypi
KERNEL_VERSION=3.9.0-1-ARCH+
KERNEL_NAME=-raspberrypi-latest
KERNEL_VERSION=3.9.2-1-ARCH+
post_install () {
# updating module dependencies