]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Feb 2026 12:15:47 +0000 (13:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Feb 2026 12:15:47 +0000 (13:15 +0100)
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

queue-6.1/gve-correct-ethtool-rx_dropped-calculation.patch [new file with mode: 0644]
queue-6.1/gve-fix-stats-report-corruption-on-queue-count-change.patch [new file with mode: 0644]
queue-6.1/kvm-selftests-add-u_fortify_source-to-avoid-some-unpredictable-test-failures.patch [new file with mode: 0644]
queue-6.1/pmdomain-imx8m-blk-ctrl-fix-out-of-range-access-of-bc-domains.patch [new file with mode: 0644]
queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-gpc-power-domain-on-for-system-wakeup.patch [new file with mode: 0644]
queue-6.1/pmdomain-imx8mp-blk-ctrl-keep-usb-phy-power-domain-on-for-system-wakeup.patch [new file with mode: 0644]
queue-6.1/series
queue-6.1/tracing-fix-ftrace-event-field-alignments.patch [new file with mode: 0644]

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 (file)
index 0000000..b918626
--- /dev/null
@@ -0,0 +1,60 @@
+From stable+bounces-214822-greg=kroah.com@vger.kernel.org Sat Feb  7 20:15:44 2026
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat,  7 Feb 2026 14:15:27 -0500
+Subject: gve: Correct ethtool rx_dropped calculation
+To: stable@vger.kernel.org
+Cc: Max Yuan <maxyuan@google.com>, Jordan Rhee <jordanrhee@google.com>, Joshua Washington <joshwash@google.com>, Matt Olson <maolson@google.com>, Harshitha Ramamurthy <hramamurthy@google.com>, Jacob Keller <jacob.e.keller@intel.com>, Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20260207191527.516750-1-sashal@kernel.org>
+
+From: Max Yuan <maxyuan@google.com>
+
+[ 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 <maxyuan@google.com>
+Reviewed-by: Jordan Rhee <jordanrhee@google.com>
+Reviewed-by: Joshua Washington <joshwash@google.com>
+Reviewed-by: Matt Olson <maolson@google.com>
+Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
+Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
+Link: https://patch.msgid.link/20260202193925.3106272-3-hramamurthy@google.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+[ Context + variable naming ]
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..91b789e
--- /dev/null
@@ -0,0 +1,124 @@
+From stable+bounces-214813-greg=kroah.com@vger.kernel.org Sat Feb  7 18:43:48 2026
+From: Sasha Levin <sashal@kernel.org>
+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 <debarghyak@google.com>, Joshua Washington <joshwash@google.com>, Harshitha Ramamurthy <hramamurthy@google.com>, Jacob Keller <jacob.e.keller@intel.com>, Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20260207174339.471643-1-sashal@kernel.org>
+
+From: Debarghya Kundu <debarghyak@google.com>
+
+[ 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 <debarghyak@google.com>
+Reviewed-by: Joshua Washington <joshwash@google.com>
+Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
+Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
+Link: https://patch.msgid.link/20260202193925.3106272-2-hramamurthy@google.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+[ gve_num_tx_queues() => priv->tx_cfg.num_queues and no stopped queues ]
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..7cdef1c
--- /dev/null
@@ -0,0 +1,53 @@
+From stable+bounces-214840-greg=kroah.com@vger.kernel.org Sat Feb  7 22:34:36 2026
+From: Sasha Levin <sashal@kernel.org>
+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 <zhiquan_li@163.com>, Sean Christopherson <seanjc@google.com>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20260207213429.568001-1-sashal@kernel.org>
+
+From: Zhiquan Li <zhiquan_li@163.com>
+
+[ 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 <zhiquan_li@163.com>
+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 <seanjc@google.com>
+[ Makefile.kvm -> Makefile ]
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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$(<D) -Iinclude/$(UNAME_M) -I ../rseq -I.. $(EXTRA_CFLAGS) \
diff --git a/queue-6.1/pmdomain-imx8m-blk-ctrl-fix-out-of-range-access-of-bc-domains.patch b/queue-6.1/pmdomain-imx8m-blk-ctrl-fix-out-of-range-access-of-bc-domains.patch
new file mode 100644 (file)
index 0000000..622517b
--- /dev/null
@@ -0,0 +1,36 @@
+From stable+bounces-214799-greg=kroah.com@vger.kernel.org Sat Feb  7 16:24:05 2026
+From: Sasha Levin <sashal@kernel.org>
+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 <xu.yang_2@nxp.com>, stable@kernel.org, Daniel Baluta <daniel.baluta@nxp.com>, Ulf Hansson <ulf.hansson@linaro.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20260207152359.392639-1-sashal@kernel.org>
+
+From: Xu Yang <xu.yang_2@nxp.com>
+
+[ 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 <xu.yang_2@nxp.com>
+Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..dddc9fd
--- /dev/null
@@ -0,0 +1,113 @@
+From stable+bounces-214795-greg=kroah.com@vger.kernel.org Sat Feb  7 16:11:56 2026
+From: Sasha Levin <sashal@kernel.org>
+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 <xu.yang_2@nxp.com>, Ulf Hansson <ulf.hansson@linaro.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20260207151116.387280-1-sashal@kernel.org>
+
+From: Xu Yang <xu.yang_2@nxp.com>
+
+[ 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 <ulf.hansson@linaro.org>
+Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl")
+Cc: stable@vger.kernel.org
+Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..32d67b3
--- /dev/null
@@ -0,0 +1,56 @@
+From stable+bounces-214796-greg=kroah.com@vger.kernel.org Sat Feb  7 16:19:17 2026
+From: Sasha Levin <sashal@kernel.org>
+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 <xu.yang_2@nxp.com>, Ulf Hansson <ulf.hansson@linaro.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20260207151911.391123-1-sashal@kernel.org>
+
+From: Xu Yang <xu.yang_2@nxp.com>
+
+[ 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 <xu.yang_2@nxp.com>
+Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl")
+Cc: stable@vger.kernel.org
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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;
index 67c164d164eb4728a85b9be8bc5109436b432d1d..6ec363f5076cacd17f7c0d5273a7d31e70a73312 100644 (file)
@@ -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 (file)
index 0000000..34dd274
--- /dev/null
@@ -0,0 +1,188 @@
+From stable+bounces-214814-greg=kroah.com@vger.kernel.org Sat Feb  7 18:44:10 2026
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat,  7 Feb 2026 12:44:03 -0500
+Subject: tracing: Fix ftrace event field alignments
+To: stable@vger.kernel.org
+Cc: Steven Rostedt <rostedt@goodmis.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Mark Rutland <mark.rutland@arm.com>, "Masami Hiramatsu (Google)" <mhiramat@kernel.org>, "jempty.liang" <imntjempty@163.com>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20260207174403.472364-1-sashal@kernel.org>
+
+From: Steven Rostedt <rostedt@goodmis.org>
+
+[ 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 <mathieu.desnoyers@efficios.com>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Reported-by: "jempty.liang" <imntjempty@163.com>
+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) <rostedt@goodmis.org>
+[ Context / renames ]
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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)