kernel: bump 6.6 to 6.6.33 and adjust subarches
This commit accomplishes three goals: 1. bump 6.6 to 6.6.33 2. kernel: modules: video: change package definition for fb for upstream changes[1] 3. kernel/multiple subtargets: add CONFIG_FB_IOMEM_FOPS=y to all subtargets which also set CONFIG_FB_CORE=y. Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.33 Removed upstreamed: pending-6.6/195-block-fix-and-simplify-blkdevparts-cmdline-parsing.patch[2] gemini/patches-6.6/0003-net-ethernet-cortina-Locking-fixes.patch[3] Manually rebased: ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=c00e8fd749502c02085534c60b1edca4fc479c91 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.33&id=99bbbd9aea059f8a206736dc601be2ae61d366fb 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.33&id=8f6f82d6a205ceb3aba8d279f9ff6eeea0b1689b Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Tested-by: Stijn Segers <foss@volatilesystems.org> Signed-off-by: John Audia <therealgraysky@proton.me>
This commit is contained in:
committed by
Hauke Mehrtens
parent
fc9cb9b609
commit
f34620f146
@@ -91,7 +91,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
#include "mtdcore.h"
|
||||
|
||||
@@ -1125,6 +1126,8 @@ int mtd_device_parse_register(struct mtd
|
||||
@@ -1127,6 +1128,8 @@ int mtd_device_parse_register(struct mtd
|
||||
register_reboot_notifier(&mtd->reboot_notifier);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation
|
||||
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -3365,6 +3365,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||
@@ -3375,6 +3375,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||
else
|
||||
reg = 1 << port;
|
||||
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
From patchwork Sun Apr 21 07:39:52 2024
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
X-Patchwork-Id: 13637306
|
||||
From: INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
To: axboe@kernel.dk
|
||||
Cc: yang.yang29@zte.com,
|
||||
justinstitt@google.com,
|
||||
xu.panda@zte.com.cn,
|
||||
linux-block@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org,
|
||||
INAGAKI Hiroshi <musashino.open@gmail.com>,
|
||||
Naohiro Aota <naota@elisp.net>
|
||||
Subject: [PATCH] block: fix and simplify blkdevparts= cmdline parsing
|
||||
Date: Sun, 21 Apr 2024 16:39:52 +0900
|
||||
Message-ID: <20240421074005.565-1-musashino.open@gmail.com>
|
||||
X-Mailer: git-send-email 2.42.0.windows.2
|
||||
Precedence: bulk
|
||||
X-Mailing-List: linux-block@vger.kernel.org
|
||||
List-Id: <linux-block.vger.kernel.org>
|
||||
List-Subscribe: <mailto:linux-block+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:linux-block+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
|
||||
Fix the cmdline parsing of the "blkdevparts=" parameter using strsep(),
|
||||
which makes the code simpler.
|
||||
|
||||
Before commit 146afeb235cc ("block: use strscpy() to instead of
|
||||
strncpy()"), we used a strncpy() to copy a block device name and partition
|
||||
names. The commit simply replaced a strncpy() and NULL termination with
|
||||
a strscpy(). It did not update calculations of length passed to strscpy().
|
||||
While the length passed to strncpy() is just a length of valid characters
|
||||
without NULL termination ('\0'), strscpy() takes it as a length of the
|
||||
destination buffer, including a NULL termination.
|
||||
|
||||
Since the source buffer is not necessarily NULL terminated, the current
|
||||
code copies "length - 1" characters and puts a NULL character in the
|
||||
destination buffer. It replaces the last character with NULL and breaks
|
||||
the parsing.
|
||||
|
||||
As an example, that buffer will be passed to parse_parts() and breaks
|
||||
parsing sub-partitions due to the missing ')' at the end, like the
|
||||
following.
|
||||
|
||||
example (Check Point V-80 & OpenWrt):
|
||||
|
||||
- Linux Kernel 6.6
|
||||
|
||||
[ 0.000000] Kernel command line: console=ttyS0,115200 earlycon=uart8250,mmio32,0xf0512000 crashkernel=30M mvpp2x.queue_mode=1 blkdevparts=mmcblk1:48M@10M(kernel-1),1M(dtb-1),720M(rootfs-1),48M(kernel-2),1M(dtb-2),720M(rootfs-2),300M(default_sw),650M(logs),1M(preset_cfg),1M(adsl),-(storage) maxcpus=4
|
||||
...
|
||||
[ 0.884016] mmc1: new HS200 MMC card at address 0001
|
||||
[ 0.889951] mmcblk1: mmc1:0001 004GA0 3.69 GiB
|
||||
[ 0.895043] cmdline partition format is invalid.
|
||||
[ 0.895704] mmcblk1: p1
|
||||
[ 0.903447] mmcblk1boot0: mmc1:0001 004GA0 2.00 MiB
|
||||
[ 0.908667] mmcblk1boot1: mmc1:0001 004GA0 2.00 MiB
|
||||
[ 0.913765] mmcblk1rpmb: mmc1:0001 004GA0 512 KiB, chardev (248:0)
|
||||
|
||||
1. "48M@10M(kernel-1),..." is passed to strscpy() with length=17
|
||||
from parse_parts()
|
||||
2. strscpy() returns -E2BIG and the destination buffer has
|
||||
"48M@10M(kernel-1\0"
|
||||
3. "48M@10M(kernel-1\0" is passed to parse_subpart()
|
||||
4. parse_subpart() fails to find ')' when parsing a partition name,
|
||||
and returns error
|
||||
|
||||
- Linux Kernel 6.1
|
||||
|
||||
[ 0.000000] Kernel command line: console=ttyS0,115200 earlycon=uart8250,mmio32,0xf0512000 crashkernel=30M mvpp2x.queue_mode=1 blkdevparts=mmcblk1:48M@10M(kernel-1),1M(dtb-1),720M(rootfs-1),48M(kernel-2),1M(dtb-2),720M(rootfs-2),300M(default_sw),650M(logs),1M(preset_cfg),1M(adsl),-(storage) maxcpus=4
|
||||
...
|
||||
[ 0.953142] mmc1: new HS200 MMC card at address 0001
|
||||
[ 0.959114] mmcblk1: mmc1:0001 004GA0 3.69 GiB
|
||||
[ 0.964259] mmcblk1: p1(kernel-1) p2(dtb-1) p3(rootfs-1) p4(kernel-2) p5(dtb-2) 6(rootfs-2) p7(default_sw) p8(logs) p9(preset_cfg) p10(adsl) p11(storage)
|
||||
[ 0.979174] mmcblk1boot0: mmc1:0001 004GA0 2.00 MiB
|
||||
[ 0.984674] mmcblk1boot1: mmc1:0001 004GA0 2.00 MiB
|
||||
[ 0.989926] mmcblk1rpmb: mmc1:0001 004GA0 512 KiB, chardev (248:0
|
||||
|
||||
By the way, strscpy() takes a length of destination buffer and it is
|
||||
often confusing when copying characters with a specified length. Using
|
||||
strsep() helps to separate the string by the specified character. Then,
|
||||
we can use strscpy() naturally with the size of the destination buffer.
|
||||
|
||||
Separating the string on the fly is also useful to omit the redundant
|
||||
string copy, reducing memory usage and improve the code readability.
|
||||
|
||||
Fixes: 146afeb235cc ("block: use strscpy() to instead of strncpy()")
|
||||
Suggested-by: Naohiro Aota <naota@elisp.net>
|
||||
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
block/partitions/cmdline.c | 49 ++++++++++----------------------------
|
||||
1 file changed, 12 insertions(+), 37 deletions(-)
|
||||
|
||||
--- a/block/partitions/cmdline.c
|
||||
+++ b/block/partitions/cmdline.c
|
||||
@@ -70,8 +70,8 @@ static int parse_subpart(struct cmdline_
|
||||
}
|
||||
|
||||
if (*partdef == '(') {
|
||||
- int length;
|
||||
- char *next = strchr(++partdef, ')');
|
||||
+ partdef++;
|
||||
+ char *next = strsep(&partdef, ")");
|
||||
|
||||
if (!next) {
|
||||
pr_warn("cmdline partition format is invalid.");
|
||||
@@ -79,11 +79,7 @@ static int parse_subpart(struct cmdline_
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- length = min_t(int, next - partdef,
|
||||
- sizeof(new_subpart->name) - 1);
|
||||
- strscpy(new_subpart->name, partdef, length);
|
||||
-
|
||||
- partdef = ++next;
|
||||
+ strscpy(new_subpart->name, next, sizeof(new_subpart->name));
|
||||
} else
|
||||
new_subpart->name[0] = '\0';
|
||||
|
||||
@@ -117,14 +113,12 @@ static void free_subpart(struct cmdline_
|
||||
}
|
||||
}
|
||||
|
||||
-static int parse_parts(struct cmdline_parts **parts, const char *bdevdef)
|
||||
+static int parse_parts(struct cmdline_parts **parts, char *bdevdef)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
char *next;
|
||||
- int length;
|
||||
struct cmdline_subpart **next_subpart;
|
||||
struct cmdline_parts *newparts;
|
||||
- char buf[BDEVNAME_SIZE + 32 + 4];
|
||||
|
||||
*parts = NULL;
|
||||
|
||||
@@ -132,28 +126,19 @@ static int parse_parts(struct cmdline_pa
|
||||
if (!newparts)
|
||||
return -ENOMEM;
|
||||
|
||||
- next = strchr(bdevdef, ':');
|
||||
+ next = strsep(&bdevdef, ":");
|
||||
if (!next) {
|
||||
pr_warn("cmdline partition has no block device.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- length = min_t(int, next - bdevdef, sizeof(newparts->name) - 1);
|
||||
- strscpy(newparts->name, bdevdef, length);
|
||||
+ strscpy(newparts->name, next, sizeof(newparts->name));
|
||||
newparts->nr_subparts = 0;
|
||||
|
||||
next_subpart = &newparts->subpart;
|
||||
|
||||
- while (next && *(++next)) {
|
||||
- bdevdef = next;
|
||||
- next = strchr(bdevdef, ',');
|
||||
-
|
||||
- length = (!next) ? (sizeof(buf) - 1) :
|
||||
- min_t(int, next - bdevdef, sizeof(buf) - 1);
|
||||
-
|
||||
- strscpy(buf, bdevdef, length);
|
||||
-
|
||||
- ret = parse_subpart(next_subpart, buf);
|
||||
+ while ((next = strsep(&bdevdef, ","))) {
|
||||
+ ret = parse_subpart(next_subpart, next);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
@@ -199,24 +184,17 @@ static int cmdline_parts_parse(struct cm
|
||||
|
||||
*parts = NULL;
|
||||
|
||||
- next = pbuf = buf = kstrdup(cmdline, GFP_KERNEL);
|
||||
+ pbuf = buf = kstrdup(cmdline, GFP_KERNEL);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
next_parts = parts;
|
||||
|
||||
- while (next && *pbuf) {
|
||||
- next = strchr(pbuf, ';');
|
||||
- if (next)
|
||||
- *next = '\0';
|
||||
-
|
||||
- ret = parse_parts(next_parts, pbuf);
|
||||
+ while ((next = strsep(&pbuf, ";"))) {
|
||||
+ ret = parse_parts(next_parts, next);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
- if (next)
|
||||
- pbuf = ++next;
|
||||
-
|
||||
next_parts = &(*next_parts)->next_parts;
|
||||
}
|
||||
|
||||
@@ -250,7 +228,6 @@ static struct cmdline_parts *bdev_parts;
|
||||
static int add_part(int slot, struct cmdline_subpart *subpart,
|
||||
struct parsed_partitions *state)
|
||||
{
|
||||
- int label_min;
|
||||
struct partition_meta_info *info;
|
||||
char tmp[sizeof(info->volname) + 4];
|
||||
|
||||
@@ -262,9 +239,7 @@ static int add_part(int slot, struct cmd
|
||||
|
||||
info = &state->parts[slot].info;
|
||||
|
||||
- label_min = min_t(int, sizeof(info->volname) - 1,
|
||||
- sizeof(subpart->name));
|
||||
- strscpy(info->volname, subpart->name, label_min);
|
||||
+ strscpy(info->volname, subpart->name, sizeof(info->volname));
|
||||
|
||||
snprintf(tmp, sizeof(tmp), "(%s)", info->volname);
|
||||
strlcat(state->pp_buf, tmp, PAGE_SIZE);
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -22006,6 +22006,12 @@ F: Documentation/filesystems/ubifs-authe
|
||||
@@ -22014,6 +22014,12 @@ F: Documentation/filesystems/ubifs-authe
|
||||
F: Documentation/filesystems/ubifs.rst
|
||||
F: fs/ubifs/
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto drop;
|
||||
|
||||
@@ -3386,6 +3388,7 @@ static int packet_create(struct net *net
|
||||
@@ -3385,6 +3387,7 @@ static int packet_create(struct net *net
|
||||
mutex_init(&po->pg_vec_lock);
|
||||
po->rollover = NULL;
|
||||
po->prot_hook.func = packet_rcv;
|
||||
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (sock->type == SOCK_PACKET)
|
||||
po->prot_hook.func = packet_rcv_spkt;
|
||||
@@ -4035,6 +4038,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
@@ -4034,6 +4037,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
packet_sock_flag_set(po, PACKET_SOCK_QDISC_BYPASS, val);
|
||||
return 0;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
default:
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
@@ -4094,6 +4107,13 @@ static int packet_getsockopt(struct sock
|
||||
@@ -4093,6 +4106,13 @@ static int packet_getsockopt(struct sock
|
||||
case PACKET_VNET_HDR_SZ:
|
||||
val = READ_ONCE(po->vnet_hdr_sz);
|
||||
break;
|
||||
|
||||
@@ -31,7 +31,7 @@ Signe-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static inline void gro_normal_list(struct napi_struct *napi)
|
||||
--- a/include/net/tcp.h
|
||||
+++ b/include/net/tcp.h
|
||||
@@ -2082,7 +2082,10 @@ void tcp_v4_destroy_sock(struct sock *sk
|
||||
@@ -2083,7 +2083,10 @@ void tcp_v4_destroy_sock(struct sock *sk
|
||||
|
||||
struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
|
||||
netdev_features_t features);
|
||||
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -13348,7 +13348,9 @@ M: Daniel Golle <daniel@makrotopia.org>
|
||||
@@ -13356,7 +13356,9 @@ M: Daniel Golle <daniel@makrotopia.org>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/pcs/pcs-mtk-lynxi.c
|
||||
|
||||
@@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi,
|
||||
int (*poll)(struct napi_struct *, int), int weight)
|
||||
{
|
||||
@@ -11306,6 +11377,9 @@ static int dev_cpu_dead(unsigned int old
|
||||
@@ -11307,6 +11378,9 @@ static int dev_cpu_dead(unsigned int old
|
||||
raise_softirq_irqoff(NET_TX_SOFTIRQ);
|
||||
local_irq_enable();
|
||||
|
||||
@@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#ifdef CONFIG_RPS
|
||||
remsd = oldsd->rps_ipi_list;
|
||||
oldsd->rps_ipi_list = NULL;
|
||||
@@ -11621,6 +11695,7 @@ static int __init net_dev_init(void)
|
||||
@@ -11622,6 +11696,7 @@ static int __init net_dev_init(void)
|
||||
INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd);
|
||||
spin_lock_init(&sd->defer_lock);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
|
||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||
@@ -6947,6 +6947,7 @@ static int mv88e6xxx_register_switch(str
|
||||
@@ -6989,6 +6989,7 @@ static int mv88e6xxx_register_switch(str
|
||||
ds->ops = &mv88e6xxx_switch_ops;
|
||||
ds->ageing_time_min = chip->info->age_time_coeff;
|
||||
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
|
||||
|
||||
Reference in New Issue
Block a user