aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.10
diff options
context:
space:
mode:
authorJohn Audia <therealgraysky@proton.me>2023-04-20 08:53:55 -0400
committerHauke Mehrtens <hauke@hauke-m.de>2023-04-22 01:15:03 +0200
commit126c64df2bb6dec95906c1f68aa37e581ef2550f (patch)
tree3bf569ce11a6b5744a6a54394f2617ca36ad962d /target/linux/generic/backport-5.10
parent3887a55909aa26c3366fd0206772280da850ab16 (diff)
downloadupstream-126c64df2bb6dec95906c1f68aa37e581ef2550f.tar.gz
upstream-126c64df2bb6dec95906c1f68aa37e581ef2550f.tar.bz2
upstream-126c64df2bb6dec95906c1f68aa37e581ef2550f.zip
kernel: bump 5.10 to 5.10.178
Removed upstreamed: backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1] 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.178&id=0279e82e148407feec88466990de14bcba9e12c0 All other patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me>
Diffstat (limited to 'target/linux/generic/backport-5.10')
-rw-r--r--target/linux/generic/backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch69
-rw-r--r--target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch6
2 files changed, 3 insertions, 72 deletions
diff --git a/target/linux/generic/backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch b/target/linux/generic/backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch
deleted file mode 100644
index 3298ec1ce4..0000000000
--- a/target/linux/generic/backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 1e020e1b96afdecd20680b5b5be2a6ffc3d27628 Mon Sep 17 00:00:00 2001
-From: Zhihao Cheng <chengzhihao1@huawei.com>
-Date: Mon, 6 Mar 2023 09:33:08 +0800
-Subject: [PATCH] ubi: Fix failure attaching when vid_hdr offset equals to
- (sub)page size
-
-Following process will make ubi attaching failed since commit
-1b42b1a36fc946 ("ubi: ensure that VID header offset ... size"):
-
-ID="0xec,0xa1,0x00,0x15" # 128M 128KB 2KB
-modprobe nandsim id_bytes=$ID
-flash_eraseall /dev/mtd0
-modprobe ubi mtd="0,2048" # set vid_hdr offset as 2048 (one page)
-(dmesg):
- ubi0 error: ubi_attach_mtd_dev [ubi]: VID header offset 2048 too large.
- UBI error: cannot attach mtd0
- UBI error: cannot initialize UBI, error -22
-
-Rework original solution, the key point is making sure
-'vid_hdr_shift + UBI_VID_HDR_SIZE < ubi->vid_hdr_alsize',
-so we should check vid_hdr_shift rather not vid_hdr_offset.
-Then, ubi still support (sub)page aligined VID header offset.
-
-Fixes: 1b42b1a36fc946 ("ubi: ensure that VID header offset ... size")
-Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
-Tested-by: Nicolas Schichan <nschichan@freebox.fr>
-Tested-by: Miquel Raynal <miquel.raynal@bootlin.com> # v5.10, v4.19
-Signed-off-by: Richard Weinberger <richard@nod.at>
----
- drivers/mtd/ubi/build.c | 21 +++++++++++++++------
- 1 file changed, 15 insertions(+), 6 deletions(-)
-
---- a/drivers/mtd/ubi/build.c
-+++ b/drivers/mtd/ubi/build.c
-@@ -665,12 +665,6 @@ static int io_init(struct ubi_device *ub
- ubi->ec_hdr_alsize = ALIGN(UBI_EC_HDR_SIZE, ubi->hdrs_min_io_size);
- ubi->vid_hdr_alsize = ALIGN(UBI_VID_HDR_SIZE, ubi->hdrs_min_io_size);
-
-- if (ubi->vid_hdr_offset && ((ubi->vid_hdr_offset + UBI_VID_HDR_SIZE) >
-- ubi->vid_hdr_alsize)) {
-- ubi_err(ubi, "VID header offset %d too large.", ubi->vid_hdr_offset);
-- return -EINVAL;
-- }
--
- dbg_gen("min_io_size %d", ubi->min_io_size);
- dbg_gen("max_write_size %d", ubi->max_write_size);
- dbg_gen("hdrs_min_io_size %d", ubi->hdrs_min_io_size);
-@@ -688,6 +682,21 @@ static int io_init(struct ubi_device *ub
- ubi->vid_hdr_aloffset;
- }
-
-+ /*
-+ * Memory allocation for VID header is ubi->vid_hdr_alsize
-+ * which is described in comments in io.c.
-+ * Make sure VID header shift + UBI_VID_HDR_SIZE not exceeds
-+ * ubi->vid_hdr_alsize, so that all vid header operations
-+ * won't access memory out of bounds.
-+ */
-+ if ((ubi->vid_hdr_shift + UBI_VID_HDR_SIZE) > ubi->vid_hdr_alsize) {
-+ ubi_err(ubi, "Invalid VID header offset %d, VID header shift(%d)"
-+ " + VID header size(%zu) > VID header aligned size(%d).",
-+ ubi->vid_hdr_offset, ubi->vid_hdr_shift,
-+ UBI_VID_HDR_SIZE, ubi->vid_hdr_alsize);
-+ return -EINVAL;
-+ }
-+
- /* Similar for the data offset */
- ubi->leb_start = ubi->vid_hdr_offset + UBI_VID_HDR_SIZE;
- ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size);
diff --git a/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
index 901792178d..583abc9c80 100644
--- a/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
+++ b/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
@@ -423,7 +423,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (bgmac->irq < 0)
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
-@@ -4480,7 +4480,6 @@ static int macb_probe(struct platform_de
+@@ -4484,7 +4484,6 @@ static int macb_probe(struct platform_de
struct net_device *dev;
struct resource *regs;
void __iomem *mem;
@@ -431,7 +431,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct macb *bp;
int err, val;
-@@ -4593,15 +4592,11 @@ static int macb_probe(struct platform_de
+@@ -4597,15 +4596,11 @@ static int macb_probe(struct platform_de
if (bp->caps & MACB_CAPS_NEEDS_RSTONUBR)
bp->rx_intr_mask |= MACB_BIT(RXUBR);
@@ -1360,7 +1360,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int irq;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -5015,7 +5015,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -5019,7 +5019,7 @@ int stmmac_dvr_probe(struct device *devi
priv->wol_irq = res->wol_irq;
priv->lpi_irq = res->lpi_irq;