diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-23 13:42:55 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-24 18:49:44 +0100 |
commit | 67dcc43f3a22dc3a7ac07a7065971b426feeb043 (patch) | |
tree | 0b647356dce45d2c79fd46cf201daa5089cc0934 /target/linux/brcm2708/patches-4.19/950-0789-Limit-max_req_size-under-arm64-or-any-other-platform.patch | |
parent | 47a93a810f78adce5a130d287f82b28e9b54313c (diff) | |
download | upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.gz upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.bz2 upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.zip |
brcm2708: organize kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0789-Limit-max_req_size-under-arm64-or-any-other-platform.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0789-Limit-max_req_size-under-arm64-or-any-other-platform.patch | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0789-Limit-max_req_size-under-arm64-or-any-other-platform.patch b/target/linux/brcm2708/patches-4.19/950-0789-Limit-max_req_size-under-arm64-or-any-other-platform.patch deleted file mode 100644 index 9bb869fe8a..0000000000 --- a/target/linux/brcm2708/patches-4.19/950-0789-Limit-max_req_size-under-arm64-or-any-other-platform.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7bfcb31431f06efc233e4cc4d7ab65e10a6522cd Mon Sep 17 00:00:00 2001 -From: Yaroslav Rosomakho <yaroslavros@gmail.com> -Date: Fri, 23 Aug 2019 11:02:22 +0200 -Subject: [PATCH 789/806] Limit max_req_size under arm64 (or any other platform - that uses swiotlb) to prevent potential buffer overflow due to bouncing. - -Signed-off-by: Yaroslav Rosomakho <yaroslavros@gmail.com> ---- - drivers/mmc/host/bcm2835-mmc.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/drivers/mmc/host/bcm2835-mmc.c -+++ b/drivers/mmc/host/bcm2835-mmc.c -@@ -38,6 +38,7 @@ - #include <linux/dmaengine.h> - #include <linux/dma-mapping.h> - #include <linux/of_dma.h> -+#include <linux/swiotlb.h> - - #include "sdhci.h" - -@@ -1374,7 +1375,10 @@ static int bcm2835_mmc_add_host(struct b - } - #endif - mmc->max_segs = 128; -- mmc->max_req_size = 524288; -+ if (swiotlb_max_segment()) -+ mmc->max_req_size = (1 << IO_TLB_SHIFT) * IO_TLB_SEGSIZE; -+ else -+ mmc->max_req_size = 524288; - mmc->max_seg_size = mmc->max_req_size; - mmc->max_blk_size = 512; - mmc->max_blk_count = 65535; |