From: Greg Kroah-Hartman Date: Fri, 17 Oct 2025 14:19:38 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v5.15.195~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=656224010ec188e2a608ef416e45750b8cdb6695;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: asoc-sof-ipc4-pcm-fix-start-offset-calculation-for-chain-dma.patch nfsd-fix-__fh_verify-for-localio.patch nfsd-fix-access-checking-for-nlm-under-xprtsec-policies.patch perf-test-stat-avoid-hybrid-assumption-when-virtualized.patch --- diff --git a/queue-6.12/asoc-sof-ipc4-pcm-fix-start-offset-calculation-for-chain-dma.patch b/queue-6.12/asoc-sof-ipc4-pcm-fix-start-offset-calculation-for-chain-dma.patch new file mode 100644 index 0000000000..81a3a74f8e --- /dev/null +++ b/queue-6.12/asoc-sof-ipc4-pcm-fix-start-offset-calculation-for-chain-dma.patch @@ -0,0 +1,93 @@ +From bace10b59624e6bd8d68bc9304357f292f1b3dcf Mon Sep 17 00:00:00 2001 +From: Kai Vehmanen +Date: Thu, 2 Oct 2025 10:47:16 +0300 +Subject: ASoC: SOF: ipc4-pcm: fix start offset calculation for chain DMA +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Kai Vehmanen + +commit bace10b59624e6bd8d68bc9304357f292f1b3dcf upstream. + +Assumption that chain DMA module starts the link DMA when 1ms of +data is available from host is not correct. Instead the firmware +chain DMA module fills the link DMA with initial buffer of zeroes +and the host and link DMAs are started at the same time. + +This results in a small error in delay calculation. This can become a +more severe problem if host DMA has delays that exceed 1ms. This results +in negative delay to be calculated and bogus values reported to +applications. This can confuse some applications like +alsa_conformance_test. + +Fix the issue by correctly calculating the firmware chain DMA +preamble size and initializing the start offset to this value. + +Cc: stable@vger.kernel.org +Fixes: a1d203d390e0 ("ASoC: SOF: ipc4-pcm: Enable delay reporting for ChainDMA streams") +Signed-off-by: Kai Vehmanen +Reviewed-by: Péter Ujfalusi +Reviewed-by: Bard Liao +Signed-off-by: Peter Ujfalusi +Link: https://patch.msgid.link/20251002074719.2084-3-peter.ujfalusi@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/sof/ipc4-pcm.c | 14 ++++++++++---- + sound/soc/sof/ipc4-topology.c | 1 - + sound/soc/sof/ipc4-topology.h | 2 ++ + 3 files changed, 12 insertions(+), 5 deletions(-) + +--- a/sound/soc/sof/ipc4-pcm.c ++++ b/sound/soc/sof/ipc4-pcm.c +@@ -992,7 +992,7 @@ static int sof_ipc4_get_stream_start_off + return -EINVAL; + } else if (host_copier->data.gtw_cfg.node_id == SOF_IPC4_CHAIN_DMA_NODE_ID) { + /* +- * While the firmware does not supports time_info reporting for ++ * While the firmware does not support time_info reporting for + * streams using ChainDMA, it is granted that ChainDMA can only + * be used on Host+Link pairs where the link position is + * accessible from the host side. +@@ -1000,10 +1000,16 @@ static int sof_ipc4_get_stream_start_off + * Enable delay calculation in case of ChainDMA via host + * accessible registers. + * +- * The ChainDMA uses 2x 1ms ping-pong buffer, dai side starts +- * when 1ms data is available ++ * The ChainDMA prefills the link DMA with a preamble ++ * of zero samples. Set the stream start offset based ++ * on size of the preamble (driver provided fifo size ++ * multiplied by 2.5). We add 1ms of margin as the FW ++ * will align the buffer size to DMA hardware ++ * alignment that is not known to host. + */ +- time_info->stream_start_offset = substream->runtime->rate / MSEC_PER_SEC; ++ int pre_ms = SOF_IPC4_CHAIN_DMA_BUF_SIZE_MS * 5 / 2 + 1; ++ ++ time_info->stream_start_offset = pre_ms * substream->runtime->rate / MSEC_PER_SEC; + goto out; + } + +--- a/sound/soc/sof/ipc4-topology.c ++++ b/sound/soc/sof/ipc4-topology.c +@@ -32,7 +32,6 @@ MODULE_PARM_DESC(ipc4_ignore_cpc, + + #define SOF_IPC4_GAIN_PARAM_ID 0 + #define SOF_IPC4_TPLG_ABI_SIZE 6 +-#define SOF_IPC4_CHAIN_DMA_BUF_SIZE_MS 2 + + static DEFINE_IDA(alh_group_ida); + static DEFINE_IDA(pipeline_ida); +--- a/sound/soc/sof/ipc4-topology.h ++++ b/sound/soc/sof/ipc4-topology.h +@@ -250,6 +250,8 @@ struct sof_ipc4_dma_stream_ch_map { + #define SOF_IPC4_DMA_METHOD_HDA 1 + #define SOF_IPC4_DMA_METHOD_GPDMA 2 /* defined for consistency but not used */ + ++#define SOF_IPC4_CHAIN_DMA_BUF_SIZE_MS 2 ++ + /** + * struct sof_ipc4_dma_config: DMA configuration + * @dma_method: HDAudio or GPDMA diff --git a/queue-6.12/nfsd-fix-__fh_verify-for-localio.patch b/queue-6.12/nfsd-fix-__fh_verify-for-localio.patch new file mode 100644 index 0000000000..cc121d7390 --- /dev/null +++ b/queue-6.12/nfsd-fix-__fh_verify-for-localio.patch @@ -0,0 +1,36 @@ +From d9d6b74e4be989f919498798fa40df37a74b5bb0 Mon Sep 17 00:00:00 2001 +From: Olga Kornievskaia +Date: Tue, 28 Jan 2025 11:58:06 -0500 +Subject: nfsd: fix __fh_verify for localio + +From: Olga Kornievskaia + +commit d9d6b74e4be989f919498798fa40df37a74b5bb0 upstream. + +__fh_verify() added a call to svc_xprt_set_valid() to help do connection +management but during LOCALIO path rqstp argument is NULL, leading to +NULL pointer dereferencing and a crash. + +Fixes: eccbbc7c00a5 ("nfsd: don't use sv_nrthreads in connection limiting calculations.") +Signed-off-by: Olga Kornievskaia +Reviewed-by: Jeff Layton +Signed-off-by: Chuck Lever +Signed-off-by: Greg Kroah-Hartman +--- + fs/nfsd/nfsfh.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/fs/nfsd/nfsfh.c ++++ b/fs/nfsd/nfsfh.c +@@ -381,8 +381,9 @@ __fh_verify(struct svc_rqst *rqstp, + error = check_nfsd_access(exp, rqstp, may_bypass_gss); + if (error) + goto out; +- +- svc_xprt_set_valid(rqstp->rq_xprt); ++ /* During LOCALIO call to fh_verify will be called with a NULL rqstp */ ++ if (rqstp) ++ svc_xprt_set_valid(rqstp->rq_xprt); + + /* Finally, check access permissions. */ + error = nfsd_permission(cred, exp, dentry, access); diff --git a/queue-6.12/nfsd-fix-access-checking-for-nlm-under-xprtsec-policies.patch b/queue-6.12/nfsd-fix-access-checking-for-nlm-under-xprtsec-policies.patch new file mode 100644 index 0000000000..358e8d94f2 --- /dev/null +++ b/queue-6.12/nfsd-fix-access-checking-for-nlm-under-xprtsec-policies.patch @@ -0,0 +1,40 @@ +From 0813c5f01249dbc32ccbc68d27a24fde5bf2901c Mon Sep 17 00:00:00 2001 +From: Olga Kornievskaia +Date: Fri, 21 Mar 2025 20:13:04 -0400 +Subject: nfsd: fix access checking for NLM under XPRTSEC policies + +From: Olga Kornievskaia + +commit 0813c5f01249dbc32ccbc68d27a24fde5bf2901c upstream. + +When an export policy with xprtsec policy is set with "tls" +and/or "mtls", but an NFS client is doing a v3 xprtsec=tls +mount, then NLM locking calls fail with an error because +there is currently no support for NLM with TLS. + +Until such support is added, allow NLM calls under TLS-secured +policy. + +Fixes: 4cc9b9f2bf4d ("nfsd: refine and rename NFSD_MAY_LOCK") +Cc: stable@vger.kernel.org +Signed-off-by: Olga Kornievskaia +Reviewed-by: NeilBrown +Reviewed-by: Jeff Layton +Signed-off-by: Chuck Lever +Signed-off-by: Greg Kroah-Hartman +--- + fs/nfsd/export.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/fs/nfsd/export.c ++++ b/fs/nfsd/export.c +@@ -1115,7 +1115,8 @@ __be32 check_nfsd_access(struct svc_expo + test_bit(XPT_PEER_AUTH, &xprt->xpt_flags)) + goto ok; + } +- goto denied; ++ if (!may_bypass_gss) ++ goto denied; + + ok: + /* legacy gss-only clients are always OK: */ diff --git a/queue-6.12/perf-test-stat-avoid-hybrid-assumption-when-virtualized.patch b/queue-6.12/perf-test-stat-avoid-hybrid-assumption-when-virtualized.patch new file mode 100644 index 0000000000..55d60dc2a5 --- /dev/null +++ b/queue-6.12/perf-test-stat-avoid-hybrid-assumption-when-virtualized.patch @@ -0,0 +1,45 @@ +From f9c506fb69bdcfb9d7138281378129ff037f2aa1 Mon Sep 17 00:00:00 2001 +From: Ian Rogers +Date: Thu, 12 Dec 2024 09:33:54 -0800 +Subject: perf test stat: Avoid hybrid assumption when virtualized + +From: Ian Rogers + +commit f9c506fb69bdcfb9d7138281378129ff037f2aa1 upstream. + +The cycles event will fallback to task-clock in the hybrid test when +running virtualized. Change the test to not fail for this. + +Fixes: 65d11821910bd910 ("perf test: Add a test for default perf stat command") +Reviewed-by: James Clark +Signed-off-by: Ian Rogers +Acked-by: Namhyung Kim +Cc: Adrian Hunter +Cc: Alexander Shishkin +Cc: Ingo Molnar +Cc: Jiri Olsa +Cc: Kan Liang +Cc: Mark Rutland +Cc: Peter Zijlstra +Link: https://lore.kernel.org/r/20241212173354.9860-1-irogers@google.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/tests/shell/stat.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/tools/perf/tests/shell/stat.sh ++++ b/tools/perf/tests/shell/stat.sh +@@ -161,7 +161,11 @@ test_hybrid() { + # Run default Perf stat + cycles_events=$(perf stat -- true 2>&1 | grep -E "/cycles/[uH]*| cycles[:uH]* " -c) + +- if [ "$pmus" -ne "$cycles_events" ] ++ # The expectation is that default output will have a cycles events on each ++ # hybrid PMU. In situations with no cycles PMU events, like virtualized, this ++ # can fall back to task-clock and so the end count may be 0. Fail if neither ++ # condition holds. ++ if [ "$pmus" -ne "$cycles_events" ] && [ "0" -ne "$cycles_events" ] + then + echo "hybrid test [Found $pmus PMUs but $cycles_events cycles events. Failed]" + err=1 diff --git a/queue-6.12/series b/queue-6.12/series index 5bc91f66be..3631b9acb5 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -271,3 +271,7 @@ cramfs-verify-inode-mode-when-loading-from-disk.patch writeback-avoid-softlockup-when-switching-many-inode.patch writeback-avoid-excessively-long-inode-switching-tim.patch sched-fair-block-delayed-tasks-on-throttled-hierarchy-during-dequeue.patch +perf-test-stat-avoid-hybrid-assumption-when-virtualized.patch +nfsd-fix-__fh_verify-for-localio.patch +nfsd-fix-access-checking-for-nlm-under-xprtsec-policies.patch +asoc-sof-ipc4-pcm-fix-start-offset-calculation-for-chain-dma.patch