The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 38dab832c3f4154968f95b267a3bb789e87554b0
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072944-swoosh-muster-ccde@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
38dab832c3f4 ("ata: libata-scsi: Fix offsets for the fixed format sense data")
ff8072d589dc ("ata: libata: remove references to non-existing error_handler()")
3ac873c76d79 ("ata: libata-core: fix when to fetch sense data for successful commands")
18bd7718b5c4 ("scsi: ata: libata: Handle completion of CDL commands using policy 0xD")
eafe804bda7b ("scsi: ata: libata: Set read/write commands CDL index")
df60f9c64576 ("scsi: ata: libata: Add ATA feature control sub-page translation")
673b2fe6ff1d ("scsi: ata: libata-scsi: Add support for CDL pages mode sense")
62e4a60e0cdb ("scsi: ata: libata: Detect support for command duration limits")
bc9af4909406 ("ata: libata: Fix FUA handling in ata_build_rw_tf()")
4d2e4980a528 ("ata: libata: cleanup fua support detection")
87aab3c4cd59 ("ata: libata: move NCQ related ATA_DFLAGs")
876293121f24 ("ata: scsi: rename flag ATA_QCFLAG_FAILED to ATA_QCFLAG_EH")
b83ad9eec316 ("ata: libata-eh: Cleanup ata_scsi_cmd_error_handler()")
3d8a3ae3d966 ("ata: libata: fix commands incorrectly not getting retried during NCQ error")
4cb7c6f1ef96 ("ata: make use of ata_port_is_frozen() helper")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 38dab832c3f4154968f95b267a3bb789e87554b0 Mon Sep 17 00:00:00 2001
From: Igor Pylypiv <ipylypiv(a)google.com>
Date: Tue, 2 Jul 2024 02:47:29 +0000
Subject: [PATCH] ata: libata-scsi: Fix offsets for the fixed format sense data
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Correct the ATA PASS-THROUGH fixed format sense data offsets to conform
to SPC-6 and SAT-5 specifications. Additionally, set the VALID bit to
indicate that the INFORMATION field contains valid information.
INFORMATION
===========
SAT-5 Table 212 — "Fixed format sense data INFORMATION field for the ATA
PASS-THROUGH commands" defines the following format:
+------+------------+
| Byte | Field |
+------+------------+
| 0 | ERROR |
| 1 | STATUS |
| 2 | DEVICE |
| 3 | COUNT(7:0) |
+------+------------+
SPC-6 Table 48 - "Fixed format sense data" specifies that the INFORMATION
field starts at byte 3 in sense buffer resulting in the following offsets
for the ATA PASS-THROUGH commands:
+------------+-------------------------+
| Field | Offset in sense buffer |
+------------+-------------------------+
| ERROR | 3 |
| STATUS | 4 |
| DEVICE | 5 |
| COUNT(7:0) | 6 |
+------------+-------------------------+
COMMAND-SPECIFIC INFORMATION
============================
SAT-5 Table 213 - "Fixed format sense data COMMAND-SPECIFIC INFORMATION
field for ATA PASS-THROUGH" defines the following format:
+------+-------------------+
| Byte | Field |
+------+-------------------+
| 0 | FLAGS | LOG INDEX |
| 1 | LBA (7:0) |
| 2 | LBA (15:8) |
| 3 | LBA (23:16) |
+------+-------------------+
SPC-6 Table 48 - "Fixed format sense data" specifies that
the COMMAND-SPECIFIC-INFORMATION field starts at byte 8
in sense buffer resulting in the following offsets for
the ATA PASS-THROUGH commands:
Offsets of these fields in the fixed sense format are as follows:
+-------------------+-------------------------+
| Field | Offset in sense buffer |
+-------------------+-------------------------+
| FLAGS | LOG INDEX | 8 |
| LBA (7:0) | 9 |
| LBA (15:8) | 10 |
| LBA (23:16) | 11 |
+-------------------+-------------------------+
Reported-by: Akshat Jain <akshatzen(a)google.com>
Fixes: 11093cb1ef56 ("libata-scsi: generate correct ATA pass-through sense")
Cc: stable(a)vger.kernel.org
Reviewed-by: Hannes Reinecke <hare(a)suse.de>
Reviewed-by: Niklas Cassel <cassel(a)kernel.org>
Signed-off-by: Igor Pylypiv <ipylypiv(a)google.com>
Link: https://lore.kernel.org/r/20240702024735.1152293-2-ipylypiv@google.com
Signed-off-by: Niklas Cassel <cassel(a)kernel.org>
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index cdf29b178ddc..a0c68b0a00c4 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -855,7 +855,6 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
struct scsi_cmnd *cmd = qc->scsicmd;
struct ata_taskfile *tf = &qc->result_tf;
unsigned char *sb = cmd->sense_buffer;
- unsigned char *desc = sb + 8;
u8 sense_key, asc, ascq;
memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
@@ -877,7 +876,8 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
scsi_build_sense(cmd, 1, RECOVERED_ERROR, 0, 0x1D);
}
- if ((cmd->sense_buffer[0] & 0x7f) >= 0x72) {
+ if ((sb[0] & 0x7f) >= 0x72) {
+ unsigned char *desc;
u8 len;
/* descriptor format */
@@ -916,21 +916,21 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
}
} else {
/* Fixed sense format */
- desc[0] = tf->error;
- desc[1] = tf->status;
- desc[2] = tf->device;
- desc[3] = tf->nsect;
- desc[7] = 0;
+ sb[0] |= 0x80;
+ sb[3] = tf->error;
+ sb[4] = tf->status;
+ sb[5] = tf->device;
+ sb[6] = tf->nsect;
if (tf->flags & ATA_TFLAG_LBA48) {
- desc[8] |= 0x80;
+ sb[8] |= 0x80;
if (tf->hob_nsect)
- desc[8] |= 0x40;
+ sb[8] |= 0x40;
if (tf->hob_lbal || tf->hob_lbam || tf->hob_lbah)
- desc[8] |= 0x20;
+ sb[8] |= 0x20;
}
- desc[9] = tf->lbal;
- desc[10] = tf->lbam;
- desc[11] = tf->lbah;
+ sb[9] = tf->lbal;
+ sb[10] = tf->lbam;
+ sb[11] = tf->lbah;
}
}
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.19.y
git checkout FETCH_HEAD
git cherry-pick -x 6807352353561187a718e87204458999dbcbba1b
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072923-veteran-backless-4326@gregkh' --subject-prefix 'PATCH 4.19.y' HEAD^..
Possible dependencies:
680735235356 ("ipv4: fix source address selection with route leak")
eba618abacad ("ipv4: Add fib_nh_common to fib_result")
0af7e7c128eb ("ipv4: Update fib_table_lookup tracepoint to take common nexthop")
b75ed8b1aa9c ("ipv4: Rename fib_nh entries")
faa041a40b9f ("ipv4: Create cleanup helper for fib_nh")
e4516ef65490 ("ipv4: Create init helper for fib_nh")
331c7a402358 ("ipv4: Move IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN to helper")
8373c6c84e67 ("ipv4: Define fib_get_nhs when CONFIG_IP_ROUTE_MULTIPATH is disabled")
544fe7c2e654 ("net/mlx5e: Activate HW multipath and handle port affinity based on FIB events")
724b509ca023 ("net/mlx5: Add multipath mode")
10a193ed78ad ("net/mlx5: Expose lag operations in header file")
bb19ad0d8d49 ("net/mlx5: Use unsigned int bit instead of bool as a struct member")
97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")
d9ee0491c2ff ("net/mlx5e: Use dedicated uplink vport netdev representor")
025380b20dc2 ("net/mlx5e: Use single argument for the esw representor build params helper")
958246664043 ("net/mlx5: Handle LAG FW commands failure gracefully")
7c34ec19e10c ("net/mlx5: Make RoCE and SR-IOV LAG modes explicit")
292612d68c4e ("net/mlx5: Rename mlx5_lag_is_bonded() to __mlx5_lag_is_active()")
eff849b2c669 ("net/mlx5: Allow/disallow LAG according to pre-req only")
3b5ff59fd851 ("net/mlx5: Adjustments for the activate LAG logic to run under sriov")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 6807352353561187a718e87204458999dbcbba1b Mon Sep 17 00:00:00 2001
From: Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
Date: Wed, 10 Jul 2024 10:14:27 +0200
Subject: [PATCH] ipv4: fix source address selection with route leak
By default, an address assigned to the output interface is selected when
the source address is not specified. This is problematic when a route,
configured in a vrf, uses an interface from another vrf (aka route leak).
The original vrf does not own the selected source address.
Let's add a check against the output interface and call the appropriate
function to select the source address.
CC: stable(a)vger.kernel.org
Fixes: 8cbb512c923d ("net: Add source address lookup op for VRF")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
Reviewed-by: David Ahern <dsahern(a)kernel.org>
Link: https://patch.msgid.link/20240710081521.3809742-2-nicolas.dichtel@6wind.com
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index f669da98d11d..8956026bc0a2 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -2270,6 +2270,15 @@ void fib_select_path(struct net *net, struct fib_result *res,
fib_select_default(fl4, res);
check_saddr:
- if (!fl4->saddr)
- fl4->saddr = fib_result_prefsrc(net, res);
+ if (!fl4->saddr) {
+ struct net_device *l3mdev;
+
+ l3mdev = dev_get_by_index_rcu(net, fl4->flowi4_l3mdev);
+
+ if (!l3mdev ||
+ l3mdev_master_dev_rcu(FIB_RES_DEV(*res)) == l3mdev)
+ fl4->saddr = fib_result_prefsrc(net, res);
+ else
+ fl4->saddr = inet_select_addr(l3mdev, 0, RT_SCOPE_LINK);
+ }
}
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 943ad0b62e3c21f324c4884caa6cb4a871bca05c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072941-nucleus-cannabis-e513@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
943ad0b62e3c ("kernel: rerun task_work while freezing in get_signal()")
f5d39b020809 ("freezer,sched: Rewrite core freezer logic")
9963e444f71e ("sched: Widen TAKS_state literals")
f9fc8cad9728 ("sched: Add TASK_ANY for wait_task_inactive()")
9204a97f7ae8 ("sched: Change wait_task_inactive()s match_state")
1fbcaa923ce2 ("freezer,umh: Clean up freezer/initrd interaction")
5950e5d574c6 ("freezer: Have {,un}lock_system_sleep() save/restore flags")
0b9d46fc5ef7 ("sched: Rename task_running() to task_on_cpu()")
8386c414e27c ("PM: hibernate: defer device probing when resuming from hibernation")
57b6de08b5f6 ("ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs")
7b0fe1367ef2 ("ptrace: Document that wait_task_inactive can't fail")
1930a6e739c4 ("Merge tag 'ptrace-cleanups-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 943ad0b62e3c21f324c4884caa6cb4a871bca05c Mon Sep 17 00:00:00 2001
From: Pavel Begunkov <asml.silence(a)gmail.com>
Date: Wed, 10 Jul 2024 18:58:18 +0100
Subject: [PATCH] kernel: rerun task_work while freezing in get_signal()
io_uring can asynchronously add a task_work while the task is getting
freezed. TIF_NOTIFY_SIGNAL will prevent the task from sleeping in
do_freezer_trap(), and since the get_signal()'s relock loop doesn't
retry task_work, the task will spin there not being able to sleep
until the freezing is cancelled / the task is killed / etc.
Run task_works in the freezer path. Keep the patch small and simple
so it can be easily back ported, but we might need to do some cleaning
after and look if there are other places with similar problems.
Cc: stable(a)vger.kernel.org
Link: https://github.com/systemd/systemd/issues/33626
Fixes: 12db8b690010c ("entry: Add support for TIF_NOTIFY_SIGNAL")
Reported-by: Julian Orth <ju.orth(a)gmail.com>
Acked-by: Oleg Nesterov <oleg(a)redhat.com>
Acked-by: Tejun Heo <tj(a)kernel.org>
Signed-off-by: Pavel Begunkov <asml.silence(a)gmail.com>
Link: https://lore.kernel.org/r/89ed3a52933370deaaf61a0a620a6ac91f1e754d.17206341…
Signed-off-by: Jens Axboe <axboe(a)kernel.dk>
diff --git a/kernel/signal.c b/kernel/signal.c
index 1f9dd41c04be..60c737e423a1 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2600,6 +2600,14 @@ static void do_freezer_trap(void)
spin_unlock_irq(¤t->sighand->siglock);
cgroup_enter_frozen();
schedule();
+
+ /*
+ * We could've been woken by task_work, run it to clear
+ * TIF_NOTIFY_SIGNAL. The caller will retry if necessary.
+ */
+ clear_notify_signal();
+ if (unlikely(task_work_pending(current)))
+ task_work_run();
}
static int ptrace_signal(int signr, kernel_siginfo_t *info, enum pid_type type)
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x e90c369cc2ffcf7145a46448de101f715a1f5584
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072901-rare-engaging-abb3@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
e90c369cc2ff ("thermal/drivers/broadcom: Fix race between removal and clock disable")
f29ecd3748a2 ("thermal: bcm2835: Convert to platform remove callback returning void")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From e90c369cc2ffcf7145a46448de101f715a1f5584 Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org>
Date: Tue, 9 Jul 2024 14:59:31 +0200
Subject: [PATCH] thermal/drivers/broadcom: Fix race between removal and clock
disable
During the probe, driver enables clocks necessary to access registers
(in get_temp()) and then registers thermal zone with managed-resources
(devm) interface. Removal of device is not done in reversed order,
because:
1. Clock will be disabled in driver remove() callback - thermal zone is
still registered and accessible to users,
2. devm interface will unregister thermal zone.
This leaves short window between (1) and (2) for accessing the
get_temp() callback with disabled clock.
Fix this by enabling clock also via devm-interface, so entire cleanup
path will be in proper, reversed order.
Fixes: 8454c8c09c77 ("thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister")
Cc: stable(a)vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org>
Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-1-241644e2b6e0@linaro.o…
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index 5c1cebe07580..3b1030fc4fbf 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -185,7 +185,7 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
return err;
}
- data->clk = devm_clk_get(&pdev->dev, NULL);
+ data->clk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(data->clk)) {
err = PTR_ERR(data->clk);
if (err != -EPROBE_DEFER)
@@ -193,10 +193,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
return err;
}
- err = clk_prepare_enable(data->clk);
- if (err)
- return err;
-
rate = clk_get_rate(data->clk);
if ((rate < 1920000) || (rate > 5000000))
dev_warn(&pdev->dev,
@@ -211,7 +207,7 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
dev_err(&pdev->dev,
"Failed to register the thermal device: %d\n",
err);
- goto err_clk;
+ return err;
}
/*
@@ -236,7 +232,7 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
dev_err(&pdev->dev,
"Not able to read trip_temp: %d\n",
err);
- goto err_tz;
+ return err;
}
/* set bandgap reference voltage and enable voltage regulator */
@@ -269,17 +265,11 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
*/
err = thermal_add_hwmon_sysfs(tz);
if (err)
- goto err_tz;
+ return err;
bcm2835_thermal_debugfs(pdev);
return 0;
-err_tz:
- devm_thermal_of_zone_unregister(&pdev->dev, tz);
-err_clk:
- clk_disable_unprepare(data->clk);
-
- return err;
}
static void bcm2835_thermal_remove(struct platform_device *pdev)
@@ -287,7 +277,6 @@ static void bcm2835_thermal_remove(struct platform_device *pdev)
struct bcm2835_thermal_data *data = platform_get_drvdata(pdev);
debugfs_remove_recursive(data->debugfsdir);
- clk_disable_unprepare(data->clk);
}
static struct platform_driver bcm2835_thermal_driver = {
Please consider the following patches (in this order) for backporting
to v6.6 and newer.
fb318ca0a522295edd6d796fb987e99ec41f0ee5
ae835a96d72cd025421910edb0e8faf706998727
The second patch addresses a regression on older Dell hardware. The
first one is a prerequisite for the second one, and a minor bugfix
itself.
Thanks,
Ard.
The patch below does not apply to the 6.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.10.y
git checkout FETCH_HEAD
git cherry-pick -x 30d77b7eef019fa4422980806e8b7cdc8674493e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072911-marshland-grab-ced7@gregkh' --subject-prefix 'PATCH 6.10.y' HEAD^..
Possible dependencies:
30d77b7eef01 ("mm/mglru: fix ineffective protection calculation")
3f74e6bd3b84 ("mm/mglru: fix overshooting shrinker memory")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 30d77b7eef019fa4422980806e8b7cdc8674493e Mon Sep 17 00:00:00 2001
From: Yu Zhao <yuzhao(a)google.com>
Date: Fri, 12 Jul 2024 17:29:56 -0600
Subject: [PATCH] mm/mglru: fix ineffective protection calculation
mem_cgroup_calculate_protection() is not stateless and should only be used
as part of a top-down tree traversal. shrink_one() traverses the per-node
memcg LRU instead of the root_mem_cgroup tree, and therefore it should not
call mem_cgroup_calculate_protection().
The existing misuse in shrink_one() can cause ineffective protection of
sub-trees that are grandchildren of root_mem_cgroup. Fix it by reusing
lru_gen_age_node(), which already traverses the root_mem_cgroup tree, to
calculate the protection.
Previously lru_gen_age_node() opportunistically skips the first pass,
i.e., when scan_control->priority is DEF_PRIORITY. On the second pass,
lruvec_is_sizable() uses appropriate scan_control->priority, set by
set_initial_priority() from lru_gen_shrink_node(), to decide whether a
memcg is too small to reclaim from.
Now lru_gen_age_node() unconditionally traverses the root_mem_cgroup tree.
So it should call set_initial_priority() upfront, to make sure
lruvec_is_sizable() uses appropriate scan_control->priority on the first
pass. Otherwise, lruvec_is_reclaimable() can return false negatives and
result in premature OOM kills when min_ttl_ms is used.
Link: https://lkml.kernel.org/r/20240712232956.1427127-1-yuzhao@google.com
Fixes: e4dde56cd208 ("mm: multi-gen LRU: per-node lru_gen_folio lists")
Signed-off-by: Yu Zhao <yuzhao(a)google.com>
Reported-by: T.J. Mercier <tjmercier(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 6216d79edb7f..525d3ffa8451 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3915,6 +3915,32 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long seq,
* working set protection
******************************************************************************/
+static void set_initial_priority(struct pglist_data *pgdat, struct scan_control *sc)
+{
+ int priority;
+ unsigned long reclaimable;
+
+ if (sc->priority != DEF_PRIORITY || sc->nr_to_reclaim < MIN_LRU_BATCH)
+ return;
+ /*
+ * Determine the initial priority based on
+ * (total >> priority) * reclaimed_to_scanned_ratio = nr_to_reclaim,
+ * where reclaimed_to_scanned_ratio = inactive / total.
+ */
+ reclaimable = node_page_state(pgdat, NR_INACTIVE_FILE);
+ if (can_reclaim_anon_pages(NULL, pgdat->node_id, sc))
+ reclaimable += node_page_state(pgdat, NR_INACTIVE_ANON);
+
+ /* round down reclaimable and round up sc->nr_to_reclaim */
+ priority = fls_long(reclaimable) - 1 - fls_long(sc->nr_to_reclaim - 1);
+
+ /*
+ * The estimation is based on LRU pages only, so cap it to prevent
+ * overshoots of shrinker objects by large margins.
+ */
+ sc->priority = clamp(priority, DEF_PRIORITY / 2, DEF_PRIORITY);
+}
+
static bool lruvec_is_sizable(struct lruvec *lruvec, struct scan_control *sc)
{
int gen, type, zone;
@@ -3948,19 +3974,17 @@ static bool lruvec_is_reclaimable(struct lruvec *lruvec, struct scan_control *sc
struct mem_cgroup *memcg = lruvec_memcg(lruvec);
DEFINE_MIN_SEQ(lruvec);
- /* see the comment on lru_gen_folio */
- gen = lru_gen_from_seq(min_seq[LRU_GEN_FILE]);
- birth = READ_ONCE(lruvec->lrugen.timestamps[gen]);
-
- if (time_is_after_jiffies(birth + min_ttl))
+ if (mem_cgroup_below_min(NULL, memcg))
return false;
if (!lruvec_is_sizable(lruvec, sc))
return false;
- mem_cgroup_calculate_protection(NULL, memcg);
+ /* see the comment on lru_gen_folio */
+ gen = lru_gen_from_seq(min_seq[LRU_GEN_FILE]);
+ birth = READ_ONCE(lruvec->lrugen.timestamps[gen]);
- return !mem_cgroup_below_min(NULL, memcg);
+ return time_is_before_jiffies(birth + min_ttl);
}
/* to protect the working set of the last N jiffies */
@@ -3970,23 +3994,20 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
{
struct mem_cgroup *memcg;
unsigned long min_ttl = READ_ONCE(lru_gen_min_ttl);
+ bool reclaimable = !min_ttl;
VM_WARN_ON_ONCE(!current_is_kswapd());
- /* check the order to exclude compaction-induced reclaim */
- if (!min_ttl || sc->order || sc->priority == DEF_PRIORITY)
- return;
+ set_initial_priority(pgdat, sc);
memcg = mem_cgroup_iter(NULL, NULL, NULL);
do {
struct lruvec *lruvec = mem_cgroup_lruvec(memcg, pgdat);
- if (lruvec_is_reclaimable(lruvec, sc, min_ttl)) {
- mem_cgroup_iter_break(NULL, memcg);
- return;
- }
+ mem_cgroup_calculate_protection(NULL, memcg);
- cond_resched();
+ if (!reclaimable)
+ reclaimable = lruvec_is_reclaimable(lruvec, sc, min_ttl);
} while ((memcg = mem_cgroup_iter(NULL, memcg, NULL)));
/*
@@ -3994,7 +4015,7 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
* younger than min_ttl. However, another possibility is all memcgs are
* either too small or below min.
*/
- if (mutex_trylock(&oom_lock)) {
+ if (!reclaimable && mutex_trylock(&oom_lock)) {
struct oom_control oc = {
.gfp_mask = sc->gfp_mask,
};
@@ -4786,8 +4807,7 @@ static int shrink_one(struct lruvec *lruvec, struct scan_control *sc)
struct mem_cgroup *memcg = lruvec_memcg(lruvec);
struct pglist_data *pgdat = lruvec_pgdat(lruvec);
- mem_cgroup_calculate_protection(NULL, memcg);
-
+ /* lru_gen_age_node() called mem_cgroup_calculate_protection() */
if (mem_cgroup_below_min(NULL, memcg))
return MEMCG_LRU_YOUNG;
@@ -4911,32 +4931,6 @@ static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc
blk_finish_plug(&plug);
}
-static void set_initial_priority(struct pglist_data *pgdat, struct scan_control *sc)
-{
- int priority;
- unsigned long reclaimable;
-
- if (sc->priority != DEF_PRIORITY || sc->nr_to_reclaim < MIN_LRU_BATCH)
- return;
- /*
- * Determine the initial priority based on
- * (total >> priority) * reclaimed_to_scanned_ratio = nr_to_reclaim,
- * where reclaimed_to_scanned_ratio = inactive / total.
- */
- reclaimable = node_page_state(pgdat, NR_INACTIVE_FILE);
- if (can_reclaim_anon_pages(NULL, pgdat->node_id, sc))
- reclaimable += node_page_state(pgdat, NR_INACTIVE_ANON);
-
- /* round down reclaimable and round up sc->nr_to_reclaim */
- priority = fls_long(reclaimable) - 1 - fls_long(sc->nr_to_reclaim - 1);
-
- /*
- * The estimation is based on LRU pages only, so cap it to prevent
- * overshoots of shrinker objects by large margins.
- */
- sc->priority = clamp(priority, DEF_PRIORITY / 2, DEF_PRIORITY);
-}
-
static void lru_gen_shrink_node(struct pglist_data *pgdat, struct scan_control *sc)
{
struct blk_plug plug;
The patch below does not apply to the 6.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.10.y
git checkout FETCH_HEAD
git cherry-pick -x 6e49019db5f7a09a9c0e8ac4d108e656c3f8e583
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072937-aloe-fog-7fc4@gregkh' --subject-prefix 'PATCH 6.10.y' HEAD^..
Possible dependencies:
6e49019db5f7 ("mm/migrate: putback split folios when numa hint migration fails")
ee86814b0562 ("mm/migrate: move NUMA hinting fault folio isolation + checks under PTL")
4b88c23ab8c9 ("mm/migrate: make migrate_misplaced_folio() return 0 on success")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 6e49019db5f7a09a9c0e8ac4d108e656c3f8e583 Mon Sep 17 00:00:00 2001
From: Peter Xu <peterx(a)redhat.com>
Date: Mon, 8 Jul 2024 17:55:37 -0400
Subject: [PATCH] mm/migrate: putback split folios when numa hint migration
fails
This issue is not from any report yet, but by code observation only.
This is yet another fix besides Hugh's patch [1] but on relevant code
path, where eager split of folio can happen if the folio is already on
deferred list during a folio migration.
Here the issue is NUMA path (migrate_misplaced_folio()) may start to
encounter such folio split now even with MR_NUMA_MISPLACED hint applied.
Then when migrate_pages() didn't migrate all the folios, it's possible the
split small folios be put onto the list instead of the original folio.
Then putting back only the head page won't be enough.
Fix it by putting back all the folios on the list.
[1] https://lore.kernel.org/all/46c948b4-4dd8-6e03-4c7b-ce4e81cfa536@google.com/
[akpm(a)linux-foundation.org: remove now unused local `nr_pages']
Link: https://lkml.kernel.org/r/20240708215537.2630610-1-peterx@redhat.com
Fixes: 7262f208ca68 ("mm/migrate: split source folio if it is on deferred split list")
Signed-off-by: Peter Xu <peterx(a)redhat.com>
Reviewed-by: Zi Yan <ziy(a)nvidia.com>
Reviewed-by: Baolin Wang <baolin.wang(a)linux.alibaba.com>
Cc: Yang Shi <shy828301(a)gmail.com>
Cc: Hugh Dickins <hughd(a)google.com>
Cc: Huang Ying <ying.huang(a)intel.com>
Cc: David Hildenbrand <david(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/mm/migrate.c b/mm/migrate.c
index 6eb9df239230..bdbb5bb04c91 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2621,20 +2621,13 @@ int migrate_misplaced_folio(struct folio *folio, struct vm_area_struct *vma,
int nr_remaining;
unsigned int nr_succeeded;
LIST_HEAD(migratepages);
- int nr_pages = folio_nr_pages(folio);
list_add(&folio->lru, &migratepages);
nr_remaining = migrate_pages(&migratepages, alloc_misplaced_dst_folio,
NULL, node, MIGRATE_ASYNC,
MR_NUMA_MISPLACED, &nr_succeeded);
- if (nr_remaining) {
- if (!list_empty(&migratepages)) {
- list_del(&folio->lru);
- node_stat_mod_folio(folio, NR_ISOLATED_ANON +
- folio_is_file_lru(folio), -nr_pages);
- folio_putback_lru(folio);
- }
- }
+ if (nr_remaining && !list_empty(&migratepages))
+ putback_movable_pages(&migratepages);
if (nr_succeeded) {
count_vm_numa_events(NUMA_PAGE_MIGRATE, nr_succeeded);
if (!node_is_toptier(folio_nid(folio)) && node_is_toptier(node))
The patch below does not apply to the 6.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.10.y
git checkout FETCH_HEAD
git cherry-pick -x 68ed2a394a0190433ba982b353579075a29099bd
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072925-darling-chaplain-8e34@gregkh' --subject-prefix 'PATCH 6.10.y' HEAD^..
Possible dependencies:
68ed2a394a01 ("mm: avoid overflows in dirty throttling logic")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 68ed2a394a0190433ba982b353579075a29099bd Mon Sep 17 00:00:00 2001
From: Jan Kara <jack(a)suse.cz>
Date: Fri, 21 Jun 2024 16:42:38 +0200
Subject: [PATCH] mm: avoid overflows in dirty throttling logic
The dirty throttling logic is interspersed with assumptions that dirty
limits in PAGE_SIZE units fit into 32-bit (so that various multiplications
fit into 64-bits). If limits end up being larger, we will hit overflows,
possible divisions by 0 etc. Fix these problems by never allowing so
large dirty limits as they have dubious practical value anyway. For
dirty_bytes / dirty_background_bytes interfaces we can just refuse to set
so large limits. For dirty_ratio / dirty_background_ratio it isn't so
simple as the dirty limit is computed from the amount of available memory
which can change due to memory hotplug etc. So when converting dirty
limits from ratios to numbers of pages, we just don't allow the result to
exceed UINT_MAX.
This is root-only triggerable problem which occurs when the operator
sets dirty limits to >16 TB.
Link: https://lkml.kernel.org/r/20240621144246.11148-2-jack@suse.cz
Signed-off-by: Jan Kara <jack(a)suse.cz>
Reported-by: Zach O'Keefe <zokeefe(a)google.com>
Reviewed-By: Zach O'Keefe <zokeefe(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index c4aa6e84c20a..acff24e9fae4 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -417,13 +417,20 @@ static void domain_dirty_limits(struct dirty_throttle_control *dtc)
else
bg_thresh = (bg_ratio * available_memory) / PAGE_SIZE;
- if (bg_thresh >= thresh)
- bg_thresh = thresh / 2;
tsk = current;
if (rt_task(tsk)) {
bg_thresh += bg_thresh / 4 + global_wb_domain.dirty_limit / 32;
thresh += thresh / 4 + global_wb_domain.dirty_limit / 32;
}
+ /*
+ * Dirty throttling logic assumes the limits in page units fit into
+ * 32-bits. This gives 16TB dirty limits max which is hopefully enough.
+ */
+ if (thresh > UINT_MAX)
+ thresh = UINT_MAX;
+ /* This makes sure bg_thresh is within 32-bits as well */
+ if (bg_thresh >= thresh)
+ bg_thresh = thresh / 2;
dtc->thresh = thresh;
dtc->bg_thresh = bg_thresh;
@@ -473,7 +480,11 @@ static unsigned long node_dirty_limit(struct pglist_data *pgdat)
if (rt_task(tsk))
dirty += dirty / 4;
- return dirty;
+ /*
+ * Dirty throttling logic assumes the limits in page units fit into
+ * 32-bits. This gives 16TB dirty limits max which is hopefully enough.
+ */
+ return min_t(unsigned long, dirty, UINT_MAX);
}
/**
@@ -510,10 +521,17 @@ static int dirty_background_bytes_handler(struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
int ret;
+ unsigned long old_bytes = dirty_background_bytes;
ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
- if (ret == 0 && write)
+ if (ret == 0 && write) {
+ if (DIV_ROUND_UP(dirty_background_bytes, PAGE_SIZE) >
+ UINT_MAX) {
+ dirty_background_bytes = old_bytes;
+ return -ERANGE;
+ }
dirty_background_ratio = 0;
+ }
return ret;
}
@@ -539,6 +557,10 @@ static int dirty_bytes_handler(struct ctl_table *table, int write,
ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
if (ret == 0 && write && vm_dirty_bytes != old_bytes) {
+ if (DIV_ROUND_UP(vm_dirty_bytes, PAGE_SIZE) > UINT_MAX) {
+ vm_dirty_bytes = old_bytes;
+ return -ERANGE;
+ }
writeback_set_ratelimit();
vm_dirty_ratio = 0;
}
The patch below does not apply to the 6.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.10.y
git checkout FETCH_HEAD
git cherry-pick -x 00f58104202c472e487f0866fbd38832523fd4f9
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072942-compare-unworried-8aec@gregkh' --subject-prefix 'PATCH 6.10.y' HEAD^..
Possible dependencies:
00f58104202c ("mm: fix khugepaged activation policy")
7f83bf14603e ("mm/huge_memory: mark racy access onhuge_anon_orders_always")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 00f58104202c472e487f0866fbd38832523fd4f9 Mon Sep 17 00:00:00 2001
From: Ryan Roberts <ryan.roberts(a)arm.com>
Date: Thu, 4 Jul 2024 10:10:50 +0100
Subject: [PATCH] mm: fix khugepaged activation policy
Since the introduction of mTHP, the docuementation has stated that
khugepaged would be enabled when any mTHP size is enabled, and disabled
when all mTHP sizes are disabled. There are 2 problems with this; 1.
this is not what was implemented by the code and 2. this is not the
desirable behavior.
Desirable behavior is for khugepaged to be enabled when any PMD-sized THP
is enabled, anon or file. (Note that file THP is still controlled by the
top-level control so we must always consider that, as well as the PMD-size
mTHP control for anon). khugepaged only supports collapsing to PMD-sized
THP so there is no value in enabling it when PMD-sized THP is disabled.
So let's change the code and documentation to reflect this policy.
Further, per-size enabled control modification events were not previously
forwarded to khugepaged to give it an opportunity to start or stop.
Consequently the following was resulting in khugepaged eroneously not
being activated:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo always > /sys/kernel/mm/transparent_hugepage/hugepages-2048kB/enabled
[ryan.roberts(a)arm.com: v3]
Link: https://lkml.kernel.org/r/20240705102849.2479686-1-ryan.roberts@arm.com
Link: https://lkml.kernel.org/r/20240705102849.2479686-1-ryan.roberts@arm.com
Link: https://lkml.kernel.org/r/20240704091051.2411934-1-ryan.roberts@arm.com
Signed-off-by: Ryan Roberts <ryan.roberts(a)arm.com>
Fixes: 3485b88390b0 ("mm: thp: introduce multi-size THP sysfs interface")
Closes: https://lore.kernel.org/linux-mm/7a0bbe69-1e3d-4263-b206-da007791a5c4@redha…
Acked-by: David Hildenbrand <david(a)redhat.com>
Cc: Baolin Wang <baolin.wang(a)linux.alibaba.com>
Cc: Barry Song <baohua(a)kernel.org>
Cc: Jonathan Corbet <corbet(a)lwn.net>
Cc: Lance Yang <ioworker0(a)gmail.com>
Cc: Yang Shi <shy828301(a)gmail.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
index a1bc9b24e29a..fe237825b95c 100644
--- a/Documentation/admin-guide/mm/transhuge.rst
+++ b/Documentation/admin-guide/mm/transhuge.rst
@@ -202,12 +202,11 @@ PMD-mappable transparent hugepage::
cat /sys/kernel/mm/transparent_hugepage/hpage_pmd_size
-khugepaged will be automatically started when one or more hugepage
-sizes are enabled (either by directly setting "always" or "madvise",
-or by setting "inherit" while the top-level enabled is set to "always"
-or "madvise"), and it'll be automatically shutdown when the last
-hugepage size is disabled (either by directly setting "never", or by
-setting "inherit" while the top-level enabled is set to "never").
+khugepaged will be automatically started when PMD-sized THP is enabled
+(either of the per-size anon control or the top-level control are set
+to "always" or "madvise"), and it'll be automatically shutdown when
+PMD-sized THP is disabled (when both the per-size anon control and the
+top-level control are "never")
Khugepaged controls
-------------------
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index cee3c5da8f0e..acb6ac24a07e 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -128,18 +128,6 @@ static inline bool hugepage_global_always(void)
(1<<TRANSPARENT_HUGEPAGE_FLAG);
}
-static inline bool hugepage_flags_enabled(void)
-{
- /*
- * We cover both the anon and the file-backed case here; we must return
- * true if globally enabled, even when all anon sizes are set to never.
- * So we don't need to look at huge_anon_orders_inherit.
- */
- return hugepage_global_enabled() ||
- READ_ONCE(huge_anon_orders_always) ||
- READ_ONCE(huge_anon_orders_madvise);
-}
-
static inline int highest_order(unsigned long orders)
{
return fls_long(orders) - 1;
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 17fb072a0ca1..f8b5cbd4dd71 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -502,6 +502,13 @@ static ssize_t thpsize_enabled_store(struct kobject *kobj,
} else
ret = -EINVAL;
+ if (ret > 0) {
+ int err;
+
+ err = start_stop_khugepaged();
+ if (err)
+ ret = err;
+ }
return ret;
}
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 409f67a817f1..a5ec03ef8722 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -413,6 +413,26 @@ static inline int hpage_collapse_test_exit_or_disable(struct mm_struct *mm)
test_bit(MMF_DISABLE_THP, &mm->flags);
}
+static bool hugepage_pmd_enabled(void)
+{
+ /*
+ * We cover both the anon and the file-backed case here; file-backed
+ * hugepages, when configured in, are determined by the global control.
+ * Anon pmd-sized hugepages are determined by the pmd-size control.
+ */
+ if (IS_ENABLED(CONFIG_READ_ONLY_THP_FOR_FS) &&
+ hugepage_global_enabled())
+ return true;
+ if (test_bit(PMD_ORDER, &huge_anon_orders_always))
+ return true;
+ if (test_bit(PMD_ORDER, &huge_anon_orders_madvise))
+ return true;
+ if (test_bit(PMD_ORDER, &huge_anon_orders_inherit) &&
+ hugepage_global_enabled())
+ return true;
+ return false;
+}
+
void __khugepaged_enter(struct mm_struct *mm)
{
struct khugepaged_mm_slot *mm_slot;
@@ -449,7 +469,7 @@ void khugepaged_enter_vma(struct vm_area_struct *vma,
unsigned long vm_flags)
{
if (!test_bit(MMF_VM_HUGEPAGE, &vma->vm_mm->flags) &&
- hugepage_flags_enabled()) {
+ hugepage_pmd_enabled()) {
if (thp_vma_allowable_order(vma, vm_flags, TVA_ENFORCE_SYSFS,
PMD_ORDER))
__khugepaged_enter(vma->vm_mm);
@@ -2462,8 +2482,7 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages, int *result,
static int khugepaged_has_work(void)
{
- return !list_empty(&khugepaged_scan.mm_head) &&
- hugepage_flags_enabled();
+ return !list_empty(&khugepaged_scan.mm_head) && hugepage_pmd_enabled();
}
static int khugepaged_wait_event(void)
@@ -2536,7 +2555,7 @@ static void khugepaged_wait_work(void)
return;
}
- if (hugepage_flags_enabled())
+ if (hugepage_pmd_enabled())
wait_event_freezable(khugepaged_wait, khugepaged_wait_event());
}
@@ -2567,7 +2586,7 @@ static void set_recommended_min_free_kbytes(void)
int nr_zones = 0;
unsigned long recommended_min;
- if (!hugepage_flags_enabled()) {
+ if (!hugepage_pmd_enabled()) {
calculate_min_free_kbytes();
goto update_wmarks;
}
@@ -2617,7 +2636,7 @@ int start_stop_khugepaged(void)
int err = 0;
mutex_lock(&khugepaged_mutex);
- if (hugepage_flags_enabled()) {
+ if (hugepage_pmd_enabled()) {
if (!khugepaged_thread)
khugepaged_thread = kthread_run(khugepaged, NULL,
"khugepaged");
@@ -2643,7 +2662,7 @@ int start_stop_khugepaged(void)
void khugepaged_min_free_kbytes_update(void)
{
mutex_lock(&khugepaged_mutex);
- if (hugepage_flags_enabled() && khugepaged_thread)
+ if (hugepage_pmd_enabled() && khugepaged_thread)
set_recommended_min_free_kbytes();
mutex_unlock(&khugepaged_mutex);
}
I'm announcing the release of the 6.9.12 kernel.
All users of the 6.9 kernel series must upgrade.
The updated 6.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.9.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 -
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1
arch/arm64/boot/dts/qcom/msm8998.dtsi | 1
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 13 +++++++-
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 13 +++++++-
arch/arm64/boot/dts/qcom/sc7180.dtsi | 1
arch/arm64/boot/dts/qcom/sc7280.dtsi | 1
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1
arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +
arch/arm64/boot/dts/qcom/sm6115.dtsi | 1
arch/arm64/boot/dts/qcom/sm6350.dtsi | 1
arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 17 ++++++++---
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 17 ++++++++---
arch/s390/mm/fault.c | 3 +
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 -
drivers/net/tap.c | 5 +++
drivers/net/tun.c | 3 +
drivers/usb/gadget/function/f_midi2.c | 19 +++++++-----
fs/jfs/xattr.c | 23 ++++++++++++---
fs/locks.c | 9 ++---
fs/ntfs3/fslog.c | 44 ++++++++++++++++++++++++----
fs/ocfs2/dir.c | 46 ++++++++++++++++++------------
sound/core/pcm_dmaengine.c | 6 +++
sound/core/seq/seq_ump_client.c | 16 ++++++++++
sound/pci/hda/patch_realtek.c | 3 +
27 files changed, 198 insertions(+), 55 deletions(-)
Abel Vesa (4):
arm64: dts: qcom: x1e80100-qcp: Fix USB PHYs regulators
arm64: dts: qcom: x1e80100-crd: Fix the PHY regulator for PCIe 6a
arm64: dts: qcom: x1e80100-qcp: Fix the PHY regulator for PCIe 6a
arm64: dts: qcom: x1e80100-crd: Fix USB PHYs regulators
Dan Carpenter (1):
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Dmitry Baryshkov (2):
arm64: dts: qcom: qrb2210-rb1: switch I2C2 to i2c-gpio
arm64: dts: qcom: qrb4210-rb2: switch I2C2 to i2c-gpio
Dongli Zhang (1):
tun: add missing verification for short frame
Edson Juliano Drosdeck (1):
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
Gerald Schaefer (1):
s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()
Greg Kroah-Hartman (1):
Linux 6.9.12
Jann Horn (1):
filelock: Fix fcntl/close race recovery compat path
Konstantin Komarov (1):
fs/ntfs3: Add a check for attr_names and oatbl
Krishna Kurapati (10):
arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode
arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB
arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB
arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for USB
Seunghun Han (1):
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Shenghao Ding (1):
ALSA: hda/tas2781: Add new quirk for Lenovo Hera2 Laptop
Shengjiu Wang (1):
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Si-Wei Liu (1):
tap: add missing verification for short frame
Takashi Iwai (2):
usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup
ALSA: seq: ump: Skip useless ports for static blocks
lei lu (3):
ocfs2: add bounds checking to ocfs2_check_dir_entry()
jfs: don't walk off the end of ealist
fs/ntfs3: Validate ff offset
We recently made GUP's common page table walking code to also walk
hugetlb VMAs without most hugetlb special-casing, preparing for the
future of having less hugetlb-specific page table walking code in the
codebase. Turns out that we missed one page table locking detail: page
table locking for hugetlb folios that are not mapped using a single
PMD/PUD.
Assume we have hugetlb folio that spans multiple PTEs (e.g., 64 KiB
hugetlb folios on arm64 with 4 KiB base page size). GUP, as it walks the
page tables, will perform a pte_offset_map_lock() to grab the PTE table
lock.
However, hugetlb that concurrently modifies these page tables would
actually grab the mm->page_table_lock: with USE_SPLIT_PTE_PTLOCKS, the
locks would differ. Something similar can happen right now with hugetlb
folios that span multiple PMDs when USE_SPLIT_PMD_PTLOCKS.
Let's make huge_pte_lockptr() effectively uses the same PT locks as any
core-mm page table walker would.
There is one ugly case: powerpc 8xx, whereby we have an 8 MiB hugetlb
folio being mapped using two PTE page tables. While hugetlb wants to take
the PMD table lock, core-mm would grab the PTE table lock of one of both
PTE page tables. In such corner cases, we have to make sure that both
locks match, which is (fortunately!) currently guaranteed for 8xx as it
does not support SMP.
Fixes: 9cb28da54643 ("mm/gup: handle hugetlb in the generic follow_page_mask code")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: David Hildenbrand <david(a)redhat.com>
---
include/linux/hugetlb.h | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index c9bf68c239a01..da800e56fe590 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -944,10 +944,29 @@ static inline bool htlb_allow_alloc_fallback(int reason)
static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
struct mm_struct *mm, pte_t *pte)
{
- if (huge_page_size(h) == PMD_SIZE)
+ VM_WARN_ON(huge_page_size(h) == PAGE_SIZE);
+ VM_WARN_ON(huge_page_size(h) >= P4D_SIZE);
+
+ /*
+ * hugetlb must use the exact same PT locks as core-mm page table
+ * walkers would. When modifying a PTE table, hugetlb must take the
+ * PTE PT lock, when modifying a PMD table, hugetlb must take the PMD
+ * PT lock etc.
+ *
+ * The expectation is that any hugetlb folio smaller than a PMD is
+ * always mapped into a single PTE table and that any hugetlb folio
+ * smaller than a PUD (but at least as big as a PMD) is always mapped
+ * into a single PMD table.
+ *
+ * If that does not hold for an architecture, then that architecture
+ * must disable split PT locks such that all *_lockptr() functions
+ * will give us the same result: the per-MM PT lock.
+ */
+ if (huge_page_size(h) < PMD_SIZE)
+ return pte_lockptr(mm, pte);
+ else if (huge_page_size(h) < PUD_SIZE)
return pmd_lockptr(mm, (pmd_t *) pte);
- VM_BUG_ON(huge_page_size(h) == PAGE_SIZE);
- return &mm->page_table_lock;
+ return pud_lockptr(mm, (pud_t *) pte);
}
#ifndef hugepages_supported
--
2.45.2
From: Volodymyr Babchuk <Volodymyr_Babchuk(a)epam.com>
Linux does not write into cmd-db region. This region of memory is write
protected by XPU. XPU may sometime falsely detect clean cache eviction
as "write" into the write protected region leading to secure interrupt
which causes an endless loop somewhere in Trust Zone.
The only reason it is working right now is because Qualcomm Hypervisor
maps the same region as Non-Cacheable memory in Stage 2 translation
tables. The issue manifests if we want to use another hypervisor (like
Xen or KVM), which does not know anything about those specific mappings.
Changing the mapping of cmd-db memory from MEMREMAP_WB to MEMREMAP_WT/WC
removes dependency on correct mappings in Stage 2 tables. This patch
fixes the issue by updating the mapping to MEMREMAP_WC.
I tested this on SA8155P with Xen.
Fixes: 312416d9171a ("drivers: qcom: add command DB driver")
Cc: stable(a)vger.kernel.org # 5.4+
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk(a)epam.com>
Tested-by: Nikita Travkin <nikita(a)trvn.ru> # sc7180 WoA in EL2
Signed-off-by: Maulik Shah <quic_mkshah(a)quicinc.com>
---
Changes in v2:
- Use MEMREMAP_WC instead of MEMREMAP_WT
- Update commit message from comments in v1
- Add Fixes tag and Cc to stable
- Link to v1: https://lore.kernel.org/lkml/20240327200917.2576034-1-volodymyr_babchuk@epa…
---
drivers/soc/qcom/cmd-db.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c
index d84572662017..ae66c2623d25 100644
--- a/drivers/soc/qcom/cmd-db.c
+++ b/drivers/soc/qcom/cmd-db.c
@@ -349,7 +349,7 @@ static int cmd_db_dev_probe(struct platform_device *pdev)
return -EINVAL;
}
- cmd_db_header = memremap(rmem->base, rmem->size, MEMREMAP_WB);
+ cmd_db_header = memremap(rmem->base, rmem->size, MEMREMAP_WC);
if (!cmd_db_header) {
ret = -ENOMEM;
cmd_db_header = NULL;
---
base-commit: 797012914d2d031430268fe512af0ccd7d8e46ef
change-id: 20240718-cmd_db_uncached-e896da5c5296
Best regards,
--
Maulik Shah <quic_mkshah(a)quicinc.com>
With PWRSTS_OFF_ON, PCIe GDSCs are turned off during gdsc_disable(). This
can happen during scenarios such as system suspend and breaks the resume
of PCIe controllers from suspend.
So use PWRSTS_RET_ON to indicate the GDSC driver to not turn off the GDSCs
during gdsc_disable() and allow the hardware to transition the GDSCs to
retention when the parent domain enters low power state during system
suspend.
Cc: stable(a)vger.kernel.org # 5.17
Fixes: db0c944ee92b ("clk: qcom: Add clock driver for SM8450")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam(a)linaro.org>
---
drivers/clk/qcom/gcc-sm8450.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/gcc-sm8450.c b/drivers/clk/qcom/gcc-sm8450.c
index 639a9a955914..c445c271678a 100644
--- a/drivers/clk/qcom/gcc-sm8450.c
+++ b/drivers/clk/qcom/gcc-sm8450.c
@@ -2974,7 +2974,7 @@ static struct gdsc pcie_0_gdsc = {
.pd = {
.name = "pcie_0_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
};
static struct gdsc pcie_1_gdsc = {
@@ -2982,7 +2982,7 @@ static struct gdsc pcie_1_gdsc = {
.pd = {
.name = "pcie_1_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
};
static struct gdsc ufs_phy_gdsc = {
--
2.25.1
This should fix the filesystem corruption during RAID resync.
Checking this condition in raid1_check_read_range is not ideal, but this
is only a debug patch.
Link: https://lore.kernel.org/lkml/20240724141906.10b4fc4e@peluse-desk5/T/#m671d6…
Signed-off-by: Mateusz Jończyk <mat.jonczyk(a)o2.pl>
Cc: Yu Kuai <yukuai3(a)huawei.com>
Cc: Song Liu <song(a)kernel.org>
Cc: stable(a)vger.kernel.org
---
drivers/md/raid1-10.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/md/raid1-10.c b/drivers/md/raid1-10.c
index 2ea1710a3b70..4ab896e8cb12 100644
--- a/drivers/md/raid1-10.c
+++ b/drivers/md/raid1-10.c
@@ -252,6 +252,10 @@ static inline int raid1_check_read_range(struct md_rdev *rdev,
sector_t first_bad;
int bad_sectors;
+ if (!test_bit(In_sync, &rdev->flags) &&
+ rdev->recovery_offset < this_sector + *len)
+ return 0;
+
/* no bad block overlap */
if (!is_badblock(rdev, this_sector, *len, &first_bad, &bad_sectors))
return *len;
--
2.25.1
This patchset serves to prevent a deadlock between
process context and softIRQ context:
A. In the process context
* (lock A) Acquiring spin_lock by snd_pcm_stream_lock_irq() in
snd_pcm_status64()
* (lock B) Then attempt to enter tasklet
B. In the softIRQ context
* (lock B) Enter tasklet
* (lock A) Attempt to acquire spin_lock by snd_pcm_stream_lock_irqsave() in
snd_pcm_period_elapsed()
? tasklet_unlock_spin_wait
</NMI>
<TASK>
ohci_flush_iso_completions firewire_ohci
amdtp_domain_stream_pcm_pointer snd_firewire_lib
snd_pcm_update_hw_ptr0 snd_pcm
snd_pcm_status64 snd_pcm
? native_queued_spin_lock_slowpath
</NMI>
<IRQ>
_raw_spin_lock_irqsave
snd_pcm_period_elapsed snd_pcm
process_rx_packets snd_firewire_lib
irq_target_callback snd_firewire_lib
handle_it_packet firewire_ohci
context_tasklet firewire_ohci
The issue has been reported as a regression of kernel 5.14:
Link: https://lore.kernel.org/regressions/kwryofzdmjvzkuw6j3clftsxmoolynljztxqwg7…
("[REGRESSION] ALSA: firewire-lib: snd_pcm_period_elapsed deadlock with
Fireface 800")
Commit 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event
in process context") removed the process context workqueue from
amdtp_domain_stream_pcm_pointer() and update_pcm_pointers() to remove
its overhead.
Commit b5b519965c4c ("ALSA: firewire-lib: obsolete workqueue for period
update") belongs to the same patch series and removed
the now-unused workqueue entirely.
Though being observed on RME Fireface 800, this issue would affect all
Firewire audio interfaces using ohci amdtp + pcm streaming.
ALSA streaming, especially under intensive CPU load will reveal this issue
the soonest due to issuing more hardIRQs, with time to occurrence ranging
from 2 secons to 30 minutes after starting playback.
to reproduce the issue:
direct ALSA playback to the device:
mpv --audio-device=alsa/sysdefault:CARD=Fireface800 Spor-Ignition.flac
Time to occurrence: 2s to 30m
Likelihood increased by:
- high CPU load
stress --cpu $(nproc)
- switching between applications via workspaces
tested with i915 in Xfce
PulsaAudio / PipeWire conceal the issue as they run PCM substream
without period wakeup mode, issuing less hardIRQs.
Backport note:
Also applies to and fixes on (tested):
6.10.2, 6.9.12, 6.6.43, 6.1.102, 5.15.164
Edmund Raile (2):
ALSA: firewire-lib: restore workqueue for process context
ALSA: firewire-lib: prevent deadlock between process and softIRQ
context
sound/firewire/amdtp-stream.c | 36 ++++++++++++++++++++++-------------
sound/firewire/amdtp-stream.h | 1 +
2 files changed, 24 insertions(+), 13 deletions(-)
--
2.45.2
After a recent change in clang to stop consuming all instances of '-S'
and '-c' [1], the stack protector scripts break due to the kernel's use
of -Werror=unused-command-line-argument to catch cases where flags are
not being properly consumed by the compiler driver:
$ echo | clang -o - -x c - -S -c -Werror=unused-command-line-argument
clang: error: argument unused during compilation: '-c' [-Werror,-Wunused-command-line-argument]
This results in CONFIG_STACKPROTECTOR getting disabled because
CONFIG_CC_HAS_SANE_STACKPROTECTOR is no longer set.
'-c' and '-S' both instruct the compiler to stop at different stages of
the pipeline ('-S' after compiling, '-c' after assembling), so having
them present together in the same command makes little sense. In this
case, the test wants to stop before assembling because it is looking at
the textual assembly output of the compiler for either '%fs' or '%gs',
so remove '-c' from the list of arguments to resolve the error.
All versions of GCC continue to work after this change, along with
versions of clang that do or do not contain the change mentioned above.
Cc: stable(a)vger.kernel.org
Fixes: 4f7fd4d7a791 ("[PATCH] Add the -fstack-protector option to the CFLAGS")
Fixes: 60a5317ff0f4 ("x86: implement x86_32 stack protector")
Link: https://github.com/llvm/llvm-project/commit/6461e537815f7fa68cef06842505353… [1]
Signed-off-by: Nathan Chancellor <nathan(a)kernel.org>
---
I think this could go via either -tip or Kbuild?
Perhaps this is an issue in the clang commit mentioned in the message
above since it deviates from GCC (Fangrui is on CC here) but I think the
combination of these options is a little dubious to begin with, hence
this change.
---
scripts/gcc-x86_32-has-stack-protector.sh | 2 +-
scripts/gcc-x86_64-has-stack-protector.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/gcc-x86_32-has-stack-protector.sh b/scripts/gcc-x86_32-has-stack-protector.sh
index 825c75c5b715..9459ca4f0f11 100755
--- a/scripts/gcc-x86_32-has-stack-protector.sh
+++ b/scripts/gcc-x86_32-has-stack-protector.sh
@@ -5,4 +5,4 @@
# -mstack-protector-guard-reg, added by
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81708
-echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -m32 -O0 -fstack-protector -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard - -o - 2> /dev/null | grep -q "%fs"
+echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -m32 -O0 -fstack-protector -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard - -o - 2> /dev/null | grep -q "%fs"
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh
index 75e4e22b986a..f680bb01aeeb 100755
--- a/scripts/gcc-x86_64-has-stack-protector.sh
+++ b/scripts/gcc-x86_64-has-stack-protector.sh
@@ -1,4 +1,4 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
-echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -m64 -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
+echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -m64 -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
---
base-commit: 1722389b0d863056d78287a120a1d6cadb8d4f7b
change-id: 20240726-fix-x86-stack-protector-tests-b542b1b9416b
Best regards,
--
Nathan Chancellor <nathan(a)kernel.org>
From: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
[ Upstream commit 524e057b2d66b61f9b63b6db30467ab7b0bb4796 ]
The Broadcom BCM5760X NIC may be a multi-function device.
While it does not advertise an ACS capability, peer-to-peer transactions
are not possible between the individual functions. So it is ok to treat
them as fully isolated.
Add an ACS quirk for this device so the functions can be in independent
IOMMU groups and attached individually to userspace applications using
VFIO.
[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20240510204228.73435-1-ajit.khaparde@broa…
Signed-off-by: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski(a)kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
Reviewed-by: Andy Gospodarek <gospo(a)broadcom.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/pci/quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index bb51820890965..a3a4c4724b6c9 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4822,6 +4822,10 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1760, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1761, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1762, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1763, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs },
{ 0 }
};
--
2.43.0
From: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
[ Upstream commit 524e057b2d66b61f9b63b6db30467ab7b0bb4796 ]
The Broadcom BCM5760X NIC may be a multi-function device.
While it does not advertise an ACS capability, peer-to-peer transactions
are not possible between the individual functions. So it is ok to treat
them as fully isolated.
Add an ACS quirk for this device so the functions can be in independent
IOMMU groups and attached individually to userspace applications using
VFIO.
[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20240510204228.73435-1-ajit.khaparde@broa…
Signed-off-by: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski(a)kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
Reviewed-by: Andy Gospodarek <gospo(a)broadcom.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/pci/quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 3bc7058404156..aef73bc36ee98 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4986,6 +4986,10 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1760, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1761, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1762, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1763, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs },
/* Amazon Annapurna Labs */
{ PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },
--
2.43.0
From: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
[ Upstream commit 524e057b2d66b61f9b63b6db30467ab7b0bb4796 ]
The Broadcom BCM5760X NIC may be a multi-function device.
While it does not advertise an ACS capability, peer-to-peer transactions
are not possible between the individual functions. So it is ok to treat
them as fully isolated.
Add an ACS quirk for this device so the functions can be in independent
IOMMU groups and attached individually to userspace applications using
VFIO.
[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20240510204228.73435-1-ajit.khaparde@broa…
Signed-off-by: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski(a)kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
Reviewed-by: Andy Gospodarek <gospo(a)broadcom.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/pci/quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 56dce858a6934..e02a1e513f989 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4997,6 +4997,10 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1760, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1761, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1762, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1763, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs },
/* Amazon Annapurna Labs */
{ PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },
--
2.43.0
From: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
[ Upstream commit 524e057b2d66b61f9b63b6db30467ab7b0bb4796 ]
The Broadcom BCM5760X NIC may be a multi-function device.
While it does not advertise an ACS capability, peer-to-peer transactions
are not possible between the individual functions. So it is ok to treat
them as fully isolated.
Add an ACS quirk for this device so the functions can be in independent
IOMMU groups and attached individually to userspace applications using
VFIO.
[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20240510204228.73435-1-ajit.khaparde@broa…
Signed-off-by: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski(a)kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
Reviewed-by: Andy Gospodarek <gospo(a)broadcom.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/pci/quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index ec4277d7835b2..1bf1a83dabb93 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5092,6 +5092,10 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1760, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1761, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1762, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1763, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs },
/* Amazon Annapurna Labs */
{ PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },
--
2.43.0
From: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
[ Upstream commit 524e057b2d66b61f9b63b6db30467ab7b0bb4796 ]
The Broadcom BCM5760X NIC may be a multi-function device.
While it does not advertise an ACS capability, peer-to-peer transactions
are not possible between the individual functions. So it is ok to treat
them as fully isolated.
Add an ACS quirk for this device so the functions can be in independent
IOMMU groups and attached individually to userspace applications using
VFIO.
[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20240510204228.73435-1-ajit.khaparde@broa…
Signed-off-by: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski(a)kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
Reviewed-by: Andy Gospodarek <gospo(a)broadcom.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/pci/quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 568410e64ce64..a2ce4e08edf5a 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5099,6 +5099,10 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1760, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1761, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1762, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1763, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs },
/* Amazon Annapurna Labs */
{ PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },
--
2.43.0
From: Ricardo Ribalda <ribalda(a)chromium.org>
[ Upstream commit 5cd7c25f6f0576073b3d03bc4cfb1e8ca63a1195 ]
Some SunplusIT cameras took a borderline interpretation of the UVC 1.5
standard, and fill the PTS and SCR fields with invalid data if the
package does not contain data.
"STC must be captured when the first video data of a video frame is put
on the USB bus."
Some SunplusIT devices send, e.g.,
buffer: 0xa7755c00 len 000012 header:0x8c stc 00000000 sof 0000 pts 00000000
buffer: 0xa7755c00 len 000012 header:0x8c stc 00000000 sof 0000 pts 00000000
buffer: 0xa7755c00 len 000668 header:0x8c stc 73779dba sof 070c pts 7376d37a
While the UVC specification meant that the first two packets shouldn't
have had the SCR bit set in the header.
This borderline/buggy interpretation has been implemented in a variety
of devices, from directly SunplusIT and from other OEMs that rebrand
SunplusIT products. So quirking based on VID:PID will be problematic.
All the affected modules have the following extension unit:
VideoControl Interface Descriptor:
guidExtensionCode {82066163-7050-ab49-b8cc-b3855e8d221d}
But the vendor plans to use that GUID in the future and fix the bug,
this means that we should use heuristic to figure out the broken
packets.
This patch takes care of this.
lsusb of one of the affected cameras:
Bus 001 Device 003: ID 1bcf:2a01 Sunplus Innovation Technology Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.01
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x1bcf Sunplus Innovation Technology Inc.
idProduct 0x2a01
bcdDevice 0.02
iManufacturer 1 SunplusIT Inc
iProduct 2 HanChen Wise Camera
iSerial 3 01.00.00
bNumConfigurations 1
Tested-by: HungNien Chen <hn.chen(a)sunplusit.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky(a)chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ribalda(a)chromium.org>
Reviewed-by: Tomasz Figa <tfiga(a)chromium.org>
Link: https://lore.kernel.org/r/20240323-resend-hwtimestamp-v10-2-b08e590d97c7@ch…
Signed-off-by: Laurent Pinchart <laurent.pinchart(a)ideasonboard.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/media/usb/uvc/uvc_video.c | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index c57bc62251bb8..e2c1b98fb4a25 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -473,6 +473,7 @@ uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *buf,
ktime_t time;
u16 host_sof;
u16 dev_sof;
+ u32 dev_stc;
switch (data[1] & (UVC_STREAM_PTS | UVC_STREAM_SCR)) {
case UVC_STREAM_PTS | UVC_STREAM_SCR:
@@ -517,6 +518,34 @@ uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *buf,
if (dev_sof == stream->clock.last_sof)
return;
+ dev_stc = get_unaligned_le32(&data[header_size - 6]);
+
+ /*
+ * STC (Source Time Clock) is the clock used by the camera. The UVC 1.5
+ * standard states that it "must be captured when the first video data
+ * of a video frame is put on the USB bus". This is generally understood
+ * as requiring devices to clear the payload header's SCR bit before
+ * the first packet containing video data.
+ *
+ * Most vendors follow that interpretation, but some (namely SunplusIT
+ * on some devices) always set the `UVC_STREAM_SCR` bit, fill the SCR
+ * field with 0's,and expect that the driver only processes the SCR if
+ * there is data in the packet.
+ *
+ * Ignore all the hardware timestamp information if we haven't received
+ * any data for this frame yet, the packet contains no data, and both
+ * STC and SOF are zero. This heuristics should be safe on compliant
+ * devices. This should be safe with compliant devices, as in the very
+ * unlikely case where a UVC 1.1 device would send timing information
+ * only before the first packet containing data, and both STC and SOF
+ * happen to be zero for a particular frame, we would only miss one
+ * clock sample from many and the clock recovery algorithm wouldn't
+ * suffer from this condition.
+ */
+ if (buf && buf->bytesused == 0 && len == header_size &&
+ dev_stc == 0 && dev_sof == 0)
+ return;
+
stream->clock.last_sof = dev_sof;
host_sof = usb_get_current_frame_number(stream->dev->udev);
@@ -554,7 +583,7 @@ uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *buf,
spin_lock_irqsave(&stream->clock.lock, flags);
sample = &stream->clock.samples[stream->clock.head];
- sample->dev_stc = get_unaligned_le32(&data[header_size - 6]);
+ sample->dev_stc = dev_stc;
sample->dev_sof = dev_sof;
sample->host_sof = host_sof;
sample->host_time = time;
--
2.43.0
From: Matthew Auld <matthew.auld(a)intel.com>
[ Upstream commit 3cd1585e57908b6efcd967465ef7685f40b2a294 ]
It is really easy to introduce subtle deadlocks in
preempt_fence_work_func() since we operate on single global ordered-wq
for signalling our preempt fences behind the scenes, so even though we
signal a particular fence, everything in the callback should be in the
fence critical section, since blocking in the callback will prevent
other published fences from signalling. If we enlarge the fence critical
section to cover the entire callback, then lockdep should be able to
understand this better, and complain if we grab a sensitive lock like
vm->lock, which is also held when waiting on preempt fences.
Signed-off-by: Matthew Auld <matthew.auld(a)intel.com>
Cc: Matthew Brost <matthew.brost(a)intel.com>
Reviewed-by: Matthew Brost <matthew.brost(a)intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240418144630.299531-2-matth…
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/gpu/drm/xe/xe_preempt_fence.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_preempt_fence.c b/drivers/gpu/drm/xe/xe_preempt_fence.c
index 7d50c6e89d8e7..5b243b7feb59d 100644
--- a/drivers/gpu/drm/xe/xe_preempt_fence.c
+++ b/drivers/gpu/drm/xe/xe_preempt_fence.c
@@ -23,11 +23,19 @@ static void preempt_fence_work_func(struct work_struct *w)
q->ops->suspend_wait(q);
dma_fence_signal(&pfence->base);
- dma_fence_end_signalling(cookie);
-
+ /*
+ * Opt for keep everything in the fence critical section. This looks really strange since we
+ * have just signalled the fence, however the preempt fences are all signalled via single
+ * global ordered-wq, therefore anything that happens in this callback can easily block
+ * progress on the entire wq, which itself may prevent other published preempt fences from
+ * ever signalling. Therefore try to keep everything here in the callback in the fence
+ * critical section. For example if something below grabs a scary lock like vm->lock,
+ * lockdep should complain since we also hold that lock whilst waiting on preempt fences to
+ * complete.
+ */
xe_vm_queue_rebind_worker(q->vm);
-
xe_exec_queue_put(q);
+ dma_fence_end_signalling(cookie);
}
static const char *
--
2.43.0
c1839501fe3e ("ALSA: firewire-lib: fix wrong value as length of header for
CIP_NO_HEADER case") indeed fixes the issue.
Thank you very much!
I just hope non-CIP_NO_HEADER cases work, but then again, looking at the
original struct
```
struct {
struct fw_iso_packet params;
__be32 header[CIP_HEADER_QUADLETS];
} template = { {0}, {0} };
```
the fw_iso_packet wasn't at the end of the array, thus
```
struct fw_iso_packet {
u16 payload_length; /* Length of indirect payload */
u32 interrupt:1; /* Generate interrupt on this packet */
u32 skip:1; /* tx: Set to not send packet at all */
/* rx: Sync bit, wait for matching sy */
u32 tag:2; /* tx: Tag in packet header */
u32 sy:4; /* tx: Sy in packet header */
u32 header_length:8; /* Size of immediate header */
u32 header[]; /* tx: Top of 1394 isoch. data_block */
};
```
its header array wouldn't ever end up being initialized here with > 0 elements.
Maybe that wasn't ever required.
Tested-by: Edmund Raile <edmund.raile(a)protonmail.com>
Link: https://lore.kernel.org/r/20240725155640.128442-1-o-takashi@sakamocchi.jp
This patchset serves to prevent a deadlock between
process context and softIRQ context:
A. In the process context
* (lock A) Acquiring spin_lock by snd_pcm_stream_lock_irq() in
snd_pcm_status64()
* (lock B) Then attempt to enter tasklet
B. In the softIRQ context
* (lock B) Enter tasklet
* (lock A) Attempt to acquire spin_lock by snd_pcm_stream_lock_irqsave() in
snd_pcm_period_elapsed()
? tasklet_unlock_spin_wait
</NMI>
<TASK>
ohci_flush_iso_completions firewire_ohci
amdtp_domain_stream_pcm_pointer snd_firewire_lib
snd_pcm_update_hw_ptr0 snd_pcm
snd_pcm_status64 snd_pcm
? native_queued_spin_lock_slowpath
</NMI>
<IRQ>
_raw_spin_lock_irqsave
snd_pcm_period_elapsed snd_pcm
process_rx_packets snd_firewire_lib
irq_target_callback snd_firewire_lib
handle_it_packet firewire_ohci
context_tasklet firewire_ohci
The issue has been reported as a regression of kernel 5.14:
Link: https://lore.kernel.org/regressions/kwryofzdmjvzkuw6j3clftsxmoolynljztxqwg7…
("[REGRESSION] ALSA: firewire-lib: snd_pcm_period_elapsed deadlock with
Fireface 800")
Commit 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event
in process context") removed the process context workqueue from
amdtp_domain_stream_pcm_pointer() and update_pcm_pointers() to remove
its overhead.
Commit b5b519965c4c ("ALSA: firewire-lib: obsolete workqueue for period
update") belongs to the same patch series and removed
the now-unused workqueue entirely.
Though being observed on RME Fireface 800, this issue would affect all
Firewire audio interfaces using ohci amdtp + pcm streaming.
ALSA streaming, especially under intensive CPU load will reveal this issue
the soonest due to issuing more hardIRQs, with time to occurrence ranging
from 2 secons to 30 minutes after starting playback.
to reproduce the issue:
direct ALSA playback to the device:
mpv --audio-device=alsa/sysdefault:CARD=Fireface800 Spor-Ignition.flac
Time to occurrence: 2s to 30m
Likelihood increased by:
- high CPU load
stress --cpu $(nproc)
- switching between applications via workspaces
tested with i915 in Xfce
PulsaAudio / PipeWire conceal the issue as they run PCM substream
without period wakeup mode, issuing less hardIRQs.
Backport note:
Also applies to and fixes on (tested):
6.10.2, 6.9.12, 6.6.43, 6.1.102, 5.15.164
Edmund Raile (2):
ALSA: firewire-lib: restore workqueue for process context
ALSA: firewire-lib: prevent deadlock between process and softIRQ
context
sound/firewire/amdtp-stream.c | 36 ++++++++++++++++++++++-------------
sound/firewire/amdtp-stream.h | 1 +
2 files changed, 24 insertions(+), 13 deletions(-)
--
2.45.2
Commit 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event
in process context") removed the process context workqueue from
amdtp_domain_stream_pcm_pointer() and update_pcm_pointers() to remove
its overhead.
With RME Fireface 800, this lead to a regression since Kernels 5.14.0,
causing a deadlock with eventual system freeze under ALSA operation:
A. In the process context
* (lock A) Acquiring spin_lock by snd_pcm_stream_lock_irq() in
snd_pcm_status64()
* (lock B) Then attempt to enter tasklet
B. In the softIRQ context
* (lock B) Enter tasklet
* (lock A) Attempt to acquire spin_lock by
snd_pcm_stream_lock_irqsave() in snd_pcm_period_elapsed()
? tasklet_unlock_spin_wait
</NMI>
<TASK>
ohci_flush_iso_completions firewire_ohci
amdtp_domain_stream_pcm_pointer snd_firewire_lib
snd_pcm_update_hw_ptr0 snd_pcm
snd_pcm_status64 snd_pcm
? native_queued_spin_lock_slowpath
</NMI>
<IRQ>
_raw_spin_lock_irqsave
snd_pcm_period_elapsed snd_pcm
process_rx_packets snd_firewire_lib
irq_target_callback snd_firewire_lib
handle_it_packet firewire_ohci
context_tasklet firewire_ohci
Restore the process context work queue to prevent deadlock
between ALSA substream process context spin_lock of
snd_pcm_stream_lock_irq() in snd_pcm_status64()
and OHCI 1394 IT softIRQ context spin_lock of
snd_pcm_stream_lock_irqsave() in snd_pcm_period_elapsed().
Cc: stable(a)vger.kernel.org
Fixes: 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event in process context")
Link: https://lore.kernel.org/r/kwryofzdmjvzkuw6j3clftsxmoolynljztxqwg76hzeo4simn…
Reported-by: edmund.raile <edmund.raile(a)proton.me>
Signed-off-by: Edmund Raile <edmund.raile(a)protonmail.com>
---
sound/firewire/amdtp-stream.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 31201d506a21..c037d7de1fdc 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -615,16 +615,9 @@ static void update_pcm_pointers(struct amdtp_stream *s,
// The program in user process should periodically check the status of intermediate
// buffer associated to PCM substream to process PCM frames in the buffer, instead
// of receiving notification of period elapsed by poll wait.
- if (!pcm->runtime->no_period_wakeup) {
- if (in_softirq()) {
- // In software IRQ context for 1394 OHCI.
- snd_pcm_period_elapsed(pcm);
- } else {
- // In process context of ALSA PCM application under acquired lock of
- // PCM substream.
- snd_pcm_period_elapsed_under_stream_lock(pcm);
- }
- }
+ if (!pcm->runtime->no_period_wakeup)
+ // wq used with amdtp_domain_stream_pcm_pointer() to prevent deadlock
+ queue_work(system_highpri_wq, &s->period_work);
}
}
@@ -1866,9 +1859,11 @@ unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d,
// Process isochronous packets queued till recent isochronous cycle to handle PCM frames.
if (irq_target && amdtp_stream_running(irq_target)) {
- // In software IRQ context, the call causes dead-lock to disable the tasklet
- // synchronously.
- if (!in_softirq())
+ // use wq to prevent deadlock between process context spin_lock
+ // of snd_pcm_stream_lock_irq() in snd_pcm_status64() and
+ // softIRQ context spin_lock of snd_pcm_stream_lock_irqsave()
+ // in snd_pcm_period_elapsed()
+ if ((!in_softirq()) && (current_work() != &s->period_work))
fw_iso_context_flush_completions(irq_target->context);
}
--
2.45.2
Commit 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event
in process context") removed the process context workqueue from
amdtp_domain_stream_pcm_pointer() and update_pcm_pointers() to remove
its overhead.
With RME Fireface 800, this lead to a regression since Kernels 5.14.0,
causing a deadlock with eventual system freeze under ALSA operation:
A. In the process context
* (lock A) Acquiring spin_lock by snd_pcm_stream_lock_irq() in
snd_pcm_status64()
* (lock B) Then attempt to enter tasklet
B. In the softIRQ context
* (lock B) Enter tasklet
* (lock A) Attempt to acquire spin_lock by
snd_pcm_stream_lock_irqsave() in snd_pcm_period_elapsed()
? tasklet_unlock_spin_wait
</NMI>
<TASK>
ohci_flush_iso_completions firewire_ohci
amdtp_domain_stream_pcm_pointer snd_firewire_lib
snd_pcm_update_hw_ptr0 snd_pcm
snd_pcm_status64 snd_pcm
? native_queued_spin_lock_slowpath
</NMI>
<IRQ>
_raw_spin_lock_irqsave
snd_pcm_period_elapsed snd_pcm
process_rx_packets snd_firewire_lib
irq_target_callback snd_firewire_lib
handle_it_packet firewire_ohci
context_tasklet firewire_ohci
Restore the process context work queue to prevent deadlock
between ALSA substream process context spin_lock of
snd_pcm_stream_lock_irq() in snd_pcm_status64()
and OHCI 1394 IT softIRQ context spin_lock of
snd_pcm_stream_lock_irqsave() in snd_pcm_period_elapsed().
Cc: stable(a)vger.kernel.org
Fixes: 7ba5ca32fe6e ("ALSA: firewire-lib: operate for period elapse event in process context")
Link: https://lore.kernel.org/r/kwryofzdmjvzkuw6j3clftsxmoolynljztxqwg76hzeo4simn…
Reported-by: edmund.raile <edmund.raile(a)proton.me>
Signed-off-by: Edmund Raile <edmund.raile(a)protonmail.com>
---
sound/firewire/amdtp-stream.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 31201d506a21..c037d7de1fdc 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -615,16 +615,9 @@ static void update_pcm_pointers(struct amdtp_stream *s,
// The program in user process should periodically check the status of intermediate
// buffer associated to PCM substream to process PCM frames in the buffer, instead
// of receiving notification of period elapsed by poll wait.
- if (!pcm->runtime->no_period_wakeup) {
- if (in_softirq()) {
- // In software IRQ context for 1394 OHCI.
- snd_pcm_period_elapsed(pcm);
- } else {
- // In process context of ALSA PCM application under acquired lock of
- // PCM substream.
- snd_pcm_period_elapsed_under_stream_lock(pcm);
- }
- }
+ if (!pcm->runtime->no_period_wakeup)
+ // wq used with amdtp_domain_stream_pcm_pointer() to prevent deadlock
+ queue_work(system_highpri_wq, &s->period_work);
}
}
@@ -1866,9 +1859,11 @@ unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d,
// Process isochronous packets queued till recent isochronous cycle to handle PCM frames.
if (irq_target && amdtp_stream_running(irq_target)) {
- // In software IRQ context, the call causes dead-lock to disable the tasklet
- // synchronously.
- if (!in_softirq())
+ // use wq to prevent deadlock between process context spin_lock
+ // of snd_pcm_stream_lock_irq() in snd_pcm_status64() and
+ // softIRQ context spin_lock of snd_pcm_stream_lock_irqsave()
+ // in snd_pcm_period_elapsed()
+ if ((!in_softirq()) && (current_work() != &s->period_work))
fw_iso_context_flush_completions(irq_target->context);
}
--
2.45.2
From: Heiner Kallweit <hkallweit1(a)gmail.com>
[ Upstream commit 982300c115d229565d7af8e8b38aa1ee7bb1f5bd ]
This early RTL8168b version was the first PCIe chip version, and it's
quite quirky. Last sign of life is from more than 15 yrs ago.
Let's remove detection of this chip version, we'll see whether anybody
complains. If not, support for this chip version can be removed a few
kernel versions later.
Signed-off-by: Heiner Kallweit <hkallweit1(a)gmail.com>
Link: https://lore.kernel.org/r/875cdcf4-843c-420a-ad5d-417447b68572@gmail.com
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/net/ethernet/realtek/r8169_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 319f8d7a502da..32ea1d902a173 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2185,7 +2185,9 @@ static void rtl8169_get_mac_version(struct rtl8169_private *tp)
/* 8168B family. */
{ 0x7cf, 0x380, RTL_GIGA_MAC_VER_12 },
{ 0x7c8, 0x380, RTL_GIGA_MAC_VER_17 },
- { 0x7c8, 0x300, RTL_GIGA_MAC_VER_11 },
+ /* This one is very old and rare, let's see if anybody complains.
+ * { 0x7c8, 0x300, RTL_GIGA_MAC_VER_11 },
+ */
/* 8101 family. */
{ 0x7c8, 0x448, RTL_GIGA_MAC_VER_39 },
--
2.43.0
From: Heiner Kallweit <hkallweit1(a)gmail.com>
[ Upstream commit 982300c115d229565d7af8e8b38aa1ee7bb1f5bd ]
This early RTL8168b version was the first PCIe chip version, and it's
quite quirky. Last sign of life is from more than 15 yrs ago.
Let's remove detection of this chip version, we'll see whether anybody
complains. If not, support for this chip version can be removed a few
kernel versions later.
Signed-off-by: Heiner Kallweit <hkallweit1(a)gmail.com>
Link: https://lore.kernel.org/r/875cdcf4-843c-420a-ad5d-417447b68572@gmail.com
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/net/ethernet/realtek/r8169_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index d24eb5ee152a5..7d3443ad8e797 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2018,7 +2018,9 @@ static enum mac_version rtl8169_get_mac_version(u16 xid, bool gmii)
/* 8168B family. */
{ 0x7cf, 0x380, RTL_GIGA_MAC_VER_12 },
{ 0x7c8, 0x380, RTL_GIGA_MAC_VER_17 },
- { 0x7c8, 0x300, RTL_GIGA_MAC_VER_11 },
+ /* This one is very old and rare, let's see if anybody complains.
+ * { 0x7c8, 0x300, RTL_GIGA_MAC_VER_11 },
+ */
/* 8101 family. */
{ 0x7c8, 0x448, RTL_GIGA_MAC_VER_39 },
--
2.43.0
From: Heiner Kallweit <hkallweit1(a)gmail.com>
[ Upstream commit 982300c115d229565d7af8e8b38aa1ee7bb1f5bd ]
This early RTL8168b version was the first PCIe chip version, and it's
quite quirky. Last sign of life is from more than 15 yrs ago.
Let's remove detection of this chip version, we'll see whether anybody
complains. If not, support for this chip version can be removed a few
kernel versions later.
Signed-off-by: Heiner Kallweit <hkallweit1(a)gmail.com>
Link: https://lore.kernel.org/r/875cdcf4-843c-420a-ad5d-417447b68572@gmail.com
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/net/ethernet/realtek/r8169_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 76d820c4e6eef..c0ad5cd963d08 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2063,7 +2063,9 @@ static enum mac_version rtl8169_get_mac_version(u16 xid, bool gmii)
/* 8168B family. */
{ 0x7cf, 0x380, RTL_GIGA_MAC_VER_12 },
{ 0x7c8, 0x380, RTL_GIGA_MAC_VER_17 },
- { 0x7c8, 0x300, RTL_GIGA_MAC_VER_11 },
+ /* This one is very old and rare, let's see if anybody complains.
+ * { 0x7c8, 0x300, RTL_GIGA_MAC_VER_11 },
+ */
/* 8101 family. */
{ 0x7c8, 0x448, RTL_GIGA_MAC_VER_39 },
--
2.43.0
From: Johannes Berg <johannes.berg(a)intel.com>
[ Upstream commit 23daf1b4c91db9b26f8425cc7039cf96d22ccbfe ]
Setting the AP channel width is meant for use with the normal
20/40/... MHz channel width progression, and switching around
in S1G or narrow channels isn't supported. Disallow that.
Reported-by: syzbot+bc0f5b92cc7091f45fb6(a)syzkaller.appspotmail.com
Link: https://msgid.link/20240515141600.d4a9590bfe32.I19a32d60097e81b527eafe6b092…
Signed-off-by: Johannes Berg <johannes.berg(a)intel.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
net/wireless/nl80211.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index a00df7b89ca86..603fcd921bd22 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3346,6 +3346,33 @@ static int __nl80211_set_channel(struct cfg80211_registered_device *rdev,
if (chandef.chan != cur_chan)
return -EBUSY;
+ /* only allow this for regular channel widths */
+ switch (wdev->links[link_id].ap.chandef.width) {
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
+ case NL80211_CHAN_WIDTH_40:
+ case NL80211_CHAN_WIDTH_80:
+ case NL80211_CHAN_WIDTH_80P80:
+ case NL80211_CHAN_WIDTH_160:
+ case NL80211_CHAN_WIDTH_320:
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ switch (chandef.width) {
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
+ case NL80211_CHAN_WIDTH_40:
+ case NL80211_CHAN_WIDTH_80:
+ case NL80211_CHAN_WIDTH_80P80:
+ case NL80211_CHAN_WIDTH_160:
+ case NL80211_CHAN_WIDTH_320:
+ break;
+ default:
+ return -EINVAL;
+ }
+
result = rdev_set_ap_chanwidth(rdev, dev, link_id,
&chandef);
if (result)
--
2.43.0
From: Johannes Berg <johannes.berg(a)intel.com>
[ Upstream commit 23daf1b4c91db9b26f8425cc7039cf96d22ccbfe ]
Setting the AP channel width is meant for use with the normal
20/40/... MHz channel width progression, and switching around
in S1G or narrow channels isn't supported. Disallow that.
Reported-by: syzbot+bc0f5b92cc7091f45fb6(a)syzkaller.appspotmail.com
Link: https://msgid.link/20240515141600.d4a9590bfe32.I19a32d60097e81b527eafe6b092…
Signed-off-by: Johannes Berg <johannes.berg(a)intel.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
net/wireless/nl80211.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 8f8f077e6cd40..053258b4e28d2 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3398,6 +3398,33 @@ static int __nl80211_set_channel(struct cfg80211_registered_device *rdev,
if (chandef.chan != cur_chan)
return -EBUSY;
+ /* only allow this for regular channel widths */
+ switch (wdev->links[link_id].ap.chandef.width) {
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
+ case NL80211_CHAN_WIDTH_40:
+ case NL80211_CHAN_WIDTH_80:
+ case NL80211_CHAN_WIDTH_80P80:
+ case NL80211_CHAN_WIDTH_160:
+ case NL80211_CHAN_WIDTH_320:
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ switch (chandef.width) {
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
+ case NL80211_CHAN_WIDTH_40:
+ case NL80211_CHAN_WIDTH_80:
+ case NL80211_CHAN_WIDTH_80P80:
+ case NL80211_CHAN_WIDTH_160:
+ case NL80211_CHAN_WIDTH_320:
+ break;
+ default:
+ return -EINVAL;
+ }
+
result = rdev_set_ap_chanwidth(rdev, dev, link_id,
&chandef);
if (result)
--
2.43.0
From: Justin Stitt <justinstitt(a)google.com>
[ Upstream commit 23cc6ef6fd453b13502caae23130844e7d6ed0fe ]
Running syzkaller with the newly enabled signed integer overflow
sanitizer produces this report:
[ 195.401651] ------------[ cut here ]------------
[ 195.404808] UBSAN: signed-integer-overflow in ../fs/open.c:321:15
[ 195.408739] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long')
[ 195.414683] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.420138] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.425804] Call Trace:
[ 195.427360] <TASK>
[ 195.428791] dump_stack_lvl+0x93/0xd0
[ 195.431150] handle_overflow+0x171/0x1b0
[ 195.433640] vfs_fallocate+0x459/0x4f0
...
[ 195.490053] ------------[ cut here ]------------
[ 195.493146] UBSAN: signed-integer-overflow in ../fs/open.c:321:61
[ 195.497030] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long)
[ 195.502940] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.508395] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.514075] Call Trace:
[ 195.515636] <TASK>
[ 195.517000] dump_stack_lvl+0x93/0xd0
[ 195.519255] handle_overflow+0x171/0x1b0
[ 195.521677] vfs_fallocate+0x4cb/0x4f0
[ 195.524033] __x64_sys_fallocate+0xb2/0xf0
Historically, the signed integer overflow sanitizer did not work in the
kernel due to its interaction with `-fwrapv` but this has since been
changed [1] in the newest version of Clang. It was re-enabled in the
kernel with Commit 557f8c582a9ba8ab ("ubsan: Reintroduce signed overflow
sanitizer").
Let's use the check_add_overflow helper to first verify the addition
stays within the bounds of its type (long long); then we can use that
sum for the following check.
Link: https://github.com/llvm/llvm-project/pull/82432 [1]
Closes: https://github.com/KSPP/linux/issues/356
Cc: linux-hardening(a)vger.kernel.org
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Signed-off-by: Justin Stitt <justinstitt(a)google.com>
Link: https://lore.kernel.org/r/20240513-b4-sio-vfs_fallocate-v2-1-db415872fb16@g…
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/open.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index 7763a1a10f592..2751cb70f2dc1 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -229,6 +229,7 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
{
struct inode *inode = file_inode(file);
long ret;
+ loff_t sum;
if (offset < 0 || len <= 0)
return -EINVAL;
@@ -297,8 +298,11 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
return -ENODEV;
- /* Check for wrap through zero too */
- if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0))
+ /* Check for wraparound */
+ if (check_add_overflow(offset, len, &sum))
+ return -EFBIG;
+
+ if (sum > inode->i_sb->s_maxbytes)
return -EFBIG;
if (!file->f_op->fallocate)
--
2.43.0
From: Justin Stitt <justinstitt(a)google.com>
[ Upstream commit 23cc6ef6fd453b13502caae23130844e7d6ed0fe ]
Running syzkaller with the newly enabled signed integer overflow
sanitizer produces this report:
[ 195.401651] ------------[ cut here ]------------
[ 195.404808] UBSAN: signed-integer-overflow in ../fs/open.c:321:15
[ 195.408739] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long')
[ 195.414683] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.420138] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.425804] Call Trace:
[ 195.427360] <TASK>
[ 195.428791] dump_stack_lvl+0x93/0xd0
[ 195.431150] handle_overflow+0x171/0x1b0
[ 195.433640] vfs_fallocate+0x459/0x4f0
...
[ 195.490053] ------------[ cut here ]------------
[ 195.493146] UBSAN: signed-integer-overflow in ../fs/open.c:321:61
[ 195.497030] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long)
[ 195.502940] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.508395] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.514075] Call Trace:
[ 195.515636] <TASK>
[ 195.517000] dump_stack_lvl+0x93/0xd0
[ 195.519255] handle_overflow+0x171/0x1b0
[ 195.521677] vfs_fallocate+0x4cb/0x4f0
[ 195.524033] __x64_sys_fallocate+0xb2/0xf0
Historically, the signed integer overflow sanitizer did not work in the
kernel due to its interaction with `-fwrapv` but this has since been
changed [1] in the newest version of Clang. It was re-enabled in the
kernel with Commit 557f8c582a9ba8ab ("ubsan: Reintroduce signed overflow
sanitizer").
Let's use the check_add_overflow helper to first verify the addition
stays within the bounds of its type (long long); then we can use that
sum for the following check.
Link: https://github.com/llvm/llvm-project/pull/82432 [1]
Closes: https://github.com/KSPP/linux/issues/356
Cc: linux-hardening(a)vger.kernel.org
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Signed-off-by: Justin Stitt <justinstitt(a)google.com>
Link: https://lore.kernel.org/r/20240513-b4-sio-vfs_fallocate-v2-1-db415872fb16@g…
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/open.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index f1c2ec6790bb3..d88b7f3b4d9f1 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -230,6 +230,7 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
{
struct inode *inode = file_inode(file);
long ret;
+ loff_t sum;
if (offset < 0 || len <= 0)
return -EINVAL;
@@ -298,8 +299,11 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
return -ENODEV;
- /* Check for wrap through zero too */
- if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0))
+ /* Check for wraparound */
+ if (check_add_overflow(offset, len, &sum))
+ return -EFBIG;
+
+ if (sum > inode->i_sb->s_maxbytes)
return -EFBIG;
if (!file->f_op->fallocate)
--
2.43.0
From: Justin Stitt <justinstitt(a)google.com>
[ Upstream commit 23cc6ef6fd453b13502caae23130844e7d6ed0fe ]
Running syzkaller with the newly enabled signed integer overflow
sanitizer produces this report:
[ 195.401651] ------------[ cut here ]------------
[ 195.404808] UBSAN: signed-integer-overflow in ../fs/open.c:321:15
[ 195.408739] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long')
[ 195.414683] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.420138] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.425804] Call Trace:
[ 195.427360] <TASK>
[ 195.428791] dump_stack_lvl+0x93/0xd0
[ 195.431150] handle_overflow+0x171/0x1b0
[ 195.433640] vfs_fallocate+0x459/0x4f0
...
[ 195.490053] ------------[ cut here ]------------
[ 195.493146] UBSAN: signed-integer-overflow in ../fs/open.c:321:61
[ 195.497030] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long)
[ 195.502940] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.508395] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.514075] Call Trace:
[ 195.515636] <TASK>
[ 195.517000] dump_stack_lvl+0x93/0xd0
[ 195.519255] handle_overflow+0x171/0x1b0
[ 195.521677] vfs_fallocate+0x4cb/0x4f0
[ 195.524033] __x64_sys_fallocate+0xb2/0xf0
Historically, the signed integer overflow sanitizer did not work in the
kernel due to its interaction with `-fwrapv` but this has since been
changed [1] in the newest version of Clang. It was re-enabled in the
kernel with Commit 557f8c582a9ba8ab ("ubsan: Reintroduce signed overflow
sanitizer").
Let's use the check_add_overflow helper to first verify the addition
stays within the bounds of its type (long long); then we can use that
sum for the following check.
Link: https://github.com/llvm/llvm-project/pull/82432 [1]
Closes: https://github.com/KSPP/linux/issues/356
Cc: linux-hardening(a)vger.kernel.org
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Signed-off-by: Justin Stitt <justinstitt(a)google.com>
Link: https://lore.kernel.org/r/20240513-b4-sio-vfs_fallocate-v2-1-db415872fb16@g…
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/open.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index 694110929519c..be3eb6126d6da 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -230,6 +230,7 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
{
struct inode *inode = file_inode(file);
long ret;
+ loff_t sum;
if (offset < 0 || len <= 0)
return -EINVAL;
@@ -298,8 +299,11 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
return -ENODEV;
- /* Check for wrap through zero too */
- if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0))
+ /* Check for wraparound */
+ if (check_add_overflow(offset, len, &sum))
+ return -EFBIG;
+
+ if (sum > inode->i_sb->s_maxbytes)
return -EFBIG;
if (!file->f_op->fallocate)
--
2.43.0
From: Justin Stitt <justinstitt(a)google.com>
[ Upstream commit 23cc6ef6fd453b13502caae23130844e7d6ed0fe ]
Running syzkaller with the newly enabled signed integer overflow
sanitizer produces this report:
[ 195.401651] ------------[ cut here ]------------
[ 195.404808] UBSAN: signed-integer-overflow in ../fs/open.c:321:15
[ 195.408739] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long')
[ 195.414683] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.420138] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.425804] Call Trace:
[ 195.427360] <TASK>
[ 195.428791] dump_stack_lvl+0x93/0xd0
[ 195.431150] handle_overflow+0x171/0x1b0
[ 195.433640] vfs_fallocate+0x459/0x4f0
...
[ 195.490053] ------------[ cut here ]------------
[ 195.493146] UBSAN: signed-integer-overflow in ../fs/open.c:321:61
[ 195.497030] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long)
[ 195.502940] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.508395] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.514075] Call Trace:
[ 195.515636] <TASK>
[ 195.517000] dump_stack_lvl+0x93/0xd0
[ 195.519255] handle_overflow+0x171/0x1b0
[ 195.521677] vfs_fallocate+0x4cb/0x4f0
[ 195.524033] __x64_sys_fallocate+0xb2/0xf0
Historically, the signed integer overflow sanitizer did not work in the
kernel due to its interaction with `-fwrapv` but this has since been
changed [1] in the newest version of Clang. It was re-enabled in the
kernel with Commit 557f8c582a9ba8ab ("ubsan: Reintroduce signed overflow
sanitizer").
Let's use the check_add_overflow helper to first verify the addition
stays within the bounds of its type (long long); then we can use that
sum for the following check.
Link: https://github.com/llvm/llvm-project/pull/82432 [1]
Closes: https://github.com/KSPP/linux/issues/356
Cc: linux-hardening(a)vger.kernel.org
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Signed-off-by: Justin Stitt <justinstitt(a)google.com>
Link: https://lore.kernel.org/r/20240513-b4-sio-vfs_fallocate-v2-1-db415872fb16@g…
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/open.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index 97932af49071a..73d864636ae57 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -229,6 +229,7 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
{
struct inode *inode = file_inode(file);
long ret;
+ loff_t sum;
if (offset < 0 || len <= 0)
return -EINVAL;
@@ -297,8 +298,11 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
return -ENODEV;
- /* Check for wrap through zero too */
- if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0))
+ /* Check for wraparound */
+ if (check_add_overflow(offset, len, &sum))
+ return -EFBIG;
+
+ if (sum > inode->i_sb->s_maxbytes)
return -EFBIG;
if (!file->f_op->fallocate)
--
2.43.0
From: Justin Stitt <justinstitt(a)google.com>
[ Upstream commit 23cc6ef6fd453b13502caae23130844e7d6ed0fe ]
Running syzkaller with the newly enabled signed integer overflow
sanitizer produces this report:
[ 195.401651] ------------[ cut here ]------------
[ 195.404808] UBSAN: signed-integer-overflow in ../fs/open.c:321:15
[ 195.408739] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long')
[ 195.414683] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.420138] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.425804] Call Trace:
[ 195.427360] <TASK>
[ 195.428791] dump_stack_lvl+0x93/0xd0
[ 195.431150] handle_overflow+0x171/0x1b0
[ 195.433640] vfs_fallocate+0x459/0x4f0
...
[ 195.490053] ------------[ cut here ]------------
[ 195.493146] UBSAN: signed-integer-overflow in ../fs/open.c:321:61
[ 195.497030] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long)
[ 195.502940] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.508395] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.514075] Call Trace:
[ 195.515636] <TASK>
[ 195.517000] dump_stack_lvl+0x93/0xd0
[ 195.519255] handle_overflow+0x171/0x1b0
[ 195.521677] vfs_fallocate+0x4cb/0x4f0
[ 195.524033] __x64_sys_fallocate+0xb2/0xf0
Historically, the signed integer overflow sanitizer did not work in the
kernel due to its interaction with `-fwrapv` but this has since been
changed [1] in the newest version of Clang. It was re-enabled in the
kernel with Commit 557f8c582a9ba8ab ("ubsan: Reintroduce signed overflow
sanitizer").
Let's use the check_add_overflow helper to first verify the addition
stays within the bounds of its type (long long); then we can use that
sum for the following check.
Link: https://github.com/llvm/llvm-project/pull/82432 [1]
Closes: https://github.com/KSPP/linux/issues/356
Cc: linux-hardening(a)vger.kernel.org
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Signed-off-by: Justin Stitt <justinstitt(a)google.com>
Link: https://lore.kernel.org/r/20240513-b4-sio-vfs_fallocate-v2-1-db415872fb16@g…
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/open.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index 0d63c94e1c5e6..dd68725cd7247 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -244,6 +244,7 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
{
struct inode *inode = file_inode(file);
long ret;
+ loff_t sum;
if (offset < 0 || len <= 0)
return -EINVAL;
@@ -312,8 +313,11 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
return -ENODEV;
- /* Check for wrap through zero too */
- if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0))
+ /* Check for wraparound */
+ if (check_add_overflow(offset, len, &sum))
+ return -EFBIG;
+
+ if (sum > inode->i_sb->s_maxbytes)
return -EFBIG;
if (!file->f_op->fallocate)
--
2.43.0
From: Justin Stitt <justinstitt(a)google.com>
[ Upstream commit 23cc6ef6fd453b13502caae23130844e7d6ed0fe ]
Running syzkaller with the newly enabled signed integer overflow
sanitizer produces this report:
[ 195.401651] ------------[ cut here ]------------
[ 195.404808] UBSAN: signed-integer-overflow in ../fs/open.c:321:15
[ 195.408739] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long')
[ 195.414683] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.420138] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.425804] Call Trace:
[ 195.427360] <TASK>
[ 195.428791] dump_stack_lvl+0x93/0xd0
[ 195.431150] handle_overflow+0x171/0x1b0
[ 195.433640] vfs_fallocate+0x459/0x4f0
...
[ 195.490053] ------------[ cut here ]------------
[ 195.493146] UBSAN: signed-integer-overflow in ../fs/open.c:321:61
[ 195.497030] 9223372036854775807 + 562984447377399 cannot be represented in type 'loff_t' (aka 'long long)
[ 195.502940] CPU: 1 PID: 703 Comm: syz-executor.0 Not tainted 6.8.0-rc2-00039-g14de58dbe653-dirty #11
[ 195.508395] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[ 195.514075] Call Trace:
[ 195.515636] <TASK>
[ 195.517000] dump_stack_lvl+0x93/0xd0
[ 195.519255] handle_overflow+0x171/0x1b0
[ 195.521677] vfs_fallocate+0x4cb/0x4f0
[ 195.524033] __x64_sys_fallocate+0xb2/0xf0
Historically, the signed integer overflow sanitizer did not work in the
kernel due to its interaction with `-fwrapv` but this has since been
changed [1] in the newest version of Clang. It was re-enabled in the
kernel with Commit 557f8c582a9ba8ab ("ubsan: Reintroduce signed overflow
sanitizer").
Let's use the check_add_overflow helper to first verify the addition
stays within the bounds of its type (long long); then we can use that
sum for the following check.
Link: https://github.com/llvm/llvm-project/pull/82432 [1]
Closes: https://github.com/KSPP/linux/issues/356
Cc: linux-hardening(a)vger.kernel.org
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Signed-off-by: Justin Stitt <justinstitt(a)google.com>
Link: https://lore.kernel.org/r/20240513-b4-sio-vfs_fallocate-v2-1-db415872fb16@g…
Reviewed-by: Jan Kara <jack(a)suse.cz>
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/open.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index 59db720693f9a..61f0b733ad962 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -245,6 +245,7 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
{
struct inode *inode = file_inode(file);
long ret;
+ loff_t sum;
if (offset < 0 || len <= 0)
return -EINVAL;
@@ -313,8 +314,11 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
return -ENODEV;
- /* Check for wrap through zero too */
- if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0))
+ /* Check for wraparound */
+ if (check_add_overflow(offset, len, &sum))
+ return -EFBIG;
+
+ if (sum > inode->i_sb->s_maxbytes)
return -EFBIG;
if (!file->f_op->fallocate)
--
2.43.0
Hello,
After updating from 6.8.9 to 6.9.1 I noticed a bug on my HP Envy x360
with AMD Ryzen 5 4500U.
#regzbot introduced: v6.8.9..v6.9.1
After waking up from sleep brightness is set to max level, ignoring
previous value.
With the help of Arch Linux team, we was able to track bad commit to
this:
https://gitlab.freedesktop.org/agd5f/linux/-/commit/63d0b87213a0ba241b3fcfb…
I have tested this on latest mainline kernel:
Results after waking up:
> cat /sys/class/backlight/amdgpu_bl1/{brightness,actual_brightness}
12
252
Then, on exact this commit (63d0b87213a0ba241b3fcfba3fe7b0aed0cd1cc5),
result is the same.
Then, on commit just before this one (aeaf3e6cf842):
> cat /sys/class/backlight/amdgpu_bl1/{brightness,actual_brightness}
12
12
I hope I included all relevant information, more info can be found here:
https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/52
I'm announcing the release of the 6.10.2 kernel.
All users of the 6.10 kernel series must upgrade.
The updated 6.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 -
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1
arch/arm64/boot/dts/qcom/msm8998.dtsi | 1
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 13 +++++++-
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 13 +++++++-
arch/arm64/boot/dts/qcom/sc7180.dtsi | 1
arch/arm64/boot/dts/qcom/sc7280.dtsi | 1
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1
arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +
arch/arm64/boot/dts/qcom/sm6115.dtsi | 1
arch/arm64/boot/dts/qcom/sm6350.dtsi | 1
arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 17 ++++++++---
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 17 ++++++++---
arch/s390/mm/fault.c | 3 +
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 -
drivers/net/tap.c | 5 +++
drivers/net/tun.c | 3 +
drivers/usb/gadget/function/f_midi2.c | 19 +++++++-----
fs/jfs/xattr.c | 23 ++++++++++++---
fs/locks.c | 9 ++---
fs/ntfs3/fslog.c | 44 ++++++++++++++++++++++++----
fs/ocfs2/dir.c | 46 ++++++++++++++++++------------
sound/core/pcm_dmaengine.c | 6 +++
sound/core/seq/seq_ump_client.c | 16 ++++++++++
sound/pci/hda/patch_realtek.c | 3 +
27 files changed, 198 insertions(+), 55 deletions(-)
Abel Vesa (4):
arm64: dts: qcom: x1e80100-qcp: Fix USB PHYs regulators
arm64: dts: qcom: x1e80100-crd: Fix the PHY regulator for PCIe 6a
arm64: dts: qcom: x1e80100-qcp: Fix the PHY regulator for PCIe 6a
arm64: dts: qcom: x1e80100-crd: Fix USB PHYs regulators
Dan Carpenter (1):
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Dmitry Baryshkov (2):
arm64: dts: qcom: qrb2210-rb1: switch I2C2 to i2c-gpio
arm64: dts: qcom: qrb4210-rb2: switch I2C2 to i2c-gpio
Dongli Zhang (1):
tun: add missing verification for short frame
Edson Juliano Drosdeck (1):
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
Gerald Schaefer (1):
s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()
Greg Kroah-Hartman (1):
Linux 6.10.2
Jann Horn (1):
filelock: Fix fcntl/close race recovery compat path
Konstantin Komarov (1):
fs/ntfs3: Add a check for attr_names and oatbl
Krishna Kurapati (10):
arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode
arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB
arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB
arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for USB
Seunghun Han (1):
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Shenghao Ding (1):
ALSA: hda/tas2781: Add new quirk for Lenovo Hera2 Laptop
Shengjiu Wang (1):
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Si-Wei Liu (1):
tap: add missing verification for short frame
Takashi Iwai (2):
usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup
ALSA: seq: ump: Skip useless ports for static blocks
lei lu (3):
ocfs2: add bounds checking to ocfs2_check_dir_entry()
jfs: don't walk off the end of ealist
fs/ntfs3: Validate ff offset
I'm announcing the release of the 6.6.43 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 -
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 13 ++++++++
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1
arch/arm64/boot/dts/qcom/sm6350.dtsi | 1
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 -
drivers/net/tap.c | 5 +++
drivers/net/tun.c | 3 ++
drivers/usb/gadget/function/f_midi2.c | 19 +++++++-----
fs/jfs/xattr.c | 23 ++++++++++++---
fs/locks.c | 9 ++----
fs/ntfs3/fslog.c | 44 ++++++++++++++++++++++++-----
fs/ocfs2/dir.c | 46 +++++++++++++++++++------------
sound/core/pcm_dmaengine.c | 6 +++-
sound/core/seq/seq_ump_client.c | 16 ++++++++++
sound/pci/hda/patch_realtek.c | 2 +
17 files changed, 149 insertions(+), 45 deletions(-)
Dan Carpenter (1):
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Dmitry Baryshkov (1):
arm64: dts: qcom: qrb4210-rb2: switch I2C2 to i2c-gpio
Dongli Zhang (1):
tun: add missing verification for short frame
Edson Juliano Drosdeck (1):
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
Greg Kroah-Hartman (1):
Linux 6.6.43
Jann Horn (1):
filelock: Fix fcntl/close race recovery compat path
Konstantin Komarov (1):
fs/ntfs3: Add a check for attr_names and oatbl
Krishna Kurapati (4):
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB
arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
Seunghun Han (1):
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Shengjiu Wang (1):
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Si-Wei Liu (1):
tap: add missing verification for short frame
Takashi Iwai (2):
usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup
ALSA: seq: ump: Skip useless ports for static blocks
lei lu (3):
ocfs2: add bounds checking to ocfs2_check_dir_entry()
jfs: don't walk off the end of ealist
fs/ntfs3: Validate ff offset
I'm announcing the release of the 6.1.102 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 -
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 -
drivers/net/tap.c | 5 +++
drivers/net/tun.c | 3 ++
fs/btrfs/transaction.c | 5 ++-
fs/f2fs/super.c | 15 +++++++++-
fs/jfs/xattr.c | 23 +++++++++++++---
fs/locks.c | 9 ++----
fs/ntfs3/fslog.c | 6 +++-
fs/ocfs2/dir.c | 46 ++++++++++++++++++++-------------
sound/core/pcm_dmaengine.c | 6 +++-
sound/pci/hda/patch_realtek.c | 2 +
15 files changed, 94 insertions(+), 33 deletions(-)
Chao Yu (1):
f2fs: avoid dead loop in f2fs_issue_checkpoint()
Dan Carpenter (1):
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Dongli Zhang (1):
tun: add missing verification for short frame
Edson Juliano Drosdeck (1):
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
Filipe Manana (1):
btrfs: do not BUG_ON on failure to get dir index for new snapshot
Greg Kroah-Hartman (1):
Linux 6.1.102
Jann Horn (1):
filelock: Fix fcntl/close race recovery compat path
Krishna Kurapati (3):
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
Seunghun Han (1):
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Shengjiu Wang (1):
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Si-Wei Liu (1):
tap: add missing verification for short frame
lei lu (3):
ocfs2: add bounds checking to ocfs2_check_dir_entry()
jfs: don't walk off the end of ealist
fs/ntfs3: Validate ff offset
This is v6.8 specific; v6.9 is reported as not affected (due to
extensive code refactoring).
Commit dc3f5aae0638 reworked how early cmdline CPU feature parsing
is done, and converted to using memcmp() in preparation for the move to
the pi minimal C standard library.
As a result it caused a regression where-by a parameter >= 146
characters on the kernel command line would cause a silent panic with no
console clues as to why.
It is due to memcmp() in include/linux/fortify-string.h detecting an
attempted out-of-bounds read. The cause itself is subtle.
arch/arm64/kernel/idreg-override.c::__parse_cmdline() compares the
struct aliases entries with each parameter via memcmp().
#define FTR_ALIAS_NAME_LEN 30
#define FTR_ALIAS_OPTION_LEN 116
...
static const struct {
char alias[FTR_ALIAS_NAME_LEN];
char feature[FTR_ALIAS_OPTION_LEN];
} aliases[]
Each element is 146 characters. When a parameter is also 146 characters
the call looks like memcmp(buf, aliases[i].alias, len+1) where len is
the equivalent of strlen(buf) and +1 to compare including the trailing
NUL.
That triggers the fortified memcmp()'s:
if (p_size < size || q_size < size)
fortify_panic(__func__);
where q_size == 146, size == 147
The solution here is to not call memcmp() at all unless the two strings
have the same length.
Initially reported in Ubuntu (and confirmed to affect Debian and
Mainline):
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2069534
Signed-off-by: Tj <tj.iam.tj(a)proton.me>
---
arch/arm64/kernel/idreg-override.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c
index e30fd9e32ef3a..9d2c120f378ae 100644
--- a/arch/arm64/kernel/idreg-override.c
+++ b/arch/arm64/kernel/idreg-override.c
@@ -308,7 +308,8 @@ static __init void __parse_cmdline(const char *cmdline, bool parse_aliases)
match_options(buf);
for (i = 0; parse_aliases && i < ARRAY_SIZE(aliases); i++)
- if (!memcmp(buf, aliases[i].alias, len + 1))
+ if (len == strlen(aliases[i].alias) &&
+ !memcmp(buf, aliases[i].alias, len + 1))
__parse_cmdline(aliases[i].feature, false);
} while (1);
}
--
2.39.2
This is the start of the stable review cycle for the 5.15.164 release.
There are 87 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 27 Jul 2024 14:27:16 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.164-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.15.164-rc1
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
Seunghun Han <kkamagui(a)gmail.com>
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
lei lu <llfamsec(a)gmail.com>
fs/ntfs3: Validate ff offset
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Paolo Abeni <pabeni(a)redhat.com>
net: relax socket state check at accept time.
Linus Torvalds <torvalds(a)linux-foundation.org>
Add gitignore file for samples/fanotify/ subdirectory
Gabriel Krisman Bertazi <krisman(a)collabora.com>
docs: Fix formatting of literal sections in fanotify docs
Gabriel Krisman Bertazi <krisman(a)collabora.com>
samples: Make fs-monitor depend on libc and headers
Gabriel Krisman Bertazi <krisman(a)collabora.com>
samples: Add fs error monitoring example
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Johannes Berg <johannes.berg(a)intel.com>
wifi: mac80211: disable softirqs for queued frame handling
SeongJae Park <sj(a)kernel.org>
mm/damon/core: merge regions aggressively when max_nr_regions is unmet
David Laight <David.Laight(a)ACULAB.COM>
minmax: relax check to allow comparison between unsigned arguments and signed constants
David Laight <David.Laight(a)ACULAB.COM>
minmax: allow comparisons of 'int' against 'unsigned char/short'
David Laight <David.Laight(a)ACULAB.COM>
minmax: allow min()/max()/clamp() if the arguments have the same signedness.
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
minmax: fix header inclusions
Jason A. Donenfeld <Jason(a)zx2c4.com>
minmax: clamp more efficiently by avoiding extra comparison
Jason A. Donenfeld <Jason(a)zx2c4.com>
minmax: sanity check constant bounds when clamping
Bart Van Assche <bvanassche(a)acm.org>
tracing: Define the is_signed_type() macro once
David Lechner <dlechner(a)baylibre.com>
spi: mux: set ctlr->bits_per_word_mask
Edward Adam Davis <eadavis(a)qq.com>
hfsplus: fix uninit-value in copy_name
John Hubbard <jhubbard(a)nvidia.com>
selftests/vDSO: fix clang build errors and warnings
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
Puranjay Mohan <puranjay(a)kernel.org>
riscv: stacktrace: fix usage of ftrace_graph_ret_addr()
Christian Brauner <brauner(a)kernel.org>
fs: better handle deep ancestor chains in is_subdir()
Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer(a)amd.com>
drm/radeon: check bo_va->bo is non-NULL before using it
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Xingui Yang <yangxingui(a)huawei.com>
scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed
Ganesh Goudar <ganeshgr(a)linux.ibm.com>
powerpc/eeh: avoid possible crash when edev->pdev changes
Anjali K <anjalik(a)linux.ibm.com>
powerpc/pseries: Whitelist dtl slub object for copying to userspace
Yunshui Jiang <jiangyunshui(a)kylinos.cn>
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
Daniele Palmas <dnlplm(a)gmail.com>
net: usb: qmi_wwan: add Telit FN912 compositions
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: dmaengine_pcm: terminate dmaengine before synchronize
Aivaz Latypov <reichaivaz(a)gmail.com>
ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx
Filipe Manana <fdmanana(a)suse.com>
btrfs: qgroup: fix quota root leak after quota disable failure
Armin Wolf <W_Armin(a)gmx.de>
platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB
Armin Wolf <W_Armin(a)gmx.de>
platform/x86: lg-laptop: Change ACPI device id
Armin Wolf <W_Armin(a)gmx.de>
platform/x86: lg-laptop: Remove LGEX0815 hotkey handling
Armin Wolf <W_Armin(a)gmx.de>
platform/x86: wireless-hotkey: Add support for LG Airplane Button
Heiko Carstens <hca(a)linux.ibm.com>
s390/sclp: Fix sclp_init() cleanup on failure
Chen Ni <nichen(a)iscas.ac.cn>
can: kvaser_usb: fix return value for hif_usb_send_regout
Primoz Fiser <primoz.fiser(a)norik.com>
ASoC: ti: omap-hdmi: Fix too long driver name
Jai Luthra <j-luthra(a)ti.com>
ASoC: ti: davinci-mcasp: Set min period size using FIFO config
Jai Luthra <j-luthra(a)ti.com>
ALSA: dmaengine: Synchronize dma channel after drop()
Thomas GENTY <tomlohave(a)gmail.com>
bytcr_rt5640 : inverse jack detect for Archos 101 cesium
Tobias Jakobi <tjakobi(a)math.uni-bielefeld.de>
Input: i8042 - add Ayaneo Kun to i8042 quirk table
Jonathan Denose <jdenose(a)google.com>
Input: elantech - fix touchpad state on resume for Lenovo N24
Arnd Bergmann <arnd(a)arndb.de>
mips: fix compat_sys_lseek syscall
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek: Add more codec ID to no shutup pins list
Alexey Makhalov <alexey.makhalov(a)broadcom.com>
drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency
Michael Ellerman <mpe(a)ellerman.id.au>
KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
Chunguang Xu <chunguang.xu(a)shopee.com>
nvme: avoid double free special payload
Alexander Usyskin <alexander.usyskin(a)intel.com>
mei: demote client disconnect warning on suspend to debug
Yuntao Wang <yuntao.wang(a)linux.dev>
fs/file: fix the check in find_next_fd()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: remove wrong expr_trans_bool()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: gconf: give a proper initial state to the Save button
Andreas Hindborg <a.hindborg(a)samsung.com>
null_blk: fix validation of block size
Wei Li <liwei391(a)huawei.com>
arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process
Eric Dumazet <edumazet(a)google.com>
ila: block BH in ila_output()
Eric Dumazet <edumazet(a)google.com>
net: ipv6: rpl_iptunnel: block BH in rpl_output() and rpl_input()
Hans de Goede <hdegoede(a)redhat.com>
Input: silead - Always support 10 fingers
Michael Ellerman <mpe(a)ellerman.id.au>
selftests/openat2: Fix build warnings on ppc64
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
Ayala Beker <ayala.beker(a)intel.com>
wifi: iwlwifi: mvm: properly set 6 GHz channel direct probe option
Yedidya Benshimol <yedidya.ben.shimol(a)intel.com>
wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd
Yedidya Benshimol <yedidya.ben.shimol(a)intel.com>
wifi: iwlwifi: mvm: d3: fix WoWLAN command version lookup
Johannes Berg <johannes.berg(a)intel.com>
wifi: mac80211: handle tasklet frames before stopping
Nicolas Escande <nico.escande(a)gmail.com>
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
Dhananjay Ugwekar <Dhananjay.Ugwekar(a)amd.com>
tools/power/cpupower: Fix Pstate frequency reporting on AMD Family 1Ah CPUs
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Avoid returning AE_OK on errors in address space handler
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Abort address space access upon error
Saurav Kashyap <skashyap(a)marvell.com>
scsi: qedf: Set qed_slowpath_params to zero before use
Saurav Kashyap <skashyap(a)marvell.com>
scsi: qedf: Wait for stag work during unload
Saurav Kashyap <skashyap(a)marvell.com>
scsi: qedf: Don't process stag work during unload and recovery
Martin Wilck <martin.wilck(a)suse.com>
scsi: core: alua: I/O errors for ALUA state transitions
Bart Van Assche <bvanassche(a)acm.org>
scsi: core: Fix a use-after-free
Daniel Borkmann <daniel(a)iogearbox.net>
bpf: Fix overrunning reservations in ringbuf
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Masahiro Yamada <masahiroy(a)kernel.org>
ARM: 9324/1: fix get_user() broken with veneer
Jann Horn <jannh(a)google.com>
filelock: Remove locks reliably when fcntl/close race is detected
Kees Cook <keescook(a)chromium.org>
gcc-plugins: Rename last_stmt() for GCC 14+
-------------
Diffstat:
.../admin-guide/filesystem-monitoring.rst | 20 +--
Makefile | 4 +-
arch/arm/include/asm/uaccess.h | 14 +-
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 +
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1 +
arch/arm64/kernel/armv8_deprecated.c | 3 +
arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +-
arch/powerpc/kernel/eeh_pe.c | 7 +-
arch/powerpc/kvm/book3s_64_vio.c | 18 ++-
arch/powerpc/platforms/pseries/setup.c | 4 +-
arch/riscv/kernel/stacktrace.c | 3 +-
drivers/acpi/ec.c | 9 +-
drivers/acpi/processor_idle.c | 40 +++---
drivers/block/null_blk/main.c | 4 +-
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
drivers/gpu/drm/radeon/radeon_gem.c | 2 +-
drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
drivers/input/mouse/elantech.c | 31 +++++
drivers/input/serio/i8042-acpipnpio.h | 18 ++-
drivers/input/touchscreen/silead.c | 19 +--
drivers/misc/mei/main.c | 2 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +-
drivers/net/usb/qmi_wwan.c | 2 +
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 16 ++-
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 5 +-
drivers/nvme/host/core.c | 1 +
drivers/platform/x86/lg-laptop.c | 89 +++++--------
drivers/platform/x86/wireless-hotkey.c | 2 +
drivers/s390/char/sclp.c | 1 +
drivers/scsi/device_handler/scsi_dh_alua.c | 31 +++--
drivers/scsi/hosts.c | 16 ++-
drivers/scsi/libsas/sas_internal.h | 14 ++
drivers/scsi/qedf/qedf.h | 1 +
drivers/scsi/qedf/qedf_main.c | 47 ++++++-
drivers/scsi/scsi_lib.c | 6 +-
drivers/scsi/scsi_priv.h | 2 +-
drivers/scsi/scsi_scan.c | 1 +
drivers/scsi/scsi_sysfs.c | 1 +
drivers/spi/spi-imx.c | 2 +-
drivers/spi/spi-mux.c | 1 +
fs/btrfs/qgroup.c | 4 +-
fs/dcache.c | 31 ++---
fs/file.c | 4 +-
fs/hfsplus/xattr.c | 2 +-
fs/jfs/xattr.c | 23 +++-
fs/locks.c | 18 ++-
fs/ntfs3/fslog.c | 6 +-
fs/ocfs2/dir.c | 46 ++++---
include/linux/compiler.h | 6 +
include/linux/minmax.h | 87 +++++++++----
include/linux/overflow.h | 1 -
include/linux/trace_events.h | 2 -
include/scsi/scsi_host.h | 2 +
include/sound/dmaengine_pcm.h | 1 +
kernel/bpf/ringbuf.c | 30 ++++-
mm/damon/core.c | 21 ++-
net/bluetooth/hci_core.c | 4 +
net/ipv4/af_inet.c | 4 +-
net/ipv6/ila/ila_lwt.c | 7 +-
net/ipv6/rpl_iptunnel.c | 14 +-
net/mac80211/ieee80211_i.h | 2 +
net/mac80211/main.c | 11 +-
net/mac80211/mesh.c | 1 +
net/mac80211/scan.c | 14 +-
net/mac80211/util.c | 4 +
net/mac802154/tx.c | 8 +-
net/wireless/scan.c | 8 +-
samples/Kconfig | 9 ++
samples/Makefile | 1 +
samples/fanotify/.gitignore | 1 +
samples/fanotify/Makefile | 5 +
samples/fanotify/fs-monitor.c | 142 +++++++++++++++++++++
scripts/gcc-plugins/gcc-common.h | 4 +
scripts/kconfig/expr.c | 29 -----
scripts/kconfig/expr.h | 1 -
scripts/kconfig/gconf.c | 3 +-
scripts/kconfig/menu.c | 2 -
sound/core/pcm_dmaengine.c | 26 ++++
sound/pci/hda/patch_realtek.c | 7 +
sound/soc/intel/boards/bytcr_rt5640.c | 11 ++
sound/soc/soc-generic-dmaengine-pcm.c | 8 ++
sound/soc/ti/davinci-mcasp.c | 9 +-
sound/soc/ti/omap-hdmi.c | 6 +-
tools/power/cpupower/utils/helpers/amd.c | 26 +++-
tools/testing/selftests/openat2/openat2_test.c | 1 +
tools/testing/selftests/vDSO/parse_vdso.c | 16 ++-
.../selftests/vDSO/vdso_standalone_test_x86.c | 18 ++-
87 files changed, 813 insertions(+), 319 deletions(-)
In a commit 1d717123bb1a ("ALSA: firewire-lib: Avoid
-Wflex-array-member-not-at-end warning"), DEFINE_FLEX() macro was used to
handle variable length of array for header field in struct fw_iso_packet
structure. The usage of macro has a side effect that the designated
initializer assigns the count of array to the given field. Therefore
CIP_HEADER_QUADLETS (=2) is assigned to struct fw_iso_packet.header,
while the original designated initializer assigns zero to all fields.
With CIP_NO_HEADER flag, the change causes invalid length of header in
isochronous packet for 1394 OHCI IT context. This bug affects all of
devices supported by ALSA fireface driver; RME Fireface 400, 800, UCX, UFX,
and 802.
This commit fixes the bug by replacing it with the alternative version of
macro which corresponds no initializer.
Cc: <stable(a)vger.kernel.org>
Fixes: 1d717123bb1a ("ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning")
Reported-by: Edmund Raile <edmund.raile(a)proton.me>
Closes: https://lore.kernel.org/r/rrufondjeynlkx2lniot26ablsltnynfaq2gnqvbiso7ds32i…
Signed-off-by: Takashi Sakamoto <o-takashi(a)sakamocchi.jp>
---
sound/firewire/amdtp-stream.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index d35d0a420ee0..1a163bbcabd7 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -1180,8 +1180,7 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
(void)fw_card_read_cycle_time(fw_parent_device(s->unit)->card, &curr_cycle_time);
for (i = 0; i < packets; ++i) {
- DEFINE_FLEX(struct fw_iso_packet, template, header,
- header_length, CIP_HEADER_QUADLETS);
+ DEFINE_RAW_FLEX(struct fw_iso_packet, template, header, CIP_HEADER_QUADLETS);
bool sched_irq = false;
build_it_pkt_header(s, desc->cycle, template, pkt_header_length,
--
2.43.0
This is the start of the stable review cycle for the 6.10.2 release.
There are 29 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 27 Jul 2024 14:27:16 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.10.2-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.10.2-rc1
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: ump: Skip useless ports for static blocks
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
Abel Vesa <abel.vesa(a)linaro.org>
arm64: dts: qcom: x1e80100-crd: Fix USB PHYs regulators
Abel Vesa <abel.vesa(a)linaro.org>
arm64: dts: qcom: x1e80100-qcp: Fix the PHY regulator for PCIe 6a
Abel Vesa <abel.vesa(a)linaro.org>
arm64: dts: qcom: x1e80100-crd: Fix the PHY regulator for PCIe 6a
Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
arm64: dts: qcom: qrb4210-rb2: switch I2C2 to i2c-gpio
Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
arm64: dts: qcom: qrb2210-rb1: switch I2C2 to i2c-gpio
Abel Vesa <abel.vesa(a)linaro.org>
arm64: dts: qcom: x1e80100-qcp: Fix USB PHYs regulators
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode
Seunghun Han <kkamagui(a)gmail.com>
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
Shenghao Ding <shenghao-ding(a)ti.com>
ALSA: hda/tas2781: Add new quirk for Lenovo Hera2 Laptop
Takashi Iwai <tiwai(a)suse.de>
usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup
lei lu <llfamsec(a)gmail.com>
fs/ntfs3: Validate ff offset
Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com>
fs/ntfs3: Add a check for attr_names and oatbl
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Gerald Schaefer <gerald.schaefer(a)linux.ibm.com>
s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
-------------
Diffstat:
Makefile | 4 +--
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 ++
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 +
arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 +
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 13 ++++++++-
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 13 ++++++++-
arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 +
arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 +
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1 +
arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 ++
arch/arm64/boot/dts/qcom/sm6115.dtsi | 1 +
arch/arm64/boot/dts/qcom/sm6350.dtsi | 1 +
arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 17 +++++++++---
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 17 +++++++++---
arch/s390/mm/fault.c | 3 +-
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
drivers/usb/gadget/function/f_midi2.c | 19 +++++++------
fs/jfs/xattr.c | 23 +++++++++++++---
fs/locks.c | 9 +++---
fs/ntfs3/fslog.c | 44 ++++++++++++++++++++++++-----
fs/ocfs2/dir.c | 46 +++++++++++++++++++------------
sound/core/pcm_dmaengine.c | 6 +++-
sound/core/seq/seq_ump_client.c | 16 +++++++++++
sound/pci/hda/patch_realtek.c | 3 ++
25 files changed, 191 insertions(+), 56 deletions(-)
The driver returns -ENODEV when the firmware battmrg service hasn't
started yet, while per-se -ENODEV is fine, we usually use -EAGAIN to
tell the user to retry again later. And the power supply core uses
-EGAIN when the device isn't initialized, let's use the same return.
This notably causes an infinite spam of:
thermal thermal_zoneXX: failed to read out thermal zone (-19)
because the thermal core doesn't understand -ENODEV, but only
considers -EAGAIN as a non-fatal error.
While it didn't appear until now, commit [1] fixes thermal core
and no more ignores thermal zones returning an error at first
temperature update.
[1] 5725f40698b9 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid")
Link: https://lore.kernel.org/all/2ed4c630-204a-4f80-a37f-f2ca838eb455@linaro.org/
Cc: stable(a)vger.kernel.org
Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply")
Signed-off-by: Neil Armstrong <neil.armstrong(a)linaro.org>
---
drivers/power/supply/qcom_battmgr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
index 46f36dcb185c..bde874b5e0e7 100644
--- a/drivers/power/supply/qcom_battmgr.c
+++ b/drivers/power/supply/qcom_battmgr.c
@@ -486,7 +486,7 @@ static int qcom_battmgr_bat_get_property(struct power_supply *psy,
int ret;
if (!battmgr->service_up)
- return -ENODEV;
+ return -EAGAIN;
if (battmgr->variant == QCOM_BATTMGR_SC8280XP)
ret = qcom_battmgr_bat_sc8280xp_update(battmgr, psp);
@@ -683,7 +683,7 @@ static int qcom_battmgr_ac_get_property(struct power_supply *psy,
int ret;
if (!battmgr->service_up)
- return -ENODEV;
+ return -EAGAIN;
ret = qcom_battmgr_bat_sc8280xp_update(battmgr, psp);
if (ret)
@@ -748,7 +748,7 @@ static int qcom_battmgr_usb_get_property(struct power_supply *psy,
int ret;
if (!battmgr->service_up)
- return -ENODEV;
+ return -EAGAIN;
if (battmgr->variant == QCOM_BATTMGR_SC8280XP)
ret = qcom_battmgr_bat_sc8280xp_update(battmgr, psp);
@@ -867,7 +867,7 @@ static int qcom_battmgr_wls_get_property(struct power_supply *psy,
int ret;
if (!battmgr->service_up)
- return -ENODEV;
+ return -EAGAIN;
if (battmgr->variant == QCOM_BATTMGR_SC8280XP)
ret = qcom_battmgr_bat_sc8280xp_update(battmgr, psp);
---
base-commit: 91e3b24eb7d297d9d99030800ed96944b8652eaf
change-id: 20240715-topic-sm8x50-upstream-fix-battmgr-temp-tz-warn-c5a2f956d28d
Best regards,
--
Neil Armstrong <neil.armstrong(a)linaro.org>
info->max_cv is in millivolts, divide the microvolt value being written
to constant_charge_voltage by 1000 *before* clamping it to info->max_cv.
Before this fix the code always tried to set constant_charge_voltage
to max_cv / 1000 = 4 millivolt, which ends up in setting it to 4.1V
which is the lowest supported value.
Fixes: 843735b788a4 ("power: axp288_charger: axp288 charger driver")
Cc: stable(a)vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
---
drivers/power/supply/axp288_charger.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/power/supply/axp288_charger.c b/drivers/power/supply/axp288_charger.c
index b5903193e2f9..aea17289a178 100644
--- a/drivers/power/supply/axp288_charger.c
+++ b/drivers/power/supply/axp288_charger.c
@@ -337,8 +337,8 @@ static int axp288_charger_usb_set_property(struct power_supply *psy,
}
break;
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE:
- scaled_val = min(val->intval, info->max_cv);
- scaled_val = DIV_ROUND_CLOSEST(scaled_val, 1000);
+ scaled_val = DIV_ROUND_CLOSEST(val->intval, 1000);
+ scaled_val = min(scaled_val, info->max_cv);
ret = axp288_charger_set_cv(info, scaled_val);
if (ret < 0) {
dev_warn(&info->pdev->dev, "set charge voltage failed\n");
--
2.45.2
The quilt patch titled
Subject: nilfs2: handle inconsistent state in nilfs_btnode_create_block()
has been removed from the -mm tree. Its filename was
nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
Subject: nilfs2: handle inconsistent state in nilfs_btnode_create_block()
Date: Thu, 25 Jul 2024 14:20:07 +0900
Syzbot reported that a buffer state inconsistency was detected in
nilfs_btnode_create_block(), triggering a kernel bug.
It is not appropriate to treat this inconsistency as a bug; it can occur
if the argument block address (the buffer index of the newly created
block) is a virtual block number and has been reallocated due to
corruption of the bitmap used to manage its allocation state.
So, modify nilfs_btnode_create_block() and its callers to treat it as a
possible filesystem error, rather than triggering a kernel bug.
Link: https://lkml.kernel.org/r/20240725052007.4562-1-konishi.ryusuke@gmail.com
Fixes: a60be987d45d ("nilfs2: B-tree node cache")
Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
Reported-by: syzbot+89cc4f2324ed37988b60(a)syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=89cc4f2324ed37988b60
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/nilfs2/btnode.c | 25 ++++++++++++++++++++-----
fs/nilfs2/btree.c | 4 ++--
2 files changed, 22 insertions(+), 7 deletions(-)
--- a/fs/nilfs2/btnode.c~nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block
+++ a/fs/nilfs2/btnode.c
@@ -51,12 +51,21 @@ nilfs_btnode_create_block(struct address
bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node));
if (unlikely(!bh))
- return NULL;
+ return ERR_PTR(-ENOMEM);
if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) ||
buffer_dirty(bh))) {
- brelse(bh);
- BUG();
+ /*
+ * The block buffer at the specified new address was already
+ * in use. This can happen if it is a virtual block number
+ * and has been reallocated due to corruption of the bitmap
+ * used to manage its allocation state (if not, the buffer
+ * clearing of an abandoned b-tree node is missing somewhere).
+ */
+ nilfs_error(inode->i_sb,
+ "state inconsistency probably due to duplicate use of b-tree node block address %llu (ino=%lu)",
+ (unsigned long long)blocknr, inode->i_ino);
+ goto failed;
}
memset(bh->b_data, 0, i_blocksize(inode));
bh->b_bdev = inode->i_sb->s_bdev;
@@ -67,6 +76,12 @@ nilfs_btnode_create_block(struct address
folio_unlock(bh->b_folio);
folio_put(bh->b_folio);
return bh;
+
+failed:
+ folio_unlock(bh->b_folio);
+ folio_put(bh->b_folio);
+ brelse(bh);
+ return ERR_PTR(-EIO);
}
int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr,
@@ -217,8 +232,8 @@ retry:
}
nbh = nilfs_btnode_create_block(btnc, newkey);
- if (!nbh)
- return -ENOMEM;
+ if (IS_ERR(nbh))
+ return PTR_ERR(nbh);
BUG_ON(nbh == obh);
ctxt->newbh = nbh;
--- a/fs/nilfs2/btree.c~nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block
+++ a/fs/nilfs2/btree.c
@@ -63,8 +63,8 @@ static int nilfs_btree_get_new_block(con
struct buffer_head *bh;
bh = nilfs_btnode_create_block(btnc, ptr);
- if (!bh)
- return -ENOMEM;
+ if (IS_ERR(bh))
+ return PTR_ERR(bh);
set_buffer_nilfs_volatile(bh);
*bhp = bh;
_
Patches currently in -mm which might be from konishi.ryusuke(a)gmail.com are
The quilt patch titled
Subject: mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist()
has been removed from the -mm tree. Its filename was
mm-page_alloc-fix-pcp-count-race-between-drain_pages_zone-vs-__rmqueue_pcplist.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Li Zhijian <lizhijian(a)fujitsu.com>
Subject: mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist()
Date: Tue, 23 Jul 2024 14:44:28 +0800
It's expected that no page should be left in pcp_list after calling
zone_pcp_disable() in offline_pages(). Previously, it's observed that
offline_pages() gets stuck [1] due to some pages remaining in pcp_list.
Cause:
There is a race condition between drain_pages_zone() and __rmqueue_pcplist()
involving the pcp->count variable. See below scenario:
CPU0 CPU1
---------------- ---------------
spin_lock(&pcp->lock);
__rmqueue_pcplist() {
zone_pcp_disable() {
/* list is empty */
if (list_empty(list)) {
/* add pages to pcp_list */
alloced = rmqueue_bulk()
mutex_lock(&pcp_batch_high_lock)
...
__drain_all_pages() {
drain_pages_zone() {
/* read pcp->count, it's 0 here */
count = READ_ONCE(pcp->count)
/* 0 means nothing to drain */
/* update pcp->count */
pcp->count += alloced << order;
...
...
spin_unlock(&pcp->lock);
In this case, after calling zone_pcp_disable() though, there are still some
pages in pcp_list. And these pages in pcp_list are neither movable nor
isolated, offline_pages() gets stuck as a result.
Solution:
Expand the scope of the pcp->lock to also protect pcp->count in
drain_pages_zone(), to ensure no pages are left in the pcp list after
zone_pcp_disable()
[1] https://lore.kernel.org/linux-mm/6a07125f-e720-404c-b2f9-e55f3f166e85@fujit…
Link: https://lkml.kernel.org/r/20240723064428.1179519-1-lizhijian@fujitsu.com
Fixes: 4b23a68f9536 ("mm/page_alloc: protect PCP lists with a spinlock")
Signed-off-by: Li Zhijian <lizhijian(a)fujitsu.com>
Reported-by: Yao Xingtao <yaoxt.fnst(a)fujitsu.com>
Reviewed-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: David Hildenbrand <david(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/page_alloc.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
--- a/mm/page_alloc.c~mm-page_alloc-fix-pcp-count-race-between-drain_pages_zone-vs-__rmqueue_pcplist
+++ a/mm/page_alloc.c
@@ -2343,16 +2343,20 @@ void drain_zone_pages(struct zone *zone,
static void drain_pages_zone(unsigned int cpu, struct zone *zone)
{
struct per_cpu_pages *pcp = per_cpu_ptr(zone->per_cpu_pageset, cpu);
- int count = READ_ONCE(pcp->count);
-
- while (count) {
- int to_drain = min(count, pcp->batch << CONFIG_PCP_BATCH_SCALE_MAX);
- count -= to_drain;
+ int count;
+ do {
spin_lock(&pcp->lock);
- free_pcppages_bulk(zone, to_drain, pcp, 0);
+ count = pcp->count;
+ if (count) {
+ int to_drain = min(count,
+ pcp->batch << CONFIG_PCP_BATCH_SCALE_MAX);
+
+ free_pcppages_bulk(zone, to_drain, pcp, 0);
+ count -= to_drain;
+ }
spin_unlock(&pcp->lock);
- }
+ } while (count);
}
/*
_
Patches currently in -mm which might be from lizhijian(a)fujitsu.com are
The quilt patch titled
Subject: alloc_tag: outline and export free_reserved_page()
has been removed from the -mm tree. Its filename was
alloc_tag-outline-and-export-free_reserved_page.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Suren Baghdasaryan <surenb(a)google.com>
Subject: alloc_tag: outline and export free_reserved_page()
Date: Wed, 17 Jul 2024 14:28:44 -0700
Outline and export free_reserved_page() because modules use it and it in
turn uses page_ext_{get|put} which should not be exported. The same
result could be obtained by outlining {get|put}_page_tag_ref() but that
would have higher performance impact as these functions are used in more
performance critical paths.
Link: https://lkml.kernel.org/r/20240717212844.2749975-1-surenb@google.com
Fixes: dcfe378c81f7 ("lib: introduce support for page allocation tagging")
Signed-off-by: Suren Baghdasaryan <surenb(a)google.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407080044.DWMC9N9I-lkp@intel.com/
Suggested-by: Christoph Hellwig <hch(a)infradead.org>
Suggested-by: Vlastimil Babka <vbabka(a)suse.cz>
Acked-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Kent Overstreet <kent.overstreet(a)linux.dev>
Cc: Pasha Tatashin <pasha.tatashin(a)soleen.com>
Cc: Sourav Panda <souravpanda(a)google.com>
Cc: <stable(a)vger.kernel.org> [6.10]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/mm.h | 16 +---------------
mm/page_alloc.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 15 deletions(-)
--- a/include/linux/mm.h~alloc_tag-outline-and-export-free_reserved_page
+++ a/include/linux/mm.h
@@ -3130,21 +3130,7 @@ extern void reserve_bootmem_region(phys_
phys_addr_t end, int nid);
/* Free the reserved page into the buddy system, so it gets managed. */
-static inline void free_reserved_page(struct page *page)
-{
- if (mem_alloc_profiling_enabled()) {
- union codetag_ref *ref = get_page_tag_ref(page);
-
- if (ref) {
- set_codetag_empty(ref);
- put_page_tag_ref(ref);
- }
- }
- ClearPageReserved(page);
- init_page_count(page);
- __free_page(page);
- adjust_managed_page_count(page, 1);
-}
+void free_reserved_page(struct page *page);
#define free_highmem_page(page) free_reserved_page(page)
static inline void mark_page_reserved(struct page *page)
--- a/mm/page_alloc.c~alloc_tag-outline-and-export-free_reserved_page
+++ a/mm/page_alloc.c
@@ -5815,6 +5815,23 @@ unsigned long free_reserved_area(void *s
return pages;
}
+void free_reserved_page(struct page *page)
+{
+ if (mem_alloc_profiling_enabled()) {
+ union codetag_ref *ref = get_page_tag_ref(page);
+
+ if (ref) {
+ set_codetag_empty(ref);
+ put_page_tag_ref(ref);
+ }
+ }
+ ClearPageReserved(page);
+ init_page_count(page);
+ __free_page(page);
+ adjust_managed_page_count(page, 1);
+}
+EXPORT_SYMBOL(free_reserved_page);
+
static int page_alloc_cpu_dead(unsigned int cpu)
{
struct zone *zone;
_
Patches currently in -mm which might be from surenb(a)google.com are
The quilt patch titled
Subject: decompress_bunzip2: fix rare decompression failure
has been removed from the -mm tree. Its filename was
decompress_bunzip2-fix-rare-decompression-failure.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Ross Lagerwall <ross.lagerwall(a)citrix.com>
Subject: decompress_bunzip2: fix rare decompression failure
Date: Wed, 17 Jul 2024 17:20:16 +0100
The decompression code parses a huffman tree and counts the number of
symbols for a given bit length. In rare cases, there may be >= 256
symbols with a given bit length, causing the unsigned char to overflow.
This causes a decompression failure later when the code tries and fails to
find the bit length for a given symbol.
Since the maximum number of symbols is 258, use unsigned short instead.
Link: https://lkml.kernel.org/r/20240717162016.1514077-1-ross.lagerwall@citrix.com
Fixes: bc22c17e12c1 ("bzip2/lzma: library support for gzip, bzip2 and lzma decompression")
Signed-off-by: Ross Lagerwall <ross.lagerwall(a)citrix.com>
Cc: Alain Knaff <alain(a)knaff.lu>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
lib/decompress_bunzip2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/lib/decompress_bunzip2.c~decompress_bunzip2-fix-rare-decompression-failure
+++ a/lib/decompress_bunzip2.c
@@ -232,7 +232,8 @@ static int INIT get_next_block(struct bu
RUNB) */
symCount = symTotal+2;
for (j = 0; j < groupCount; j++) {
- unsigned char length[MAX_SYMBOLS], temp[MAX_HUFCODE_BITS+1];
+ unsigned char length[MAX_SYMBOLS];
+ unsigned short temp[MAX_HUFCODE_BITS+1];
int minLen, maxLen, pp;
/* Read Huffman code lengths for each symbol. They're
stored in a way similar to mtf; record a starting
_
Patches currently in -mm which might be from ross.lagerwall(a)citrix.com are
The quilt patch titled
Subject: mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines
has been removed from the -mm tree. Its filename was
mm-huge_memory-use-config_64bit-to-relax-huge-page-alignment-on-32-bit-machines.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Yang Shi <yang(a)os.amperecomputing.com>
Subject: mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines
Date: Fri, 12 Jul 2024 08:58:55 -0700
Yves-Alexis Perez reported commit 4ef9ad19e176 ("mm: huge_memory: don't
force huge page alignment on 32 bit") didn't work for x86_32 [1]. It is
because x86_32 uses CONFIG_X86_32 instead of CONFIG_32BIT.
!CONFIG_64BIT should cover all 32 bit machines.
[1] https://lore.kernel.org/linux-mm/CAHbLzkr1LwH3pcTgM+aGQ31ip2bKqiqEQ8=FQB+t2…
Link: https://lkml.kernel.org/r/20240712155855.1130330-1-yang@os.amperecomputing.…
Fixes: 4ef9ad19e176 ("mm: huge_memory: don't force huge page alignment on 32 bit")
Signed-off-by: Yang Shi <yang(a)os.amperecomputing.com>
Reported-by: Yves-Alexis Perez <corsac(a)debian.org>
Tested-by: Yves-Alexis Perez <corsac(a)debian.org>
Acked-by: David Hildenbrand <david(a)redhat.com>
Cc: Ben Hutchings <ben(a)decadent.org.uk>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: Jiri Slaby <jirislaby(a)kernel.org>
Cc: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Cc: Rik van Riel <riel(a)surriel.com>
Cc: Salvatore Bonaccorso <carnil(a)debian.org>
Cc: Suren Baghdasaryan <surenb(a)google.com>
Cc: <stable(a)vger.kernel.org> [6.8+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/huge_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/huge_memory.c~mm-huge_memory-use-config_64bit-to-relax-huge-page-alignment-on-32-bit-machines
+++ a/mm/huge_memory.c
@@ -877,7 +877,7 @@ static unsigned long __thp_get_unmapped_
loff_t off_align = round_up(off, size);
unsigned long len_pad, ret, off_sub;
- if (IS_ENABLED(CONFIG_32BIT) || in_compat_syscall())
+ if (!IS_ENABLED(CONFIG_64BIT) || in_compat_syscall())
return 0;
if (off_end <= off_align || (off_end - off_align) < size)
_
Patches currently in -mm which might be from yang(a)os.amperecomputing.com are
The quilt patch titled
Subject: mm: fix old/young bit handling in the faulting path
has been removed from the -mm tree. Its filename was
mm-fix-old-young-bit-handling-in-the-faulting-path.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Ram Tummala <rtummala(a)nvidia.com>
Subject: mm: fix old/young bit handling in the faulting path
Date: Tue, 9 Jul 2024 18:45:39 -0700
Commit 3bd786f76de2 ("mm: convert do_set_pte() to set_pte_range()")
replaced do_set_pte() with set_pte_range() and that introduced a
regression in the following faulting path of non-anonymous vmas which
caused the PTE for the faulting address to be marked as old instead of
young.
handle_pte_fault()
do_pte_missing()
do_fault()
do_read_fault() || do_cow_fault() || do_shared_fault()
finish_fault()
set_pte_range()
The polarity of prefault calculation is incorrect. This leads to prefault
being incorrectly set for the faulting address. The following check will
incorrectly mark the PTE old rather than young. On some architectures
this will cause a double fault to mark it young when the access is
retried.
if (prefault && arch_wants_old_prefaulted_pte())
entry = pte_mkold(entry);
On a subsequent fault on the same address, the faulting path will see a
non NULL vmf->pte and instead of reaching the do_pte_missing() path, PTE
will then be correctly marked young in handle_pte_fault() itself.
Due to this bug, performance degradation in the fault handling path will
be observed due to unnecessary double faulting.
Link: https://lkml.kernel.org/r/20240710014539.746200-1-rtummala@nvidia.com
Fixes: 3bd786f76de2 ("mm: convert do_set_pte() to set_pte_range()")
Signed-off-by: Ram Tummala <rtummala(a)nvidia.com>
Reviewed-by: Yin Fengwei <fengwei.yin(a)intel.com>
Cc: Alistair Popple <apopple(a)nvidia.com>
Cc: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Cc: Yin Fengwei <fengwei.yin(a)intel.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/memory.c~mm-fix-old-young-bit-handling-in-the-faulting-path
+++ a/mm/memory.c
@@ -4780,7 +4780,7 @@ void set_pte_range(struct vm_fault *vmf,
{
struct vm_area_struct *vma = vmf->vma;
bool write = vmf->flags & FAULT_FLAG_WRITE;
- bool prefault = in_range(vmf->address, addr, nr * PAGE_SIZE);
+ bool prefault = !in_range(vmf->address, addr, nr * PAGE_SIZE);
pte_t entry;
flush_icache_pages(vma, page, nr);
_
Patches currently in -mm which might be from rtummala(a)nvidia.com are
This is the start of the stable review cycle for the 6.9.12 release.
There are 29 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 27 Jul 2024 14:27:16 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.9.12-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.9.12-rc1
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: ump: Skip useless ports for static blocks
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
Abel Vesa <abel.vesa(a)linaro.org>
arm64: dts: qcom: x1e80100-crd: Fix USB PHYs regulators
Abel Vesa <abel.vesa(a)linaro.org>
arm64: dts: qcom: x1e80100-qcp: Fix the PHY regulator for PCIe 6a
Abel Vesa <abel.vesa(a)linaro.org>
arm64: dts: qcom: x1e80100-crd: Fix the PHY regulator for PCIe 6a
Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
arm64: dts: qcom: qrb4210-rb2: switch I2C2 to i2c-gpio
Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
arm64: dts: qcom: qrb2210-rb1: switch I2C2 to i2c-gpio
Abel Vesa <abel.vesa(a)linaro.org>
arm64: dts: qcom: x1e80100-qcp: Fix USB PHYs regulators
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode
Seunghun Han <kkamagui(a)gmail.com>
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
Shenghao Ding <shenghao-ding(a)ti.com>
ALSA: hda/tas2781: Add new quirk for Lenovo Hera2 Laptop
Takashi Iwai <tiwai(a)suse.de>
usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup
lei lu <llfamsec(a)gmail.com>
fs/ntfs3: Validate ff offset
Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com>
fs/ntfs3: Add a check for attr_names and oatbl
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Gerald Schaefer <gerald.schaefer(a)linux.ibm.com>
s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
-------------
Diffstat:
Makefile | 4 +--
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 ++
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 +
arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 +
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 13 ++++++++-
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 13 ++++++++-
arch/arm64/boot/dts/qcom/sc7180.dtsi | 1 +
arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 +
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1 +
arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 ++
arch/arm64/boot/dts/qcom/sm6115.dtsi | 1 +
arch/arm64/boot/dts/qcom/sm6350.dtsi | 1 +
arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 17 +++++++++---
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 17 +++++++++---
arch/s390/mm/fault.c | 3 +-
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
drivers/usb/gadget/function/f_midi2.c | 19 +++++++------
fs/jfs/xattr.c | 23 +++++++++++++---
fs/locks.c | 9 +++---
fs/ntfs3/fslog.c | 44 ++++++++++++++++++++++++-----
fs/ocfs2/dir.c | 46 +++++++++++++++++++------------
sound/core/pcm_dmaengine.c | 6 +++-
sound/core/seq/seq_ump_client.c | 16 +++++++++++
sound/pci/hda/patch_realtek.c | 3 ++
25 files changed, 191 insertions(+), 56 deletions(-)
This is the start of the stable review cycle for the 6.6.43 release.
There are 16 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 27 Jul 2024 14:27:16 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.43-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.6.43-rc1
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: ump: Skip useless ports for static blocks
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
arm64: dts: qcom: qrb4210-rb2: switch I2C2 to i2c-gpio
Seunghun Han <kkamagui(a)gmail.com>
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
Takashi Iwai <tiwai(a)suse.de>
usb: gadget: midi2: Fix incorrect default MIDI2 protocol setup
lei lu <llfamsec(a)gmail.com>
fs/ntfs3: Validate ff offset
Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com>
fs/ntfs3: Add a check for attr_names and oatbl
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
-------------
Diffstat:
Makefile | 4 +--
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 +
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 13 ++++++++-
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1 +
arch/arm64/boot/dts/qcom/sm6350.dtsi | 1 +
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
drivers/usb/gadget/function/f_midi2.c | 19 +++++++------
fs/jfs/xattr.c | 23 +++++++++++++---
fs/locks.c | 9 +++----
fs/ntfs3/fslog.c | 44 +++++++++++++++++++++++++-----
fs/ocfs2/dir.c | 46 ++++++++++++++++++++------------
sound/core/pcm_dmaengine.c | 6 ++++-
sound/core/seq/seq_ump_client.c | 16 +++++++++++
sound/pci/hda/patch_realtek.c | 2 ++
15 files changed, 142 insertions(+), 46 deletions(-)
This is the start of the stable review cycle for the 6.1.102 release.
There are 13 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 27 Jul 2024 14:27:16 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.102-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.1.102-rc1
Filipe Manana <fdmanana(a)suse.com>
btrfs: do not BUG_ON on failure to get dir index for new snapshot
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: sdm630: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: ipq6018: Disable SS instance in Parkmode for USB
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
Seunghun Han <kkamagui(a)gmail.com>
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
lei lu <llfamsec(a)gmail.com>
fs/ntfs3: Validate ff offset
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Chao Yu <chao(a)kernel.org>
f2fs: avoid dead loop in f2fs_issue_checkpoint()
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
-------------
Diffstat:
Makefile | 4 +--
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 +
arch/arm64/boot/dts/qcom/sdm630.dtsi | 1 +
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
fs/btrfs/transaction.c | 5 +++-
fs/f2fs/super.c | 15 +++++++++--
fs/jfs/xattr.c | 23 ++++++++++++++---
fs/locks.c | 9 +++----
fs/ntfs3/fslog.c | 6 ++++-
fs/ocfs2/dir.c | 46 +++++++++++++++++++++-------------
sound/core/pcm_dmaengine.c | 6 ++++-
sound/pci/hda/patch_realtek.c | 2 ++
13 files changed, 87 insertions(+), 34 deletions(-)
This is the start of the stable review cycle for the 4.19.319 release.
There are 32 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 28 Jul 2024 07:05:18 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.319-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.319-rc2
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Paolo Abeni <pabeni(a)redhat.com>
net: relax socket state check at accept time.
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Masahiro Yamada <masahiroy(a)kernel.org>
ARM: 9324/1: fix get_user() broken with veneer
Jann Horn <jannh(a)google.com>
filelock: Remove locks reliably when fcntl/close race is detected
Edward Adam Davis <eadavis(a)qq.com>
hfsplus: fix uninit-value in copy_name
John Hubbard <jhubbard(a)nvidia.com>
selftests/vDSO: fix clang build errors and warnings
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
Christian Brauner <brauner(a)kernel.org>
fs: better handle deep ancestor chains in is_subdir()
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Yunshui Jiang <jiangyunshui(a)kylinos.cn>
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
Daniele Palmas <dnlplm(a)gmail.com>
net: usb: qmi_wwan: add Telit FN912 compositions
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: dmaengine_pcm: terminate dmaengine before synchronize
Heiko Carstens <hca(a)linux.ibm.com>
s390/sclp: Fix sclp_init() cleanup on failure
Chen Ni <nichen(a)iscas.ac.cn>
can: kvaser_usb: fix return value for hif_usb_send_regout
Thomas GENTY <tomlohave(a)gmail.com>
bytcr_rt5640 : inverse jack detect for Archos 101 cesium
Jonathan Denose <jdenose(a)google.com>
Input: elantech - fix touchpad state on resume for Lenovo N24
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
Alexander Usyskin <alexander.usyskin(a)intel.com>
mei: demote client disconnect warning on suspend to debug
Yuntao Wang <yuntao.wang(a)linux.dev>
fs/file: fix the check in find_next_fd()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: remove wrong expr_trans_bool()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: gconf: give a proper initial state to the Save button
Eric Dumazet <edumazet(a)google.com>
ila: block BH in ila_output()
Hans de Goede <hdegoede(a)redhat.com>
Input: silead - Always support 10 fingers
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
Nicolas Escande <nico.escande(a)gmail.com>
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Avoid returning AE_OK on errors in address space handler
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Abort address space access upon error
Saurav Kashyap <skashyap(a)marvell.com>
scsi: qedf: Set qed_slowpath_params to zero before use
Kees Cook <keescook(a)chromium.org>
gcc-plugins: Rename last_stmt() for GCC 14+
-------------
Diffstat:
Makefile | 4 +-
arch/arm/include/asm/uaccess.h | 14 +------
drivers/acpi/ec.c | 9 ++++-
drivers/acpi/processor_idle.c | 40 ++++++++-----------
drivers/input/mouse/elantech.c | 31 +++++++++++++++
drivers/input/touchscreen/silead.c | 19 +++------
drivers/misc/mei/main.c | 2 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +-
drivers/net/usb/qmi_wwan.c | 2 +
drivers/s390/char/sclp.c | 1 +
drivers/scsi/qedf/qedf_main.c | 1 +
drivers/spi/spi-imx.c | 2 +-
fs/dcache.c | 31 +++++++--------
fs/file.c | 4 +-
fs/hfsplus/xattr.c | 2 +-
fs/jfs/xattr.c | 23 +++++++++--
fs/locks.c | 18 ++++-----
fs/ocfs2/dir.c | 46 ++++++++++++++--------
net/bluetooth/hci_core.c | 4 ++
net/ipv4/af_inet.c | 4 +-
net/ipv6/ila/ila_lwt.c | 7 +++-
net/mac80211/mesh.c | 1 +
net/mac80211/scan.c | 14 +++++--
net/mac802154/tx.c | 8 ++--
net/wireless/scan.c | 8 +++-
scripts/gcc-plugins/gcc-common.h | 4 ++
scripts/kconfig/expr.c | 29 --------------
scripts/kconfig/expr.h | 1 -
scripts/kconfig/gconf.c | 3 +-
scripts/kconfig/menu.c | 2 -
sound/core/pcm_dmaengine.c | 12 ++++++
sound/soc/intel/boards/bytcr_rt5640.c | 11 ++++++
tools/testing/selftests/vDSO/parse_vdso.c | 16 +++++---
.../selftests/vDSO/vdso_standalone_test_x86.c | 18 ++++++++-
34 files changed, 233 insertions(+), 160 deletions(-)
This is the start of the stable review cycle for the 5.10.223 release.
There are 59 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 27 Jul 2024 14:27:16 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.223-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.10.223-rc1
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Krishna Kurapati <quic_kriskura(a)quicinc.com>
arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB
Seunghun Han <kkamagui(a)gmail.com>
ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Paolo Abeni <pabeni(a)redhat.com>
net: relax socket state check at accept time.
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Gabriel Krisman Bertazi <krisman(a)collabora.com>
ext4: Send notifications on error
Gabriel Krisman Bertazi <krisman(a)collabora.com>
ext4: fix error code saved on super block during file system abort
Bart Van Assche <bvanassche(a)acm.org>
scsi: core: Fix a use-after-free
Jason Xing <kernelxing(a)tencent.com>
bpf, skmsg: Fix NULL pointer dereference in sk_psock_skb_ingress_enqueue
Daniel Borkmann <daniel(a)iogearbox.net>
bpf: Fix overrunning reservations in ringbuf
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Masahiro Yamada <masahiroy(a)kernel.org>
ARM: 9324/1: fix get_user() broken with veneer
David Lechner <dlechner(a)baylibre.com>
spi: mux: set ctlr->bits_per_word_mask
Edward Adam Davis <eadavis(a)qq.com>
hfsplus: fix uninit-value in copy_name
John Hubbard <jhubbard(a)nvidia.com>
selftests/vDSO: fix clang build errors and warnings
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
Christian Brauner <brauner(a)kernel.org>
fs: better handle deep ancestor chains in is_subdir()
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Xingui Yang <yangxingui(a)huawei.com>
scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed
Ganesh Goudar <ganeshgr(a)linux.ibm.com>
powerpc/eeh: avoid possible crash when edev->pdev changes
Anjali K <anjalik(a)linux.ibm.com>
powerpc/pseries: Whitelist dtl slub object for copying to userspace
Yunshui Jiang <jiangyunshui(a)kylinos.cn>
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
Daniele Palmas <dnlplm(a)gmail.com>
net: usb: qmi_wwan: add Telit FN912 compositions
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: dmaengine_pcm: terminate dmaengine before synchronize
Aivaz Latypov <reichaivaz(a)gmail.com>
ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx
Filipe Manana <fdmanana(a)suse.com>
btrfs: qgroup: fix quota root leak after quota disable failure
Heiko Carstens <hca(a)linux.ibm.com>
s390/sclp: Fix sclp_init() cleanup on failure
Chen Ni <nichen(a)iscas.ac.cn>
can: kvaser_usb: fix return value for hif_usb_send_regout
Primoz Fiser <primoz.fiser(a)norik.com>
ASoC: ti: omap-hdmi: Fix too long driver name
Jai Luthra <j-luthra(a)ti.com>
ASoC: ti: davinci-mcasp: Set min period size using FIFO config
Jai Luthra <j-luthra(a)ti.com>
ALSA: dmaengine: Synchronize dma channel after drop()
Thomas GENTY <tomlohave(a)gmail.com>
bytcr_rt5640 : inverse jack detect for Archos 101 cesium
Tobias Jakobi <tjakobi(a)math.uni-bielefeld.de>
Input: i8042 - add Ayaneo Kun to i8042 quirk table
Jonathan Denose <jdenose(a)google.com>
Input: elantech - fix touchpad state on resume for Lenovo N24
Arnd Bergmann <arnd(a)arndb.de>
mips: fix compat_sys_lseek syscall
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek: Add more codec ID to no shutup pins list
Michael Ellerman <mpe(a)ellerman.id.au>
KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
Alexander Usyskin <alexander.usyskin(a)intel.com>
mei: demote client disconnect warning on suspend to debug
Yuntao Wang <yuntao.wang(a)linux.dev>
fs/file: fix the check in find_next_fd()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: remove wrong expr_trans_bool()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: gconf: give a proper initial state to the Save button
Andreas Hindborg <a.hindborg(a)samsung.com>
null_blk: fix validation of block size
Wei Li <liwei391(a)huawei.com>
arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process
Eric Dumazet <edumazet(a)google.com>
ila: block BH in ila_output()
Eric Dumazet <edumazet(a)google.com>
net: ipv6: rpl_iptunnel: block BH in rpl_output() and rpl_input()
Hans de Goede <hdegoede(a)redhat.com>
Input: silead - Always support 10 fingers
Michael Ellerman <mpe(a)ellerman.id.au>
selftests/openat2: Fix build warnings on ppc64
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
Nicolas Escande <nico.escande(a)gmail.com>
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Avoid returning AE_OK on errors in address space handler
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Abort address space access upon error
Saurav Kashyap <skashyap(a)marvell.com>
scsi: qedf: Set qed_slowpath_params to zero before use
Jann Horn <jannh(a)google.com>
filelock: Remove locks reliably when fcntl/close race is detected
Kees Cook <keescook(a)chromium.org>
gcc-plugins: Rename last_stmt() for GCC 14+
-------------
Diffstat:
Makefile | 4 +-
arch/arm/include/asm/uaccess.h | 14 +------
arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 +
arch/arm64/kernel/armv8_deprecated.c | 3 ++
arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +-
arch/powerpc/kernel/eeh_pe.c | 7 +++-
arch/powerpc/kvm/book3s_64_vio.c | 18 ++++++---
arch/powerpc/platforms/pseries/setup.c | 4 +-
drivers/acpi/ec.c | 9 ++++-
drivers/acpi/processor_idle.c | 40 ++++++++-----------
drivers/block/null_blk/main.c | 4 +-
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
drivers/input/mouse/elantech.c | 31 +++++++++++++++
drivers/input/serio/i8042-acpipnpio.h | 18 ++++++++-
drivers/input/touchscreen/silead.c | 19 +++------
drivers/misc/mei/main.c | 2 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +-
drivers/net/usb/qmi_wwan.c | 2 +
drivers/s390/char/sclp.c | 1 +
drivers/scsi/hosts.c | 16 ++++++--
drivers/scsi/libsas/sas_internal.h | 14 +++++++
drivers/scsi/qedf/qedf_main.c | 1 +
drivers/scsi/scsi_lib.c | 6 ++-
drivers/scsi/scsi_priv.h | 2 +-
drivers/scsi/scsi_scan.c | 1 +
drivers/scsi/scsi_sysfs.c | 1 +
drivers/spi/spi-imx.c | 2 +-
drivers/spi/spi-mux.c | 1 +
fs/btrfs/qgroup.c | 4 +-
fs/dcache.c | 31 +++++++--------
fs/ext4/super.c | 9 ++++-
fs/file.c | 4 +-
fs/hfsplus/xattr.c | 2 +-
fs/jfs/xattr.c | 23 +++++++++--
fs/locks.c | 18 ++++-----
fs/ocfs2/dir.c | 46 ++++++++++++++--------
include/linux/skmsg.h | 2 +
include/scsi/scsi_host.h | 2 +
include/sound/dmaengine_pcm.h | 1 +
kernel/bpf/ringbuf.c | 30 +++++++++++---
net/bluetooth/hci_core.c | 4 ++
net/ipv4/af_inet.c | 4 +-
net/ipv6/ila/ila_lwt.c | 7 +++-
net/ipv6/rpl_iptunnel.c | 14 +++----
net/mac80211/mesh.c | 1 +
net/mac80211/scan.c | 14 +++++--
net/mac802154/tx.c | 8 ++--
net/wireless/scan.c | 8 +++-
scripts/gcc-plugins/gcc-common.h | 4 ++
scripts/kconfig/expr.c | 29 --------------
scripts/kconfig/expr.h | 1 -
scripts/kconfig/gconf.c | 3 +-
scripts/kconfig/menu.c | 2 -
sound/core/pcm_dmaengine.c | 26 ++++++++++++
sound/pci/hda/patch_realtek.c | 7 ++++
sound/soc/intel/boards/bytcr_rt5640.c | 11 ++++++
sound/soc/soc-generic-dmaengine-pcm.c | 8 ++++
sound/soc/ti/davinci-mcasp.c | 9 ++++-
sound/soc/ti/omap-hdmi.c | 6 +--
tools/testing/selftests/openat2/openat2_test.c | 1 +
tools/testing/selftests/vDSO/parse_vdso.c | 16 +++++---
.../selftests/vDSO/vdso_standalone_test_x86.c | 18 ++++++++-
62 files changed, 396 insertions(+), 204 deletions(-)
This is the start of the stable review cycle for the 5.4.281 release.
There are 44 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 28 Jul 2024 07:05:34 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.281-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.281-rc2
Si-Wei Liu <si-wei.liu(a)oracle.com>
tap: add missing verification for short frame
Dongli Zhang <dongli.zhang(a)oracle.com>
tun: add missing verification for short frame
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Paolo Abeni <pabeni(a)redhat.com>
net: relax socket state check at accept time.
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Masahiro Yamada <masahiroy(a)kernel.org>
ARM: 9324/1: fix get_user() broken with veneer
Edward Adam Davis <eadavis(a)qq.com>
hfsplus: fix uninit-value in copy_name
John Hubbard <jhubbard(a)nvidia.com>
selftests/vDSO: fix clang build errors and warnings
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
Christian Brauner <brauner(a)kernel.org>
fs: better handle deep ancestor chains in is_subdir()
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Xingui Yang <yangxingui(a)huawei.com>
scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed
Ganesh Goudar <ganeshgr(a)linux.ibm.com>
powerpc/eeh: avoid possible crash when edev->pdev changes
Anjali K <anjalik(a)linux.ibm.com>
powerpc/pseries: Whitelist dtl slub object for copying to userspace
Yunshui Jiang <jiangyunshui(a)kylinos.cn>
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
Daniele Palmas <dnlplm(a)gmail.com>
net: usb: qmi_wwan: add Telit FN912 compositions
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: dmaengine_pcm: terminate dmaengine before synchronize
Heiko Carstens <hca(a)linux.ibm.com>
s390/sclp: Fix sclp_init() cleanup on failure
Chen Ni <nichen(a)iscas.ac.cn>
can: kvaser_usb: fix return value for hif_usb_send_regout
Primoz Fiser <primoz.fiser(a)norik.com>
ASoC: ti: omap-hdmi: Fix too long driver name
Jai Luthra <j-luthra(a)ti.com>
ASoC: ti: davinci-mcasp: Set min period size using FIFO config
Thomas GENTY <tomlohave(a)gmail.com>
bytcr_rt5640 : inverse jack detect for Archos 101 cesium
Jonathan Denose <jdenose(a)google.com>
Input: elantech - fix touchpad state on resume for Lenovo N24
Arnd Bergmann <arnd(a)arndb.de>
mips: fix compat_sys_lseek syscall
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek: Add more codec ID to no shutup pins list
Michael Ellerman <mpe(a)ellerman.id.au>
KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
Alexander Usyskin <alexander.usyskin(a)intel.com>
mei: demote client disconnect warning on suspend to debug
Yuntao Wang <yuntao.wang(a)linux.dev>
fs/file: fix the check in find_next_fd()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: remove wrong expr_trans_bool()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: gconf: give a proper initial state to the Save button
Eric Dumazet <edumazet(a)google.com>
ila: block BH in ila_output()
Hans de Goede <hdegoede(a)redhat.com>
Input: silead - Always support 10 fingers
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
Nicolas Escande <nico.escande(a)gmail.com>
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Avoid returning AE_OK on errors in address space handler
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Abort address space access upon error
Saurav Kashyap <skashyap(a)marvell.com>
scsi: qedf: Set qed_slowpath_params to zero before use
Jann Horn <jannh(a)google.com>
filelock: Remove locks reliably when fcntl/close race is detected
Kees Cook <keescook(a)chromium.org>
gcc-plugins: Rename last_stmt() for GCC 14+
-------------
Diffstat:
Makefile | 4 +-
arch/arm/include/asm/uaccess.h | 14 +------
arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +-
arch/powerpc/kernel/eeh_pe.c | 7 +++-
arch/powerpc/kvm/book3s_64_vio.c | 18 ++++++---
arch/powerpc/platforms/pseries/setup.c | 4 +-
drivers/acpi/ec.c | 9 ++++-
drivers/acpi/processor_idle.c | 40 ++++++++-----------
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
drivers/input/mouse/elantech.c | 31 +++++++++++++++
drivers/input/touchscreen/silead.c | 19 +++------
drivers/misc/mei/main.c | 2 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +-
drivers/net/tap.c | 5 +++
drivers/net/tun.c | 3 ++
drivers/net/usb/qmi_wwan.c | 2 +
drivers/s390/char/sclp.c | 1 +
drivers/scsi/libsas/sas_internal.h | 14 +++++++
drivers/scsi/qedf/qedf_main.c | 1 +
drivers/spi/spi-imx.c | 2 +-
fs/dcache.c | 31 +++++++--------
fs/file.c | 4 +-
fs/hfsplus/xattr.c | 2 +-
fs/jfs/xattr.c | 23 +++++++++--
fs/locks.c | 18 ++++-----
fs/ocfs2/dir.c | 46 ++++++++++++++--------
net/bluetooth/hci_core.c | 4 ++
net/ipv4/af_inet.c | 4 +-
net/ipv6/ila/ila_lwt.c | 7 +++-
net/mac80211/mesh.c | 1 +
net/mac80211/scan.c | 14 +++++--
net/mac802154/tx.c | 8 ++--
net/wireless/scan.c | 8 +++-
scripts/gcc-plugins/gcc-common.h | 4 ++
scripts/kconfig/expr.c | 29 --------------
scripts/kconfig/expr.h | 1 -
scripts/kconfig/gconf.c | 3 +-
scripts/kconfig/menu.c | 2 -
sound/core/pcm_dmaengine.c | 12 ++++++
sound/pci/hda/patch_realtek.c | 5 +++
sound/soc/intel/boards/bytcr_rt5640.c | 11 ++++++
sound/soc/ti/davinci-mcasp.c | 9 ++++-
sound/soc/ti/omap-hdmi.c | 6 +--
tools/testing/selftests/vDSO/parse_vdso.c | 16 +++++---
.../selftests/vDSO/vdso_standalone_test_x86.c | 18 ++++++++-
45 files changed, 290 insertions(+), 178 deletions(-)
This is the start of the stable review cycle for the 4.19.319 release.
There are 33 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 27 Jul 2024 14:27:16 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.319-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.319-rc1
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Paolo Abeni <pabeni(a)redhat.com>
net: relax socket state check at accept time.
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Masahiro Yamada <masahiroy(a)kernel.org>
ARM: 9324/1: fix get_user() broken with veneer
Jann Horn <jannh(a)google.com>
filelock: Remove locks reliably when fcntl/close race is detected
Edward Adam Davis <eadavis(a)qq.com>
hfsplus: fix uninit-value in copy_name
John Hubbard <jhubbard(a)nvidia.com>
selftests/vDSO: fix clang build errors and warnings
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
Christian Brauner <brauner(a)kernel.org>
fs: better handle deep ancestor chains in is_subdir()
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Yunshui Jiang <jiangyunshui(a)kylinos.cn>
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
Daniele Palmas <dnlplm(a)gmail.com>
net: usb: qmi_wwan: add Telit FN912 compositions
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: dmaengine_pcm: terminate dmaengine before synchronize
Heiko Carstens <hca(a)linux.ibm.com>
s390/sclp: Fix sclp_init() cleanup on failure
Ian Ray <ian.ray(a)gehealthcare.com>
gpio: pca953x: fix pca953x_irq_bus_sync_unlock race
Chen Ni <nichen(a)iscas.ac.cn>
can: kvaser_usb: fix return value for hif_usb_send_regout
Thomas GENTY <tomlohave(a)gmail.com>
bytcr_rt5640 : inverse jack detect for Archos 101 cesium
Jonathan Denose <jdenose(a)google.com>
Input: elantech - fix touchpad state on resume for Lenovo N24
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
Alexander Usyskin <alexander.usyskin(a)intel.com>
mei: demote client disconnect warning on suspend to debug
Yuntao Wang <yuntao.wang(a)linux.dev>
fs/file: fix the check in find_next_fd()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: remove wrong expr_trans_bool()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: gconf: give a proper initial state to the Save button
Eric Dumazet <edumazet(a)google.com>
ila: block BH in ila_output()
Hans de Goede <hdegoede(a)redhat.com>
Input: silead - Always support 10 fingers
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
Nicolas Escande <nico.escande(a)gmail.com>
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Avoid returning AE_OK on errors in address space handler
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Abort address space access upon error
Saurav Kashyap <skashyap(a)marvell.com>
scsi: qedf: Set qed_slowpath_params to zero before use
Kees Cook <keescook(a)chromium.org>
gcc-plugins: Rename last_stmt() for GCC 14+
-------------
Diffstat:
Makefile | 4 +-
arch/arm/include/asm/uaccess.h | 14 +------
drivers/acpi/ec.c | 9 ++++-
drivers/acpi/processor_idle.c | 40 ++++++++-----------
drivers/gpio/gpio-pca953x.c | 2 +
drivers/input/mouse/elantech.c | 31 +++++++++++++++
drivers/input/touchscreen/silead.c | 19 +++------
drivers/misc/mei/main.c | 2 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +-
drivers/net/usb/qmi_wwan.c | 2 +
drivers/s390/char/sclp.c | 1 +
drivers/scsi/qedf/qedf_main.c | 1 +
drivers/spi/spi-imx.c | 2 +-
fs/dcache.c | 31 +++++++--------
fs/file.c | 4 +-
fs/hfsplus/xattr.c | 2 +-
fs/jfs/xattr.c | 23 +++++++++--
fs/locks.c | 18 ++++-----
fs/ocfs2/dir.c | 46 ++++++++++++++--------
net/bluetooth/hci_core.c | 4 ++
net/ipv4/af_inet.c | 4 +-
net/ipv6/ila/ila_lwt.c | 7 +++-
net/mac80211/mesh.c | 1 +
net/mac80211/scan.c | 14 +++++--
net/mac802154/tx.c | 8 ++--
net/wireless/scan.c | 8 +++-
scripts/gcc-plugins/gcc-common.h | 4 ++
scripts/kconfig/expr.c | 29 --------------
scripts/kconfig/expr.h | 1 -
scripts/kconfig/gconf.c | 3 +-
scripts/kconfig/menu.c | 2 -
sound/core/pcm_dmaengine.c | 12 ++++++
sound/soc/intel/boards/bytcr_rt5640.c | 11 ++++++
tools/testing/selftests/vDSO/parse_vdso.c | 16 +++++---
.../selftests/vDSO/vdso_standalone_test_x86.c | 18 ++++++++-
35 files changed, 235 insertions(+), 160 deletions(-)
This is the start of the stable review cycle for the 5.4.281 release.
There are 43 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat, 27 Jul 2024 14:27:16 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.281-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.281-rc1
Jann Horn <jannh(a)google.com>
filelock: Fix fcntl/close race recovery compat path
Edson Juliano Drosdeck <edson.drosdeck(a)gmail.com>
ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
lei lu <llfamsec(a)gmail.com>
jfs: don't walk off the end of ealist
lei lu <llfamsec(a)gmail.com>
ocfs2: add bounds checking to ocfs2_check_dir_entry()
Paolo Abeni <pabeni(a)redhat.com>
net: relax socket state check at accept time.
Dan Carpenter <dan.carpenter(a)linaro.org>
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
Kuan-Wei Chiu <visitorckw(a)gmail.com>
ACPI: processor_idle: Fix invalid comparison with insertion sort for latency
Masahiro Yamada <masahiroy(a)kernel.org>
ARM: 9324/1: fix get_user() broken with veneer
Edward Adam Davis <eadavis(a)qq.com>
hfsplus: fix uninit-value in copy_name
John Hubbard <jhubbard(a)nvidia.com>
selftests/vDSO: fix clang build errors and warnings
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
spi: imx: Don't expect DMA for i.MX{25,35,50,51,53} cspi devices
Christian Brauner <brauner(a)kernel.org>
fs: better handle deep ancestor chains in is_subdir()
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
Bluetooth: hci_core: cancel all works upon hci_unregister_dev()
Xingui Yang <yangxingui(a)huawei.com>
scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed
Ganesh Goudar <ganeshgr(a)linux.ibm.com>
powerpc/eeh: avoid possible crash when edev->pdev changes
Anjali K <anjalik(a)linux.ibm.com>
powerpc/pseries: Whitelist dtl slub object for copying to userspace
Yunshui Jiang <jiangyunshui(a)kylinos.cn>
net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()
Daniele Palmas <dnlplm(a)gmail.com>
net: usb: qmi_wwan: add Telit FN912 compositions
Shengjiu Wang <shengjiu.wang(a)nxp.com>
ALSA: dmaengine_pcm: terminate dmaengine before synchronize
Heiko Carstens <hca(a)linux.ibm.com>
s390/sclp: Fix sclp_init() cleanup on failure
Ian Ray <ian.ray(a)gehealthcare.com>
gpio: pca953x: fix pca953x_irq_bus_sync_unlock race
Chen Ni <nichen(a)iscas.ac.cn>
can: kvaser_usb: fix return value for hif_usb_send_regout
Primoz Fiser <primoz.fiser(a)norik.com>
ASoC: ti: omap-hdmi: Fix too long driver name
Jai Luthra <j-luthra(a)ti.com>
ASoC: ti: davinci-mcasp: Set min period size using FIFO config
Thomas GENTY <tomlohave(a)gmail.com>
bytcr_rt5640 : inverse jack detect for Archos 101 cesium
Jonathan Denose <jdenose(a)google.com>
Input: elantech - fix touchpad state on resume for Lenovo N24
Arnd Bergmann <arnd(a)arndb.de>
mips: fix compat_sys_lseek syscall
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek: Add more codec ID to no shutup pins list
Michael Ellerman <mpe(a)ellerman.id.au>
KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: cfg80211: wext: add extra SIOCSIWSCAN data check
Alexander Usyskin <alexander.usyskin(a)intel.com>
mei: demote client disconnect warning on suspend to debug
Yuntao Wang <yuntao.wang(a)linux.dev>
fs/file: fix the check in find_next_fd()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: remove wrong expr_trans_bool()
Masahiro Yamada <masahiroy(a)kernel.org>
kconfig: gconf: give a proper initial state to the Save button
Eric Dumazet <edumazet(a)google.com>
ila: block BH in ila_output()
Hans de Goede <hdegoede(a)redhat.com>
Input: silead - Always support 10 fingers
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: mac80211: fix UBSAN noise in ieee80211_prep_hw_scan()
Nicolas Escande <nico.escande(a)gmail.com>
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Avoid returning AE_OK on errors in address space handler
Armin Wolf <W_Armin(a)gmx.de>
ACPI: EC: Abort address space access upon error
Saurav Kashyap <skashyap(a)marvell.com>
scsi: qedf: Set qed_slowpath_params to zero before use
Jann Horn <jannh(a)google.com>
filelock: Remove locks reliably when fcntl/close race is detected
Kees Cook <keescook(a)chromium.org>
gcc-plugins: Rename last_stmt() for GCC 14+
-------------
Diffstat:
Makefile | 4 +-
arch/arm/include/asm/uaccess.h | 14 +------
arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +-
arch/powerpc/kernel/eeh_pe.c | 7 +++-
arch/powerpc/kvm/book3s_64_vio.c | 18 ++++++---
arch/powerpc/platforms/pseries/setup.c | 4 +-
drivers/acpi/ec.c | 9 ++++-
drivers/acpi/processor_idle.c | 40 ++++++++-----------
drivers/gpio/gpio-pca953x.c | 2 +
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
drivers/input/mouse/elantech.c | 31 +++++++++++++++
drivers/input/touchscreen/silead.c | 19 +++------
drivers/misc/mei/main.c | 2 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +-
drivers/net/usb/qmi_wwan.c | 2 +
drivers/s390/char/sclp.c | 1 +
drivers/scsi/libsas/sas_internal.h | 14 +++++++
drivers/scsi/qedf/qedf_main.c | 1 +
drivers/spi/spi-imx.c | 2 +-
fs/dcache.c | 31 +++++++--------
fs/file.c | 4 +-
fs/hfsplus/xattr.c | 2 +-
fs/jfs/xattr.c | 23 +++++++++--
fs/locks.c | 18 ++++-----
fs/ocfs2/dir.c | 46 ++++++++++++++--------
net/bluetooth/hci_core.c | 4 ++
net/ipv4/af_inet.c | 4 +-
net/ipv6/ila/ila_lwt.c | 7 +++-
net/mac80211/mesh.c | 1 +
net/mac80211/scan.c | 14 +++++--
net/mac802154/tx.c | 8 ++--
net/wireless/scan.c | 8 +++-
scripts/gcc-plugins/gcc-common.h | 4 ++
scripts/kconfig/expr.c | 29 --------------
scripts/kconfig/expr.h | 1 -
scripts/kconfig/gconf.c | 3 +-
scripts/kconfig/menu.c | 2 -
sound/core/pcm_dmaengine.c | 12 ++++++
sound/pci/hda/patch_realtek.c | 5 +++
sound/soc/intel/boards/bytcr_rt5640.c | 11 ++++++
sound/soc/ti/davinci-mcasp.c | 9 ++++-
sound/soc/ti/omap-hdmi.c | 6 +--
tools/testing/selftests/vDSO/parse_vdso.c | 16 +++++---
.../selftests/vDSO/vdso_standalone_test_x86.c | 18 ++++++++-
44 files changed, 284 insertions(+), 178 deletions(-)
The check_unaligned_access_emulated() function should have been called
during CPU hotplug to ensure that if all CPUs had emulated unaligned
accesses, the new CPU also does.
This patch adds the call to check_unaligned_access_emulated() in
the hotplug path.
Fixes: 55e0bf49a0d0 ("RISC-V: Probe misaligned access speed in parallel")
Signed-off-by: Jesse Taube <jesse(a)rivosinc.com>
Reviewed-by: Evan Green <evan(a)rivosinc.com>
Cc: stable(a)vger.kernel.org
---
V5 -> V6:
- New patch
V6 -> V7:
- No changes
---
arch/riscv/kernel/unaligned_access_speed.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/kernel/unaligned_access_speed.c b/arch/riscv/kernel/unaligned_access_speed.c
index a9a6bcb02acf..b67db1fc3740 100644
--- a/arch/riscv/kernel/unaligned_access_speed.c
+++ b/arch/riscv/kernel/unaligned_access_speed.c
@@ -191,6 +191,7 @@ static int riscv_online_cpu(unsigned int cpu)
if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN)
goto exit;
+ check_unaligned_access_emulated(NULL);
buf = alloc_pages(GFP_KERNEL, MISALIGNED_BUFFER_ORDER);
if (!buf) {
pr_warn("Allocation failure, not measuring misaligned performance\n");
--
2.45.2
It could lead to error happen because the variable res is not updated if
the call to sr_share_read_word returns an error. In this particular case
error code was returned and res stayed uninitialized. Same issue also
applies to sr_read_reg.
This can be avoided by checking the return value of sr_share_read_word
and sr_read_reg, and propagating the error if the read operation failed.
Found by code review.
Cc: stable(a)vger.kernel.org
Fixes: c9b37458e956 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v4:
- added a check for sr_read_reg() as suggestions.
Changes in v3:
- added Cc stable line as suggestions.
Changes in v2:
- modified the subject as suggestions.
---
drivers/net/usb/sr9700.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 0a662e42ed96..cb7d2f798fb4 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -179,6 +179,7 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
struct usbnet *dev = netdev_priv(netdev);
__le16 res;
int rc = 0;
+ int err;
if (phy_id) {
netdev_dbg(netdev, "Only internal phy supported\n");
@@ -189,11 +190,17 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
if (loc == MII_BMSR) {
u8 value;
- sr_read_reg(dev, SR_NSR, &value);
+ err = sr_read_reg(dev, SR_NSR, &value);
+ if (err < 0)
+ return err;
+
if (value & NSR_LINKST)
rc = 1;
}
- sr_share_read_word(dev, 1, loc, &res);
+ err = sr_share_read_word(dev, 1, loc, &res);
+ if (err < 0)
+ return err;
+
if (rc == 1)
res = le16_to_cpu(res) | BMSR_LSTATUS;
else
--
2.25.1
Lima DRM driver uses devfreq to perform DVFS, while using simple_ondemand
devfreq governor by default. This causes driver initialization to fail on
boot when simple_ondemand governor isn't built into the kernel statically,
as a result of the missing module dependency and, consequently, the required
governor module not being included in the initial ramdisk. Thus, let's mark
simple_ondemand governor as a softdep for Lima, to have its kernel module
included in the initial ramdisk.
This is a rather longstanding issue that has forced distributions to build
devfreq governors statically into their kernels, [1][2] or may have forced
some users to introduce unnecessary workarounds.
Having simple_ondemand marked as a softdep for Lima may not resolve this
issue for all Linux distributions. In particular, it will remain unresolved
for the distributions whose utilities for the initial ramdisk generation do
not handle the available softdep information [3] properly yet. However, some
Linux distributions already handle softdeps properly while generating their
initial ramdisks, [4] and this is a prerequisite step in the right direction
for the distributions that don't handle them properly yet.
[1] https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephone/-/blob…
[2] https://gitlab.com/postmarketOS/pmaports/-/blob/7f64e287e7732c9eaa029653e73…
[3] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=49d8e0…
[4] https://github.com/archlinux/mkinitcpio/commit/97ac4d37aae084a050be512f6d8f…
Cc: Philip Muller <philm(a)manjaro.org>
Cc: Oliver Smith <ollieparanoid(a)postmarketos.org>
Cc: Daniel Smith <danct12(a)disroot.org>
Cc: stable(a)vger.kernel.org
Fixes: 1996970773a3 ("drm/lima: Add optional devfreq and cooling device support")
Signed-off-by: Dragan Simic <dsimic(a)manjaro.org>
---
drivers/gpu/drm/lima/lima_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c
index 739c865b556f..10bce18b7c31 100644
--- a/drivers/gpu/drm/lima/lima_drv.c
+++ b/drivers/gpu/drm/lima/lima_drv.c
@@ -501,3 +501,4 @@ module_platform_driver(lima_platform_driver);
MODULE_AUTHOR("Lima Project Developers");
MODULE_DESCRIPTION("Lima DRM Driver");
MODULE_LICENSE("GPL v2");
+MODULE_SOFTDEP("pre: governor_simpleondemand");
From: Tvrtko Ursulin <tvrtko.ursulin(a)igalia.com>
Long time ago in commit b3ac17667f11 ("drm/scheduler: rework entity
creation") a change was made which prevented priority changes for entities
with only one assigned scheduler.
The commit reduced drm_sched_entity_set_priority() to simply update the
entities priority, but the run queue selection logic in
drm_sched_entity_select_rq() was never able to actually change the
originally assigned run queue.
In practice that only affected amdgpu, being the only driver which can do
dynamic priority changes. And that appears was attempted to be rectified
there in 2316a86bde49 ("drm/amdgpu: change hw sched list on ctx priority
override").
A few unresolved problems however were that this only fixed
drm_sched_entity_set_priority() *if* drm_sched_entity_modify_sched() was
called first. That was not documented anywhere.
Secondly, this only works if drm_sched_entity_modify_sched() is actually
called, which in amdgpu's case today is true only for gfx and compute.
Priority changes for other engines with only one scheduler assigned, such
as jpeg and video decode will still not work.
Note that this was also noticed in 981b04d96856 ("drm/sched: improve docs
around drm_sched_entity").
Completely different set of non-obvious confusion was that whereas
drm_sched_entity_init() was not keeping the passed in list of schedulers
(courtesy of 8c23056bdc7a ("drm/scheduler: do not keep a copy of sched
list")), drm_sched_entity_modify_sched() was disagreeing with that and
would simply assign the single item list.
That incosistency appears to be semi-silently fixed in ac4eb83ab255
("drm/sched: select new rq even if there is only one v3").
What was also not documented is why it was important to not keep the
list of schedulers when there is only one. I suspect it could have
something to do with the fact the passed in array is on stack for many
callers with just one scheduler. With more than one scheduler amdgpu is
the only caller, and there the container is not on the stack. Keeping a
stack backed list in the entity would obviously be undefined behaviour
*if* the list was kept.
Amdgpu however did only stop passing in stack backed container for the more
than one scheduler case in 977f7e1068be ("drm/amdgpu: allocate entities on
demand"). Until then I suspect dereferencing freed stack from
drm_sched_entity_select_rq() was still present.
In order to untangle all that and fix priority changes this patch is
bringing back the entity owned container for storing the passed in
scheduler list. Container is now owned by the entity and the pointers are
owned by the drivers. List of schedulers is always kept including for the
one scheduler case.
The patch can therefore also removes the single scheduler special case,
which means that priority changes should now work (be able to change the
selected run-queue) for all drivers and engines. In other words
drm_sched_entity_set_priority() should now just work for all cases.
To enable maintaining its own container some API calls needed to grow a
capability for returning success/failure, which is a change which
percolates mostly through amdgpu source.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin(a)igalia.com>
Fixes: b3ac17667f11 ("drm/scheduler: rework entity creation")
References: 8c23056bdc7a ("drm/scheduler: do not keep a copy of sched list")
References: 977f7e1068be ("drm/amdgpu: allocate entities on demand")
References: 2316a86bde49 ("drm/amdgpu: change hw sched list on ctx priority override")
References: ac4eb83ab255 ("drm/sched: select new rq even if there is only one v3")
References: 981b04d96856 ("drm/sched: improve docs around drm_sched_entity")
Cc: Christian König <christian.koenig(a)amd.com>
Cc: Alex Deucher <alexander.deucher(a)amd.com>
Cc: Luben Tuikov <ltuikov89(a)gmail.com>
Cc: Matthew Brost <matthew.brost(a)intel.com>
Cc: Daniel Vetter <daniel.vetter(a)ffwll.ch>
Cc: amd-gfx(a)lists.freedesktop.org
Cc: dri-devel(a)lists.freedesktop.org
Cc: <stable(a)vger.kernel.org> # v5.6+
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 31 +++++---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 13 +--
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 3 +-
drivers/gpu/drm/scheduler/sched_entity.c | 96 ++++++++++++++++-------
include/drm/gpu_scheduler.h | 16 ++--
6 files changed, 100 insertions(+), 61 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 5cb33ac99f70..387247f8307e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -802,15 +802,15 @@ struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx,
return fence;
}
-static void amdgpu_ctx_set_entity_priority(struct amdgpu_ctx *ctx,
- struct amdgpu_ctx_entity *aentity,
- int hw_ip,
- int32_t priority)
+static int amdgpu_ctx_set_entity_priority(struct amdgpu_ctx *ctx,
+ struct amdgpu_ctx_entity *aentity,
+ int hw_ip,
+ int32_t priority)
{
struct amdgpu_device *adev = ctx->mgr->adev;
- unsigned int hw_prio;
struct drm_gpu_scheduler **scheds = NULL;
- unsigned num_scheds;
+ unsigned int hw_prio, num_scheds;
+ int ret = 0;
/* set sw priority */
drm_sched_entity_set_priority(&aentity->entity,
@@ -822,16 +822,18 @@ static void amdgpu_ctx_set_entity_priority(struct amdgpu_ctx *ctx,
hw_prio = array_index_nospec(hw_prio, AMDGPU_RING_PRIO_MAX);
scheds = adev->gpu_sched[hw_ip][hw_prio].sched;
num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds;
- drm_sched_entity_modify_sched(&aentity->entity, scheds,
- num_scheds);
+ ret = drm_sched_entity_modify_sched(&aentity->entity, scheds,
+ num_scheds);
}
+
+ return ret;
}
-void amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx,
- int32_t priority)
+int amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx, int32_t priority)
{
int32_t ctx_prio;
unsigned i, j;
+ int ret;
ctx->override_priority = priority;
@@ -842,10 +844,15 @@ void amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx,
if (!ctx->entities[i][j])
continue;
- amdgpu_ctx_set_entity_priority(ctx, ctx->entities[i][j],
- i, ctx_prio);
+ ret = amdgpu_ctx_set_entity_priority(ctx,
+ ctx->entities[i][j],
+ i, ctx_prio);
+ if (ret)
+ return ret;
}
}
+
+ return 0;
}
int amdgpu_ctx_wait_prev_fence(struct amdgpu_ctx *ctx,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
index 85376baaa92f..835661515e33 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h
@@ -82,7 +82,7 @@ struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx,
struct drm_sched_entity *entity,
uint64_t seq);
bool amdgpu_ctx_priority_is_valid(int32_t ctx_prio);
-void amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx, int32_t ctx_prio);
+int amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx, int32_t ctx_prio);
int amdgpu_ctx_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
index 863b2a34b2d6..944edb7f00a2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
@@ -54,12 +54,15 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
mgr = &fpriv->ctx_mgr;
mutex_lock(&mgr->lock);
- idr_for_each_entry(&mgr->ctx_handles, ctx, id)
- amdgpu_ctx_priority_override(ctx, priority);
+ idr_for_each_entry(&mgr->ctx_handles, ctx, id) {
+ r = amdgpu_ctx_priority_override(ctx, priority);
+ if (r)
+ break;
+ }
mutex_unlock(&mgr->lock);
fdput(f);
- return 0;
+ return r;
}
static int amdgpu_sched_context_priority_override(struct amdgpu_device *adev,
@@ -88,11 +91,11 @@ static int amdgpu_sched_context_priority_override(struct amdgpu_device *adev,
return -EINVAL;
}
- amdgpu_ctx_priority_override(ctx, priority);
+ r = amdgpu_ctx_priority_override(ctx, priority);
amdgpu_ctx_put(ctx);
fdput(f);
- return 0;
+ return r;
}
int amdgpu_sched_ioctl(struct drm_device *dev, void *data,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
index 81fb99729f37..2453decc73c7 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
@@ -1362,8 +1362,7 @@ static int vcn_v4_0_5_limit_sched(struct amdgpu_cs_parser *p,
scheds = p->adev->gpu_sched[AMDGPU_HW_IP_VCN_ENC]
[AMDGPU_RING_PRIO_0].sched;
- drm_sched_entity_modify_sched(job->base.entity, scheds, 1);
- return 0;
+ return drm_sched_entity_modify_sched(job->base.entity, scheds, 1);
}
static int vcn_v4_0_5_dec_msg(struct amdgpu_cs_parser *p, struct amdgpu_job *job,
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c
index 58c8161289fe..cb5cc65f461d 100644
--- a/drivers/gpu/drm/scheduler/sched_entity.c
+++ b/drivers/gpu/drm/scheduler/sched_entity.c
@@ -45,7 +45,12 @@
* @guilty: atomic_t set to 1 when a job on this queue
* is found to be guilty causing a timeout
*
- * Note that the &sched_list must have at least one element to schedule the entity.
+ * Note that the &sched_list must have at least one element to schedule the
+ * entity.
+ *
+ * The individual drm_gpu_scheduler pointers have borrow semantics, ie.
+ * they must remain valid during entities lifetime, while the containing
+ * array can be freed after this call returns.
*
* For changing @priority later on at runtime see
* drm_sched_entity_set_priority(). For changing the set of schedulers
@@ -69,27 +74,24 @@ int drm_sched_entity_init(struct drm_sched_entity *entity,
INIT_LIST_HEAD(&entity->list);
entity->rq = NULL;
entity->guilty = guilty;
- entity->num_sched_list = num_sched_list;
entity->priority = priority;
- /*
- * It's perfectly valid to initialize an entity without having a valid
- * scheduler attached. It's just not valid to use the scheduler before it
- * is initialized itself.
- */
- entity->sched_list = num_sched_list > 1 ? sched_list : NULL;
RCU_INIT_POINTER(entity->last_scheduled, NULL);
RB_CLEAR_NODE(&entity->rb_tree_node);
- if (num_sched_list && !sched_list[0]->sched_rq) {
- /* Since every entry covered by num_sched_list
- * should be non-NULL and therefore we warn drivers
- * not to do this and to fix their DRM calling order.
- */
- pr_warn("%s: called with uninitialized scheduler\n", __func__);
- } else if (num_sched_list) {
- /* The "priority" of an entity cannot exceed the number of run-queues of a
- * scheduler. Protect against num_rqs being 0, by converting to signed. Choose
- * the lowest priority available.
+ if (num_sched_list) {
+ int ret;
+
+ ret = drm_sched_entity_modify_sched(entity,
+ sched_list,
+ num_sched_list);
+ if (ret)
+ return ret;
+
+ /*
+ * The "priority" of an entity cannot exceed the number of
+ * run-queues of a scheduler. Protect against num_rqs being 0,
+ * by converting to signed. Choose the lowest priority
+ * available.
*/
if (entity->priority >= sched_list[0]->num_rqs) {
drm_err(sched_list[0], "entity with out-of-bounds priority:%u num_rqs:%u\n",
@@ -122,19 +124,58 @@ EXPORT_SYMBOL(drm_sched_entity_init);
* existing entity->sched_list
* @num_sched_list: number of drm sched in sched_list
*
+ * The individual drm_gpu_scheduler pointers have borrow semantics, ie.
+ * they must remain valid during entities lifetime, while the containing
+ * array can be freed after this call returns.
+ *
* Note that this must be called under the same common lock for @entity as
* drm_sched_job_arm() and drm_sched_entity_push_job(), or the driver needs to
* guarantee through some other means that this is never called while new jobs
* can be pushed to @entity.
+ *
+ * Returns zero on success and a negative error code on failure.
*/
-void drm_sched_entity_modify_sched(struct drm_sched_entity *entity,
- struct drm_gpu_scheduler **sched_list,
- unsigned int num_sched_list)
+int drm_sched_entity_modify_sched(struct drm_sched_entity *entity,
+ struct drm_gpu_scheduler **sched_list,
+ unsigned int num_sched_list)
{
- WARN_ON(!num_sched_list || !sched_list);
+ struct drm_gpu_scheduler **new, **old;
+ unsigned int i;
- entity->sched_list = sched_list;
+ if (!(entity && sched_list && (num_sched_list == 0 || sched_list[0])))
+ return -EINVAL;
+
+ /*
+ * It's perfectly valid to initialize an entity without having a valid
+ * scheduler attached. It's just not valid to use the scheduler before
+ * it is initialized itself.
+ *
+ * Since every entry covered by num_sched_list should be non-NULL and
+ * therefore we warn drivers not to do this and to fix their DRM calling
+ * order.
+ */
+ for (i = 0; i < num_sched_list; i++) {
+ if (!sched_list[i]) {
+ pr_warn("%s: called with uninitialized scheduler %u!\n",
+ __func__, i);
+ return -EINVAL;
+ }
+ }
+
+ new = kmemdup_array(sched_list,
+ num_sched_list,
+ sizeof(*sched_list),
+ GFP_KERNEL);
+ if (!new)
+ return -ENOMEM;
+
+ old = entity->sched_list;
+ entity->sched_list = new;
entity->num_sched_list = num_sched_list;
+
+ kfree(old);
+
+ return 0;
}
EXPORT_SYMBOL(drm_sched_entity_modify_sched);
@@ -341,6 +382,8 @@ void drm_sched_entity_fini(struct drm_sched_entity *entity)
dma_fence_put(rcu_dereference_check(entity->last_scheduled, true));
RCU_INIT_POINTER(entity->last_scheduled, NULL);
+
+ kfree(entity->sched_list);
}
EXPORT_SYMBOL(drm_sched_entity_fini);
@@ -531,10 +574,6 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity)
struct drm_gpu_scheduler *sched;
struct drm_sched_rq *rq;
- /* single possible engine and already selected */
- if (!entity->sched_list)
- return;
-
/* queue non-empty, stay on the same engine */
if (spsc_queue_count(&entity->job_queue))
return;
@@ -561,9 +600,6 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity)
entity->rq = rq;
}
spin_unlock(&entity->rq_lock);
-
- if (entity->num_sched_list == 1)
- entity->sched_list = NULL;
}
/**
diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
index 5acc64954a88..09e1d063a5c0 100644
--- a/include/drm/gpu_scheduler.h
+++ b/include/drm/gpu_scheduler.h
@@ -110,18 +110,12 @@ struct drm_sched_entity {
/**
* @sched_list:
*
- * A list of schedulers (struct drm_gpu_scheduler). Jobs from this entity can
- * be scheduled on any scheduler on this list.
+ * A list of schedulers (struct drm_gpu_scheduler). Jobs from this
+ * entity can be scheduled on any scheduler on this list.
*
* This can be modified by calling drm_sched_entity_modify_sched().
* Locking is entirely up to the driver, see the above function for more
* details.
- *
- * This will be set to NULL if &num_sched_list equals 1 and @rq has been
- * set already.
- *
- * FIXME: This means priority changes through
- * drm_sched_entity_set_priority() will be lost henceforth in this case.
*/
struct drm_gpu_scheduler **sched_list;
@@ -568,9 +562,9 @@ int drm_sched_job_add_implicit_dependencies(struct drm_sched_job *job,
bool write);
-void drm_sched_entity_modify_sched(struct drm_sched_entity *entity,
- struct drm_gpu_scheduler **sched_list,
- unsigned int num_sched_list);
+int drm_sched_entity_modify_sched(struct drm_sched_entity *entity,
+ struct drm_gpu_scheduler **sched_list,
+ unsigned int num_sched_list);
void drm_sched_tdr_queue_imm(struct drm_gpu_scheduler *sched);
void drm_sched_job_cleanup(struct drm_sched_job *job);
--
2.44.0
On the off chance that clock value ends up being too high (by means
of skl_ddi_calculate_wrpll() having benn called with big enough
value of crtc_state->port_clock * 1000), one possible consequence
may be that the result will not be able to fit into signed int.
Fix this, albeit unlikely, issue by first casting one of the operands
to u32, then to u64, and thus avoid causing an integer overflow.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
Fixes: fe70b262e781 ("drm/i915: Move a bunch of stuff into rodata from the stack")
Cc: stable(a)vger.kernel.org
Signed-off-by: Nikita Zhandarovich <n.zhandarovich(a)fintech.ru>
---
Fixes: tag is not entirely correct, as I can't properly identify the
origin with all the code movement. I opted out for using the most
recent topical commit instead.
drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
index 90998b037349..46d4dac6c491 100644
--- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
@@ -1683,7 +1683,7 @@ skl_ddi_calculate_wrpll(int clock /* in Hz */,
};
unsigned int dco, d, i;
unsigned int p0, p1, p2;
- u64 afe_clock = clock * 5; /* AFE Clock is 5x Pixel clock */
+ u64 afe_clock = (u64)(u32)clock * 5; /* AFE Clock is 5x Pixel clock */
for (d = 0; d < ARRAY_SIZE(dividers); d++) {
for (dco = 0; dco < ARRAY_SIZE(dco_central_freq); dco++) {
From: Chris Wulff <crwulff(a)gmail.com>
Make sure the descriptor has been set before looking at maxpacket.
This fixes a null pointer panic in this case.
This may happen if the gadget doesn't properly set up the endpoint
for the current speed, or the gadget descriptors are malformed and
the descriptor for the speed/endpoint are not found.
No current gadget driver is known to have this problem, but this
may cause a hard-to-find bug during development of new gadgets.
Fixes: 54f83b8c8ea9 ("USB: gadget: Reject endpoints with 0 maxpacket value")
Cc: stable(a)vger.kernel.org
Signed-off-by: Chris Wulff <crwulff(a)gmail.com>
---
v2: Added WARN_ONCE message & clarification on causes
v1: https://lore.kernel.org/all/20240721192048.3530097-2-crwulff@gmail.com/
---
drivers/usb/gadget/udc/core.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index 2dfae7a17b3f..81f9140f3681 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -118,12 +118,10 @@ int usb_ep_enable(struct usb_ep *ep)
goto out;
/* UDC drivers can't handle endpoints with maxpacket size 0 */
- if (usb_endpoint_maxp(ep->desc) == 0) {
- /*
- * We should log an error message here, but we can't call
- * dev_err() because there's no way to find the gadget
- * given only ep.
- */
+ if (!ep->desc || usb_endpoint_maxp(ep->desc) == 0) {
+ WARN_ONCE(1, "%s: ep%d (%s) has %s\n", __func__, ep->address, ep->name,
+ (!ep->desc) ? "NULL descriptor" : "maxpacket 0");
+
ret = -EINVAL;
goto out;
}
--
2.43.0
From: Xiubo Li <xiubli(a)redhat.com>
If a client sends out a cap update dropping caps with the prior 'seq'
just before an incoming cap revoke request, then the client may drop
the revoke because it believes it's already released the requested
capabilities.
This causes the MDS to wait indefinitely for the client to respond
to the revoke. It's therefore always a good idea to ack the cap
revoke request with the bumped up 'seq'.
Currently if the cap->issued equals to the newcaps the check_caps()
will do nothing, we should force flush the caps.
Cc: stable(a)vger.kernel.org
Link: https://tracker.ceph.com/issues/61782
Signed-off-by: Xiubo Li <xiubli(a)redhat.com>
---
V3:
- Move the force check earlier
V2:
- Improved the patch to force send the cap update only when no caps
being used.
fs/ceph/caps.c | 35 ++++++++++++++++++++++++-----------
fs/ceph/super.h | 7 ++++---
2 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 24c31f795938..672c6611d749 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -2024,6 +2024,8 @@ bool __ceph_should_report_size(struct ceph_inode_info *ci)
* CHECK_CAPS_AUTHONLY - we should only check the auth cap
* CHECK_CAPS_FLUSH - we should flush any dirty caps immediately, without
* further delay.
+ * CHECK_CAPS_FLUSH_FORCE - we should flush any caps immediately, without
+ * further delay.
*/
void ceph_check_caps(struct ceph_inode_info *ci, int flags)
{
@@ -2105,7 +2107,7 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags)
}
doutc(cl, "%p %llx.%llx file_want %s used %s dirty %s "
- "flushing %s issued %s revoking %s retain %s %s%s%s\n",
+ "flushing %s issued %s revoking %s retain %s %s%s%s%s\n",
inode, ceph_vinop(inode), ceph_cap_string(file_wanted),
ceph_cap_string(used), ceph_cap_string(ci->i_dirty_caps),
ceph_cap_string(ci->i_flushing_caps),
@@ -2113,7 +2115,8 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags)
ceph_cap_string(retain),
(flags & CHECK_CAPS_AUTHONLY) ? " AUTHONLY" : "",
(flags & CHECK_CAPS_FLUSH) ? " FLUSH" : "",
- (flags & CHECK_CAPS_NOINVAL) ? " NOINVAL" : "");
+ (flags & CHECK_CAPS_NOINVAL) ? " NOINVAL" : "",
+ (flags & CHECK_CAPS_FLUSH_FORCE) ? " FLUSH_FORCE" : "");
/*
* If we no longer need to hold onto old our caps, and we may
@@ -2188,6 +2191,11 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags)
queue_writeback = true;
}
+ if (flags & CHECK_CAPS_FLUSH_FORCE) {
+ doutc(cl, "force to flush caps\n");
+ goto ack;
+ }
+
if (cap == ci->i_auth_cap &&
(cap->issued & CEPH_CAP_FILE_WR)) {
/* request larger max_size from MDS? */
@@ -3518,6 +3526,8 @@ static void handle_cap_grant(struct inode *inode,
bool queue_invalidate = false;
bool deleted_inode = false;
bool fill_inline = false;
+ bool revoke_wait = false;
+ int flags = 0;
/*
* If there is at least one crypto block then we'll trust
@@ -3713,16 +3723,18 @@ static void handle_cap_grant(struct inode *inode,
ceph_cap_string(cap->issued), ceph_cap_string(newcaps),
ceph_cap_string(revoking));
if (S_ISREG(inode->i_mode) &&
- (revoking & used & CEPH_CAP_FILE_BUFFER))
+ (revoking & used & CEPH_CAP_FILE_BUFFER)) {
writeback = true; /* initiate writeback; will delay ack */
- else if (queue_invalidate &&
+ revoke_wait = true;
+ } else if (queue_invalidate &&
revoking == CEPH_CAP_FILE_CACHE &&
- (newcaps & CEPH_CAP_FILE_LAZYIO) == 0)
- ; /* do nothing yet, invalidation will be queued */
- else if (cap == ci->i_auth_cap)
+ (newcaps & CEPH_CAP_FILE_LAZYIO) == 0) {
+ revoke_wait = true; /* do nothing yet, invalidation will be queued */
+ } else if (cap == ci->i_auth_cap) {
check_caps = 1; /* check auth cap only */
- else
+ } else {
check_caps = 2; /* check all caps */
+ }
/* If there is new caps, try to wake up the waiters */
if (~cap->issued & newcaps)
wake = true;
@@ -3749,8 +3761,9 @@ static void handle_cap_grant(struct inode *inode,
BUG_ON(cap->issued & ~cap->implemented);
/* don't let check_caps skip sending a response to MDS for revoke msgs */
- if (le32_to_cpu(grant->op) == CEPH_CAP_OP_REVOKE) {
+ if (!revoke_wait && le32_to_cpu(grant->op) == CEPH_CAP_OP_REVOKE) {
cap->mds_wanted = 0;
+ flags |= CHECK_CAPS_FLUSH_FORCE;
if (cap == ci->i_auth_cap)
check_caps = 1; /* check auth cap only */
else
@@ -3806,9 +3819,9 @@ static void handle_cap_grant(struct inode *inode,
mutex_unlock(&session->s_mutex);
if (check_caps == 1)
- ceph_check_caps(ci, CHECK_CAPS_AUTHONLY | CHECK_CAPS_NOINVAL);
+ ceph_check_caps(ci, flags | CHECK_CAPS_AUTHONLY | CHECK_CAPS_NOINVAL);
else if (check_caps == 2)
- ceph_check_caps(ci, CHECK_CAPS_NOINVAL);
+ ceph_check_caps(ci, flags | CHECK_CAPS_NOINVAL);
}
/*
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index b0b368ed3018..831e8ec4d5da 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -200,9 +200,10 @@ struct ceph_cap {
struct list_head caps_item;
};
-#define CHECK_CAPS_AUTHONLY 1 /* only check auth cap */
-#define CHECK_CAPS_FLUSH 2 /* flush any dirty caps */
-#define CHECK_CAPS_NOINVAL 4 /* don't invalidate pagecache */
+#define CHECK_CAPS_AUTHONLY 1 /* only check auth cap */
+#define CHECK_CAPS_FLUSH 2 /* flush any dirty caps */
+#define CHECK_CAPS_NOINVAL 4 /* don't invalidate pagecache */
+#define CHECK_CAPS_FLUSH_FORCE 8 /* force flush any caps */
struct ceph_cap_flush {
u64 tid;
--
2.45.1
The patch titled
Subject: selftests: mm: add s390 to ARCH check
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
selftests-mm-add-s390-to-arch-check.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Nico Pache <npache(a)redhat.com>
Subject: selftests: mm: add s390 to ARCH check
Date: Wed, 24 Jul 2024 15:35:17 -0600
commit 0518dbe97fe6 ("selftests/mm: fix cross compilation with LLVM")
changed the env variable for the architecture from MACHINE to ARCH.
This is preventing 3 required TEST_GEN_FILES from being included when
cross compiling s390x and errors when trying to run the test suite. This
is due to the ARCH variable already being set and the arch folder name
being s390.
Add "s390" to the filtered list to cover this case and have the 3 files
included in the build.
Link: https://lkml.kernel.org/r/20240724213517.23918-1-npache@redhat.com
Fixes: 0518dbe97fe6 ("selftests/mm: fix cross compilation with LLVM")
Signed-off-by: Nico Pache <npache(a)redhat.com>
Cc: Mark Brown <broonie(a)kernel.org>
Cc: Albert Ou <aou(a)eecs.berkeley.edu>
Cc: Palmer Dabbelt <palmer(a)dabbelt.com>
Cc: Paul Walmsley <paul.walmsley(a)sifive.com>
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
tools/testing/selftests/mm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/tools/testing/selftests/mm/Makefile~selftests-mm-add-s390-to-arch-check
+++ a/tools/testing/selftests/mm/Makefile
@@ -110,7 +110,7 @@ endif
endif
-ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 powerpc riscv64 s390x sparc64 x86_64))
+ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 powerpc riscv64 s390x sparc64 x86_64 s390))
TEST_GEN_FILES += va_high_addr_switch
TEST_GEN_FILES += virtual_address_range
TEST_GEN_FILES += write_to_hugetlbfs
_
Patches currently in -mm which might be from npache(a)redhat.com are
selftests-mm-add-s390-to-arch-check.patch
The patch titled
Subject: crash: fix x86_32 crash memory reserve dead loop bug
has been added to the -mm mm-nonmm-unstable branch. Its filename is
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Jinjie Ruan <ruanjinjie(a)huawei.com>
Subject: crash: fix x86_32 crash memory reserve dead loop bug
Date: Thu, 18 Jul 2024 11:54:42 +0800
Patch series "crash: Fix x86_32 memory reserve dead loop bug", v3.
Fix two bugs for x86_32 crash memory reserve, and prepare to apply generic
crashkernel reservation to 32bit system. Then use generic interface to
simplify crashkernel reservation for ARM32.
This patch (of 3):
On x86_32 Qemu machine with 1GB memory, the cmdline "crashkernel=1G,high"
will cause system stall as below:
ACPI: Reserving FACP table memory at [mem 0x3ffe18b8-0x3ffe192b]
ACPI: Reserving DSDT table memory at [mem 0x3ffe0040-0x3ffe18b7]
ACPI: Reserving FACS table memory at [mem 0x3ffe0000-0x3ffe003f]
ACPI: Reserving APIC table memory at [mem 0x3ffe192c-0x3ffe19bb]
ACPI: Reserving HPET table memory at [mem 0x3ffe19bc-0x3ffe19f3]
ACPI: Reserving WAET table memory at [mem 0x3ffe19f4-0x3ffe1a1b]
143MB HIGHMEM available.
879MB LOWMEM available.
mapped low ram: 0 - 36ffe000
low ram: 0 - 36ffe000
(stall here)
The reason is that the CRASH_ADDR_LOW_MAX is equal to CRASH_ADDR_HIGH_MAX
on x86_32, the first high crash kernel memory reservation will fail, then
go into the "retry" loop and never came out as below.
-> reserve_crashkernel_generic() and high is true
-> alloc at [CRASH_ADDR_LOW_MAX, CRASH_ADDR_HIGH_MAX] fail
-> alloc at [0, CRASH_ADDR_LOW_MAX] fail and repeatedly
(because CRASH_ADDR_LOW_MAX = CRASH_ADDR_HIGH_MAX).
Fix it by prevent crashkernel=,high from being parsed successfully on 32bit
system with a architecture-defined macro.
After this patch, the 'crashkernel=,high' for 32bit system can't succeed,
and it has no chance to call reserve_crashkernel_generic(), therefore this
issue on x86_32 is solved.
Link: https://lkml.kernel.org/r/20240718035444.2977105-1-ruanjinjie@huawei.com
Link: https://lkml.kernel.org/r/20240718035444.2977105-2-ruanjinjie@huawei.com
Fixes: 9c08a2a139fe ("x86: kdump: use generic interface to simplify crashkernel reservation code")
Signed-off-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
Signed-off-by: Baoquan He <bhe(a)redhat.com>
Tested-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
Cc: Albert Ou <aou(a)eecs.berkeley.edu>
Cc: Andrew Davis <afd(a)ti.com>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Chen Jiahao <chenjiahao16(a)huawei.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: Dave Young <dyoung(a)redhat.com>
Cc: Eric DeVolder <eric.devolder(a)oracle.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Hari Bathini <hbathini(a)linux.ibm.com>
Cc: Helge Deller <deller(a)gmx.de>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: Javier Martinez Canillas <javierm(a)redhat.com>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: Palmer Dabbelt <palmer(a)dabbelt.com>
Cc: Paul Walmsley <paul.walmsley(a)sifive.com>
Cc: Rob Herring <robh(a)kernel.org>
Cc: Russell King <linux(a)armlinux.org.uk>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Vivek Goyal <vgoyal(a)redhat.com>
Cc: Will Deacon <will(a)kernel.org>
Cc: Zhen Lei <thunder.leizhen(a)huawei.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
arch/arm64/include/asm/crash_reserve.h | 2 ++
arch/riscv/include/asm/crash_reserve.h | 2 ++
arch/x86/include/asm/crash_reserve.h | 1 +
kernel/crash_reserve.c | 2 +-
4 files changed, 6 insertions(+), 1 deletion(-)
--- a/arch/arm64/include/asm/crash_reserve.h~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug
+++ a/arch/arm64/include/asm/crash_reserve.h
@@ -7,4 +7,6 @@
#define CRASH_ADDR_LOW_MAX arm64_dma_phys_limit
#define CRASH_ADDR_HIGH_MAX (PHYS_MASK + 1)
+
+#define HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH
#endif
--- a/arch/riscv/include/asm/crash_reserve.h~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug
+++ a/arch/riscv/include/asm/crash_reserve.h
@@ -7,5 +7,7 @@
#define CRASH_ADDR_LOW_MAX dma32_phys_limit
#define CRASH_ADDR_HIGH_MAX memblock_end_of_DRAM()
+#define HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH
+
extern phys_addr_t memblock_end_of_DRAM(void);
#endif
--- a/arch/x86/include/asm/crash_reserve.h~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug
+++ a/arch/x86/include/asm/crash_reserve.h
@@ -26,6 +26,7 @@ extern unsigned long swiotlb_size_or_def
#else
# define CRASH_ADDR_LOW_MAX SZ_4G
# define CRASH_ADDR_HIGH_MAX SZ_64T
+#define HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH
#endif
# define DEFAULT_CRASH_KERNEL_LOW_SIZE crash_low_size_default()
--- a/kernel/crash_reserve.c~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug
+++ a/kernel/crash_reserve.c
@@ -305,7 +305,7 @@ int __init parse_crashkernel(char *cmdli
/* crashkernel=X[@offset] */
ret = __parse_crashkernel(cmdline, system_ram, crash_size,
crash_base, NULL);
-#ifdef CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
+#ifdef HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH
/*
* If non-NULL 'high' passed in and no normal crashkernel
* setting detected, try parsing crashkernel=,high|low.
_
Patches currently in -mm which might be from ruanjinjie(a)huawei.com are
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug.patch
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug-at-high.patch
arm-use-generic-interface-to-simplify-crashkernel-reservation.patch
The patch titled
Subject: mm: let pte_lockptr() consume a pte_t pointer
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-let-pte_lockptr-consume-a-pte_t-pointer.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: David Hildenbrand <david(a)redhat.com>
Subject: mm: let pte_lockptr() consume a pte_t pointer
Date: Thu, 25 Jul 2024 20:39:54 +0200
Patch series "mm/hugetlb: fix hugetlb vs. core-mm PT locking".
Working on another generic page table walker that tries to avoid
special-casing hugetlb, I found a page table locking issue with hugetlb
folios that are not mapped using a single PMD/PUD.
For some hugetlb folio sizes, GUP will take different page table locks
when walking the page tables than hugetlb when modifying the page tables.
I did not actually try reproducing an issue, but looking at
follow_pmd_mask() where we might be rereading a PMD value multiple times
it's rather clear that concurrent modifications are rather unpleasant.
In follow_page_pte() we might be better in that regard -- ptep_get() does
a READ_ONCE() -- but who knows what else could happen concurrently in some
weird corner cases (e.g., hugetlb folio getting unmapped and freed).
This patch (of 2):
pte_lockptr() is the only *_lockptr() function that doesn't consume what
would be expected: it consumes a pmd_t pointer instead of a pte_t pointer.
Let's change that. The two callers in pgtable-generic.c are easily
adjusted. Adjust khugepaged.c:retract_page_tables() to simply do a
pte_offset_map_nolock() to obtain the lock, even though we won't actually
be traversing the page table.
This makes the code more similar to the other variants and avoids other
hacks to make the new pte_lockptr() version happy. pte_lockptr() users
reside now only in pgtable-generic.c.
Maybe, using pte_offset_map_nolock() is the right thing to do because the
PTE table could have been removed in the meantime? At least it sounds
more future proof if we ever have other means of page table reclaim.
It's not quite clear if holding the PTE table lock is really required:
what if someone else obtains the lock just after we unlock it? But we'll
leave that as is for now, maybe there are good reasons.
This is a preparation for adapting hugetlb page table locking logic to
take the same locks as core-mm page table walkers would.
Link: https://lkml.kernel.org/r/20240725183955.2268884-1-david@redhat.com
Link: https://lkml.kernel.org/r/20240725183955.2268884-2-david@redhat.com
Fixes: 9cb28da54643 ("mm/gup: handle hugetlb in the generic follow_page_mask code")
Signed-off-by: David Hildenbrand <david(a)redhat.com>
Cc: Muchun Song <muchun.song(a)linux.dev>
Cc: Oscar Salvador <osalvador(a)suse.de>
Cc: Peter Xu <peterx(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/mm.h | 7 ++++---
mm/khugepaged.c | 21 +++++++++++++++------
mm/pgtable-generic.c | 4 ++--
3 files changed, 21 insertions(+), 11 deletions(-)
--- a/include/linux/mm.h~mm-let-pte_lockptr-consume-a-pte_t-pointer
+++ a/include/linux/mm.h
@@ -2915,9 +2915,10 @@ static inline spinlock_t *ptlock_ptr(str
}
#endif /* ALLOC_SPLIT_PTLOCKS */
-static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pmd_t *pmd)
+static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pte_t *pte)
{
- return ptlock_ptr(page_ptdesc(pmd_page(*pmd)));
+ /* PTE page tables don't currently exceed a single page. */
+ return ptlock_ptr(virt_to_ptdesc(pte));
}
static inline bool ptlock_init(struct ptdesc *ptdesc)
@@ -2940,7 +2941,7 @@ static inline bool ptlock_init(struct pt
/*
* We use mm->page_table_lock to guard all pagetable pages of the mm.
*/
-static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pmd_t *pmd)
+static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pte_t *pte)
{
return &mm->page_table_lock;
}
--- a/mm/khugepaged.c~mm-let-pte_lockptr-consume-a-pte_t-pointer
+++ a/mm/khugepaged.c
@@ -1697,12 +1697,13 @@ static void retract_page_tables(struct a
i_mmap_lock_read(mapping);
vma_interval_tree_foreach(vma, &mapping->i_mmap, pgoff, pgoff) {
struct mmu_notifier_range range;
+ bool retracted = false;
struct mm_struct *mm;
unsigned long addr;
pmd_t *pmd, pgt_pmd;
spinlock_t *pml;
spinlock_t *ptl;
- bool skipped_uffd = false;
+ pte_t *pte;
/*
* Check vma->anon_vma to exclude MAP_PRIVATE mappings that
@@ -1739,9 +1740,17 @@ static void retract_page_tables(struct a
mmu_notifier_invalidate_range_start(&range);
pml = pmd_lock(mm, pmd);
- ptl = pte_lockptr(mm, pmd);
+
+ /*
+ * No need to check the PTE table content, but we'll grab the
+ * PTE table lock while we zap it.
+ */
+ pte = pte_offset_map_nolock(mm, pmd, addr, &ptl);
+ if (!pte)
+ goto unlock_pmd;
if (ptl != pml)
spin_lock_nested(ptl, SINGLE_DEPTH_NESTING);
+ pte_unmap(pte);
/*
* Huge page lock is still held, so normally the page table
@@ -1752,20 +1761,20 @@ static void retract_page_tables(struct a
* repeating the anon_vma check protects from one category,
* and repeating the userfaultfd_wp() check from another.
*/
- if (unlikely(vma->anon_vma || userfaultfd_wp(vma))) {
- skipped_uffd = true;
- } else {
+ if (likely(!vma->anon_vma && !userfaultfd_wp(vma))) {
pgt_pmd = pmdp_collapse_flush(vma, addr, pmd);
pmdp_get_lockless_sync();
+ retracted = true;
}
if (ptl != pml)
spin_unlock(ptl);
+unlock_pmd:
spin_unlock(pml);
mmu_notifier_invalidate_range_end(&range);
- if (!skipped_uffd) {
+ if (retracted) {
mm_dec_nr_ptes(mm);
page_table_check_pte_clear_range(mm, addr, pgt_pmd);
pte_free_defer(mm, pmd_pgtable(pgt_pmd));
--- a/mm/pgtable-generic.c~mm-let-pte_lockptr-consume-a-pte_t-pointer
+++ a/mm/pgtable-generic.c
@@ -313,7 +313,7 @@ pte_t *pte_offset_map_nolock(struct mm_s
pte = __pte_offset_map(pmd, addr, &pmdval);
if (likely(pte))
- *ptlp = pte_lockptr(mm, &pmdval);
+ *ptlp = pte_lockptr(mm, pte);
return pte;
}
@@ -371,7 +371,7 @@ again:
pte = __pte_offset_map(pmd, addr, &pmdval);
if (unlikely(!pte))
return pte;
- ptl = pte_lockptr(mm, &pmdval);
+ ptl = pte_lockptr(mm, pte);
spin_lock(ptl);
if (likely(pmd_same(pmdval, pmdp_get_lockless(pmd)))) {
*ptlp = ptl;
_
Patches currently in -mm which might be from david(a)redhat.com are
mm-let-pte_lockptr-consume-a-pte_t-pointer.patch
mm-hugetlb-fix-hugetlb-vs-core-mm-pt-locking.patch
The check_unaligned_access_emulated() function should have been called
during CPU hotplug to ensure that if all CPUs had emulated unaligned
accesses, the new CPU also does.
This patch adds the call to check_unaligned_access_emulated() in
the hotplug path.
Fixes: 55e0bf49a0d0 ("RISC-V: Probe misaligned access speed in parallel")
Signed-off-by: Jesse Taube <jesse(a)rivosinc.com>
Cc: stable(a)vger.kernel.org
---
V5 -> V6:
- New patch
---
arch/riscv/kernel/unaligned_access_speed.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/kernel/unaligned_access_speed.c b/arch/riscv/kernel/unaligned_access_speed.c
index a9a6bcb02acf..b67db1fc3740 100644
--- a/arch/riscv/kernel/unaligned_access_speed.c
+++ b/arch/riscv/kernel/unaligned_access_speed.c
@@ -191,6 +191,7 @@ static int riscv_online_cpu(unsigned int cpu)
if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN)
goto exit;
+ check_unaligned_access_emulated(NULL);
buf = alloc_pages(GFP_KERNEL, MISALIGNED_BUFFER_ORDER);
if (!buf) {
pr_warn("Allocation failure, not measuring misaligned performance\n");
--
2.45.2
From: Johannes Berg <johannes.berg(a)intel.com>
In commit 0d9c2beed116 ("wifi: mac80211: fix monitor channel
with chanctx emulation") I changed mac80211 to always have an
internal monitor_sdata to have something to have the chanctx
bound to.
However, if the driver didn't also have the WANT_MONITOR flag
this would cause mac80211 to allocate it without telling the
driver (which was intentional) but also use it for later APIs
to the driver without it ever having known about it which was
_not_ intentional.
Check through the code and only use the monitor_sdata in the
relevant places (TX, MU-MIMO follow settings, TX power, and
interface iteration) when the WANT_MONITOR flag is set.
Cc: stable(a)vger.kernel.org
Fixes: 0d9c2beed116 ("wifi: mac80211: fix monitor channel with chanctx emulation")
Reported-by: ZeroBeat <ZeroBeat(a)gmx.de>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219086
Tested-by: Lorenzo Bianconi <lorenzo(a)kernel.org>
Signed-off-by: Johannes Berg <johannes.berg(a)intel.com>
---
net/mac80211/cfg.c | 7 +++++--
net/mac80211/tx.c | 5 +++--
net/mac80211/util.c | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 85cb71de370f..b02b84ce2130 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -114,7 +114,7 @@ static int ieee80211_set_mon_options(struct ieee80211_sub_if_data *sdata,
/* apply all changes now - no failures allowed */
- if (monitor_sdata)
+ if (monitor_sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
ieee80211_set_mu_mimo_follow(monitor_sdata, params);
if (params->flags) {
@@ -3053,6 +3053,9 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
if (sdata->vif.type == NL80211_IFTYPE_MONITOR) {
+ if (!ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
+ return -EOPNOTSUPP;
+
sdata = wiphy_dereference(local->hw.wiphy,
local->monitor_sdata);
if (!sdata)
@@ -3115,7 +3118,7 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,
if (has_monitor) {
sdata = wiphy_dereference(local->hw.wiphy,
local->monitor_sdata);
- if (sdata) {
+ if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) {
sdata->deflink.user_power_level = local->user_power_level;
if (txp_type != sdata->vif.bss_conf.txpower_type)
update_txp_type = true;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 72a9ba8bc5fd..edba4a31844f 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1768,7 +1768,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
break;
}
sdata = rcu_dereference(local->monitor_sdata);
- if (sdata) {
+ if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) {
vif = &sdata->vif;
info->hw_queue =
vif->hw_queue[skb_get_queue_mapping(skb)];
@@ -3957,7 +3957,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
break;
}
tx.sdata = rcu_dereference(local->monitor_sdata);
- if (tx.sdata) {
+ if (tx.sdata &&
+ ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) {
vif = &tx.sdata->vif;
info->hw_queue =
vif->hw_queue[skb_get_queue_mapping(skb)];
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index ced19ce7c51a..c7ad9bc5973a 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -776,7 +776,7 @@ static void __iterate_interfaces(struct ieee80211_local *local,
sdata = rcu_dereference_check(local->monitor_sdata,
lockdep_is_held(&local->iflist_mtx) ||
lockdep_is_held(&local->hw.wiphy->mtx));
- if (sdata &&
+ if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF) &&
(iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL || !active_only ||
sdata->flags & IEEE80211_SDATA_IN_DRIVER))
iterator(data, sdata->vif.addr, &sdata->vif);
--
2.45.2
string.h tests for the macros NOLIBC_ARCH_HAS_$FUNC to use the
architecture-optimized function variants.
However if string.h is included before arch.h header than that check
does not work, leading to duplicate function definitions.
Fixes: 553845eebd60 ("tools/nolibc: x86-64: Use `rep movsb` for `memcpy()` and `memmove()`")
Fixes: 12108aa8c1a1 ("tools/nolibc: x86-64: Use `rep stosb` for `memset()`")
Cc: stable(a)vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux(a)weissschuh.net>
---
If nobody complains I'll apply this after v6.11-rc1 is released.
---
tools/include/nolibc/string.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/include/nolibc/string.h b/tools/include/nolibc/string.h
index f9ab28421e6d..9ec9c24f38c0 100644
--- a/tools/include/nolibc/string.h
+++ b/tools/include/nolibc/string.h
@@ -7,6 +7,7 @@
#ifndef _NOLIBC_STRING_H
#define _NOLIBC_STRING_H
+#include "arch.h"
#include "std.h"
static void *malloc(size_t len);
---
base-commit: 6ca8f2e20bd1ced8a7cd12b3ae4b1ceca85cfc2b
change-id: 20240725-arch-has-func-59b6c92ce935
Best regards,
--
Thomas Weißschuh <linux(a)weissschuh.net>
From: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Currently, irqchips for all of the subnodes (which represent a given
bus master) point to the parent wrapper node. This is no bueno, as
no interrupts arrive, ever (because nothing references that node).
Fix that by passing a reference to the respective master's of_node.
Worth noting, this is a NOP for devices with only a single master
described.
Signed-off-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240522-topic-spmi_multi_master_irqfix-v2-1-7ec9…
Reviewed-by: Abel Vesa <abel.vesa(a)linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Fixes: 02922ccbb330 ("spmi: pmic-arb: Register controller for bus instead of arbiter")
Cc: stable(a)vger.kernel.org
Signed-off-by: Stephen Boyd <sboyd(a)kernel.org>
---
drivers/spmi/spmi-pmic-arb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index f240fcc5a4e1..b6880c13163c 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1737,8 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
dev_dbg(&pdev->dev, "adding irq domain for bus %d\n", bus_index);
- bus->domain = irq_domain_add_tree(dev->of_node,
- &pmic_arb_irq_domain_ops, bus);
+ bus->domain = irq_domain_add_tree(node, &pmic_arb_irq_domain_ops, bus);
if (!bus->domain) {
dev_err(&pdev->dev, "unable to create irq_domain\n");
return -ENOMEM;
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Bisection revealed that the bitcrushing distortion with RME FireFace 800
was caused by 1d717123bb1a7555
("ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning").
Reverting this commit yields restoration of clear audio output.
I will send in a patch reverting this commit for now, soonTM.
#regzbot introduced: 1d717123bb1a7555
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x df39038cd89525d465c2c8827eb64116873f141a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072535-synergy-struggle-8ecc@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
df39038cd895 ("s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()")
b20c8216c1e0 ("s390/mm,fault: move VM_FAULT_ERROR handling to do_exception()")
7c194d84a9ce ("s390/mm,fault: remove VM_FAULT_BADMAP and VM_FAULT_BADACCESS")
b61a0922b6dc ("s390/mm,fault: remove VM_FAULT_SIGNAL")
0f86ac4ba713 ("s390/mm,fault: remove VM_FAULT_BADCONTEXT")
0f1a14e0348e ("s390/mm,fault: simplify kfence fault handling")
64ea33fb09f8 ("s390/mm,fault: call do_fault_error() only from do_exception()")
5db06565cad6 ("s390/mm,fault: get rid of do_low_address()")
cca12b427d43 ("s390/mm,fault: remove VM_FAULT_PFAULT")
5be05c35e72f ("s390/mm,fault: improve readability by using teid union")
4416d2ed8166 ("s390/mm,fault: use static key for store indication")
9641613f48bb ("s390/mm,fault: use get_fault_address() everywhere")
5c845de331d9 ("s390/mm,fault: remove noinline attribute from all functions")
8dbc33dc8163 ("s390/mm,fault: have balanced braces, remove unnecessary blanks")
7c915a84e5e2 ("s390/mm,fault: reverse x-mas tree coding style")
3aad8c044297 ("s390/mm,fault: remove and improve comments, adjust whitespace")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From df39038cd89525d465c2c8827eb64116873f141a Mon Sep 17 00:00:00 2001
From: Gerald Schaefer <gerald.schaefer(a)linux.ibm.com>
Date: Mon, 15 Jul 2024 20:04:16 +0200
Subject: [PATCH] s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()
There is no support for HWPOISON, MEMORY_FAILURE, or ARCH_HAS_COPY_MC on
s390. Therefore we do not expect to see VM_FAULT_HWPOISON in
do_exception().
However, since commit af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more
general"), it is possible to see VM_FAULT_HWPOISON in combination with
PTE_MARKER_POISONED, even on architectures that do not support HWPOISON
otherwise. In this case, we will end up on the BUG() in do_exception().
Fix this by treating VM_FAULT_HWPOISON the same as VM_FAULT_SIGBUS, similar
to x86 when MEMORY_FAILURE is not configured. Also print unexpected fault
flags, for easier debugging.
Note that VM_FAULT_HWPOISON_LARGE is not expected, because s390 cannot
support swap entries on other levels than PTE level.
Cc: stable(a)vger.kernel.org # 6.6+
Fixes: af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more general")
Reported-by: Yunseong Kim <yskelg(a)gmail.com>
Tested-by: Yunseong Kim <yskelg(a)gmail.com>
Acked-by: Alexander Gordeev <agordeev(a)linux.ibm.com>
Signed-off-by: Gerald Schaefer <gerald.schaefer(a)linux.ibm.com>
Message-ID: <20240715180416.3632453-1-gerald.schaefer(a)linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor(a)linux.ibm.com>
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 6b19a33c49c2..8e149ef5e89b 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -433,12 +433,13 @@ static void do_exception(struct pt_regs *regs, int access)
handle_fault_error_nolock(regs, 0);
else
do_sigsegv(regs, SEGV_MAPERR);
- } else if (fault & VM_FAULT_SIGBUS) {
+ } else if (fault & (VM_FAULT_SIGBUS | VM_FAULT_HWPOISON)) {
if (!user_mode(regs))
handle_fault_error_nolock(regs, 0);
else
do_sigbus(regs);
} else {
+ pr_emerg("Unexpected fault flags: %08x\n", fault);
BUG();
}
}
From: Bailey Forrest <bcf(a)google.com>
The NIC requires each TSO segment to not span more than 10
descriptors. NIC further requires each descriptor to not exceed
16KB - 1 (GVE_TX_MAX_BUF_SIZE_DQO).
The descriptors for an skb are generated by
gve_tx_add_skb_no_copy_dqo() for DQO RDA queue format.
gve_tx_add_skb_no_copy_dqo() loops through each skb frag and
generates a descriptor for the entire frag if the frag size is
not greater than GVE_TX_MAX_BUF_SIZE_DQO. If the frag size is
greater than GVE_TX_MAX_BUF_SIZE_DQO, it is split into descriptor(s)
of size GVE_TX_MAX_BUF_SIZE_DQO and a descriptor is generated for
the remainder (frag size % GVE_TX_MAX_BUF_SIZE_DQO).
gve_can_send_tso() checks if the descriptors thus generated for an
skb would meet the requirement that each TSO-segment not span more
than 10 descriptors. However, the current code misses an edge case
when a TSO segment spans multiple descriptors within a large frag.
This change fixes the edge case.
gve_can_send_tso() relies on the assumption that max gso size (9728)
is less than GVE_TX_MAX_BUF_SIZE_DQO and therefore within an skb
fragment a TSO segment can never span more than 2 descriptors.
Fixes: a57e5de476be ("gve: DQO: Add TX path")
Signed-off-by: Praveen Kaligineedi <pkaligineedi(a)google.com>
Signed-off-by: Bailey Forrest <bcf(a)google.com>
Reviewed-by: Jeroen de Borst <jeroendb(a)google.com>
Cc: stable(a)vger.kernel.org
---
Changes from v1:
- Added 'stable tag'
- Added more explanation in the commit message
- Modified comments to clarify the changes made
- Changed variable names 'last_frag_size' to 'prev_frag_size' and
'last_frag_remain' to 'prev_frag_remain'
- Removed parentheses around single line statement
drivers/net/ethernet/google/gve/gve_tx_dqo.c | 22 +++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
index 0b3cca3fc792..f879426cb552 100644
--- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
@@ -866,22 +866,42 @@ static bool gve_can_send_tso(const struct sk_buff *skb)
const int header_len = skb_tcp_all_headers(skb);
const int gso_size = shinfo->gso_size;
int cur_seg_num_bufs;
+ int prev_frag_size;
int cur_seg_size;
int i;
cur_seg_size = skb_headlen(skb) - header_len;
+ prev_frag_size = skb_headlen(skb);
cur_seg_num_bufs = cur_seg_size > 0;
for (i = 0; i < shinfo->nr_frags; i++) {
if (cur_seg_size >= gso_size) {
cur_seg_size %= gso_size;
cur_seg_num_bufs = cur_seg_size > 0;
+
+ if (prev_frag_size > GVE_TX_MAX_BUF_SIZE_DQO) {
+ int prev_frag_remain = prev_frag_size %
+ GVE_TX_MAX_BUF_SIZE_DQO;
+
+ /* If the last descriptor of the previous frag
+ * is less than cur_seg_size, the segment will
+ * span two descriptors in the previous frag.
+ * Since max gso size (9728) is less than
+ * GVE_TX_MAX_BUF_SIZE_DQO, it is impossible
+ * for the segment to span more than two
+ * descriptors.
+ */
+ if (prev_frag_remain &&
+ cur_seg_size > prev_frag_remain)
+ cur_seg_num_bufs++;
+ }
}
if (unlikely(++cur_seg_num_bufs > max_bufs_per_seg))
return false;
- cur_seg_size += skb_frag_size(&shinfo->frags[i]);
+ prev_frag_size = skb_frag_size(&shinfo->frags[i]);
+ cur_seg_size += prev_frag_size;
}
return true;
--
2.45.2.1089.g2a221341d9-goog
From: Jiri Olsa <jolsa(a)kernel.org>
[ Upstream commit 4121d4481b72501aa4d22680be4ea1096d69d133 ]
Hao Sun reported crash in dispatcher image [1].
Currently we don't have any sync between bpf_dispatcher_update and
bpf_dispatcher_xdp_func, so following race is possible:
cpu 0: cpu 1:
bpf_prog_run_xdp
...
bpf_dispatcher_xdp_func
in image at offset 0x0
bpf_dispatcher_update
update image at offset 0x800
bpf_dispatcher_update
update image at offset 0x0
in image at offset 0x0 -> crash
Fixing this by synchronizing dispatcher image update (which is done
in bpf_dispatcher_update function) with bpf_dispatcher_xdp_func that
reads and execute the dispatcher image.
Calling synchronize_rcu after updating and installing new image ensures
that readers leave old image before it's changed in the next dispatcher
update. The update itself is locked with dispatcher's mutex.
The bpf_prog_run_xdp is called under local_bh_disable and synchronize_rcu
will wait for it to leave [2].
[1] https://lore.kernel.org/bpf/Y5SFho7ZYXr9ifRn@krava/T/#m00c29ece654bc9f332a1…
[2] https://lore.kernel.org/bpf/0B62D35A-E695-4B7A-A0D4-774767544C1A@gmail.com/…
Reported-by: Hao Sun <sunhao.th(a)gmail.com>
Signed-off-by: Jiri Olsa <jolsa(a)kernel.org>
Acked-by: Yonghong Song <yhs(a)fb.com>
Acked-by: Paul E. McKenney <paulmck(a)kernel.org>
Link: https://lore.kernel.org/r/20221214123542.1389719-1-jolsa@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau(a)kernel.org>
(cherry picked from commit 4121d4481b72501aa4d22680be4ea1096d69d133)
Signed-off-by: Sergio González Collado <sergio.collado(a)gmail.com>
Reported-by: syzbot+08ba1e474d350b613604(a)syzkaller.appspotmail.com
---
kernel/bpf/dispatcher.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/bpf/dispatcher.c b/kernel/bpf/dispatcher.c
index c19719f48ce0..fa3e9225aedc 100644
--- a/kernel/bpf/dispatcher.c
+++ b/kernel/bpf/dispatcher.c
@@ -125,6 +125,11 @@ static void bpf_dispatcher_update(struct bpf_dispatcher *d, int prev_num_progs)
__BPF_DISPATCHER_UPDATE(d, new ?: (void *)&bpf_dispatcher_nop_func);
+ /* Make sure all the callers executing the previous/old half of the
+ * image leave it, so following update call can modify it safely.
+ */
+ synchronize_rcu();
+
if (new)
d->image_off = noff;
}
--
2.39.2
From: Filipe Manana <fdmanana(a)suse.com>
[ Upstream commit df9f278239046719c91aeb59ec0afb1a99ee8b2b ]
During the transaction commit path, at create_pending_snapshot(), there
is no need to BUG_ON() in case we fail to get a dir index for the snapshot
in the parent directory. This should fail very rarely because the parent
inode should be loaded in memory already, with the respective delayed
inode created and the parent inode's index_cnt field already initialized.
However if it fails, it may be -ENOMEM like the comment at
create_pending_snapshot() says or any error returned by
btrfs_search_slot() through btrfs_set_inode_index_count(), which can be
pretty much anything such as -EIO or -EUCLEAN for example. So the comment
is not correct when it says it can only be -ENOMEM.
However doing a BUG_ON() here is overkill, since we can instead abort
the transaction and return the error. Note that any error returned by
create_pending_snapshot() will eventually result in a transaction
abort at cleanup_transaction(), called from btrfs_commit_transaction(),
but we can explicitly abort the transaction at this point instead so that
we get a stack trace to tell us that the call to btrfs_set_inode_index()
failed.
So just abort the transaction and return in case btrfs_set_inode_index()
returned an error at create_pending_snapshot().
Reviewed-by: Johannes Thumshirn <johannes.thumshirn(a)wdc.com>
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
(cherry picked from commit df9f278239046719c91aeb59ec0afb1a99ee8b2b)
Signed-off-by: Sergio González Collado <sergio.collado(a)gmail.com>
Reported-by: syzbot+c56033c8c15c08286062(a)syzkaller.appspotmail.com
---
fs/btrfs/transaction.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index a7853a3a5719..604241e6e2c1 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1701,7 +1701,10 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
* insert the directory item
*/
ret = btrfs_set_inode_index(BTRFS_I(parent_inode), &index);
- BUG_ON(ret); /* -ENOMEM */
+ if (ret) {
+ btrfs_abort_transaction(trans, ret);
+ goto fail;
+ }
/* check if there is a file/dir which has the same name. */
dir_item = btrfs_lookup_dir_item(NULL, parent_root, path,
--
2.39.2
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 074992a1163295d717faa21d1818c4c19ef6e676
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072522-properly-jackpot-9fed@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
074992a11632 ("arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for USB")
a06a2f12f9e2 ("arm64: dts: qcom: qrb4210-rb2: enable USB-C port handling")
7e3a1f6470f7 ("arm64: dts: qcom: sm6115: drop pipe clock selection")
b3eaa47395b9 ("arm64: dts: qcom: sm6115: Hook up interconnects")
f6874706e311 ("arm64: dts: qcom: sm6115: switch UFS QMP PHY to new style of bindings")
ff753723bf39 ("arm64: dts: qcom: qrb4210-rb2: Enable MPSS and Wi-Fi")
cab60b166575 ("arm64: dts: qcom: qrb4210-rb2: Enable bluetooth")
ba5f5610841f ("arm64: dts: qcom: sm6115: Add UART3")
27c2ca90e2f3 ("arm64: dts: qcom: qrb4210-rb2: don't force usb peripheral mode")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 074992a1163295d717faa21d1818c4c19ef6e676 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:45 +0530
Subject: [PATCH] arm64: dts: qcom: sm6115: Disable SS instance in Parkmode for
USB
For Gen-1 targets like SM6115, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for SM6115 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 97e563bf5ba1 ("arm64: dts: qcom: sm6115: Add basic soc dtsi")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-6-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index ac5f071a8db3..aec6ca5941c2 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -1659,6 +1659,7 @@ usb_dwc3: usb@4e00000 {
snps,has-lpm-erratum;
snps,hird-threshold = /bits/ 8 <0x10>;
snps,usb3_lpm_capable;
+ snps,parkmode-disable-ss-quirk;
usb-role-switch;
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x cf4d6d54eadb60d2ee4d31c9d92299f5e8dcb55c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072509-chive-tabby-a6f1@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
cf4d6d54eadb ("arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB")
ca5ca568d738 ("arm64: dts: qcom: sdm845: switch USB QMP PHY to new style of bindings")
a9ecdec45a3a ("arm64: dts: qcom: sdm845: switch USB+DP QMP PHY to new style of bindings")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From cf4d6d54eadb60d2ee4d31c9d92299f5e8dcb55c Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:48 +0530
Subject: [PATCH] arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for
USB
For Gen-1 targets like SDM845, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for SDM845 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-9-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 23b101bb3842..54077549b9da 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4138,6 +4138,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0x740 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
@@ -4213,6 +4214,7 @@ usb_2_dwc3: usb@a800000 {
iommus = <&apps_smmu 0x760 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_2_hsphy>, <&usb_2_qmpphy>;
phy-names = "usb2-phy", "usb3-phy";
};
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x dc6ba95c6c4400a84cca5b419b34ae852a08cfb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072552-victory-unpaid-afda@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
dc6ba95c6c44 ("arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB")
d412786ab86b ("arm64: dts: qcom: ipq8074: remove USB tx-fifo-resize property")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:42 +0530
Subject: [PATCH] arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode
for USB
For Gen-1 targets like IPQ8074, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for IPQ8074 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 92682d3c9478..284a4553070f 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -666,6 +666,7 @@ dwc_0: usb@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
@@ -715,6 +716,7 @@ dwc_1: usb@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x dc6ba95c6c4400a84cca5b419b34ae852a08cfb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072552-twisty-harvest-26cd@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
dc6ba95c6c44 ("arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:42 +0530
Subject: [PATCH] arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode
for USB
For Gen-1 targets like IPQ8074, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for IPQ8074 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 92682d3c9478..284a4553070f 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -666,6 +666,7 @@ dwc_0: usb@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
@@ -715,6 +716,7 @@ dwc_1: usb@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x dc6ba95c6c4400a84cca5b419b34ae852a08cfb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072551-chain-finalist-0cb0@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
dc6ba95c6c44 ("arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:42 +0530
Subject: [PATCH] arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode
for USB
For Gen-1 targets like IPQ8074, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for IPQ8074 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 92682d3c9478..284a4553070f 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -666,6 +666,7 @@ dwc_0: usb@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
@@ -715,6 +716,7 @@ dwc_1: usb@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x dc6ba95c6c4400a84cca5b419b34ae852a08cfb5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072550-editor-edging-bfb4@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
dc6ba95c6c44 ("arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From dc6ba95c6c4400a84cca5b419b34ae852a08cfb5 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:42 +0530
Subject: [PATCH] arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode
for USB
For Gen-1 targets like IPQ8074, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for IPQ8074 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 5e09bc51d07b ("arm64: dts: ipq8074: enable USB support")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 92682d3c9478..284a4553070f 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -666,6 +666,7 @@ dwc_0: usb@8a00000 {
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_0>, <&ssphy_0>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
@@ -715,6 +716,7 @@ dwc_1: usb@8c00000 {
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
phys = <&qusb_phy_1>, <&ssphy_1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,parkmode-disable-ss-quirk;
snps,is-utmi-l1-suspend;
snps,hird-threshold = /bits/ 8 <0x0>;
snps,dis_u2_susphy_quirk;
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 0046325ae52079b46da13a7f84dd7b2a6f7c38f8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072510-blade-spousal-6659@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
0046325ae520 ("arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB")
b7efebfeb2e8 ("arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings")
ed9cbbcb8c6a ("arm64: dts: qcom: msm8998: drop USB PHY clock index")
1351512f29b4 ("arm64: dts: qcom: Correct QMP PHY child node name")
82d61e19fccb ("arm64: dts: qcom: msm8996: Move '#clock-cells' to QMP PHY child node")
095bbdd9a5c3 ("arm64: dts: qcom: ipq6018: Add pcie support")
63fa43224696 ("arm64: dts: qcom: sm8250: fix usb2 qmp phy node")
dc2f86369b15 ("arm64: dts: qcom: sm8250: Fix pcie2_lane unit address")
59c7cf814783 ("arm64: dts: qcom: sm8350: Add UFS nodes")
e780fb318fe5 ("arm64: dts: qcom: sm8350: add USB and PHY device nodes")
e53bdfc00977 ("arm64: dts: qcom: sm8250: Add PCIe support")
b7e8f433a673 ("arm64: dts: qcom: Add basic devicetree support for SM8350 SoC")
46a6f297d7dd ("arm64: dts: qcom: sm8250: Add USB and PHY device nodes")
0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:43 +0530
Subject: [PATCH] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8998, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8998 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 99f811a57ac5..7f44807b1b97 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2144,6 +2144,7 @@ usb3_dwc3: usb@a800000 {
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 0046325ae52079b46da13a7f84dd7b2a6f7c38f8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072509-coach-bronzing-2797@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
0046325ae520 ("arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB")
b7efebfeb2e8 ("arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings")
ed9cbbcb8c6a ("arm64: dts: qcom: msm8998: drop USB PHY clock index")
1351512f29b4 ("arm64: dts: qcom: Correct QMP PHY child node name")
82d61e19fccb ("arm64: dts: qcom: msm8996: Move '#clock-cells' to QMP PHY child node")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:43 +0530
Subject: [PATCH] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8998, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8998 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 99f811a57ac5..7f44807b1b97 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2144,6 +2144,7 @@ usb3_dwc3: usb@a800000 {
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 0046325ae52079b46da13a7f84dd7b2a6f7c38f8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072508-musty-divisive-4413@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
0046325ae520 ("arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB")
b7efebfeb2e8 ("arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:43 +0530
Subject: [PATCH] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8998, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8998 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 99f811a57ac5..7f44807b1b97 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2144,6 +2144,7 @@ usb3_dwc3: usb@a800000 {
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 0046325ae52079b46da13a7f84dd7b2a6f7c38f8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072508-equipment-maturely-32e1@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
0046325ae520 ("arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB")
b7efebfeb2e8 ("arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0046325ae52079b46da13a7f84dd7b2a6f7c38f8 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:43 +0530
Subject: [PATCH] arm64: dts: qcom: msm8998: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8998, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8998 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-4-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 99f811a57ac5..7f44807b1b97 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -2144,6 +2144,7 @@ usb3_dwc3: usb@a800000 {
interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&qusb2phy>, <&usb3phy>;
phy-names = "usb2-phy", "usb3-phy";
snps,has-lpm-erratum;
The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x c5d57eb7d06df16c07037cea5dacfd74d49d1833
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072552-smock-demeanor-6259@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
c5d57eb7d06d ("arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for USB")
5ed2b6388b31 ("arm64: dts: qcom: sm6350: Use specific qmpphy compatible")
347b9491c595 ("arm64: dts: qcom: sm6350: fix USB-DP PHY registers")
95fade4016cb ("arm64: dts: qcom: sm6350: drop bogus DP PHY clock")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c5d57eb7d06df16c07037cea5dacfd74d49d1833 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:46 +0530
Subject: [PATCH] arm64: dts: qcom: sm6350: Disable SS instance in Parkmode for
USB
For Gen-1 targets like SM6350, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for SM6350 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 23737b9557fe ("arm64: dts: qcom: sm6350: Add USB1 nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-7-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index 46e122c4421c..84009b74aee7 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -1921,6 +1921,7 @@ usb_1_dwc3: usb@a600000 {
snps,dis_enblslpm_quirk;
snps,has-lpm-erratum;
snps,hird-threshold = /bits/ 8 <0x10>;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
usb-role-switch;
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y
git checkout FETCH_HEAD
git cherry-pick -x 44ea1ae3cf95db97e10d6ce17527948121f1dd4b
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072533-splurge-kung-54fa@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..
Possible dependencies:
44ea1ae3cf95 ("arm64: dts: qcom: msm8996: Disable SS instance in Parkmode for USB")
d0af0537e28f ("arm64: dts: qcom: msm8996: Add missing DWC3 quirks")
50aa72ccb30b ("arm64: dts: qcom: msm8996: Sort all nodes in msm8996.dtsi")
86f6d6225e5e ("arm64: dts: qcom: msm8996: Pad addresses")
808844314309 ("arm64: dts: qcom: msm8996: Move regulator consumers to db820c")
75b77d6492eb ("arm64: dts: qcom: msm8996: Use node references in db820c")
f978d45b4aab ("arm64: dts: qcom: db820c: Move non-soc entries out of /soc")
d026c96b25b7 ("arm64: dts: qcom: msm8996: Disable USB2 PHY suspend by core")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 44ea1ae3cf95db97e10d6ce17527948121f1dd4b Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Thu, 4 Jul 2024 20:58:47 +0530
Subject: [PATCH] arm64: dts: qcom: msm8996: Disable SS instance in Parkmode
for USB
For Gen-1 targets like MSM8996, it is seen that stressing out the
controller in host mode results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instance in park mode for MSM8996 to mitigate this issue.
Cc: stable(a)vger.kernel.org
Fixes: 1e39255ed29d ("arm64: dts: msm8996: Add device node for qcom,dwc3")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240704152848.3380602-8-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 2b20cedfe26c..0fd2b1b944a5 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -3101,6 +3101,7 @@ usb3_dwc3: usb@6a00000 {
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
snps,is-utmi-l1-suspend;
+ snps,parkmode-disable-ss-quirk;
tx-fifo-resize;
};
};
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072515-shifting-impulse-0512@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
3d930f1750ce ("arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode")
36888ed83f99 ("arm64: dts: qcom: sc7280: switch USB+DP QMP PHY to new style of bindings")
70c4a1ca13b3 ("arm64: dts: qcom: sc7280: link usb3_phy_wrapper_gcc_usb30_pipe_clk")
531c738fb360 ("arm64: dts: qcom: sc7280: drop PCIe PHY clock index")
fc6b1225d20d ("arm64: dts: qcom: sc7280: Add Display Port node")
25940788d170 ("arm64: dts: qcom: sc7280: add edp display dt nodes")
43137272f0bc ("arm64: dts: qcom: sc7280: Add DSI display nodes")
fcb68dfda5cb ("arm64: dts: qcom: sc7280: add display dt nodes")
bd7d507935ca ("arm64: dts: qcom: sc7280: Add pcie clock support")
92e0ee9f83b3 ("arm64: dts: qcom: sc7280: Add PCIe and PHY related nodes")
6b3207dfebdf ("arm64: dts: qcom: sc7280: Use QMP property to control load state")
7720ea001b52 ("arm64: dts: qcom: sc7280: Add QSPI node")
425f30cc843c ("arm64: dts: qcom: sc7280: fix display port phy reg property")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:59 +0530
Subject: [PATCH] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in
park mode
On SC7280, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7280 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index c3aaa09b8187..ba43fba2c551 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4232,6 +4232,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0xe0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072514-hunter-transpose-6f5e@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
3d930f1750ce ("arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode")
36888ed83f99 ("arm64: dts: qcom: sc7280: switch USB+DP QMP PHY to new style of bindings")
70c4a1ca13b3 ("arm64: dts: qcom: sc7280: link usb3_phy_wrapper_gcc_usb30_pipe_clk")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:59 +0530
Subject: [PATCH] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in
park mode
On SC7280, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7280 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index c3aaa09b8187..ba43fba2c551 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4232,6 +4232,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0xe0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072513-magnify-deputize-f818@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
3d930f1750ce ("arm64: dts: qcom: sc7280: Disable SuperSpeed instances in park mode")
36888ed83f99 ("arm64: dts: qcom: sc7280: switch USB+DP QMP PHY to new style of bindings")
70c4a1ca13b3 ("arm64: dts: qcom: sc7280: link usb3_phy_wrapper_gcc_usb30_pipe_clk")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 3d930f1750ce30a6c36dbc71f8ff7e20322b94d7 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:59 +0530
Subject: [PATCH] arm64: dts: qcom: sc7280: Disable SuperSpeed instances in
park mode
On SC7280, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7280 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-3-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index c3aaa09b8187..ba43fba2c551 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4232,6 +4232,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0xe0 0x0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 5b8baed4b88132c12010ce6ca1b56f00d122e376
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072546-saddled-unselect-6d9b@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
5b8baed4b881 ("arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode")
ebb840b00b7f ("arm64: dts: qcom: sc7180: switch USB+DP QMP PHY to new style of bindings")
2b616f86d51b ("arm64: dts: qcom: sc7180: rename labels for DSI nodes")
4a9f8f8f2ada ("arm64: dts: qcom: Add Acer Aspire 1")
39238382c499 ("arm64: dts: qcom: sc7180: Drop redundant disable in mdp")
43926a3cb191 ("arm64: dts: qcom: sc7180: Don't enable lpass clocks by default")
c28d9029f3b6 ("arm64: dts: qcom: sc7180-trogdor-wormdingler: use just "port" in panel")
88904a12fbcb ("arm64: dts: qcom: sc7180-trogdor-quackingstick: use just "port" in panel")
746bda7d9dd9 ("arm64: dts: qcom: sc7180-idp: use just "port" in panel")
603f96d4c9d0 ("arm64: dts: qcom: add initial support for qcom sa8775p-ride")
a45d0641d110 ("arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl")
f5b4811e8758 ("arm64: dts: qcom: sc7180: Add trogdor eDP/touchscreen regulator off-on-time")
6be310347c9c ("arm64: dts: qcom: add SA8540P ride(Qdrive-3)")
2372bd2d5be6 ("arm64: dts: qcom: sc7180: change DSI PHY node name to generic one")
95dc5fd99972 ("arm64: dts: qcom: sc7180: Drop redundant phy-names from DSI controller")
a10b760b7402 ("arm64: dts: qcom: sc7180-trogdor: Split out keyboard node and describe detachables")
6afcee78b4a4 ("arm64: dts: qcom: sc7180: Add kingoftown dts files")
fb69f6adaf88 ("arm64: dts: qcom: sc7180: Add pazquel dts files")
9520fef90049 ("arm64: dts: qcom: sc7180: Add mrbland dts files")
c77a3d4a2bfa ("arm64: dts: qcom: sc7180: Add quackingstick dts files")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 5b8baed4b88132c12010ce6ca1b56f00d122e376 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:58 +0530
Subject: [PATCH] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in
park mode
On SC7180, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7180 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-2-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 52d074a4fbf3..9ab0c98cac05 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3066,6 +3066,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0x540 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 5b8baed4b88132c12010ce6ca1b56f00d122e376
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072545-supermom-stinky-b4f9@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
5b8baed4b881 ("arm64: dts: qcom: sc7180: Disable SuperSpeed instances in park mode")
ebb840b00b7f ("arm64: dts: qcom: sc7180: switch USB+DP QMP PHY to new style of bindings")
2b616f86d51b ("arm64: dts: qcom: sc7180: rename labels for DSI nodes")
4a9f8f8f2ada ("arm64: dts: qcom: Add Acer Aspire 1")
39238382c499 ("arm64: dts: qcom: sc7180: Drop redundant disable in mdp")
43926a3cb191 ("arm64: dts: qcom: sc7180: Don't enable lpass clocks by default")
c28d9029f3b6 ("arm64: dts: qcom: sc7180-trogdor-wormdingler: use just "port" in panel")
88904a12fbcb ("arm64: dts: qcom: sc7180-trogdor-quackingstick: use just "port" in panel")
746bda7d9dd9 ("arm64: dts: qcom: sc7180-idp: use just "port" in panel")
603f96d4c9d0 ("arm64: dts: qcom: add initial support for qcom sa8775p-ride")
a45d0641d110 ("arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl")
f5b4811e8758 ("arm64: dts: qcom: sc7180: Add trogdor eDP/touchscreen regulator off-on-time")
6be310347c9c ("arm64: dts: qcom: add SA8540P ride(Qdrive-3)")
2372bd2d5be6 ("arm64: dts: qcom: sc7180: change DSI PHY node name to generic one")
95dc5fd99972 ("arm64: dts: qcom: sc7180: Drop redundant phy-names from DSI controller")
a10b760b7402 ("arm64: dts: qcom: sc7180-trogdor: Split out keyboard node and describe detachables")
6afcee78b4a4 ("arm64: dts: qcom: sc7180: Add kingoftown dts files")
fb69f6adaf88 ("arm64: dts: qcom: sc7180: Add pazquel dts files")
9520fef90049 ("arm64: dts: qcom: sc7180: Add mrbland dts files")
c77a3d4a2bfa ("arm64: dts: qcom: sc7180: Add quackingstick dts files")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 5b8baed4b88132c12010ce6ca1b56f00d122e376 Mon Sep 17 00:00:00 2001
From: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Date: Tue, 4 Jun 2024 11:36:58 +0530
Subject: [PATCH] arm64: dts: qcom: sc7180: Disable SuperSpeed instances in
park mode
On SC7180, in host mode, it is observed that stressing out controller
results in HC died error:
xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
xhci-hcd.12.auto: xHCI host controller not responding, assume dead
xhci-hcd.12.auto: HC died; cleaning up
And at this instant only restarting the host mode fixes it. Disable
SuperSpeed instances in park mode for SC7180 to mitigate this issue.
Reported-by: Doug Anderson <dianders(a)google.com>
Cc: stable(a)vger.kernel.org
Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes")
Signed-off-by: Krishna Kurapati <quic_kriskura(a)quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio(a)linaro.org>
Link: https://lore.kernel.org/r/20240604060659.1449278-2-quic_kriskura@quicinc.com
Signed-off-by: Bjorn Andersson <andersson(a)kernel.org>
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 52d074a4fbf3..9ab0c98cac05 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3066,6 +3066,7 @@ usb_1_dwc3: usb@a600000 {
iommus = <&apps_smmu 0x540 0>;
snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk;
+ snps,parkmode-disable-ss-quirk;
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
maximum-speed = "super-speed";
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.19.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072558-waving-discharge-31eb@gregkh' --subject-prefix 'PATCH 4.19.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072557-handlebar-underpass-54f1@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072556-gumminess-desecrate-6e7c@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072555-hubcap-monetary-01bc@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072554-renovate-snippet-1b35@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072553-viewing-trapped-d0a4@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 6.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.9.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072553-arena-chute-8609@gregkh' --subject-prefix 'PATCH 6.9.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
The patch below does not apply to the 6.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.10.y
git checkout FETCH_HEAD
git cherry-pick -x af77c4fc1871847b528d58b7fdafb4aa1f6a9262
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2024072552-willed-overturn-c270@gregkh' --subject-prefix 'PATCH 6.10.y' HEAD^..
Possible dependencies:
af77c4fc1871 ("ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af77c4fc1871847b528d58b7fdafb4aa1f6a9262 Mon Sep 17 00:00:00 2001
From: Ferry Meng <mengferry(a)linux.alibaba.com>
Date: Mon, 20 May 2024 10:40:24 +0800
Subject: [PATCH] ocfs2: strict bound check before memcmp in
ocfs2_xattr_find_entry()
xattr in ocfs2 maybe 'non-indexed', which saved with additional space
requested. It's better to check if the memory is out of bound before
memcmp, although this possibility mainly comes from crafted poisonous
images.
Link: https://lkml.kernel.org/r/20240520024024.1976129-2-joseph.qi@linux.alibaba.…
Signed-off-by: Ferry Meng <mengferry(a)linux.alibaba.com>
Signed-off-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Reported-by: lei lu <llfamsec(a)gmail.com>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 8aea94c90739..35c0cc2a51af 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -1068,7 +1068,7 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
{
struct ocfs2_xattr_entry *entry;
size_t name_len;
- int i, cmp = 1;
+ int i, name_offset, cmp = 1;
if (name == NULL)
return -EINVAL;
@@ -1083,10 +1083,15 @@ static int ocfs2_xattr_find_entry(struct inode *inode, int name_index,
cmp = name_index - ocfs2_xattr_get_type(entry);
if (!cmp)
cmp = name_len - entry->xe_name_len;
- if (!cmp)
- cmp = memcmp(name, (xs->base +
- le16_to_cpu(entry->xe_name_offset)),
- name_len);
+ if (!cmp) {
+ name_offset = le16_to_cpu(entry->xe_name_offset);
+ if ((xs->base + name_offset + name_len) > xs->end) {
+ ocfs2_error(inode->i_sb,
+ "corrupted xattr entries");
+ return -EFSCORRUPTED;
+ }
+ cmp = memcmp(name, (xs->base + name_offset), name_len);
+ }
if (cmp == 0)
break;
entry += 1;
Lina reports random oopsen originating from the fast GUP code when
16K pages are used with 4-level page-tables, the fourth level being
folded at runtime due to lack of LPA2.
In this configuration, the generic implementation of
p4d_offset_lockless() will return a 'p4d_t *' corresponding to the
'pgd_t' allocated on the stack of the caller, gup_fast_pgd_range().
This is normally fine, but when the fourth level of page-table is folded
at runtime, pud_offset_lockless() will offset from the address of the
'p4d_t' to calculate the address of the PUD in the same page-table page.
This results in a stray stack read when the 'p4d_t' has been allocated
on the stack and can send the walker into the weeds.
Fix the problem by providing our own definition of p4d_offset_lockless()
when CONFIG_PGTABLE_LEVELS <= 4 which returns the real page-table
pointer rather than the address of the local stack variable.
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Ard Biesheuvel <ardb(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/50360968-13fb-4e6f-8f52-1725b3177215@asahilina.net
Fixes: 0dd4f60a2c76 ("arm64: mm: Add support for folding PUDs at runtime")
Reported-by: Asahi Lina <lina(a)asahilina.net>
Signed-off-by: Will Deacon <will(a)kernel.org>
---
arch/arm64/include/asm/pgtable.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index f8efbc128446..7a4f5604be3f 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -1065,6 +1065,28 @@ static inline bool pgtable_l5_enabled(void) { return false; }
#define p4d_offset_kimg(dir,addr) ((p4d_t *)dir)
+static inline
+p4d_t *p4d_offset_lockless_folded(pgd_t *pgdp, pgd_t pgd, unsigned long addr)
+{
+ /*
+ * With runtime folding of the pud, pud_offset_lockless() passes
+ * the 'pgd_t *' we return here to p4d_to_folded_pud(), which
+ * will offset the pointer assuming that it points into
+ * a page-table page. However, the fast GUP path passes us a
+ * pgd_t allocated on the stack and so we must use the original
+ * pointer in 'pgdp' to construct the p4d pointer instead of
+ * using the generic p4d_offset_lockless() implementation.
+ *
+ * Note: reusing the original pointer means that we may
+ * dereference the same (live) page-table entry multiple times.
+ * This is safe because it is still only loaded once in the
+ * context of each level and the CPU guarantees same-address
+ * read-after-read ordering.
+ */
+ return p4d_offset(pgdp, addr);
+}
+#define p4d_offset_lockless p4d_offset_lockless_folded
+
#endif /* CONFIG_PGTABLE_LEVELS > 4 */
#define pgd_ERROR(e) \
--
2.45.2.1089.g2a221341d9-goog
Panfrost DRM driver uses devfreq to perform DVFS, while using simple_ondemand
devfreq governor by default. This causes driver initialization to fail on
boot when simple_ondemand governor isn't built into the kernel statically,
as a result of the missing module dependency and, consequently, the required
governor module not being included in the initial ramdisk. Thus, let's mark
simple_ondemand governor as a softdep for Panfrost, to have its kernel module
included in the initial ramdisk.
This is a rather longstanding issue that has forced distributions to build
devfreq governors statically into their kernels, [1][2] or has forced users
to introduce some unnecessary workarounds. [3]
For future reference, not having support for the simple_ondemand governor in
the initial ramdisk produces errors in the kernel log similar to these below,
which were taken from a Pine64 RockPro64:
panfrost ff9a0000.gpu: [drm:panfrost_devfreq_init [panfrost]] *ERROR* Couldn't initialize GPU devfreq
panfrost ff9a0000.gpu: Fatal error during GPU init
panfrost: probe of ff9a0000.gpu failed with error -22
Having simple_ondemand marked as a softdep for Panfrost may not resolve this
issue for all Linux distributions. In particular, it will remain unresolved
for the distributions whose utilities for the initial ramdisk generation do
not handle the available softdep information [4] properly yet. However, some
Linux distributions already handle softdeps properly while generating their
initial ramdisks, [5] and this is a prerequisite step in the right direction
for the distributions that don't handle them properly yet.
[1] https://gitlab.manjaro.org/manjaro-arm/packages/core/linux/-/blob/linux61/c…
[2] https://salsa.debian.org/kernel-team/linux/-/merge_requests/1066
[3] https://forum.pine64.org/showthread.php?tid=15458
[4] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=49d8e0…
[5] https://github.com/archlinux/mkinitcpio/commit/97ac4d37aae084a050be512f6d8f…
Cc: Diederik de Haas <didi.debian(a)cknow.org>
Cc: Furkan Kardame <f.kardame(a)manjaro.org>
Cc: stable(a)vger.kernel.org
Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Signed-off-by: Dragan Simic <dsimic(a)manjaro.org>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index ef9f6c0716d5..149737d7a07e 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -828,3 +828,4 @@ module_platform_driver(panfrost_driver);
MODULE_AUTHOR("Panfrost Project Developers");
MODULE_DESCRIPTION("Panfrost DRM Driver");
MODULE_LICENSE("GPL v2");
+MODULE_SOFTDEP("pre: governor_simpleondemand");
The patch titled
Subject: nilfs2: handle inconsistent state in nilfs_btnode_create_block()
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
Subject: nilfs2: handle inconsistent state in nilfs_btnode_create_block()
Date: Thu, 25 Jul 2024 14:20:07 +0900
Syzbot reported that a buffer state inconsistency was detected in
nilfs_btnode_create_block(), triggering a kernel bug.
It is not appropriate to treat this inconsistency as a bug; it can occur
if the argument block address (the buffer index of the newly created
block) is a virtual block number and has been reallocated due to
corruption of the bitmap used to manage its allocation state.
So, modify nilfs_btnode_create_block() and its callers to treat it as a
possible filesystem error, rather than triggering a kernel bug.
Link: https://lkml.kernel.org/r/20240725052007.4562-1-konishi.ryusuke@gmail.com
Fixes: a60be987d45d ("nilfs2: B-tree node cache")
Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
Reported-by: syzbot+89cc4f2324ed37988b60(a)syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=89cc4f2324ed37988b60
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/nilfs2/btnode.c | 25 ++++++++++++++++++++-----
fs/nilfs2/btree.c | 4 ++--
2 files changed, 22 insertions(+), 7 deletions(-)
--- a/fs/nilfs2/btnode.c~nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block
+++ a/fs/nilfs2/btnode.c
@@ -51,12 +51,21 @@ nilfs_btnode_create_block(struct address
bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node));
if (unlikely(!bh))
- return NULL;
+ return ERR_PTR(-ENOMEM);
if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) ||
buffer_dirty(bh))) {
- brelse(bh);
- BUG();
+ /*
+ * The block buffer at the specified new address was already
+ * in use. This can happen if it is a virtual block number
+ * and has been reallocated due to corruption of the bitmap
+ * used to manage its allocation state (if not, the buffer
+ * clearing of an abandoned b-tree node is missing somewhere).
+ */
+ nilfs_error(inode->i_sb,
+ "state inconsistency probably due to duplicate use of b-tree node block address %llu (ino=%lu)",
+ (unsigned long long)blocknr, inode->i_ino);
+ goto failed;
}
memset(bh->b_data, 0, i_blocksize(inode));
bh->b_bdev = inode->i_sb->s_bdev;
@@ -67,6 +76,12 @@ nilfs_btnode_create_block(struct address
folio_unlock(bh->b_folio);
folio_put(bh->b_folio);
return bh;
+
+failed:
+ folio_unlock(bh->b_folio);
+ folio_put(bh->b_folio);
+ brelse(bh);
+ return ERR_PTR(-EIO);
}
int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr,
@@ -217,8 +232,8 @@ retry:
}
nbh = nilfs_btnode_create_block(btnc, newkey);
- if (!nbh)
- return -ENOMEM;
+ if (IS_ERR(nbh))
+ return PTR_ERR(nbh);
BUG_ON(nbh == obh);
ctxt->newbh = nbh;
--- a/fs/nilfs2/btree.c~nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block
+++ a/fs/nilfs2/btree.c
@@ -63,8 +63,8 @@ static int nilfs_btree_get_new_block(con
struct buffer_head *bh;
bh = nilfs_btnode_create_block(btnc, ptr);
- if (!bh)
- return -ENOMEM;
+ if (IS_ERR(bh))
+ return PTR_ERR(bh);
set_buffer_nilfs_volatile(bh);
*bhp = bh;
_
Patches currently in -mm which might be from konishi.ryusuke(a)gmail.com are
nilfs2-handle-inconsistent-state-in-nilfs_btnode_create_block.patch
In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is
assigned to modeset->mode, which will lead to a possible NULL pointer
dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: cf13909aee05 ("drm/fb-helper: Move out modeset config code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v4:
- modified patch, set ret and break to handle error rightly.
Changes in v3:
- modified patch as suggestions, returned error directly when failing to
get modeset->mode.
Changes in v2:
- added the recipient's email address, due to the prolonged absence of a
response from the recipients.
- added Cc stable.
---
drivers/gpu/drm/drm_client_modeset.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 31af5cf37a09..cee5eafbfb81 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -880,6 +880,11 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
kfree(modeset->mode);
modeset->mode = drm_mode_duplicate(dev, mode);
+ if (!modeset->mode) {
+ ret = -ENOMEM;
+ break;
+ }
+
drm_connector_get(connector);
modeset->connectors[modeset->num_connectors++] = connector;
modeset->x = offset->x;
--
2.25.1
In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is
assigned to modeset->mode, which will lead to a possible NULL pointer
dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: cf13909aee05 ("drm/fb-helper: Move out modeset config code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v3:
- modified patch as suggestions, returned error directly when failing to
get modeset->mode.
Changes in v2:
- added the recipient's email address, due to the prolonged absence of a
response from the recipients.
- added Cc stable.
---
drivers/gpu/drm/drm_client_modeset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 31af5cf37a09..750b8dce0f90 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -880,6 +880,9 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
kfree(modeset->mode);
modeset->mode = drm_mode_duplicate(dev, mode);
+ if (!modeset->mode)
+ return 0;
+
drm_connector_get(connector);
modeset->connectors[modeset->num_connectors++] = connector;
modeset->x = offset->x;
--
2.25.1
On Wed 2024-07-24 18:48:20, DAVIETTE wrote:
> Afternoon:
>
> Has any test on incorporation of muti platform data been seen using the PATCH file ?
>
> Will the install cause support default models to reset.
>
> Any other information is welcomed and appreciated, Thanks.
>
> D.Lauricella
Has spam gotten smart with use of AI, or is this real?
Can you fix your mailer to to generate in-reply-to headers and try
again stating your question?
BR,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Commit 3b52093dc917 ("rtc: ds1343: Do not hardcode SPI mode flags")
bit-flips (^=) the existing SPI_CS_HIGH setting in the SPI mode during
device probe. This will set it to the wrong value if the spi-cs-high
property has been set in the devicetree node. Just force it to be set
active high and get rid of some commentary that attempted to explain why
flipping the bit was the correct choice.
Fixes: 3b52093dc917 ("rtc: ds1343: Do not hardcode SPI mode flags")
Cc: <stable(a)vger.kernel.org> # 5.6+
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: Mark Brown <broonie(a)kernel.org>
Signed-off-by: Ian Abbott <abbotti(a)mev.co.uk>
---
drivers/rtc/rtc-ds1343.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c
index ed5a6ba89a3e..484b5756b55c 100644
--- a/drivers/rtc/rtc-ds1343.c
+++ b/drivers/rtc/rtc-ds1343.c
@@ -361,13 +361,10 @@ static int ds1343_probe(struct spi_device *spi)
if (!priv)
return -ENOMEM;
- /* RTC DS1347 works in spi mode 3 and
- * its chip select is active high. Active high should be defined as
- * "inverse polarity" as GPIO-based chip selects can be logically
- * active high but inverted by the GPIO library.
+ /*
+ * RTC DS1347 works in spi mode 3 and its chip select is active high.
*/
- spi->mode |= SPI_MODE_3;
- spi->mode ^= SPI_CS_HIGH;
+ spi->mode |= SPI_MODE_3 | SPI_CS_HIGH;
spi->bits_per_word = 8;
res = spi_setup(spi);
if (res)
--
2.43.0
This is the start of the stable review cycle for the 6.10.1 release.
There are 11 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 25 Jul 2024 12:28:30 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.10.1-rc2…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.10.1-rc2
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
thermal: core: Allow thermal zones to tell the core to ignore them
Pavel Begunkov <asml.silence(a)gmail.com>
io_uring: fix error pbuf checking
Richard Fitzgerald <rf(a)opensource.cirrus.com>
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum
Richard Fitzgerald <rf(a)opensource.cirrus.com>
ASoC: cs35l56: Use header defines for Speaker Volume control definition
Hao Ge <gehao(a)kylinos.cn>
tpm: Use auth only after NULL check in tpm_buf_check_hmac_response()
David Howells <dhowells(a)redhat.com>
cifs: Fix setting of zero_point after DIO write
David Howells <dhowells(a)redhat.com>
cifs: Fix server re-repick on subrequest retry
Steve French <stfrench(a)microsoft.com>
cifs: fix noisy message on copy_file_range
David Howells <dhowells(a)redhat.com>
cifs: Fix missing fscache invalidation
David Howells <dhowells(a)redhat.com>
cifs: Fix missing error code set
Kees Cook <kees(a)kernel.org>
ext4: use memtostr_pad() for s_volume_name
-------------
Diffstat:
Makefile | 4 +--
drivers/char/tpm/tpm2-sessions.c | 5 +--
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 7 +++-
drivers/thermal/thermal_core.c | 51 ++++++++++++++---------------
drivers/thermal/thermal_core.h | 3 ++
drivers/thermal/thermal_helpers.c | 2 ++
fs/ext4/ext4.h | 2 +-
fs/ext4/ioctl.c | 2 +-
fs/smb/client/cifsfs.c | 2 +-
fs/smb/client/file.c | 21 +++++++++---
fs/smb/client/smb2pdu.c | 3 --
include/sound/cs35l56.h | 2 +-
io_uring/kbuf.c | 4 ++-
sound/soc/codecs/cs35l56.c | 6 +++-
14 files changed, 69 insertions(+), 45 deletions(-)
I'm announcing the release of the 6.10.1 kernel.
All users of the 6.10 kernel series must upgrade.
The updated 6.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 -
drivers/char/tpm/tpm2-sessions.c | 5 +-
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 7 +++
drivers/thermal/thermal_core.c | 51 +++++++++++++---------------
drivers/thermal/thermal_core.h | 3 +
drivers/thermal/thermal_helpers.c | 2 +
fs/ext4/ext4.h | 2 -
fs/ext4/ioctl.c | 2 -
fs/smb/client/cifsfs.c | 2 -
fs/smb/client/file.c | 21 +++++++++--
fs/smb/client/smb2pdu.c | 3 -
include/sound/cs35l56.h | 2 -
io_uring/kbuf.c | 4 +-
sound/soc/codecs/cs35l56.c | 6 ++-
14 files changed, 68 insertions(+), 44 deletions(-)
David Howells (4):
cifs: Fix missing error code set
cifs: Fix missing fscache invalidation
cifs: Fix server re-repick on subrequest retry
cifs: Fix setting of zero_point after DIO write
Greg Kroah-Hartman (1):
Linux 6.10.1
Hao Ge (1):
tpm: Use auth only after NULL check in tpm_buf_check_hmac_response()
Kees Cook (1):
ext4: use memtostr_pad() for s_volume_name
Pavel Begunkov (1):
io_uring: fix error pbuf checking
Rafael J. Wysocki (1):
thermal: core: Allow thermal zones to tell the core to ignore them
Richard Fitzgerald (2):
ASoC: cs35l56: Use header defines for Speaker Volume control definition
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum
Steve French (1):
cifs: fix noisy message on copy_file_range
I'm announcing the release of the 6.10.1 kernel.
All users of the 6.10 kernel series must upgrade.
The updated 6.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 -
drivers/char/tpm/tpm2-sessions.c | 5 +-
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 7 +++
drivers/thermal/thermal_core.c | 51 +++++++++++++---------------
drivers/thermal/thermal_core.h | 3 +
drivers/thermal/thermal_helpers.c | 2 +
fs/ext4/ext4.h | 2 -
fs/ext4/ioctl.c | 2 -
fs/smb/client/cifsfs.c | 2 -
fs/smb/client/file.c | 21 +++++++++--
fs/smb/client/smb2pdu.c | 3 -
include/sound/cs35l56.h | 2 -
io_uring/kbuf.c | 4 +-
sound/soc/codecs/cs35l56.c | 6 ++-
14 files changed, 68 insertions(+), 44 deletions(-)
David Howells (4):
cifs: Fix missing error code set
cifs: Fix missing fscache invalidation
cifs: Fix server re-repick on subrequest retry
cifs: Fix setting of zero_point after DIO write
Greg Kroah-Hartman (1):
Linux 6.10.1
Hao Ge (1):
tpm: Use auth only after NULL check in tpm_buf_check_hmac_response()
Kees Cook (1):
ext4: use memtostr_pad() for s_volume_name
Pavel Begunkov (1):
io_uring: fix error pbuf checking
Rafael J. Wysocki (1):
thermal: core: Allow thermal zones to tell the core to ignore them
Richard Fitzgerald (2):
ASoC: cs35l56: Use header defines for Speaker Volume control definition
ASoC: cs35l56: Limit Speaker Volume to +12dB maximum
Steve French (1):
cifs: fix noisy message on copy_file_range
Hi,
A recent patch available in 6.10 [1] uncovered two issues on how the DMA Link ID
is tracked with ChainDMA and can cause under specific conditions [2] to cause a DSP
panic.
The issue is not academic as we have one user report of it:
https://github.com/thesofproject/linux/issues/5116
The patches have been marked for stable backport to made there way to 6.10.
The first patch is fixing a code move patch, for older than 6.9 we would need
different patch to fix the original code, but since the issue is only valid for
6.10, I will do that at a later time.
Mark, can you please schedule these as fixes for 6.11 to get them fast to 6.10?
Thank you.
[1] ebd3b3014eeb ("ASoC: SOF: pcm: reset all PCM sources in case of xruns")
[2] https://github.com/thesofproject/linux/pull/5119#issuecomment-2244770449
Regards,
Peter
---
Peter Ujfalusi (2):
ASoC: SOF: ipc4-topology: Only handle dai_config with HW_PARAMS for
ChainDMA
ASoC: SOF: ipc4-topology: Preserve the DMA Link ID for ChainDMA on
unprepare
sound/soc/sof/ipc4-topology.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
--
2.45.2
(Mail V2: Send to correct mailing list and CCing relevant people.)
On Tue, 25 Jun 2024 16:29:04 +0200, Greg Kroah-Hartman wrote:
> In the Linux kernel, the following vulnerability has been resolved:
>
> drm/amdgpu: add error handle to avoid out-of-bounds
>
> if the sdma_v4_0_irq_id_to_seq return -EINVAL, the process should
> be stop to avoid out-of-bounds read, so directly return -EINVAL.
>
> The Linux kernel CVE team has assigned CVE-2024-39471 to this issue.
This commit has a bug which was fixed by 6769a23697f1. It should be
immediately backported, otherwise this "fix" doesn't do anything since
gcc will optimise out the check.
Thanks,
Siddh
In drm_client_modeset_probe(), the return value of drm_mode_duplicate() is
assigned to modeset->mode, which will lead to a possible NULL pointer
dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
Cc: stable(a)vger.kernel.org
Fixes: cf13909aee05 ("drm/fb-helper: Move out modeset config code")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v2:
- added the recipient's email address, due to the prolonged absence of a
response from the recipients.
- added Cc stable.
---
drivers/gpu/drm/drm_client_modeset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 31af5cf37a09..cca37b225385 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -880,6 +880,9 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
kfree(modeset->mode);
modeset->mode = drm_mode_duplicate(dev, mode);
+ if (!modeset->mode)
+ continue;
+
drm_connector_get(connector);
modeset->connectors[modeset->num_connectors++] = connector;
modeset->x = offset->x;
--
2.25.1
Zero and negative number is not a valid IRQ for in-kernel code and the
irq_of_parse_and_map() function returns zero on error. So this check for
valid IRQs should only accept values > 0.
Cc: stable(a)vger.kernel.org
Fixes: 44dab88e7cc9 ("spi: add spi_ppc4xx driver")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v2:
- added Cc stable line;
- added Fixes line.
---
drivers/spi/spi-ppc4xx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c
index 942c3117ab3a..01fdecbf132d 100644
--- a/drivers/spi/spi-ppc4xx.c
+++ b/drivers/spi/spi-ppc4xx.c
@@ -413,6 +413,9 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
/* Request IRQ */
hw->irqnum = irq_of_parse_and_map(np, 0);
+ if (hw->irqnum <= 0)
+ goto free_host;
+
ret = request_irq(hw->irqnum, spi_ppc4xx_int,
0, "spi_ppc4xx_of", (void *)hw);
if (ret) {
--
2.25.1
This is the start of the stable review cycle for the 5.10.220 release.
There are 770 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 20 Jun 2024 12:32:00 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.220-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.10.220-rc1
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Fix a regression in nfsd_setattr()
NeilBrown <neilb(a)suse.de>
nfsd: don't call locks_release_private() twice concurrently
NeilBrown <neilb(a)suse.de>
nfsd: don't take fi_lock in nfsd_break_deleg_cb()
NeilBrown <neilb(a)suse.de>
nfsd: fix RELEASE_LOCKOWNER
Jeff Layton <jlayton(a)kernel.org>
nfsd: drop the nfsd_put helper
NeilBrown <neilb(a)suse.de>
nfsd: call nfsd_last_thread() before final nfsd_put()
NeilBrown <neilb(a)suse.de>
NFSD: fix possible oops when nfsd/pool_stats is closed.
Chuck Lever <chuck.lever(a)oracle.com>
Documentation: Add missing documentation for EXPORT_OP flags
NeilBrown <neilb(a)suse.de>
nfsd: separate nfsd_last_thread() from nfsd_put()
NeilBrown <neilb(a)suse.de>
nfsd: Simplify code around svc_exit_thread() call in nfsd()
Chuck Lever <chuck.lever(a)oracle.com>
nfsd: don't allow nfsd threads to be signalled.
Tavian Barnes <tavianator(a)tavianator.com>
nfsd: Fix creation time serialization order
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd4_encode_nfstime4() helper
NeilBrown <neilb(a)suse.de>
lockd: drop inappropriate svc_get() from locked_get()
Dan Carpenter <dan.carpenter(a)linaro.org>
nfsd: fix double fget() bug in __write_ports_addfd()
Jeff Layton <jlayton(a)kernel.org>
nfsd: make a copy of struct iattr before calling notify_change
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop
Jeff Layton <jlayton(a)kernel.org>
nfsd: simplify the delayed disposal list code
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Convert filecache to rhltable
Jeff Layton <jlayton(a)kernel.org>
nfsd: allow reaping files still under writeback
Jeff Layton <jlayton(a)kernel.org>
nfsd: update comment over __nfsd_file_cache_purge
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't take/put an extra reference when putting a file
Jeff Layton <jlayton(a)kernel.org>
nfsd: add some comments to nfsd_file_do_acquire
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't kill nfsd_files because of lease break error
Jeff Layton <jlayton(a)kernel.org>
nfsd: simplify test_bit return in NFSD_FILE_KEY_FULL comparator
Jeff Layton <jlayton(a)kernel.org>
nfsd: NFSD_FILE_KEY_INODE only needs to find GC'ed entries
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't open-code clear_and_wake_up_bit
Jeff Layton <jlayton(a)kernel.org>
nfsd: call op_release, even when op_func returns an error
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't replace page in rq_pages if it's a continuation of last page
Jeff Layton <jlayton(a)kernel.org>
lockd: set file_lock start and end when decoding nlm4 testargs
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against filesystem freezing
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: copy the whole verifier in nfsd_copy_write_verifier
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't fsync nfsd_files on last close
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix courtesy client with deny mode handling in nfs4_upgrade_open
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: fix problems with cleanup on errors in nfsd4_copy
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't hand out delegation on setuid files being opened for write
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: fix leaked reference count of nfsd4_ssc_umount_item
Jeff Layton <jlayton(a)kernel.org>
nfsd: clean up potential nfsd_file refcount leaks in COPY codepath
Jeff Layton <jlayton(a)kernel.org>
nfsd: allow nfsd_file_get to sanely handle a NULL pointer
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: enhance inter-server copy cleanup
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't destroy global nfs4_file table in per-net shutdown
Jeff Layton <jlayton(a)kernel.org>
nfsd: don't free files unconditionally in __nfsd_file_cache_purge
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: replace delayed_work with work_struct for nfsd_client_shrinker
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: register/unregister of nfsd-client shrinker at nfsd startup/shutdown time
Xingyuan Mo <hdthky0(a)gmail.com>
NFSD: fix use-after-free in nfsd4_ssc_setup_dul()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use set_bit(RQ_DROPME)
Chuck Lever <chuck.lever(a)oracle.com>
Revert "SUNRPC: Use RMW bitops in single-threaded hot paths"
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix handling of cached open files in nfsd4_open codepath
Jeff Layton <jlayton(a)kernel.org>
nfsd: rework refcounting in filecache
Kees Cook <keescook(a)chromium.org>
NFSD: Avoid clashing function prototypes
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use only RQ_DROPME to signal the need to drop a reply
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add delegation reaper to react to low memory condition
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add support for sending CB_RECALL_ANY
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: refactoring courtesy_client_reaper to a generic low memory shrinker
Brian Foster <bfoster(a)redhat.com>
NFSD: pass range end to vfs_fsync_range() instead of count
Jeff Layton <jlayton(a)kernel.org>
lockd: fix file selection in nlmsvc_cancel_blocked
Jeff Layton <jlayton(a)kernel.org>
lockd: ensure we use the correct file descriptor when unlocking
Jeff Layton <jlayton(a)kernel.org>
lockd: set missing fl_flags field when retrieving args
Xiu Jianfeng <xiujianfeng(a)huawei.com>
NFSD: Use struct_size() helper in alloc_session()
Jeff Layton <jlayton(a)kernel.org>
nfsd: return error if nfs4_setacl fails
Trond Myklebust <trond.myklebust(a)hammerspace.com>
lockd: set other missing fields when unlocking files
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd_file_fsync tracepoint
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix up the filecache laundrette scheduling
Jeff Layton <jlayton(a)kernel.org>
nfsd: reorganize filecache.c
Jeff Layton <jlayton(a)kernel.org>
nfsd: remove the pages_flushed statistic from filecache
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix licensing header in filecache.c
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use rhashtable for managing nfs4_file objects
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor find_file()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up find_or_add_file()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a nfsd4_file_hash_remove() helper
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd4_init_file()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update file_hashtbl() helpers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use const pointers as parameters to fh_ helpers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace delegation revocations
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace stateids returned via DELEGRETURN
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfs4_preprocess_stateid_op() call sites
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Flesh out a documenting comment for filecache.c
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an NFSD_FILE_GC flag to enable nfsd_file garbage collection
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Revert "NFSD: NFSv4 CLOSE should release an nfsd_file immediately"
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Pass the target nfsd_file to nfsd_commit()
David Disseldorp <ddiss(a)suse.de>
exportfs: use pr_debug for unreachable debug statements
Jeff Layton <jlayton(a)kernel.org>
nfsd: allow disabling NFSv2 at compile time
Jeff Layton <jlayton(a)kernel.org>
nfsd: move nfserrno() to vfs.c
Jeff Layton <jlayton(a)kernel.org>
nfsd: ignore requests to disable unsupported versions
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Finish converting the NFSv3 GETACL result encoder
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Finish converting the NFSv2 GETACL result encoder
Colin Ian King <colin.i.king(a)gmail.com>
NFSD: Remove redundant assignment to variable host_err
Anna Schumaker <Anna.Schumaker(a)Netapp.com>
NFSD: Simplify READ_PLUS
Jeff Layton <jlayton(a)kernel.org>
nfsd: use locks_inode_context helper
Jeff Layton <jlayton(a)kernel.org>
lockd: use locks_inode_context helper
Jeff Layton <jlayton(a)kernel.org>
filelock: add a new locks_inode_context accessor function
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix reads with a non-zero offset that don't end on a page boundary
Jeff Layton <jlayton(a)kernel.org>
nfsd: put the export reference in nfsd4_verify_deleg_dentry
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix use-after-free in nfsd_file_do_acquire tracepoint
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix net-namespace logic in __nfsd_file_cache_purge
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
NFSD: unregister shrinker when nfsd_init_net() fails
Jeff Layton <jlayton(a)kernel.org>
nfsd: rework hashtable handling in nfsd_do_file_acquire
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix nfsd_file_unhash_and_dispose
Gaosheng Cui <cuigaosheng1(a)huawei.com>
fanotify: Remove obsoleted fanotify_event_has_path()
Gaosheng Cui <cuigaosheng1(a)huawei.com>
fsnotify: remove unused declaration
Al Viro <viro(a)zeniv.linux.org.uk>
fs/notify: constify path
Jeff Layton <jlayton(a)kernel.org>
nfsd: extra checks when freeing delegation stateids
Jeff Layton <jlayton(a)kernel.org>
nfsd: make nfsd4_run_cb a bool return function
Jeff Layton <jlayton(a)kernel.org>
nfsd: fix comments about spinlock handling with delegations
Jeff Layton <jlayton(a)kernel.org>
nfsd: only fill out return pointer on success in nfsd4_lookup_stateid
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Cap rsize_bop result based on send buffer size
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Rename the fields in copy_stateid_t
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_SHOW_ATTRIBUTE to define nfsd_file_cache_stats_fops
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_SHOW_ATTRIBUTE to define nfsd_reply_cache_stats_fops
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_SHOW_ATTRIBUTE to define client_info_fops
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_SHOW_ATTRIBUTE to define export_features_fops and supported_enctypes_fops
ChenXiaoSong <chenxiaosong2(a)huawei.com>
nfsd: use DEFINE_PROC_SHOW_ATTRIBUTE to define nfsd_proc_ops
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Pack struct nfsd4_compoundres
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove unused nfsd4_compoundargs::cachetype field
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove "inline" directives on op_rsize_bop helpers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfs4svc_encode_compoundres()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up WRITE arg decoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use xdr_inline_decode() to decode NFSv3 symlinks
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor common code out of dirlist helpers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Reduce amount of struct nfsd4_compoundargs that needs clearing
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Parametrize how much of argsize should be zeroed
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add shrinker to reap courtesy clients on low memory condition
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: keep track of the number of courtesy clients in the system
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfsd4_remove() wait before returning NFS4ERR_DELAY
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfsd4_rename() wait before returning NFS4ERR_DELAY
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_setattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a mechanism to wait for a DELEGRETURN
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints to report NFSv4 callback completions
Gaosheng Cui <cuigaosheng1(a)huawei.com>
nfsd: remove nfsd4_prepare_cb_recall() declaration
Jeff Layton <jlayton(a)kernel.org>
nfsd: clean up mounted_on_fileid handling
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix handling of oversized NFSv4 COMPOUND requests
NeilBrown <neilb(a)suse.de>
NFSD: drop fname and flen args from nfsd_create_locked()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against send buffer overflow in NFSv3 READ
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against send buffer overflow in NFSv2 READ
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against send buffer overflow in NFSv3 READDIR
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Protect against send buffer overflow in NFSv2 READDIR
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Increase NFSD_MAX_OPS_PER_COMPOUND
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
nfsd: Propagate some error code returned by memdup_user()
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
nfsd: Avoid some useless tests
Jinpeng Cui <cui.jinpeng2(a)zte.com.cn>
NFSD: remove redundant variable status
Olga Kornievskaia <kolga(a)netapp.com>
NFSD enforce filehandle check for source file in COPY
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
lockd: move from strlcpy with unused retval to strscpy
Wolfram Sang <wsa+renesas(a)sang-engineering.com>
NFSD: move from strlcpy with unused retval to strscpy
Al Viro <viro(a)zeniv.linux.org.uk>
nfsd_splice_actor(): handle compound pages
NeilBrown <neilb(a)suse.de>
NFSD: fix regression with setting ACLs.
Jeff Layton <jlayton(a)kernel.org>
lockd: detect and reject lock arguments that overflow
NeilBrown <neilb(a)suse.de>
NFSD: discard fh_locked flag and fh_lock/fh_unlock
NeilBrown <neilb(a)suse.de>
NFSD: use (un)lock_inode instead of fh_(un)lock for file operations
NeilBrown <neilb(a)suse.de>
NFSD: use explicit lock/unlock for directory ops
NeilBrown <neilb(a)suse.de>
NFSD: reduce locking in nfsd_lookup()
NeilBrown <neilb(a)suse.de>
NFSD: only call fh_unlock() once in nfsd_link()
NeilBrown <neilb(a)suse.de>
NFSD: always drop directory lock in nfsd_unlink()
NeilBrown <neilb(a)suse.de>
NFSD: change nfsd_create()/nfsd_symlink() to unlock directory before returning.
NeilBrown <neilb(a)suse.de>
NFSD: add posix ACLs to struct nfsd_attrs
NeilBrown <neilb(a)suse.de>
NFSD: add security label to struct nfsd_attrs
NeilBrown <neilb(a)suse.de>
NFSD: set attributes when creating symlinks
NeilBrown <neilb(a)suse.de>
NFSD: introduce struct nfsd_attrs
Jeff Layton <jlayton(a)kernel.org>
NFSD: verify the opened dentry after setting a delegation
Jeff Layton <jlayton(a)kernel.org>
NFSD: drop fh argument from alloc_init_deleg
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move copy offload callback arguments into a separate structure
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd4_send_cb_offload()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove kmalloc from nfsd4_do_async_copy()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd4_do_copy()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd4_cleanup_inter_ssc() (2/2)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace boolean fields in struct nfsd4_copy
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfs4_put_copy() static
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Reorder the fields in struct nfsd4_op
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Shrink size of struct nfsd4_copy
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Shrink size of struct nfsd4_copy_notify
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: nfserrno(-ENOMEM) is nfserr_jukebox
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix strncpy() fortify warning
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd4_encode_readlink()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Use xdr_pad_size()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Simplify starting_len
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Optimize nfsd4_encode_readv()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd4_read::rd_eof field
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up SPLICE_OK in nfsd4_encode_read()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Optimize nfsd4_encode_fattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Optimize nfsd4_encode_operation()
Jeff Layton <jlayton(a)kernel.org>
nfsd: silence extraneous printk on nfsd.ko insertion
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: limit the number of v4 clients to 1024 per 1GB of system memory
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: keep track of the number of v4 clients in the system
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: refactoring v4 specific code to a helper in nfs4state.c
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Ensure nf_inode is never dereferenced
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: NFSv4 CLOSE should release an nfsd_file immediately
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move nfsd_file_trace_alloc() tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Separate tracepoints for acquire and create
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up unused code after rhashtable conversion
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Convert the filecache to use rhashtable
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Set up an rhashtable for the filecache
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace the "init once" mechanism
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove nfsd_file::nf_hashval
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: nfsd_file_hash_remove can compute hashval
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor __nfsd_file_close_inode()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: nfsd_file_unhash can compute hashval from nf->nf_inode
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove lockdep assertion from unhash_and_release_locked()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: No longer record nf_hashval in the trace log
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Never call nfsd_file_gc() in foreground paths
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix the filecache LRU shrinker
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Leave open files out of the filecache LRU
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace filecache LRU activity
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: WARN when freeing an item still linked via nf_lru
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Hook up the filecache stat file
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Zero counters when the filecache is re-initialized
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Record number of flush calls
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report the number of items evicted by the LRU walk
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_file_lru_scan()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_file_gc()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_file_lru_dispose_list() helper
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report average age of filecache items
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report count of freed filecache items
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report count of calls to nfsd_file_acquire()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Report filecache LRU size
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Demote a WARN to a pr_warn()
Colin Ian King <colin.i.king(a)gmail.com>
nfsd: remove redundant assignment to variable len
Zhang Jiaming <jiaming(a)nfschina.com>
NFSD: Fix space and spelling mistake
Benjamin Coddington <bcodding(a)redhat.com>
NLM: Defend against file_lock changes after vfs_test_lock()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Fix xdr_encode_bool()
Jeff Layton <jlayton(a)kernel.org>
nfsd: eliminate the NFSD_FILE_BREAK_* flags
Xin Gao <gaoxin(a)cdjrlc.com>
fsnotify: Fix comment typo
Amir Goldstein <amir73il(a)gmail.com>
fanotify: introduce FAN_MARK_IGNORE
Amir Goldstein <amir73il(a)gmail.com>
fanotify: cleanups for fanotify_mark() input validations
Amir Goldstein <amir73il(a)gmail.com>
fanotify: prepare for setting event flags in ignore mask
Oliver Ford <ojford(a)gmail.com>
fs: inotify: Fix typo in inotify comment
Jeff Layton <jlayton(a)kernel.org>
lockd: fix nlm_close_files
Jeff Layton <jlayton(a)kernel.org>
lockd: set fl_owner when unlocking files
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Decode NFSv4 birth time attribute
NeilBrown <neilb(a)suse.de>
NFS: restore module put when manager exits.
Amir Goldstein <amir73il(a)gmail.com>
fanotify: refine the validation checks on non-dir inode mask
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Optimize xdr_reserve_space()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix potential use-after-free in nfsd_file_put()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: nfsd_file_put() can sleep
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add documenting comment for nfsd4_release_lockowner()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Modernize nfsd4_release_lockowner()
Julian Schroeder <jumaco(a)amazon.com>
nfsd: destroy percpu stats counters after reply cache shutdown
Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com>
nfsd: Fix null-ptr-deref in nfsd_fill_super()
Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com>
nfsd: Unregister the cld notifier when laundry_wq create failed
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Use RMW bitops in single-threaded hot paths
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up the show_nf_flags() macro
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace filecache opens
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move documenting comment for nfsd4_process_open2()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix whitespace
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove dprintk call sites from tail of nfsd4_open()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Instantiate a struct file when creating a regular NFSv4 file
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd_open_verified()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove do_nfsd_create()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor NFSv4 OPEN(CREATE)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor NFSv3 CREATE
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Refactor nfsd_create_setattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Avoid calling fh_drop_write() twice in do_nfsd_create()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd3_proc_create()
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: Show state of courtesy client in client info
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add support for lock conflict to courteous server
Dai Ngo <dai.ngo(a)oracle.com>
fs/lock: add 2 callbacks to lock_manager_operations to resolve conflict
Dai Ngo <dai.ngo(a)oracle.com>
fs/lock: add helper locks_owner_has_blockers to check for blockers
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: move create/destroy of laundry_wq to init_nfsd and exit_nfsd
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add support for share reservation conflict to courteous server
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: add courteous server support for thread with only delegation
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd_splice_actor()
Vasily Averin <vvs(a)openvz.org>
fanotify: fix incorrect fmode_t casts
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: consistent behavior for parent not watching children
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: introduce mark type iterator
Amir Goldstein <amir73il(a)gmail.com>
fanotify: enable "evictable" inode marks
Amir Goldstein <amir73il(a)gmail.com>
fanotify: use fsnotify group lock helpers
Amir Goldstein <amir73il(a)gmail.com>
fanotify: implement "evictable" inode marks
Amir Goldstein <amir73il(a)gmail.com>
fanotify: factor out helper fanotify_mark_update_flags()
Amir Goldstein <amir73il(a)gmail.com>
fanotify: create helper fanotify_mark_user_flags()
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: allow adding an inode mark without pinning inode
Amir Goldstein <amir73il(a)gmail.com>
dnotify: use fsnotify group lock helpers
Amir Goldstein <amir73il(a)gmail.com>
nfsd: use fsnotify group lock helpers
Amir Goldstein <amir73il(a)gmail.com>
inotify: use fsnotify group lock helpers
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: create helpers for group mark_mutex lock
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: make allow_dups a property of the group
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: pass flags argument to fsnotify_alloc_group()
Amir Goldstein <amir73il(a)gmail.com>
inotify: move control flags from mask to mark flags
Dai Ngo <dai.ngo(a)oracle.com>
fs/lock: documentation cleanup. Replace inode->i_lock with flc_lock.
Amir Goldstein <amir73il(a)gmail.com>
fanotify: do not allow setting dirent events in mask of non-dir
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Clean up nfsd_file_put()
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Fix a write performance regression
Haowen Bai <baihaowen(a)meizu.com>
SUNRPC: Return true/false (not 1/0) from bool functions
Bang Li <libang.linuxer(a)gmail.com>
fsnotify: remove redundant parameter judgment
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: optimize FS_MODIFY events with no ignored masks
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: fix merge with parent's ignored mask
Jakob Koschel <jakobkoschel(a)gmail.com>
nfsd: fix using the correct variable for sizeof()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up _lm_ operation names
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove CONFIG_NFSD_V3
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move svc_serv_ops::svo_function into struct svc_serv
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove svc_serv_ops::svo_module
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Remove svc_shutdown_net()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Rename svc_close_xprt()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Rename svc_create_xprt()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Remove svo_shutdown method
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Merge svc_do_enqueue_xprt() into svc_enqueue_xprt()
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Remove the .svo_enqueue_xprt method
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Streamline the rare "found" case
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Skip extra computation for RC_NOCACHE case
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: De-duplicate hash bucket indexing
Ondrej Valousek <ondrej.valousek.xm(a)renesas.com>
nfsd: Add support for the birth time attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Deprecate NFS_OFFSET_MAX
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: COMMIT operations must not return NFS?ERR_INVAL
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix NFSv3 SETATTR/CREATE's handling of large file sizes
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix ia_size underflow
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix the behavior of READ near OFFSET_MAX
J. Bruce Fields <bfields(a)redhat.com>
lockd: fix failure to cleanup client locks
J. Bruce Fields <bfields(a)redhat.com>
lockd: fix server crash on reboot of client holding lock
Yang Li <yang.lee(a)linux.alibaba.com>
fanotify: remove variable set but not used
J. Bruce Fields <bfields(a)redhat.com>
nfsd: fix crash on COPY_NOTIFY with special stateid
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Move fill_pre_wcc() and fill_post_wcc()
Chuck Lever <chuck.lever(a)oracle.com>
Revert "nfsd: skip some unnecessary stats in the v4 case"
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Trace boot verifier resets
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Rename boot verifier functions
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up the nfsd_net::nfssvc_boot field
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Write verifier might go backwards
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Add a tracepoint for errors in nfsd4_clone_file_range()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: De-duplicate net_generic(nf->nf_net, nfsd_net_id)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: De-duplicate net_generic(SVC_NET(rqstp), nfsd_net_id)
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up nfsd_vfs_write()
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: Retry once in nfsd_open on an -EOPENSTALE return
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: Add errno mapping for EREMOTEIO
Peng Tao <tao.peng(a)primarydata.com>
nfsd: map EBADF
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix zero-length NFSv3 WRITEs
Vasily Averin <vvs(a)virtuozzo.com>
nfsd4: add refcount for nfsd4_blocked_lock
J. Bruce Fields <bfields(a)redhat.com>
nfs: block notification on fs with its own ->lock
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: De-duplicate nfsd4_decode_bitmap4()
J. Bruce Fields <bfields(a)redhat.com>
nfsd: improve stateid access bitmask documentation
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Combine XDR error tracepoints
NeilBrown <neilb(a)suse.de>
NFSD: simplify per-net file cache management
Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com>
NFSD: Fix inconsistent indenting
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove be32_to_cpu() from DRC hash function
NeilBrown <neilb(a)suse.de>
NFS: switch the callback service back to non-pooled.
NeilBrown <neilb(a)suse.de>
lockd: use svc_set_num_threads() for thread start and stop
NeilBrown <neilb(a)suse.de>
SUNRPC: always treat sv_nrpools==1 as "not pooled"
NeilBrown <neilb(a)suse.de>
SUNRPC: move the pool_map definitions (back) into svc.c
NeilBrown <neilb(a)suse.de>
lockd: rename lockd_create_svc() to lockd_get()
NeilBrown <neilb(a)suse.de>
lockd: introduce lockd_put()
NeilBrown <neilb(a)suse.de>
lockd: move svc_exit_thread() into the thread
NeilBrown <neilb(a)suse.de>
lockd: move lockd_start_svc() call into lockd_create_svc()
NeilBrown <neilb(a)suse.de>
lockd: simplify management of network status notifiers
NeilBrown <neilb(a)suse.de>
lockd: introduce nlmsvc_serv
NeilBrown <neilb(a)suse.de>
NFSD: simplify locking for network notifier.
NeilBrown <neilb(a)suse.de>
SUNRPC: discard svo_setup and rename svc_set_num_threads_sync()
NeilBrown <neilb(a)suse.de>
NFSD: Make it possible to use svc_set_num_threads_sync
NeilBrown <neilb(a)suse.de>
NFSD: narrow nfsd_mutex protection in nfsd thread
NeilBrown <neilb(a)suse.de>
SUNRPC: use sv_lock to protect updates to sv_nrthreads.
NeilBrown <neilb(a)suse.de>
nfsd: make nfsd_stats.th_cnt atomic_t
NeilBrown <neilb(a)suse.de>
SUNRPC: stop using ->sv_nrthreads as a refcount
NeilBrown <neilb(a)suse.de>
SUNRPC/NFSD: clean up get/put functions.
NeilBrown <neilb(a)suse.de>
SUNRPC: change svc_get() to return the svc.
NeilBrown <neilb(a)suse.de>
NFSD: handle errors better in write_ports_addfd()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix sparse warning
Eric W. Biederman <ebiederm(a)xmission.com>
exit: Rename module_put_and_exit to module_put_and_kthread_exit
Eric W. Biederman <ebiederm(a)xmission.com>
exit: Implement kthread_exit
Amir Goldstein <amir73il(a)gmail.com>
fanotify: wire up FAN_RENAME event
Amir Goldstein <amir73il(a)gmail.com>
fanotify: report old and/or new parent+name in FAN_RENAME event
Amir Goldstein <amir73il(a)gmail.com>
fanotify: record either old name new name or both for FAN_RENAME
Amir Goldstein <amir73il(a)gmail.com>
fanotify: record old and new parent and name in FAN_RENAME event
Amir Goldstein <amir73il(a)gmail.com>
fanotify: support secondary dir fh and name in fanotify_info
Amir Goldstein <amir73il(a)gmail.com>
fanotify: use helpers to parcel fanotify_info buffer
Amir Goldstein <amir73il(a)gmail.com>
fanotify: use macros to get the offset to fanotify_info buffer
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: generate FS_RENAME event with rich information
Amir Goldstein <amir73il(a)gmail.com>
fanotify: introduce group flag FAN_REPORT_TARGET_FID
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: separate mark iterator type from object type enum
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: clarify object type argument
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix READDIR buffer overflow
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix exposure in nfsd4_decode_bitmap()
J. Bruce Fields <bfields(a)redhat.com>
nfsd4: remove obselete comment
Changcheng Deng <deng.changcheng(a)zte.com.cn>
NFSD:fix boolreturn.cocci warning
J. Bruce Fields <bfields(a)redhat.com>
nfsd: update create verifier comment
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Change return value type of .pc_encode
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Replace the "__be32 *p" parameter to .pc_encode
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Save location of NFSv4 COMPOUND status
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Change return value type of .pc_decode
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Replace the "__be32 *p" parameter to .pc_decode
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment()
Colin Ian King <colin.king(a)canonical.com>
NFSD: Initialize pointer ni with NULL and not plain integer 0
NeilBrown <neilb(a)suse.de>
NFSD: simplify struct nfsfh
NeilBrown <neilb(a)suse.de>
NFSD: drop support for ancient filehandles
NeilBrown <neilb(a)suse.de>
NFSD: move filehandle format declarations out of "uapi".
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Optimize DRC bucket pruning
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Trace calls to .rpc_call_done
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Allow users to request FAN_FS_ERROR events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Emit generic error info for error event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Report fid info for file related file system errors
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: WARN_ON against too large file handles
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Add helpers to decide whether to report FID/DFID
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Wrap object_fh inline space in a creator macro
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Support merging of error events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Support enqueueing of error events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Pre-allocate pool of error events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Reserve UAPI bits for FAN_FS_ERROR
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Support FS_ERROR event type
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Require fid_mode for any non-fd event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Encode empty file handle when no inode is provided
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Allow file handle encoding for unhashed events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Support null inode event in fanotify_dfid_inode
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Pass group argument to free_event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Protect fsnotify_handle_inode_event from no-inode events
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Retrieve super block from the data field
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Add wrapper around fsnotify_add_event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Add helper to detect overflow_event
Gabriel Krisman Bertazi <krisman(a)collabora.com>
inotify: Don't force FS_IN_IGNORED
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Split fsid check from other fid mode checks
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fanotify: Fold event size calculation to its own function
Gabriel Krisman Bertazi <krisman(a)collabora.com>
fsnotify: Don't insert unmergeable events in hashtable
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: clarify contract for create event hooks
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: pass dentry instead of inode data
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: pass data_type to fsnotify_name()
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Fix a warning for nfsd_file_close_inode
Chuck Lever <chuck.lever(a)oracle.com>
NLM: Fix svcxdr_encode_owner()
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: fix sb_connectors leak
Chuck Lever <chuck.lever(a)oracle.com>
NFS: Remove unused callback void decoder
Chuck Lever <chuck.lever(a)oracle.com>
NFS: Add a private local dispatcher for NFSv4 callback operations
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Eliminate the RQ_AUTHERR flag
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Set rq_auth_stat in the pg_authenticate() callout
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Add svc_rqst::rq_auth_stat
J. Bruce Fields <bfields(a)redhat.com>
nfs: don't allow reexport reclaims
J. Bruce Fields <bfields(a)redhat.com>
lockd: don't attempt blocking locks on nfs reexports
J. Bruce Fields <bfields(a)redhat.com>
nfs: don't atempt blocking locks on nfs reexports
J. Bruce Fields <bfields(a)redhat.com>
Keep read and write fds with each nlm_file
J. Bruce Fields <bfields(a)redhat.com>
lockd: update nlm_lookup_file reexport comment
J. Bruce Fields <bfields(a)redhat.com>
nlm: minor refactoring
J. Bruce Fields <bfields(a)redhat.com>
nlm: minor nlm_lookup_file argument change
Jia He <hejianet(a)gmail.com>
lockd: change the proc_handler for nsm_use_hostnames
Jia He <hejianet(a)gmail.com>
sysctl: introduce new proc handler proc_dobool
NeilBrown <neilb(a)suse.de>
NFSD: remove vanity comments
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Batch release pages during splice read
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Add svc_rqst_replace_page() API
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up splice actor
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: optimize the case of no marks of any type
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: count all objects with attached connectors
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: count s_fsnotify_inode_refs for attached connectors
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: replace igrab() with ihold() on attach connector
Matthew Bobrowski <repnop(a)google.com>
fanotify: add pidfd support to the fanotify API
Matthew Bobrowski <repnop(a)google.com>
fanotify: introduce a generic info record copying helper
Matthew Bobrowski <repnop(a)google.com>
fanotify: minor cosmetic adjustments to fid labels
Matthew Bobrowski <repnop(a)google.com>
kernel/pid.c: implement additional checks upon pidfd_create() parameters
Matthew Bobrowski <repnop(a)google.com>
kernel/pid.c: remove static qualifier from pidfd_create()
J. Bruce Fields <bfields(a)redhat.com>
nfsd: fix NULL dereference in nfs3svc_encode_getaclres
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Prevent a possible oops in the nfs_dirent() tracepoint
Colin Ian King <colin.king(a)canonical.com>
nfsd: remove redundant assignment to pointer 'this'
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 SHARE results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 nlm_res results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 TEST results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 void results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 FREE_ALL arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 SHARE arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 SM_NOTIFY arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 nlm_res arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 UNLOCK arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 CANCEL arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 LOCK arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 TEST arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv4 void arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 SHARE results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 nlm_res results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 TEST results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 void results encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 FREE_ALL arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 SHARE arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 SM_NOTIFY arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 nlm_res arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 UNLOCK arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 CANCEL arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 LOCK arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 TEST arguments decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Update the NLMv1 void argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Common NLM XDR helpers
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Create a simplified .vs_dispatch method for NLM requests
Chuck Lever <chuck.lever(a)oracle.com>
lockd: Remove stale comments
J. Bruce Fields <bfields(a)redhat.com>
nfsd: rpc_peeraddr2str needs rcu lock
Wei Yongjun <weiyongjun1(a)huawei.com>
NFSD: Fix error return code in nfsd4_interssc_connect()
Dai Ngo <dai.ngo(a)oracle.com>
nfsd: fix kernel test robot warning in SSC code
Dave Wysochanski <dwysocha(a)redhat.com>
nfsd4: Expose the callback address and state of each NFS4 client
J. Bruce Fields <bfields(a)redhat.com>
nfsd: move fsnotify on client creation outside spinlock
Dai Ngo <dai.ngo(a)oracle.com>
NFSD: delay unmount source's export after inter-server copy completed.
Olga Kornievskaia <kolga(a)netapp.com>
NFSD add vfs_fsync after async copy is done
J. Bruce Fields <bfields(a)redhat.com>
nfsd: move some commit_metadata()s outside the inode lock
Yu Hsiang Huang <nickhuang(a)synology.com>
nfsd: Prevent truncation of an unlinked inode from blocking access to its directory
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update nfsd_cb_args tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove the nfsd_cb_work and nfsd_cb_done tracepoints
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd_cb_probe tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace the nfsd_deleg_break tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd_cb_offload tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an nfsd_cb_lm_notify tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Enhance the nfsd_cb_setup tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Adjust cb_shutdown tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add cb_lost tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Drop TRACE_DEFINE_ENUM for NFSD4_CB_<state> macros
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Capture every CB state transition
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Constify @fh argument of knfsd_fh_hash()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints for EXCHANGEID edge cases
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints for SETCLIENTID edge cases
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a couple more nfsd_clid_expired call sites
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_destroyed tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_reclaim_complete tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_confirmed tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove trace_nfsd_clid_inuse_err
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_verf_mismatch tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add nfsd_clid_cred_mismatch tracepoint
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an RPC authflavor tracepoint display helper
Amir Goldstein <amir73il(a)gmail.com>
fanotify: fix permission model of unprivileged group
Trond Myklebust <trond.myklebust(a)hammerspace.com>
NFS: fix nfs_fetch_iversion()
Dai Ngo <dai.ngo(a)oracle.com>
NFSv4.2: Remove ifdef CONFIG_NFSD from NFSv4.2 client SSC code.
Gustavo A. R. Silva <gustavoars(a)kernel.org>
nfsd: Fix fall-through warnings for Clang
J. Bruce Fields <bfields(a)redhat.com>
nfsd: grant read delegations to clients holding writes
J. Bruce Fields <bfields(a)redhat.com>
nfsd: reshuffle some code
J. Bruce Fields <bfields(a)redhat.com>
nfsd: track filehandle aliasing in nfs4_files
J. Bruce Fields <bfields(a)redhat.com>
nfsd: hash nfs4_files by inode number
Vasily Averin <vvs(a)virtuozzo.com>
nfsd: removed unused argument in nfsd_startup_generic()
Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com>
nfsd: remove unused function
Christian Brauner <christian.brauner(a)ubuntu.com>
fanotify_user: use upper_32_bits() to verify mask
Amir Goldstein <amir73il(a)gmail.com>
fanotify: support limited functionality for unprivileged users
Amir Goldstein <amir73il(a)gmail.com>
fanotify: configurable limits via sysfs
Amir Goldstein <amir73il(a)gmail.com>
fanotify: limit number of event merge attempts
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: use hash table for faster events merge
Amir Goldstein <amir73il(a)gmail.com>
fanotify: mix event info and pid into merge key hash
Amir Goldstein <amir73il(a)gmail.com>
fanotify: reduce event objectid to 29-bit hash
Chuck Lever <chuck.lever(a)oracle.com>
Revert "fanotify: limit number of event merge attempts"
Amir Goldstein <amir73il(a)gmail.com>
fsnotify: allow fsnotify_{peek,remove}_first_event with empty queue
Guobin Huang <huangguobin4(a)huawei.com>
NFSD: Use DEFINE_SPINLOCK() for spinlock
Gustavo A. R. Silva <gustavoars(a)kernel.org>
UAPI: nfsfh.h: Replace one-element array with flexible-array member
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Export svc_xprt_received()
NeilBrown <neilb(a)suse.de>
nfsd: report client confirmation status in "info" file
J. Bruce Fields <bfields(a)redhat.com>
nfsd: don't ignore high bits of copy count
J. Bruce Fields <bfields(a)redhat.com>
nfsd: COPY with length 0 should copy to end of file
Ricardo Ribalda <ribalda(a)chromium.org>
nfsd: Fix typo "accesible"
Paul Menzel <pmenzel(a)molgen.mpg.de>
nfsd: Log client tracking type log message as info instead of warning
J. Bruce Fields <bfields(a)redhat.com>
nfsd: helper for laundromat expiry calculations
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up NFSDDBG_FACILITY macro
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a tracepoint to record directory entry encoding
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up after updating NFSv3 ACL encoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 SETACL result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 GETACL result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up after updating NFSv2 ACL encoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 ACL ACCESS result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 ACL GETATTR result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SETACL result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 GETACL result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an xdr_stream-based encoder for NFSv2/3 ACLs
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove unused NFSv2 directory entry encoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READDIR entry encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READDIR result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Count bytes instead of pages in the NFSv2 READDIR encoder
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper that encodes NFSv3 directory offset cookies, again
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 STATFS result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READ result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READLINK result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 diropres encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 attrstat encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 stat encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Reduce svc_rqst::rq_pages churn during READDIR operations
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove unused NFSv3 directory entry encoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update NFSv3 READDIR entry encoders to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 READDIR3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Count bytes instead of pages in the NFSv3 READDIR encoder
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper that encodes NFSv3 directory offset cookies
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 COMMIT3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 PATHCONF3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 FSINFO3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 FSSTAT3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 LINK3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 RENAMEv3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 CREATE family of encoders to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 WRITE3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 READ3res encode to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 READLINK3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 wccstat result encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 LOOKUP3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 ACCESS3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the GETATTR3res encoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Extract the svcxdr_init_encode() helper
Christian Brauner <christian.brauner(a)ubuntu.com>
namei: introduce struct renamedata
Christian Brauner <christian.brauner(a)ubuntu.com>
fs: add file and path permissions helpers
Christoph Hellwig <hch(a)lst.de>
kallsyms: only build {,module_}kallsyms_on_each_symbol when required
Christoph Hellwig <hch(a)lst.de>
kallsyms: refactor {,module_}kallsyms_on_each_symbol
Christoph Hellwig <hch(a)lst.de>
module: use RCU to synchronize find_module
Christoph Hellwig <hch(a)lst.de>
module: unexport find_module and module_mutex
Shakeel Butt <shakeelb(a)google.com>
inotify, memcg: account inotify instances to kmemcg
J. Bruce Fields <bfields(a)redhat.com>
nfsd: skip some unnecessary stats in the v4 case
J. Bruce Fields <bfields(a)redhat.com>
nfs: use change attribute for NFS re-exports
Dai Ngo <dai.ngo(a)oracle.com>
NFSv4_2: SSC helper should use its own config.
J. Bruce Fields <bfields(a)redhat.com>
nfsd: cstate->session->se_client -> cstate->clp
J. Bruce Fields <bfields(a)redhat.com>
nfsd: simplify nfsd4_check_open_reclaim
J. Bruce Fields <bfields(a)redhat.com>
nfsd: remove unused set_client argument
J. Bruce Fields <bfields(a)redhat.com>
nfsd: find_cpntf_state cleanup
J. Bruce Fields <bfields(a)redhat.com>
nfsd: refactor set_client
J. Bruce Fields <bfields(a)redhat.com>
nfsd: rename lookup_clientid->set_client
J. Bruce Fields <bfields(a)redhat.com>
nfsd: simplify nfsd_renew
J. Bruce Fields <bfields(a)redhat.com>
nfsd: simplify process_lock
J. Bruce Fields <bfields(a)redhat.com>
nfsd4: simplify process_lookup1
Amir Goldstein <amir73il(a)gmail.com>
nfsd: report per-export stats
Amir Goldstein <amir73il(a)gmail.com>
nfsd: protect concurrent access to nfsd stats counters
Amir Goldstein <amir73il(a)gmail.com>
nfsd: remove unused stats counters
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up after updating NFSv3 ACL decoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SETACL argument decoder to use struct xdr_stream, again
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 GETACL argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up after updating NFSv2 ACL decoders
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 ACL ACCESS argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 ACL GETATTR argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SETACL argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add an xdr_stream-based decoder for NFSv2/3 ACLs
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 GETACL argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove argument length checking in nfsd_dispatch()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SYMLINK argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 CREATE argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 SETATTR argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 LINK argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 RENAME argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update NFSv2 diropargs decoding to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READDIR argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to set up the pages where the dirlist is encoded, again
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READLINK argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 WRITE argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 READ argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv2 GETATTR argument decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the MKNOD3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the SYMLINK3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the MKDIR3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the CREATE3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the SETATTR3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the LINK3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the RENAME3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update the NFSv3 DIROPargs decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update COMMIT3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update READDIR3args decoders to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to set up the pages where the dirlist is encoded
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix returned READDIR offset cookie
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update READLINK3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update WRITE3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update READ3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update ACCESS3arg decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Update GETATTR3args decoder to use struct xdr_stream
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Move definition of XDR_UNIT
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Display RPC procedure names instead of proc numbers
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Make trace_svc_process() display the RPC procedure symbolically
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Restore NFSv4 decoding's SAVEMEM functionality
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Fix sparse warning in nfssvc.c
Zheng Yongjun <zhengyongjun3(a)huawei.com>
fs/lockd: convert comma to semicolon
Waiman Long <longman(a)redhat.com>
inotify: Increase default inotify.max_user_watches limit to 1048576
Eric W. Biederman <ebiederm(a)xmission.com>
file: Replace ksys_close with close_fd
Eric W. Biederman <ebiederm(a)xmission.com>
file: Rename __close_fd to close_fd and remove the files parameter
Eric W. Biederman <ebiederm(a)xmission.com>
file: Merge __alloc_fd into alloc_fd
Eric W. Biederman <ebiederm(a)xmission.com>
file: In f_dupfd read RLIMIT_NOFILE once.
Eric W. Biederman <ebiederm(a)xmission.com>
file: Merge __fd_install into fd_install
Eric W. Biederman <ebiederm(a)xmission.com>
proc/fd: In fdinfo seq_show don't use get_files_struct
Eric W. Biederman <ebiederm(a)xmission.com>
proc/fd: In proc_readfd_common use task_lookup_next_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Implement task_lookup_next_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
kcmp: In get_file_raw_ptr use task_lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
proc/fd: In tid_fd_mode use task_lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Implement task_lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Rename fcheck lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Replace fcheck_files with files_lookup_fd_rcu
Eric W. Biederman <ebiederm(a)xmission.com>
file: Factor files_lookup_fd_locked out of fcheck_files
Eric W. Biederman <ebiederm(a)xmission.com>
file: Rename __fcheck_files to files_lookup_fd_raw
Chuck Lever <chuck.lever(a)oracle.com>
Revert "fget: clarify and improve __fget_files() implementation"
Eric W. Biederman <ebiederm(a)xmission.com>
proc/fd: In proc_fd_link use fget_task
Eric W. Biederman <ebiederm(a)xmission.com>
bpf: In bpf_task_fd_query use fget_task
Eric W. Biederman <ebiederm(a)xmission.com>
kcmp: In kcmp_epoll_target use fget_task
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Remove reset_files_struct
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Simplify unshare_files
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Move unshare_files to fix posix file locking during exec
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Don't open code get_close_on_exec
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Record NFSv4 pre/post-op attributes as non-atomic
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Set PF_LOCAL_THROTTLE on local filesystems only
Trond Myklebust <trond.myklebust(a)hammerspace.com>
nfsd: Fix up nfsd to ensure that timeout errors don't result in ESTALE
Trond Myklebust <trond.myklebust(a)hammerspace.com>
exportfs: Add a function to return the raw output from fh_to_dentry()
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: close cached files prior to a REMOVE or RENAME that would replace target
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: allow filesystems to opt out of subtree checking
Jeff Layton <jeff.layton(a)primarydata.com>
nfsd: add a new EXPORT_OP_NOWCC flag to struct export_operations
J. Bruce Fields <bfields(a)redhat.com>
Revert "nfsd4: support change_attr_type attribute"
J. Bruce Fields <bfields(a)redhat.com>
nfsd4: don't query change attribute in v2/v3 case
J. Bruce Fields <bfields(a)redhat.com>
nfsd: minor nfsd4_change_attribute cleanup
J. Bruce Fields <bfields(a)redhat.com>
nfsd: simplify nfsd4_change_info
J. Bruce Fields <bfields(a)redhat.com>
nfsd: only call inode_query_iversion in the I_VERSION case
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove macros that are no longer used
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_compound()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Make nfsd4_ops::opnum a u32
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_listxattrs()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_setxattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_xattr_name()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_clone()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_seek()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_offload_status()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_copy_notify()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_copy()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_nl4_server()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_fallocate()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_reclaim_complete()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_destroy_clientid()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_test_stateid()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_sequence()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_secinfo_no_name()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_layoutreturn()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_layoutget()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_layoutcommit()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_getdeviceinfo()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_free_stateid()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_destroy_session()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_create_session()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper to decode channel_attrs4
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper to decode nfs_impl_id4
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a helper to decode state_protect4_a
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a separate decoder for ssv_sp_parms
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add a separate decoder to handle state_protect_ops
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_bind_conn_to_session()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_backchannel_ctl()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_cb_sec()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_release_lockowner()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_write()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_verify()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_setclientid_confirm()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_setclientid()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_setattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_secinfo()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_renew()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_rename()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_remove()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_readdir()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_read()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_putfh()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_open_downgrade()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_open_confirm()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_open()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to decode OPEN's open_claim4 argument
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_share_deny()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_share_access()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to decode OPEN's openflag4 argument
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to decode OPEN's createhow4 argument
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper to decode NFSv4 verifiers
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_lookup()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_locku()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_lockt()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_lock()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helper for decoding locker4
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add helpers to decode a clientid4 and an NFSv4 state owner
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Relocate nfsd4_decode_opaque()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_link()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_getattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_delegreturn()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_create()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_fattr()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 umask attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 security label attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 time_set attributes
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 owner_group attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 owner attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 mode attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 acl attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros that decode the fattr4 size attribute
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Change the way the expected length of a fattr4 is checked
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_commit()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_close()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace READ* macros in nfsd4_decode_access()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Replace the internals of the READ_BUF() macro
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints in nfsd4_decode/encode_compound()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add tracepoints in nfsd_dispatch()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add common helpers to decode void args and encode void results
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Prepare for xdr_stream-style decoding on the server-side
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Add xdr_set_scratch_page() and xdr_reset_scratch_buffer()
Huang Guobin <huangguobin4(a)huawei.com>
nfsd: Fix error return code in nfsd_file_cache_init()
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Add SPDX header for fs/nfsd/trace.c
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Remove extra "0x" in tracepoint format specifier
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Clean up the show_nf_may macro
Alex Shi <alex.shi(a)linux.alibaba.com>
nfsd/nfs3: remove unused macro nfsd3_fhandleres
Tom Rix <trix(a)redhat.com>
NFSD: A semicolon is not needed after a switch statement.
Chuck Lever <chuck.lever(a)oracle.com>
NFSD: Invoke svc_encode_result_payload() in "read" NFSD encoders
Chuck Lever <chuck.lever(a)oracle.com>
SUNRPC: Rename svc_encode_read_payload()
-------------
Diffstat:
Documentation/filesystems/files.rst | 8 +-
Documentation/filesystems/locking.rst | 10 +-
Documentation/filesystems/nfs/exporting.rst | 78 +
Makefile | 4 +-
arch/powerpc/platforms/cell/spufs/coredump.c | 2 +-
crypto/algboss.c | 4 +-
fs/Kconfig | 6 +-
fs/autofs/dev-ioctl.c | 5 +-
fs/cachefiles/namei.c | 9 +-
fs/cifs/connect.c | 2 +-
fs/coredump.c | 5 +-
fs/ecryptfs/inode.c | 10 +-
fs/exec.c | 29 +-
fs/exportfs/expfs.c | 40 +-
fs/file.c | 177 +-
fs/init.c | 6 +-
fs/lockd/clnt4xdr.c | 9 +-
fs/lockd/clntproc.c | 3 -
fs/lockd/host.c | 4 +-
fs/lockd/svc.c | 262 +-
fs/lockd/svc4proc.c | 70 +-
fs/lockd/svclock.c | 67 +-
fs/lockd/svcproc.c | 62 +-
fs/lockd/svcsubs.c | 123 +-
fs/lockd/svcxdr.h | 142 +
fs/lockd/xdr.c | 448 +--
fs/lockd/xdr4.c | 472 ++--
fs/locks.c | 102 +-
fs/namei.c | 21 +-
fs/nfs/blocklayout/blocklayout.c | 2 +-
fs/nfs/blocklayout/dev.c | 2 +-
fs/nfs/callback.c | 111 +-
fs/nfs/callback_xdr.c | 33 +-
fs/nfs/dir.c | 2 +-
fs/nfs/export.c | 17 +
fs/nfs/file.c | 3 +
fs/nfs/filelayout/filelayout.c | 4 +-
fs/nfs/filelayout/filelayoutdev.c | 2 +-
fs/nfs/flexfilelayout/flexfilelayout.c | 4 +-
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +-
fs/nfs/nfs42xdr.c | 2 +-
fs/nfs/nfs4state.c | 2 +-
fs/nfs/nfs4xdr.c | 6 +-
fs/nfs/pagelist.c | 3 -
fs/nfs/super.c | 8 +
fs/nfs/write.c | 3 -
fs/nfs_common/Makefile | 2 +-
fs/nfs_common/nfs_ssc.c | 2 -
fs/nfs_common/nfsacl.c | 123 +
fs/nfsd/Kconfig | 36 +-
fs/nfsd/Makefile | 8 +-
fs/nfsd/acl.h | 6 +-
fs/nfsd/blocklayout.c | 1 +
fs/nfsd/blocklayoutxdr.c | 1 +
fs/nfsd/cache.h | 2 +-
fs/nfsd/export.c | 74 +-
fs/nfsd/export.h | 16 +-
fs/nfsd/filecache.c | 1229 +++++----
fs/nfsd/filecache.h | 23 +-
fs/nfsd/flexfilelayout.c | 3 +-
fs/nfsd/lockd.c | 10 +-
fs/nfsd/netns.h | 63 +-
fs/nfsd/nfs2acl.c | 214 +-
fs/nfsd/nfs3acl.c | 140 +-
fs/nfsd/nfs3proc.c | 396 ++-
fs/nfsd/nfs3xdr.c | 1763 ++++++------
fs/nfsd/nfs4acl.c | 45 +-
fs/nfsd/nfs4callback.c | 168 +-
fs/nfsd/nfs4idmap.c | 9 +-
fs/nfsd/nfs4layouts.c | 4 +-
fs/nfsd/nfs4proc.c | 1111 +++++---
fs/nfsd/nfs4recover.c | 20 +-
fs/nfsd/nfs4state.c | 1725 ++++++++----
fs/nfsd/nfs4xdr.c | 3763 ++++++++++++++------------
fs/nfsd/nfscache.c | 115 +-
fs/nfsd/nfsctl.c | 169 +-
fs/nfsd/nfsd.h | 50 +-
fs/nfsd/nfsfh.c | 291 +-
fs/nfsd/nfsfh.h | 179 +-
fs/nfsd/nfsproc.c | 262 +-
fs/nfsd/nfssvc.c | 356 ++-
fs/nfsd/nfsxdr.c | 834 +++---
fs/nfsd/state.h | 69 +-
fs/nfsd/stats.c | 126 +-
fs/nfsd/stats.h | 96 +-
fs/nfsd/trace.c | 1 +
fs/nfsd/trace.h | 894 +++++-
fs/nfsd/vfs.c | 931 +++----
fs/nfsd/vfs.h | 60 +-
fs/nfsd/xdr.h | 68 +-
fs/nfsd/xdr3.h | 116 +-
fs/nfsd/xdr4.h | 127 +-
fs/nfsd/xdr4cb.h | 6 +
fs/notify/dnotify/dnotify.c | 17 +-
fs/notify/fanotify/fanotify.c | 487 +++-
fs/notify/fanotify/fanotify.h | 252 +-
fs/notify/fanotify/fanotify_user.c | 882 ++++--
fs/notify/fdinfo.c | 19 +-
fs/notify/fsnotify.c | 183 +-
fs/notify/fsnotify.h | 19 +-
fs/notify/group.c | 38 +-
fs/notify/inotify/inotify.h | 11 +-
fs/notify/inotify/inotify_fsnotify.c | 12 +-
fs/notify/inotify/inotify_user.c | 87 +-
fs/notify/mark.c | 172 +-
fs/notify/notification.c | 78 +-
fs/open.c | 49 +-
fs/overlayfs/overlayfs.h | 9 +-
fs/proc/fd.c | 48 +-
fs/udf/file.c | 2 +-
fs/verity/enable.c | 2 +-
include/linux/dnotify.h | 2 +-
include/linux/errno.h | 1 +
include/linux/exportfs.h | 15 +
include/linux/fanotify.h | 74 +-
include/linux/fdtable.h | 37 +-
include/linux/fs.h | 54 +-
include/linux/fsnotify.h | 77 +-
include/linux/fsnotify_backend.h | 372 ++-
include/linux/iversion.h | 13 +
include/linux/kallsyms.h | 17 +-
include/linux/kthread.h | 1 +
include/linux/lockd/bind.h | 3 +-
include/linux/lockd/lockd.h | 17 +-
include/linux/lockd/xdr.h | 35 +-
include/linux/lockd/xdr4.h | 33 +-
include/linux/module.h | 24 +-
include/linux/nfs.h | 8 -
include/linux/nfs4.h | 21 +-
include/linux/nfs_ssc.h | 14 +
include/linux/nfsacl.h | 6 +
include/linux/pid.h | 1 +
include/linux/sched/user.h | 3 -
include/linux/sunrpc/msg_prot.h | 3 -
include/linux/sunrpc/svc.h | 151 +-
include/linux/sunrpc/svc_rdma.h | 4 +-
include/linux/sunrpc/svc_xprt.h | 16 +-
include/linux/sunrpc/svcauth.h | 4 +-
include/linux/sunrpc/svcsock.h | 7 +-
include/linux/sunrpc/xdr.h | 153 +-
include/linux/syscalls.h | 12 -
include/linux/sysctl.h | 2 +
include/linux/user_namespace.h | 4 +
include/trace/events/sunrpc.h | 26 +-
include/uapi/linux/fanotify.h | 42 +
include/uapi/linux/nfs3.h | 6 +
include/uapi/linux/nfsd/nfsfh.h | 105 -
kernel/audit_fsnotify.c | 8 +-
kernel/audit_tree.c | 2 +-
kernel/audit_watch.c | 5 +-
kernel/bpf/inode.c | 2 +-
kernel/bpf/syscall.c | 20 +-
kernel/bpf/task_iter.c | 2 +-
kernel/fork.c | 12 +-
kernel/kallsyms.c | 8 +-
kernel/kcmp.c | 29 +-
kernel/kthread.c | 23 +-
kernel/livepatch/core.c | 7 +-
kernel/module.c | 26 +-
kernel/pid.c | 15 +-
kernel/sys.c | 2 +-
kernel/sysctl.c | 54 +-
kernel/trace/trace_kprobe.c | 4 +-
kernel/ucount.c | 4 +
mm/madvise.c | 2 +-
mm/memcontrol.c | 2 +-
mm/mincore.c | 2 +-
net/bluetooth/bnep/core.c | 2 +-
net/bluetooth/cmtp/core.c | 2 +-
net/bluetooth/hidp/core.c | 2 +-
net/sunrpc/auth_gss/gss_rpc_xdr.c | 2 +-
net/sunrpc/auth_gss/svcauth_gss.c | 47 +-
net/sunrpc/sched.c | 1 +
net/sunrpc/svc.c | 314 ++-
net/sunrpc/svc_xprt.c | 104 +-
net/sunrpc/svcauth.c | 8 +-
net/sunrpc/svcauth_unix.c | 18 +-
net/sunrpc/svcsock.c | 32 +-
net/sunrpc/xdr.c | 112 +-
net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 2 +-
net/sunrpc/xprtrdma/svc_rdma_sendto.c | 32 +-
net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +-
net/unix/af_unix.c | 2 +-
tools/objtool/check.c | 3 +-
184 files changed, 13912 insertions(+), 8825 deletions(-)
It could lead to error happen because the variable res is not updated if
the call to sr_share_read_word returns an error. In this particular case
error code was returned and res stayed uninitialized.
This can be avoided by checking the return value of sr_share_read_word
and propagating the error if the read operation failed.
Found by code review.
Cc: stable(a)vger.kernel.org
Fixes: c9b37458e956 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
Changes in v3:
- added Cc stable line as suggestions.
Changes in v2:
- modified the subject as suggestions.
---
drivers/net/usb/sr9700.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 0a662e42ed96..d5bc596f4521 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -179,6 +179,7 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
struct usbnet *dev = netdev_priv(netdev);
__le16 res;
int rc = 0;
+ int err;
if (phy_id) {
netdev_dbg(netdev, "Only internal phy supported\n");
@@ -193,7 +194,10 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
if (value & NSR_LINKST)
rc = 1;
}
- sr_share_read_word(dev, 1, loc, &res);
+ err = sr_share_read_word(dev, 1, loc, &res);
+ if (err < 0)
+ return err;
+
if (rc == 1)
res = le16_to_cpu(res) | BMSR_LSTATUS;
else
--
2.25.1
Because maxnode bug there is no way to bind or migrate_pages to the
last node in multi-node NUMA system unless you lie about maxnodes
when making the mbind, set_mempolicy or migrate_pages syscall.
Manpage for those syscall describe maxnodes as the number of bits in
the node bitmap ("bit mask of nodes containing up to maxnode bits").
Thus if maxnode is n then we expect to have a n bit(s) bitmap which
means that the mask of valid bits is ((1 << n) - 1). The get_nodes()
decrement lead to the mask being ((1 << (n - 1)) - 1).
The three syscalls use a common helper get_nodes() and first things
this helper do is decrement maxnode by 1 which leads to using n-1 bits
in the provided mask of nodes (see get_bitmap() an helper function to
get_nodes()).
The lead to two bugs, either the last node in the bitmap provided will
not be use in either of the three syscalls, or the syscalls will error
out and return EINVAL if the only bit set in the bitmap was the last
bit in the mask of nodes (which is ignored because of the bug and an
empty mask of nodes is an invalid argument).
I am surprised this bug was never caught ... it has been in the kernel
since forever.
People can use the following function to detect if the kernel has the
bug:
bool kernel_has_maxnodes_bug(void)
{
unsigned long nodemask = 1;
bool has_bug;
long res;
res = set_mempolicy(MPOL_BIND, &nodemask, 1);
has_bug = res && (errno == EINVAL);
set_mempolicy(MPOL_DEFAULT, NULL, 0);
return has_bug;
}
You can tested with any of the three program below:
gcc mbind.c -o mbind -lnuma
gcc set_mempolicy.c -o set_mempolicy -lnuma
gcc migrate_pages.c -o migrate_pages -lnuma
First argument is maxnode, second argument is the bit index to set in
the mask of node (0 set the first bit, 1 the second bit, ...).
./mbind 2 1 & sleep 2 && numastat -n -p `pidof mbind` && fg
./set_mempolicy 2 1 & sleep 2 && numastat -n -p `pidof set_mempolicy` && fg
./migrate_pages 2 1 & sleep 2 && numastat -n -p `pidof migrate_pages` && fg
mbind.c %< ----------------------------------------------------------
void *anon_mem(size_t size)
{
void *ret;
ret = mmap(NULL, size, PROT_READ|
PROT_WRITE, MAP_PRIVATE|
MAP_ANON, -1, 0);
return ret == MAP_FAILED ? NULL : ret;
}
unsigned long mround(unsigned long v, unsigned long m)
{
if (m == 0) {
return v;
}
return v + m - (v % m);
}
void bitmap_set(void *_bitmap, unsigned long b)
{
uint8_t *bitmap = _bitmap;
bitmap[b >> 3] |= (1 << (b & 7));
}
int main(int argc, char *argv[])
{
unsigned long *nodemask, maxnode, node, i;
size_t bytes;
int8_t *mem;
long res;
if (argv[1] == NULL || argv[2] == NULL) {
printf("missing argument: %s maxnodes node\n", argv[0]);
return -1;
}
maxnode = atoi(argv[1]);
node = atoi(argv[2]);
bytes = mround(mround(maxnode, 8) >> 3,
sizeof(unsigned long));
nodemask = calloc(bytes, 1);
mem = anon_mem(NPAGES << 12);
if (!mem || !nodemask) {
return -1;
}
// Try to bind memory to node
bitmap_set(nodemask, node);
res = mbind(mem, NPAGES << 12, MPOL_BIND,
nodemask, maxnode, 0);
if (res) {
printf("mbind(mem, NPAGES << 12, MPOL_BIND, "
"nodemask, %d, 0) failed with %d\n",
maxnode, errno);
return -1;
}
// Write something to breakup from the zero page
for (unsigned i = 0; i < NPAGES; i++) {
mem[i << 12] = i + 1;
}
// Allow numastats to gather statistics
getchar();
return 0;
}
set_mempolicy %< ----------------------------------------------------
void *anon_mem(size_t size)
{
void *ret;
ret = mmap(NULL, size, PROT_READ|
PROT_WRITE, MAP_PRIVATE|
MAP_ANON, -1, 0);
return ret == MAP_FAILED ? NULL : ret;
}
unsigned long mround(unsigned long v, unsigned long m)
{
if (m == 0) {
return v;
}
return v + m - (v % m);
}
void bitmap_set(void *_bitmap, unsigned long b)
{
uint8_t *bitmap = _bitmap;
bitmap[b >> 3] |= (1 << (b & 7));
}
int main(int argc, char *argv[])
{
unsigned long *nodemask, maxnode, node, i;
size_t bytes;
int8_t *mem;
long res;
if (argv[1] == NULL || argv[2] == NULL) {
printf("missing argument: %s maxnodes node\n", argv[0]);
return -1;
}
maxnode = atoi(argv[1]);
node = atoi(argv[2]);
// bind memory to node 0 ...
i = 1;
res = set_mempolicy(MPOL_BIND, i, 2);
if (res) {
printf("set_mempolicy(MPOL_BIND, []=1, %d) "
"failed with %d\n", maxnode, errno);
return -1;
}
bytes = mround(mround(maxnode, 8) >> 3,
sizeof(unsigned long));
nodemask = calloc(bytes, 1);
mem = anon_mem(NPAGES << 12);
if (!mem || !nodemask) {
return -1;
}
// Try to bind memory to node
bitmap_set(nodemask, node);
res = set_mempolicy(MPOL_BIND, nodemask, maxnode);
if (res) {
printf("set_mempolicy(MPOL_BIND, nodemask, %d) "
"failed with %d\n", maxnode, errno);
return -1;
}
// Write something to breakup from the zero page
for (unsigned i = 0; i < NPAGES; i++) {
mem[i << 12] = i + 1;
}
// Allow numastats to gather statistics
getchar();
return 0;
}
migrate_pages %< ----------------------------------------------------
void *anon_mem(size_t size)
{
void *ret;
ret = mmap(NULL, size, PROT_READ|
PROT_WRITE, MAP_PRIVATE|
MAP_ANON, -1, 0);
return ret == MAP_FAILED ? NULL : ret;
}
unsigned long mround(unsigned long v, unsigned long m)
{
if (m == 0) {
return v;
}
return v + m - (v % m);
}
void bitmap_set(void *_bitmap, unsigned long b)
{
uint8_t *bitmap = _bitmap;
bitmap[b >> 3] |= (1 << (b & 7));
}
int main(int argc, char *argv[])
{
unsigned long *old_nodes, *new_nodes, maxnode, node, i;
size_t bytes;
int8_t *mem;
long res;
if (argv[1] == NULL || argv[2] == NULL) {
printf("missing argument: %s maxnodes node\n", argv[0]);
return -1;
}
maxnode = atoi(argv[1]);
node = atoi(argv[2]);
// bind memory to node 0 ...
i = 1;
res = set_mempolicy(MPOL_BIND, &i, 2);
if (res) {
printf("set_mempolicy(MPOL_BIND, []=1, %d) "
"failed with %d\n", maxnode, errno);
return -1;
}
bytes = mround(mround(maxnode, 8) >> 3,
sizeof(unsigned long));
old_nodes = calloc(bytes, 1);
new_nodes = calloc(bytes, 1);
mem = anon_mem(NPAGES << 12);
if (!mem || !new_nodes || !old_nodes) {
return -1;
}
// Write something to breakup from the zero page
for (unsigned i = 0; i < NPAGES; i++) {
mem[i << 12] = i + 1;
}
// Try to bind memory to node
bitmap_set(old_nodes, 0);
bitmap_set(new_nodes, node);
res = migrate_pages(getpid(), maxnode,
old_nodes, new_nodes);
if (res) {
printf("migrate_pages(pid, %d, old_nodes, "
"new_nodes) failed with %d\n",
maxnode, errno);
return -1;
}
// Allow numastats to gather statistics
getchar();
return 0;
}
Signed-off-by: Jérôme Glisse <jglisse(a)google.com>
To: Andrew Morton <akpm(a)linux-foundation.org>
To: linux-mm(a)kvack.org
Cc: linux-kernel(a)vger.kernel.org
Cc: stable(a)vger.kernel.org
---
mm/mempolicy.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index aec756ae5637..658e5366d266 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1434,7 +1434,6 @@ static int get_bitmap(unsigned long *mask, const unsigned long __user *nmask,
static int get_nodes(nodemask_t *nodes, const unsigned long __user *nmask,
unsigned long maxnode)
{
- --maxnode;
nodes_clear(*nodes);
if (maxnode == 0 || !nmask)
return 0;
--
2.45.2.1089.g2a221341d9-goog
The patch titled
Subject: crash: fix x86_32 crash memory reserve dead loop bug at high
has been added to the -mm mm-nonmm-unstable branch. Its filename is
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug-at-high.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Jinjie Ruan <ruanjinjie(a)huawei.com>
Subject: crash: fix x86_32 crash memory reserve dead loop bug at high
Date: Thu, 18 Jul 2024 11:54:43 +0800
On x86_32 Qemu machine with 1GB memory, the cmdline "crashkernel=512M" will
also cause system stall as below:
ACPI: Reserving FACP table memory at [mem 0x3ffe18b8-0x3ffe192b]
ACPI: Reserving DSDT table memory at [mem 0x3ffe0040-0x3ffe18b7]
ACPI: Reserving FACS table memory at [mem 0x3ffe0000-0x3ffe003f]
ACPI: Reserving APIC table memory at [mem 0x3ffe192c-0x3ffe19bb]
ACPI: Reserving HPET table memory at [mem 0x3ffe19bc-0x3ffe19f3]
ACPI: Reserving WAET table memory at [mem 0x3ffe19f4-0x3ffe1a1b]
143MB HIGHMEM available.
879MB LOWMEM available.
mapped low ram: 0 - 36ffe000
low ram: 0 - 36ffe000
(stall here)
The reason is that the CRASH_ADDR_LOW_MAX is equal to CRASH_ADDR_HIGH_MAX
on x86_32, the first "low" crash kernel memory reservation for 512M fails,
then it go into the "retry" loop and never came out as below (consider
CRASH_ADDR_LOW_MAX = CRASH_ADDR_HIGH_MAX = 512M):
-> reserve_crashkernel_generic() and high is false
-> alloc at [0, 0x20000000] fail
-> alloc at [0x20000000, 0x20000000] fail and repeatedly
(because CRASH_ADDR_LOW_MAX = CRASH_ADDR_HIGH_MAX).
Fix it by skipping meaningless calls of memblock_phys_alloc_range() with
`start = end`
After this patch, the retry dead loop is avoided and print below info:
cannot allocate crashkernel (size:0x20000000)
And apply generic crashkernel reservation to 32bit system will be ready.
Link: https://lkml.kernel.org/r/20240718035444.2977105-3-ruanjinjie@huawei.com
Fixes: 9c08a2a139fe ("x86: kdump: use generic interface to simplify crashkernel reservation code")
Signed-off-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
Signed-off-by: Baoquan He <bhe(a)redhat.com>
Tested-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
Cc: Albert Ou <aou(a)eecs.berkeley.edu>
Cc: Andrew Davis <afd(a)ti.com>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Chen Jiahao <chenjiahao16(a)huawei.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: Dave Young <dyoung(a)redhat.com>
Cc: Eric DeVolder <eric.devolder(a)oracle.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Hari Bathini <hbathini(a)linux.ibm.com>
Cc: Helge Deller <deller(a)gmx.de>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: Javier Martinez Canillas <javierm(a)redhat.com>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: Palmer Dabbelt <palmer(a)dabbelt.com>
Cc: Paul Walmsley <paul.walmsley(a)sifive.com>
Cc: Rob Herring <robh(a)kernel.org>
Cc: Russell King <linux(a)armlinux.org.uk>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Vivek Goyal <vgoyal(a)redhat.com>
Cc: Will Deacon <will(a)kernel.org>
Cc: Zhen Lei <thunder.leizhen(a)huawei.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
kernel/crash_reserve.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/kernel/crash_reserve.c~crash-fix-x86_32-crash-memory-reserve-dead-loop-bug-at-high
+++ a/kernel/crash_reserve.c
@@ -413,7 +413,8 @@ retry:
search_end = CRASH_ADDR_HIGH_MAX;
search_base = CRASH_ADDR_LOW_MAX;
crash_low_size = DEFAULT_CRASH_KERNEL_LOW_SIZE;
- goto retry;
+ if (search_base != search_end)
+ goto retry;
}
/*
_
Patches currently in -mm which might be from ruanjinjie(a)huawei.com are
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug.patch
crash-fix-x86_32-crash-memory-reserve-dead-loop-bug-at-high.patch
arm-use-generic-interface-to-simplify-crashkernel-reservation.patch