From 43adf9b316384367c47fc5e6e20ba120a50d67ad Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 8 Feb 2026 13:15:47 +0100 Subject: [PATCH] 6.1-stable patches added patches: gve-correct-ethtool-rx_dropped-calculation.patch gve-fix-stats-report-corruption-on-queue-count-change.patch kvm-selftests-add-u_fortify_source-to-avoid-some-unpredictable-test-failures.patch pmdomain-imx8m-blk-ctrl-fix-out-of-range-access-of-bc-domains.patch pmdomain-imx8mp-blk-ctrl-keep-gpc-power-domain-on-for-system-wakeup.patch pmdomain-imx8mp-blk-ctrl-keep-usb-phy-power-domain-on-for-system-wakeup.patch tracing-fix-ftrace-event-field-alignments.patch --- ...rrect-ethtool-rx_dropped-calculation.patch | 60 ++++++ ...ort-corruption-on-queue-count-change.patch | 124 ++++++++++++ ...oid-some-unpredictable-test-failures.patch | 53 +++++ ...ix-out-of-range-access-of-bc-domains.patch | 36 ++++ ...pc-power-domain-on-for-system-wakeup.patch | 113 +++++++++++ ...hy-power-domain-on-for-system-wakeup.patch | 56 ++++++ queue-6.1/series | 7 + ...ng-fix-ftrace-event-field-alignments.patch | 188 ++++++++++++++++++ 8 files changed, 637 insertions(+) create mode 100644 queue-6.1/gve-correct-ethtool-rx_dropped-calculation.patch create mode 100644 queue-6.1/gve-fix-stats-report-corruption-on-queue-count-change.patch create mode 100644 queue-6.1/kvm-selftests-add-u_fortify_source-to-avoid-some-unpredictable-test-failures.patch create mode 100644 queue-6.1/pmdomain-imx8m-blk-ctrl-fix-out-of-range-access-of-bc-domains.patch create mode 100644 queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-gpc-power-domain-on-for-system-wakeup.patch create mode 100644 queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-usb-phy-power-domain-on-for-system-wakeup.patch create mode 100644 queue-6.1/tracing-fix-ftrace-event-field-alignments.patch diff --git a/queue-6.1/gve-correct-ethtool-rx_dropped-calculation.patch b/queue-6.1/gve-correct-ethtool-rx_dropped-calculation.patch new file mode 100644 index 0000000000..b918626b06 --- /dev/null +++ b/queue-6.1/gve-correct-ethtool-rx_dropped-calculation.patch @@ -0,0 +1,60 @@ +From stable+bounces-214822-greg=kroah.com@vger.kernel.org Sat Feb 7 20:15:44 2026 +From: Sasha Levin +Date: Sat, 7 Feb 2026 14:15:27 -0500 +Subject: gve: Correct ethtool rx_dropped calculation +To: stable@vger.kernel.org +Cc: Max Yuan , Jordan Rhee , Joshua Washington , Matt Olson , Harshitha Ramamurthy , Jacob Keller , Jakub Kicinski , Sasha Levin +Message-ID: <20260207191527.516750-1-sashal@kernel.org> + +From: Max Yuan + +[ Upstream commit c7db85d579a1dccb624235534508c75fbf2dfe46 ] + +The gve driver's "rx_dropped" statistic, exposed via `ethtool -S`, +incorrectly includes `rx_buf_alloc_fail` counts. These failures +represent an inability to allocate receive buffers, not true packet +drops where a received packet is discarded. This misrepresentation can +lead to inaccurate diagnostics. + +This patch rectifies the ethtool "rx_dropped" calculation. It removes +`rx_buf_alloc_fail` from the total and adds `xdp_tx_errors` and +`xdp_redirect_errors`, which represent legitimate packet drops within +the XDP path. + +Cc: stable@vger.kernel.org +Fixes: 433e274b8f7b ("gve: Add stats for gve.") +Signed-off-by: Max Yuan +Reviewed-by: Jordan Rhee +Reviewed-by: Joshua Washington +Reviewed-by: Matt Olson +Signed-off-by: Harshitha Ramamurthy +Reviewed-by: Jacob Keller +Link: https://patch.msgid.link/20260202193925.3106272-3-hramamurthy@google.com +Signed-off-by: Jakub Kicinski +[ Context + variable naming ] +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/google/gve/gve_ethtool.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/net/ethernet/google/gve/gve_ethtool.c ++++ b/drivers/net/ethernet/google/gve/gve_ethtool.c +@@ -216,8 +216,7 @@ gve_get_ethtool_stats(struct net_device + data[i++] = rx_bytes; + data[i++] = tx_bytes; + /* total rx dropped packets */ +- data[i++] = rx_skb_alloc_fail + rx_buf_alloc_fail + +- rx_desc_err_dropped_pkt; ++ data[i++] = rx_skb_alloc_fail + rx_desc_err_dropped_pkt; + data[i++] = tx_dropped; + data[i++] = priv->tx_timeo_cnt; + data[i++] = rx_skb_alloc_fail; +@@ -293,7 +292,6 @@ gve_get_ethtool_stats(struct net_device + data[i++] = rx->rx_frag_copy_cnt; + /* rx dropped packets */ + data[i++] = tmp_rx_skb_alloc_fail + +- tmp_rx_buf_alloc_fail + + tmp_rx_desc_err_dropped_pkt; + data[i++] = rx->rx_copybreak_pkt; + data[i++] = rx->rx_copied_pkt; diff --git a/queue-6.1/gve-fix-stats-report-corruption-on-queue-count-change.patch b/queue-6.1/gve-fix-stats-report-corruption-on-queue-count-change.patch new file mode 100644 index 0000000000..91b789e391 --- /dev/null +++ b/queue-6.1/gve-fix-stats-report-corruption-on-queue-count-change.patch @@ -0,0 +1,124 @@ +From stable+bounces-214813-greg=kroah.com@vger.kernel.org Sat Feb 7 18:43:48 2026 +From: Sasha Levin +Date: Sat, 7 Feb 2026 12:43:39 -0500 +Subject: gve: Fix stats report corruption on queue count change +To: stable@vger.kernel.org +Cc: Debarghya Kundu , Joshua Washington , Harshitha Ramamurthy , Jacob Keller , Jakub Kicinski , Sasha Levin +Message-ID: <20260207174339.471643-1-sashal@kernel.org> + +From: Debarghya Kundu + +[ Upstream commit 7b9ebcce0296e104a0d82a6b09d68564806158ff ] + +The driver and the NIC share a region in memory for stats reporting. +The NIC calculates its offset into this region based on the total size +of the stats region and the size of the NIC's stats. + +When the number of queues is changed, the driver's stats region is +resized. If the queue count is increased, the NIC can write past +the end of the allocated stats region, causing memory corruption. +If the queue count is decreased, there is a gap between the driver +and NIC stats, leading to incorrect stats reporting. + +This change fixes the issue by allocating stats region with maximum +size, and the offset calculation for NIC stats is changed to match +with the calculation of the NIC. + +Cc: stable@vger.kernel.org +Fixes: 24aeb56f2d38 ("gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags.") +Signed-off-by: Debarghya Kundu +Reviewed-by: Joshua Washington +Signed-off-by: Harshitha Ramamurthy +Reviewed-by: Jacob Keller +Link: https://patch.msgid.link/20260202193925.3106272-2-hramamurthy@google.com +Signed-off-by: Jakub Kicinski +[ gve_num_tx_queues() => priv->tx_cfg.num_queues and no stopped queues ] +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/google/gve/gve_ethtool.c | 42 +++++++++++++++++--------- + drivers/net/ethernet/google/gve/gve_main.c | 4 +- + 2 files changed, 31 insertions(+), 15 deletions(-) + +--- a/drivers/net/ethernet/google/gve/gve_ethtool.c ++++ b/drivers/net/ethernet/google/gve/gve_ethtool.c +@@ -145,7 +145,8 @@ gve_get_ethtool_stats(struct net_device + tmp_tx_pkts, tmp_tx_bytes; + u64 rx_buf_alloc_fail, rx_desc_err_dropped_pkt, rx_pkts, + rx_skb_alloc_fail, rx_bytes, tx_pkts, tx_bytes, tx_dropped; +- int stats_idx, base_stats_idx, max_stats_idx; ++ int rx_base_stats_idx, max_rx_stats_idx, max_tx_stats_idx; ++ int stats_idx, stats_region_len, nic_stats_len; + struct stats *report_stats; + int *rx_qid_to_stats_idx; + int *tx_qid_to_stats_idx; +@@ -230,14 +231,33 @@ gve_get_ethtool_stats(struct net_device + data[i++] = priv->stats_report_trigger_cnt; + i = GVE_MAIN_STATS_LEN; + +- /* For rx cross-reporting stats, start from nic rx stats in report */ +- base_stats_idx = GVE_TX_STATS_REPORT_NUM * priv->tx_cfg.num_queues + +- GVE_RX_STATS_REPORT_NUM * priv->rx_cfg.num_queues; +- max_stats_idx = NIC_RX_STATS_REPORT_NUM * priv->rx_cfg.num_queues + +- base_stats_idx; ++ rx_base_stats_idx = 0; ++ max_rx_stats_idx = 0; ++ max_tx_stats_idx = 0; ++ stats_region_len = priv->stats_report_len - ++ sizeof(struct gve_stats_report); ++ nic_stats_len = (NIC_RX_STATS_REPORT_NUM * priv->rx_cfg.num_queues + ++ NIC_TX_STATS_REPORT_NUM * priv->tx_cfg.num_queues) * ++ sizeof(struct stats); ++ if (unlikely((stats_region_len - ++ nic_stats_len) % sizeof(struct stats))) { ++ net_err_ratelimited("Starting index of NIC stats should be multiple of stats size"); ++ } else { ++ /* For rx cross-reporting stats, ++ * start from nic rx stats in report ++ */ ++ rx_base_stats_idx = (stats_region_len - nic_stats_len) / ++ sizeof(struct stats); ++ max_rx_stats_idx = NIC_RX_STATS_REPORT_NUM * ++ priv->rx_cfg.num_queues + ++ rx_base_stats_idx; ++ max_tx_stats_idx = NIC_TX_STATS_REPORT_NUM * ++ priv->tx_cfg.num_queues + ++ max_rx_stats_idx; ++ } + /* Preprocess the stats report for rx, map queue id to start index */ + skip_nic_stats = false; +- for (stats_idx = base_stats_idx; stats_idx < max_stats_idx; ++ for (stats_idx = rx_base_stats_idx; stats_idx < max_rx_stats_idx; + stats_idx += NIC_RX_STATS_REPORT_NUM) { + u32 stat_name = be32_to_cpu(report_stats[stats_idx].stat_name); + u32 queue_id = be32_to_cpu(report_stats[stats_idx].queue_id); +@@ -294,13 +314,9 @@ gve_get_ethtool_stats(struct net_device + i += priv->rx_cfg.num_queues * NUM_GVE_RX_CNTS; + } + +- /* For tx cross-reporting stats, start from nic tx stats in report */ +- base_stats_idx = max_stats_idx; +- max_stats_idx = NIC_TX_STATS_REPORT_NUM * priv->tx_cfg.num_queues + +- max_stats_idx; +- /* Preprocess the stats report for tx, map queue id to start index */ + skip_nic_stats = false; +- for (stats_idx = base_stats_idx; stats_idx < max_stats_idx; ++ /* NIC TX stats start right after NIC RX stats */ ++ for (stats_idx = max_rx_stats_idx; stats_idx < max_tx_stats_idx; + stats_idx += NIC_TX_STATS_REPORT_NUM) { + u32 stat_name = be32_to_cpu(report_stats[stats_idx].stat_name); + u32 queue_id = be32_to_cpu(report_stats[stats_idx].queue_id); +--- a/drivers/net/ethernet/google/gve/gve_main.c ++++ b/drivers/net/ethernet/google/gve/gve_main.c +@@ -135,9 +135,9 @@ static int gve_alloc_stats_report(struct + int tx_stats_num, rx_stats_num; + + tx_stats_num = (GVE_TX_STATS_REPORT_NUM + NIC_TX_STATS_REPORT_NUM) * +- priv->tx_cfg.num_queues; ++ priv->tx_cfg.max_queues; + rx_stats_num = (GVE_RX_STATS_REPORT_NUM + NIC_RX_STATS_REPORT_NUM) * +- priv->rx_cfg.num_queues; ++ priv->rx_cfg.max_queues; + priv->stats_report_len = struct_size(priv->stats_report, stats, + size_add(tx_stats_num, rx_stats_num)); + priv->stats_report = diff --git a/queue-6.1/kvm-selftests-add-u_fortify_source-to-avoid-some-unpredictable-test-failures.patch b/queue-6.1/kvm-selftests-add-u_fortify_source-to-avoid-some-unpredictable-test-failures.patch new file mode 100644 index 0000000000..7cdef1c6ea --- /dev/null +++ b/queue-6.1/kvm-selftests-add-u_fortify_source-to-avoid-some-unpredictable-test-failures.patch @@ -0,0 +1,53 @@ +From stable+bounces-214840-greg=kroah.com@vger.kernel.org Sat Feb 7 22:34:36 2026 +From: Sasha Levin +Date: Sat, 7 Feb 2026 16:34:29 -0500 +Subject: KVM: selftests: Add -U_FORTIFY_SOURCE to avoid some unpredictable test failures +To: stable@vger.kernel.org +Cc: Zhiquan Li , Sean Christopherson , Sasha Levin +Message-ID: <20260207213429.568001-1-sashal@kernel.org> + +From: Zhiquan Li + +[ Upstream commit e396a74222654486d6ab45dca5d0c54c408b8b91 ] + +Some distributions (such as Ubuntu) configure GCC so that +_FORTIFY_SOURCE is automatically enabled at -O1 or above. This results +in some fortified version of definitions of standard library functions +are included. While linker resolves the symbols, the fortified versions +might override the definitions in lib/string_override.c and reference to +those PLT entries in GLIBC. This is not a problem for the code in host, +but it is a disaster for the guest code. E.g., if build and run +x86/nested_emulation_test on Ubuntu 24.04 will encounter a L1 #PF due to +memset() reference to __memset_chk@plt. + +The option -fno-builtin-memset is not helpful here, because those +fortified versions are not built-in but some definitions which are +included by header, they are for different intentions. + +In order to eliminate the unpredictable behaviors may vary depending on +the linker and platform, add the "-U_FORTIFY_SOURCE" into CFLAGS to +prevent from introducing the fortified definitions. + +Signed-off-by: Zhiquan Li +Link: https://patch.msgid.link/20260122053551.548229-1-zhiquan_li@163.com +Fixes: 6b6f71484bf4 ("KVM: selftests: Implement memcmp(), memcpy(), and memset() for guest use") +Cc: stable@vger.kernel.org +[sean: tag for stable] +Signed-off-by: Sean Christopherson +[ Makefile.kvm -> Makefile ] +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + tools/testing/selftests/kvm/Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- a/tools/testing/selftests/kvm/Makefile ++++ b/tools/testing/selftests/kvm/Makefile +@@ -202,6 +202,7 @@ else + LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include + endif + CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ ++ -U_FORTIFY_SOURCE \ + -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ + -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ + -I$( +Date: Sat, 7 Feb 2026 10:23:59 -0500 +Subject: pmdomain: imx8m-blk-ctrl: fix out-of-range access of bc->domains +To: stable@vger.kernel.org +Cc: Xu Yang , stable@kernel.org, Daniel Baluta , Ulf Hansson , Sasha Levin +Message-ID: <20260207152359.392639-1-sashal@kernel.org> + +From: Xu Yang + +[ Upstream commit 6bd8b4a92a901fae1a422e6f914801063c345e8d ] + +Fix out-of-range access of bc->domains in imx8m_blk_ctrl_remove(). + +Fixes: 2684ac05a8c4 ("soc: imx: add i.MX8M blk-ctrl driver") +Cc: stable@kernel.org +Signed-off-by: Xu Yang +Reviewed-by: Daniel Baluta +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soc/imx/imx8m-blk-ctrl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/soc/imx/imx8m-blk-ctrl.c ++++ b/drivers/soc/imx/imx8m-blk-ctrl.c +@@ -326,7 +326,7 @@ static int imx8m_blk_ctrl_remove(struct + + of_genpd_del_provider(pdev->dev.of_node); + +- for (i = 0; bc->onecell_data.num_domains; i++) { ++ for (i = 0; i < bc->onecell_data.num_domains; i++) { + struct imx8m_blk_ctrl_domain *domain = &bc->domains[i]; + + pm_genpd_remove(&domain->genpd); diff --git a/queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-gpc-power-domain-on-for-system-wakeup.patch b/queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-gpc-power-domain-on-for-system-wakeup.patch new file mode 100644 index 0000000000..dddc9fd37e --- /dev/null +++ b/queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-gpc-power-domain-on-for-system-wakeup.patch @@ -0,0 +1,113 @@ +From stable+bounces-214795-greg=kroah.com@vger.kernel.org Sat Feb 7 16:11:56 2026 +From: Sasha Levin +Date: Sat, 7 Feb 2026 10:11:16 -0500 +Subject: pmdomain: imx8mp-blk-ctrl: Keep gpc power domain on for system wakeup +To: stable@vger.kernel.org +Cc: Xu Yang , Ulf Hansson , Sasha Levin +Message-ID: <20260207151116.387280-1-sashal@kernel.org> + +From: Xu Yang + +[ Upstream commit e9ab2b83893dd03cf04d98faded81190e635233f ] + +Current design will power off all dependent GPC power domains in +imx8mp_blk_ctrl_suspend(), even though the user device has enabled +wakeup capability. The result is that wakeup function never works +for such device. + +An example will be USB wakeup on i.MX8MP. PHY device '382f0040.usb-phy' +is attached to power domain 'hsioblk-usb-phy2' which is spawned by hsio +block control. A virtual power domain device 'genpd:3:32f10000.blk-ctrl' +is created to build connection with 'hsioblk-usb-phy2' and it depends on +GPC power domain 'usb-otg2'. If device '382f0040.usb-phy' enable wakeup, +only power domain 'hsioblk-usb-phy2' keeps on during system suspend, +power domain 'usb-otg2' is off all the time. So the wakeup event can't +happen. + +In order to further establish a connection between the power domains +related to GPC and block control during system suspend, register a genpd +power on/off notifier for the power_dev. This allows us to prevent the GPC +power domain from being powered off, in case the block control power +domain is kept on to serve system wakeup. + +Suggested-by: Ulf Hansson +Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl") +Cc: stable@vger.kernel.org +Signed-off-by: Xu Yang +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soc/imx/imx8mp-blk-ctrl.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +--- a/drivers/soc/imx/imx8mp-blk-ctrl.c ++++ b/drivers/soc/imx/imx8mp-blk-ctrl.c +@@ -54,6 +54,7 @@ struct imx8mp_blk_ctrl_domain { + struct icc_bulk_data paths[DOMAIN_MAX_PATHS]; + struct device *power_dev; + struct imx8mp_blk_ctrl *bc; ++ struct notifier_block power_nb; + int num_paths; + int id; + }; +@@ -492,6 +493,20 @@ static int imx8mp_blk_ctrl_power_off(str + return 0; + } + ++static int imx8mp_blk_ctrl_gpc_notifier(struct notifier_block *nb, ++ unsigned long action, void *data) ++{ ++ struct imx8mp_blk_ctrl_domain *domain = ++ container_of(nb, struct imx8mp_blk_ctrl_domain, power_nb); ++ ++ if (action == GENPD_NOTIFY_PRE_OFF) { ++ if (domain->genpd.status == GENPD_STATE_ON) ++ return NOTIFY_BAD; ++ } ++ ++ return NOTIFY_OK; ++} ++ + static struct lock_class_key blk_ctrl_genpd_lock_class; + + static int imx8mp_blk_ctrl_probe(struct platform_device *pdev) +@@ -593,6 +608,14 @@ static int imx8mp_blk_ctrl_probe(struct + goto cleanup_pds; + } + ++ domain->power_nb.notifier_call = imx8mp_blk_ctrl_gpc_notifier; ++ ret = dev_pm_genpd_add_notifier(domain->power_dev, &domain->power_nb); ++ if (ret) { ++ dev_err_probe(dev, ret, "failed to add power notifier\n"); ++ dev_pm_domain_detach(domain->power_dev, true); ++ goto cleanup_pds; ++ } ++ + domain->genpd.name = data->name; + domain->genpd.power_on = imx8mp_blk_ctrl_power_on; + domain->genpd.power_off = imx8mp_blk_ctrl_power_off; +@@ -602,6 +625,7 @@ static int imx8mp_blk_ctrl_probe(struct + ret = pm_genpd_init(&domain->genpd, NULL, true); + if (ret) { + dev_err_probe(dev, ret, "failed to init power domain\n"); ++ dev_pm_genpd_remove_notifier(domain->power_dev); + dev_pm_domain_detach(domain->power_dev, true); + goto cleanup_pds; + } +@@ -644,6 +668,7 @@ cleanup_provider: + cleanup_pds: + for (i--; i >= 0; i--) { + pm_genpd_remove(&bc->domains[i].genpd); ++ dev_pm_genpd_remove_notifier(bc->domains[i].power_dev); + dev_pm_domain_detach(bc->domains[i].power_dev, true); + } + +@@ -663,6 +688,7 @@ static int imx8mp_blk_ctrl_remove(struct + struct imx8mp_blk_ctrl_domain *domain = &bc->domains[i]; + + pm_genpd_remove(&domain->genpd); ++ dev_pm_genpd_remove_notifier(domain->power_dev); + dev_pm_domain_detach(domain->power_dev, true); + } + diff --git a/queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-usb-phy-power-domain-on-for-system-wakeup.patch b/queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-usb-phy-power-domain-on-for-system-wakeup.patch new file mode 100644 index 0000000000..32d67b3d86 --- /dev/null +++ b/queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-usb-phy-power-domain-on-for-system-wakeup.patch @@ -0,0 +1,56 @@ +From stable+bounces-214796-greg=kroah.com@vger.kernel.org Sat Feb 7 16:19:17 2026 +From: Sasha Levin +Date: Sat, 7 Feb 2026 10:19:11 -0500 +Subject: pmdomain: imx8mp-blk-ctrl: Keep usb phy power domain on for system wakeup +To: stable@vger.kernel.org +Cc: Xu Yang , Ulf Hansson , Sasha Levin +Message-ID: <20260207151911.391123-1-sashal@kernel.org> + +From: Xu Yang + +[ Upstream commit e2c4c5b2bbd4f688a0f9f6da26cdf6d723c53478 ] + +USB system wakeup need its PHY on, so add the GENPD_FLAG_ACTIVE_WAKEUP +flags to USB PHY genpd configuration. + +Signed-off-by: Xu Yang +Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl") +Cc: stable@vger.kernel.org +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soc/imx/imx8mp-blk-ctrl.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/soc/imx/imx8mp-blk-ctrl.c ++++ b/drivers/soc/imx/imx8mp-blk-ctrl.c +@@ -42,6 +42,7 @@ struct imx8mp_blk_ctrl_domain_data { + const char * const *path_names; + int num_paths; + const char *gpc_name; ++ const unsigned int flags; + }; + + #define DOMAIN_MAX_CLKS 2 +@@ -167,10 +168,12 @@ static const struct imx8mp_blk_ctrl_doma + [IMX8MP_HSIOBLK_PD_USB_PHY1] = { + .name = "hsioblk-usb-phy1", + .gpc_name = "usb-phy1", ++ .flags = GENPD_FLAG_ACTIVE_WAKEUP, + }, + [IMX8MP_HSIOBLK_PD_USB_PHY2] = { + .name = "hsioblk-usb-phy2", + .gpc_name = "usb-phy2", ++ .flags = GENPD_FLAG_ACTIVE_WAKEUP, + }, + [IMX8MP_HSIOBLK_PD_PCIE] = { + .name = "hsioblk-pcie", +@@ -619,6 +622,7 @@ static int imx8mp_blk_ctrl_probe(struct + domain->genpd.name = data->name; + domain->genpd.power_on = imx8mp_blk_ctrl_power_on; + domain->genpd.power_off = imx8mp_blk_ctrl_power_off; ++ domain->genpd.flags = data->flags; + domain->bc = bc; + domain->id = i; + diff --git a/queue-6.1/series b/queue-6.1/series index 67c164d164..6ec363f507 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -8,3 +8,10 @@ kvm-don-t-clobber-irqfd-routing-type-when-deassigning-irqfd.patch netfilter-nft_set_pipapo-clamp-maximum-map-bucket-size-to-int_max.patch binder-fix-br_frozen_reply-error-log.patch binderfs-fix-ida_alloc_max-upper-bound.patch +pmdomain-imx8mp-blk-ctrl-keep-gpc-power-domain-on-for-system-wakeup.patch +pmdomain-imx8mp-blk-ctrl-keep-usb-phy-power-domain-on-for-system-wakeup.patch +pmdomain-imx8m-blk-ctrl-fix-out-of-range-access-of-bc-domains.patch +gve-fix-stats-report-corruption-on-queue-count-change.patch +tracing-fix-ftrace-event-field-alignments.patch +gve-correct-ethtool-rx_dropped-calculation.patch +kvm-selftests-add-u_fortify_source-to-avoid-some-unpredictable-test-failures.patch diff --git a/queue-6.1/tracing-fix-ftrace-event-field-alignments.patch b/queue-6.1/tracing-fix-ftrace-event-field-alignments.patch new file mode 100644 index 0000000000..34dd2744db --- /dev/null +++ b/queue-6.1/tracing-fix-ftrace-event-field-alignments.patch @@ -0,0 +1,188 @@ +From stable+bounces-214814-greg=kroah.com@vger.kernel.org Sat Feb 7 18:44:10 2026 +From: Sasha Levin +Date: Sat, 7 Feb 2026 12:44:03 -0500 +Subject: tracing: Fix ftrace event field alignments +To: stable@vger.kernel.org +Cc: Steven Rostedt , Mathieu Desnoyers , Mark Rutland , "Masami Hiramatsu (Google)" , "jempty.liang" , Sasha Levin +Message-ID: <20260207174403.472364-1-sashal@kernel.org> + +From: Steven Rostedt + +[ Upstream commit 033c55fe2e326bea022c3cc5178ecf3e0e459b82 ] + +The fields of ftrace specific events (events used to save ftrace internal +events like function traces and trace_printk) are generated similarly to +how normal trace event fields are generated. That is, the fields are added +to a trace_events_fields array that saves the name, offset, size, +alignment and signness of the field. It is used to produce the output in +the format file in tracefs so that tooling knows how to parse the binary +data of the trace events. + +The issue is that some of the ftrace event structures are packed. The +function graph exit event structures are one of them. The 64 bit calltime +and rettime fields end up 4 byte aligned, but the algorithm to show to +userspace shows them as 8 byte aligned. + +The macros that create the ftrace events has one for embedded structure +fields. There's two macros for theses fields: + + __field_desc() and __field_packed() + +The difference of the latter macro is that it treats the field as packed. + +Rename that field to __field_desc_packed() and create replace the +__field_packed() to be a normal field that is packed and have the calltime +and rettime use those. + +This showed up on 32bit architectures for function graph time fields. It +had: + + ~# cat /sys/kernel/tracing/events/ftrace/funcgraph_exit/format +[..] + field:unsigned long func; offset:8; size:4; signed:0; + field:unsigned int depth; offset:12; size:4; signed:0; + field:unsigned int overrun; offset:16; size:4; signed:0; + field:unsigned long long calltime; offset:24; size:8; signed:0; + field:unsigned long long rettime; offset:32; size:8; signed:0; + +Notice that overrun is at offset 16 with size 4, where in the structure +calltime is at offset 20 (16 + 4), but it shows the offset at 24. That's +because it used the alignment of unsigned long long when used as a +declaration and not as a member of a structure where it would be aligned +by word size (in this case 4). + +By using the proper structure alignment, the format has it at the correct +offset: + + ~# cat /sys/kernel/tracing/events/ftrace/funcgraph_exit/format +[..] + field:unsigned long func; offset:8; size:4; signed:0; + field:unsigned int depth; offset:12; size:4; signed:0; + field:unsigned int overrun; offset:16; size:4; signed:0; + field:unsigned long long calltime; offset:20; size:8; signed:0; + field:unsigned long long rettime; offset:28; size:8; signed:0; + +Cc: stable@vger.kernel.org +Cc: Mathieu Desnoyers +Cc: Mark Rutland +Acked-by: Masami Hiramatsu (Google) +Reported-by: "jempty.liang" +Link: https://patch.msgid.link/20260204113628.53faec78@gandalf.local.home +Fixes: 04ae87a52074e ("ftrace: Rework event_create_dir()") +Closes: https://lore.kernel.org/all/20260130015740.212343-1-imntjempty@163.com/ +Closes: https://lore.kernel.org/all/20260202123342.2544795-1-imntjempty@163.com/ +Signed-off-by: Steven Rostedt (Google) +[ Context / renames ] +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + kernel/trace/trace.h | 7 +++++-- + kernel/trace/trace_entries.h | 14 +++++++------- + kernel/trace/trace_export.c | 21 +++++++++++++++------ + 3 files changed, 27 insertions(+), 15 deletions(-) + +--- a/kernel/trace/trace.h ++++ b/kernel/trace/trace.h +@@ -65,14 +65,17 @@ enum trace_type { + #undef __field_fn + #define __field_fn(type, item) type item; + ++#undef __field_packed ++#define __field_packed(type, item) type item; ++ + #undef __field_struct + #define __field_struct(type, item) __field(type, item) + + #undef __field_desc + #define __field_desc(type, container, item) + +-#undef __field_packed +-#define __field_packed(type, container, item) ++#undef __field_desc_packed ++#define __field_desc_packed(type, container, item) + + #undef __array + #define __array(type, item, size) type item[size]; +--- a/kernel/trace/trace_entries.h ++++ b/kernel/trace/trace_entries.h +@@ -78,8 +78,8 @@ FTRACE_ENTRY_PACKED(funcgraph_entry, ftr + + F_STRUCT( + __field_struct( struct ftrace_graph_ent, graph_ent ) +- __field_packed( unsigned long, graph_ent, func ) +- __field_packed( int, graph_ent, depth ) ++ __field_desc_packed( unsigned long, graph_ent, func ) ++ __field_desc_packed( int, graph_ent, depth ) + ), + + F_printk("--> %ps (%d)", (void *)__entry->func, __entry->depth) +@@ -92,11 +92,11 @@ FTRACE_ENTRY_PACKED(funcgraph_exit, ftra + + F_STRUCT( + __field_struct( struct ftrace_graph_ret, ret ) +- __field_packed( unsigned long, ret, func ) +- __field_packed( int, ret, depth ) +- __field_packed( unsigned int, ret, overrun ) +- __field_packed( unsigned long long, ret, calltime) +- __field_packed( unsigned long long, ret, rettime ) ++ __field_desc_packed( unsigned long, ret, func ) ++ __field_desc_packed( int, ret, depth ) ++ __field_desc_packed( unsigned int, ret, overrun ) ++ __field_desc_packed( unsigned long long, ret, calltime) ++ __field_desc_packed( unsigned long long, ret, rettime ) + ), + + F_printk("<-- %ps (%d) (start: %llx end: %llx) over: %d", +--- a/kernel/trace/trace_export.c ++++ b/kernel/trace/trace_export.c +@@ -42,11 +42,14 @@ static int ftrace_event_register(struct + #undef __field_fn + #define __field_fn(type, item) type item; + ++#undef __field_packed ++#define __field_packed(type, item) type item; ++ + #undef __field_desc + #define __field_desc(type, container, item) type item; + +-#undef __field_packed +-#define __field_packed(type, container, item) type item; ++#undef __field_desc_packed ++#define __field_desc_packed(type, container, item) type item; + + #undef __array + #define __array(type, item, size) type item[size]; +@@ -101,11 +104,14 @@ static void __always_unused ____ftrace_c + #undef __field_fn + #define __field_fn(_type, _item) __field_ext(_type, _item, FILTER_TRACE_FN) + ++#undef __field_packed ++#define __field_packed(_type, _item) __field_ext_packed(_type, _item, FILTER_OTHER) ++ + #undef __field_desc + #define __field_desc(_type, _container, _item) __field_ext(_type, _item, FILTER_OTHER) + +-#undef __field_packed +-#define __field_packed(_type, _container, _item) __field_ext_packed(_type, _item, FILTER_OTHER) ++#undef __field_desc_packed ++#define __field_desc_packed(_type, _container, _item) __field_ext_packed(_type, _item, FILTER_OTHER) + + #undef __array + #define __array(_type, _item, _len) { \ +@@ -140,11 +146,14 @@ static struct trace_event_fields ftrace_ + #undef __field_fn + #define __field_fn(type, item) + ++#undef __field_packed ++#define __field_packed(type, item) ++ + #undef __field_desc + #define __field_desc(type, container, item) + +-#undef __field_packed +-#define __field_packed(type, container, item) ++#undef __field_desc_packed ++#define __field_desc_packed(type, container, item) + + #undef __array + #define __array(type, item, len) -- 2.47.3