Skip to content

Rebase edera/mainline onto master @ 4405c18c95d2 - #120

Closed
edera-rebase-app[bot] wants to merge 10000 commits into
edera/mainlinefrom
rebase/edera-mainline/20261119-2ece1af06645-4405c18c95d2
Closed

edera-rebase-app[bot] wants to merge 10000 commits into
edera/mainlinefrom
rebase/edera-mainline/20261119-2ece1af06645-4405c18c95d2

Conversation

@edera-rebase-app

Copy link
Copy Markdown

Nightly rebase of edera/mainline (2ece1af06645) onto master (4405c18c95d2), driven by Claude. Not pushed automatically because the checker found drift and a build failure and Claude's report asks for a decision. Run log.

Important

Do not use the merge button: this branch replaces edera/mainline rather than merging into it. Approve the pull request to land it; the land workflow force-pushes edera/mainline to the approved head, pinned to 2ece1af06645, and keeps a backup.

Independent checks

Builds: failure (x86_64 vmlinux on the Edera host config and arm64 vmlinux, both with the Edera features built in; per-build results in the run).

The build failed and Claude's repair round (success) left no new branch; this is the unrepaired rebase.

Old tip 2ece1af06645
New tip d58f6bea5d31
Old upstream base 864c07de0c7d
New upstream base 4405c18c95d2
  • New branch is based on the upstream tip.
  • Downstream series is linear.
  • Downstream commit set changed: 130 before, 130 after; 2 commit(s) lost, added, or with different +/- lines.
  • Downstream drift: the tree changed by more than the upstream delta.
Commits whose hunk context moved (own +/- lines identical)
  • ea62ac9f1b0f iommu/xen: Add Xen PV-IOMMU driver → 88e1981610c2
  • d8221bf28f22 x86/CPU/AMD: avoid printing reset reasons on Xen domU → 4d13afdf368c
  • bd1c0dba57c3 sysctl: wire up PaX softmode setting → 603bab1a0fce
  • 849ed61740ea use maximum supported mmap rnd entropy by default → d188c9b8fd78
  • 5b1ff5bbc8cb 9p/xen: carry the 9P session across a restore → 37e9d8605e2f
  • 85e1da02b838 9p/xen: end foreign access on the grant refs we granted, not the intf page's → 4e81a994dccc
Commits lost, added, or whose own +/- lines changed
Before After
f492e4d0cb26 9p/xen: reconnect to the backend on resume 9e1163209bc2 9p/xen: reconnect to the backend on resume
3f7ca89e3d70 xen/gntdev: don't copy to user space under priv->lock (#79) 2ab25ce3a8e5 xen/gntdev: don't copy to user space under priv->lock (#79)
Drift (changed lines: upstream delta vs. actual change)
--- upstream-files
+++ actual-files
@@ -24142,8 +24142,6 @@
 +++ b/drivers/xen/gntalloc.c
 --- a/drivers/xen/gntdev-dmabuf.c
 +++ b/drivers/xen/gntdev-dmabuf.c
---- a/drivers/xen/gntdev.c
-+++ b/drivers/xen/gntdev.c
 --- a/drivers/xen/grant-dma-iommu.c
 +++ b/drivers/xen/grant-dma-iommu.c
 --- a/drivers/xen/grant-dma-ops.c
--- upstream-lines
+++ actual-lines
@@ -798312,14 +798312,6 @@
 +	gfns = kzalloc_objs(*gfns, count);
 -	refs = kcalloc(op.count, sizeof(*refs), GFP_KERNEL);
 +	refs = kzalloc_objs(*refs, op.count);
-+	mutex_unlock(&priv->lock);
--		list_del(&map->next);
-+		mutex_lock(&priv->lock);
-+		map = gntdev_find_map_index(priv, op.index >> PAGE_SHIFT,
-+					    op.count);
-+		if (map)
-+			list_del(&map->next);
--	mutex_unlock(&priv->lock);
 -	mmu = devm_kzalloc(&pdev->dev, sizeof(*mmu), GFP_KERNEL);
 +	mmu = devm_kzalloc_obj(&pdev->dev, *mmu);
 -	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
@@ -896046,6 +896038,18 @@
 +	return ret;
 +}
 +
++#ifdef CONFIG_OPENPAX_SOFTMODE
++static const struct ctl_table pax_table[] = {
++	{
++		.procname       = "softmode",
++		.data           = &pax_softmode,
++		.maxlen         = sizeof(int),
++		.mode           = 0600,
++		.proc_handler   = proc_dointvec,
++	},
++};
++#endif
++
 +static const struct ctl_table sysctl_subsys_table[] = {
 +	{
 +		.procname	= "sysctl_writes_strict",
@@ -896093,6 +896097,9 @@
 +int __init sysctl_init_bases(void)
 +{
 +	register_sysctl_init("kernel", sysctl_subsys_table);
++#ifdef CONFIG_OPENPAX_SOFTMODE
++	register_sysctl_init("kernel/pax", pax_table);
++#endif
 +
 +	return 0;
 +}
@@ -896126,6 +896133,18 @@
 -	mutex_unlock(&static_key_mutex);
 -	return ret;
 +	return -ENOSYS;
+-#ifdef CONFIG_OPENPAX_SOFTMODE
+-static const struct ctl_table pax_table[] = {
+-	{
+-		.procname       = "softmode",
+-		.data           = &pax_softmode,
+-		.maxlen         = sizeof(int),
+-		.mode           = 0600,
+-		.proc_handler   = proc_dointvec,
+-	},
+-};
+-#endif
+-
 -static const struct ctl_table sysctl_subsys_table[] = {
 -#ifdef CONFIG_SYSCTL
 -	{
@@ -896175,6 +896194,9 @@
 -int __init sysctl_init_bases(void)
 -{
 -	register_sysctl_init("kernel", sysctl_subsys_table);
+-#ifdef CONFIG_OPENPAX_SOFTMODE
+-	register_sysctl_init("kernel/pax", pax_table);
+-#endif
 -
 -	return 0;
 -}
@@ -933355,64 +933377,15 @@
 +
 +			if (req)
 +				p9_req_put(priv->client, req);
--	if (priv->rings) {
--		for (i = 0; i < XEN_9PFS_NUM_RINGS; i++) {
--			struct xen_9pfs_dataring *ring = &priv->rings[i];
-+	for (i = 0; i < XEN_9PFS_NUM_RINGS; i++) {
-+		struct xen_9pfs_dataring *ring = &priv->rings[i];
--			cancel_work_sync(&ring->work);
-+		if (!ring->intf)
-+			break;
-+		if (ring->irq >= 0) {
-+			unbind_from_irqhandler(ring->irq, ring);
-+			ring->irq = -1;
-+		}
+-		cancel_work_sync(&ring->work);
+-
 +		cancel_work_sync(&ring->work);
--			if (!ring->intf)
--				break;
--			if (ring->irq >= 0) {
--				unbind_from_irqhandler(ring->irq, ring);
--				ring->irq = -1;
--			}
--			if (ring->data.in) {
--				for (j = 0; j < (1 << ring->intf->ring_order);
--				     j++) {
--					grant_ref_t ref;
--
--					ref = ring->intf->ref[j];
--					gnttab_end_foreign_access(ref, NULL);
--					ring->intf->ref[j] = INVALID_GRANT_REF;
--				}
--				free_pages_exact(ring->data.in,
--						 1UL << (ring->intf->ring_order +
--							 XEN_PAGE_SHIFT));
--				ring->data.in = NULL;
--				ring->data.out = NULL;
--			}
--			if (ring->ref != INVALID_GRANT_REF) {
--				gnttab_end_foreign_access(ring->ref, NULL);
--				ring->ref = INVALID_GRANT_REF;
-+		if (ring->data.in) {
-+			for (j = 0; j < (1 << ring->intf->ring_order); j++) {
-+				grant_ref_t ref;
-+
-+				ref = ring->intf->ref[j];
-+				gnttab_end_foreign_access(ref, NULL);
-+				ring->intf->ref[j] = INVALID_GRANT_REF;
--			free_page((unsigned long)ring->intf);
--			ring->intf = NULL;
-+			free_pages_exact(ring->data.in,
-+					 1UL << (ring->intf->ring_order +
-+						 XEN_PAGE_SHIFT));
-+			ring->data.in = NULL;
-+			ring->data.out = NULL;
++
+-	if (priv->rings) {
+-		xen_9pfs_front_free_rings(priv);
 -		kfree(priv->rings);
-+		if (ring->ref != INVALID_GRANT_REF) {
-+			gnttab_end_foreign_access(ring->ref, NULL);
-+			ring->ref = INVALID_GRANT_REF;
-+		}
-+		free_page((unsigned long)ring->intf);
-+		ring->intf = NULL;
+-	}
++	xen_9pfs_front_free_rings(priv);
 -	priv->rings = kzalloc_objs(*priv->rings, XEN_9PFS_NUM_RINGS);
 -	if (!priv->rings) {
 -		kfree(priv);

Claude's report

Summary

Rebased edera/mainline (old tip 2ece1af06645) from merge base 864c07de0c7d (v7.2-rc5-26646-g864c07de0c7d) onto upstream 4405c18c95d2 (v7.2-rc5-43498-g4405c18c95d2): 15872 upstream commits. All 130 downstream commits replayed. The new tip of rebase-result is d58f6bea5d31. Five commits conflicted and were resolved by hand. No commit was dropped, and no build fix or fix-up commit was needed. x86_64 and arm64 vmlinux both build. verify-upstream-rebase.sh passes the base and linearity checks. It flags 2 commits whose own +/- lines changed and some tree drift. Both come only from the conflict resolutions below, so I expect it to report that drift rather than pass clean. The items under "Needs a decision" stop the automatic push on purpose.

Needs a decision

  • UNSURE: xen/gntdev: don't copy to user space under priv->lock (#79) (downstream 3f7ca89e3d70, now 2ab25ce3a8e5) fixes the same map-ioctl/mmap deadlock as upstream 7620a997e485 xen/gntdev: fix deadlock between map ioctl and mmap (Cc: stable), but in a different way. Both drop priv->lock before copy_to_user(). On a failed copy, upstream re-takes the lock and looks the map up again by op.index/op.count with gntdev_find_map_index(). Downstream holds an extra reference across the copy and removes the map only if that exact pointer is still on priv->maps. What I committed: the downstream version, so gntdev_ioctl_map_grant_ref() is byte-identical to the old tip. It keeps upstream's lock ordering, the only constraint upstream's fix adds. It also can't remove a different map that was given the same index after a concurrent unmap. The other reading: take upstream's version and let the downstream commit shrink to almost nothing (or drop it), which keeps this function identical to mainline and makes future stable backports apply cleanly. A maintainer should pick one.
  • UNSURE: x86/CPU/AMD: avoid printing reset reasons on Xen domU (downstream d8221bf28f22, now 4d13afdf368c) applied cleanly but is now dead code. Upstream ea51d1a4c31f x86/CPU/AMD: Don't print reset reason in VMs (Cc: stable) returns early from print_s5_reset_status_mmio() whenever X86_FEATURE_HYPERVISOR is set. That covers every Xen PV guest, dom0 included, so the downstream XENPV && !xen_initial_domain() check after it can never fire. It also changes behaviour: a Xen PV dom0 used to print the S5 reset reason (downstream let dom0 through), and with upstream it no longer does. What I committed: the downstream commit, replayed unchanged (harmless and redundant). The other reading: drop the downstream commit as superseded by ea51d1a4c31f. If dom0 should still print the reset reason, upstream's check would need a downstream exception. I did not add one.
  • UNSURE: upstream 228e21764b38 Drivers: hv: Run VMBus kexec cleanup from syscore shutdown moves hv_kexec_handler() (vmbus_initiate_unload() plus cpuhp_remove_state(hyperv_cpuhp_online)) from x86's hv_machine_shutdown() into a VMBus syscore .shutdown hook that runs whenever kexec_is_in_progress(). Before, it ran only when Hyper-V was the primary hypervisor, because hv_machine_shutdown is installed by the ms_hyperv platform code. Now it also runs in the downstream Xen-PV-dom0-nested-on-Hyper-V setup (hyperv_nested_on_xen), which registers VMBus through hv_acpi_init() but whose machine ops are Xen's. No lines conflicted. The likely effect is good (VMBus is unloaded cleanly before kexec), but in the nested case nobody has tested this path: the SynIC/Xen-VIRQ bridge teardown happens through hv_synic_cleanup with Xen proxying the MSRs. What I committed: nothing changed; upstream's behaviour applies. A maintainer should confirm that kexec from a nested dom0 is expected to run this, or gate it on !hyperv_nested_on_xen.

Conflicts resolved

  • sysctl: wire up PaX softmode setting (bd1c0dba57c3, now 603bab1a0fce). File: kernel/sysctl.c. Collided with upstream 443bea2f71c5 sysctl: consolidate CONFIG_SYSCTL into a single block in kernel/sysctl.c (and acd19f2c56f2), which moved sysctl_subsys_table and sysctl_init_bases() inside the single #ifdef CONFIG_SYSCTL block and dropped the inner #ifdef CONFIG_SYSCTL. I kept upstream's layout and added the downstream pax_table (under CONFIG_OPENPAX_SOFTMODE) right before sysctl_subsys_table, plus its register_sysctl_init("kernel/pax", ...) call, in the new location. The commit's own +/- lines are identical to the original; the verifier shows it as "context moved" and as drift because the hunk now sits in a different place.
  • use maximum supported mmap rnd entropy by default (849ed61740ea, now d188c9b8fd78). File: arch/Kconfig. Collided with upstream 8cdae75cebe0 arch/Kconfig: fix dead conditions by removing dead options, which deleted ARCH_MMAP_RND_BITS_DEFAULT / ARCH_MMAP_RND_COMPAT_BITS_DEFAULT and their default ... if ... lines (an int used as a condition is always false, so those lines never applied). I kept the upstream removal and applied the downstream change: the remaining fallback default goes from _MIN to _MAX for both symbols. Nothing downstream referenced the removed symbols, so behaviour is unchanged.
  • 9p/xen: reconnect to the backend on resume (f492e4d0cb26, now 9e1163209bc2). File: net/9p/trans_xen.c. Collided with upstream b3d07d64832c 9p/xen: Use array for data rings (the rings array became rings[XEN_9PFS_NUM_RINGS] inside the priv) and 7b6f2e3c29fb 9p/xen: drain response work after unbinding IRQ (Fixes, Cc: stable; cancel_work_sync() moved after unbind_from_irqhandler()). I kept the embedded array: the downstream commit reuses the same ring slots on reconnect and never reallocates the array. That means dropping the kzalloc_objs/kfree(priv->rings)/if (priv->rings) lines from xen_9pfs_front_init() and xen_9pfs_front_free(). In the new xen_9pfs_front_free_rings() I kept upstream's ordering: skip a ring with no intf, unbind the IRQ, then cancel_work_sync(). The downstream fields ring_order, rings_sem and connected and all of the reconnect logic are unchanged. The downstream disconnect path (schedule_work/flush_work, then free_rings) therefore also gets upstream's unbind-then-drain ordering.
  • 9p/xen: carry the 9P session across a restore (5b1ff5bbc8cb, now 37e9d8605e2f). File: net/9p/trans_xen.c. Collided with upstream 9b4cf60c6b73 9p/xen: validate the response size from the backend (Fixes, Cc: stable) in p9_xen_response(), and with the rings-array change above. I kept upstream's h.size < sizeof(h) || h.size > queued rejection first, then the downstream intercept of the P9_NOTAG control reply on ring 0, so the control path never uses an unvalidated h.size. A bad size now breaks before the intercept can complete ctl_done. That can't hang anything because xen_9pfs_front_ctl() waits with wait_for_completion_timeout(). I dropped the downstream rings allocation and free again (the array is embedded) and kept INIT_LIST_HEAD(&priv->session), init_completion(&priv->ctl_done) and xen_9pfs_front_session_free(). ring == priv->rings is still valid C, because the array decays to &rings[0], so I left it as written. Own +/- lines are identical; the verifier lists it as "context moved".
  • xen/gntdev: don't copy to user space under priv->lock (#79) (3f7ca89e3d70, now 2ab25ce3a8e5). File: drivers/xen/gntdev.c. Collided with upstream 7620a997e485 xen/gntdev: fix deadlock between map ioctl and mmap. Both fix the same deadlock. I kept the downstream reference-counted version (see the first UNSURE item). The upstream gntdev_find_map_index() re-lookup lines do not appear in the final tree; this is the gntdev drift the verifier reports.

Dropped downstream commits

None.

Build fixes

None. The workflow sent this branch back as a failed build. Its build logs hold only build-arm64.log, which ends kernel-build: arm64 vmlinux built (a pass), and there is no x86_64 log at all, so no build error was given to fix. Rebuilding d58f6bea5d31 with kernel-build.sh passed on both arches (see Builds). I changed no commit, and the branch is still d58f6bea5d31.

Upstream commits that meet the series

Fixes (Fixes:, CVE or Cc: stable) that touch files the series touches, and what the final tree shows:

  • a02926f7c89b xen-blkback: Avoid UAF when reading I/O statistics (XSA-528 / CVE-2026-100082): intact. rings_lock is initialised in xen_blkif_alloc(), taken for write when rings/nr_rings are published and torn down, and for read in the stats show_ macro. Downstream 4e54ad13ce40 only adds host_node and node placement and doesn't touch rings/nr_rings.
  • bfddc420afe8 xen-netback: defer xenvif_mcast_addr_list_free() (XSA-527 / CVE-2026-100081): intact. The only call is in backend_disconnect() after synchronize_net() (drivers/net/xen-netback/xenbus.c:270). Downstream 72d7a148f049 does not bring back the call in xenvif_disconnect_data().
  • 7b6f2e3c29fb 9p/xen: drain response work after unbinding IRQ: intact in xen_9pfs_front_free_rings() (see conflicts), which also covers the downstream disconnect and reconnect-error paths.
  • 9b4cf60c6b73 9p/xen: validate the response size from the backend: intact, and placed before the downstream control-reply intercept (see conflicts).
  • 4d183e6f1532 9p/xen: fix refcount leak in p9_xen_response() on wrong tag: intact (p9_req_put() on the wrong-tag path).
  • 241d46901226 9p: reject RERROR/RLERROR with zero errcode: intact in p9_check_errors(). Downstream doesn't touch it. The downstream control path in trans_xen.c already rejects ecode == 0 and ecode > MAX_ERRNO with -EPROTO.
  • 2acd800de882 9p: fix caches_show() out-of-bounds write: intact (sysfs_emit_at). Downstream only adds a separate features attribute next to it.
  • 7620a997e485 xen/gntdev: fix deadlock between map ioctl and mmap: superseded by the downstream equivalent. The lock ordering is kept; see UNSURE.
  • ea51d1a4c31f x86/CPU/AMD: Don't print reset reason in VMs: intact. It makes downstream d8221bf28f22 redundant; see UNSURE.
  • 2b66f2cc7532 Xen/gnttab: improve error handling in gnttab_dma_{alloc,free}_pages(), 4ebb3b8d129c xen: don't allow gnttab_dma_[alloc|free]_pages() in PV guest, 704f812cdab8 xen/grant-table: annotate on-stack work: intact. Downstream grant-table changes (xen_mfn_to_node, gnttab_alloc_pages_node) don't touch those functions.
  • 0f4a9e682f7f xattr: always invoke cap_convert_nscap() for security.capability writes: intact. Downstream only adds pax_getxattr().
  • 51e766bcd35e init/main: fix false-positive kernel panic on environment variable overwrite, b82ed0e3a1da init/main: fix off-by-one in argv_init cleanup, 278b2abf660a init/bootconfig: pass init arguments in documented order: intact. Downstream only adds pax_softmode and its __setup.
  • 1c8f6308e557 iommu/dma: Catch scatterlist length overflows: intact. Downstream only changes the PCI-window reservation condition in iova_reserve_iommu_regions().
  • mm/VMA fixes (13fc99f46399, c386d799f423, 769417e410dd, 168ed9c5d5ec, 0193e8336802, b1ee87802111, aa09311c40f6, f987d9f38a46, ff82ce7f90f5, 4c2dec1dce36, 8146c6478224, ef694e2d2101, 68cb098eadda, 7135a05838e8, dc0b17144d62) against the OpenPaX commits: MM_AUDIT_PLACEHOLDER

Other upstream changes that meet the series without a fix tag:

  • 8cdae75cebe0 arch/Kconfig: fix dead conditions by removing dead options: resolved; see conflicts.
  • 443bea2f71c5, acd19f2c56f2 (sysctl consolidation): resolved; see conflicts. 242bac52294e, d08ab285b096, 2bfbb09b505c (sysctl conversion rework): no interaction, since pax_table uses plain proc_dointvec.
  • b3d07d64832c 9p/xen: Use array for data rings: resolved; see conflicts. 33625427a382 net/9p: add vsock transport, 8bb0279930cc, 9eb9b583ea35, 7fb9bd365905, 5852cdf0006f: no interaction with the downstream 9p client and share_client changes.
  • 6eecb67b69af xen/grant-table: stop setting PG_private on pages for grant mapping: no downstream code uses PagePrivate/PG_private in Xen code. gnttab_alloc_pages_node() still goes through gnttab_pages_set_private() / gnttab_pages_clear_private().
  • 228e21764b38 Drivers: hv: Run VMBus kexec cleanup from syscore shutdown: see UNSURE.
  • dd57772e36f7 Drivers: hv: vmbus: Check ACPI companion before use: no interaction with the downstream hyperv_nested_on_xen IRQ-bridge branches in vmbus_bus_init() / vmbus_exit().
  • 118bdac10546 Drivers: hv: Add logical device ID registry for vPCI devices: the registry hashtable is initialised in hv_common_init(), which the downstream hyperv_init_nested_on_xen() calls, so hv_pci_probe() still works when nested. No overlap with the downstream nested-MSI and use_calls changes.
  • 2690d4156b51 iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest: x86_init.iommu.iommu_init = hv_iommu_init is set only in hyperv_init(), not in the downstream nested-on-Xen bring-up, so it can't race the Xen PV-IOMMU.
  • 1ae140d0f272 iommu: Make iommu-dma helpers private: upstream now includes "iommu-priv.h" in dma-iommu.c. Downstream 1b8277179ffe also adds that include (in a different spot), so the file now includes the header twice. That's harmless because the header has an include guard, so I left it.
  • fdd81f15fc43, 641a9b9cc697, 95d2fec40c48, 0bf031ba8c49, 42eed9bb9ca4 (iommu/dma-mapping): no interaction. The downstream Xen IOMMU driver doesn't use dma_opt_mapping_size() or the privatised helpers.
  • d0ec95a8a4e7 hv_netvsc: Advertise the SR-IOV capability for CoCo VMs, 56fb075b77f8 mshv: Redesign hypervisor memory deposit logic: no interaction with the downstream nested-on-Xen netvsc DMA mapping or the asm-generic declarations.
  • 0af298e62e5c treewide: refresh kmalloc_obj() conversions, bbe5d3b3d402, c2d4ccfbba3f, f000a06da2a5, 10823ced2f18, 8ebd2eb87f50, 5728d3523f12, 084100a1b579, aabe6e1b36ce, 677f83795fdf, 958c01049e0a, 38828d44f31e, 799203afd298, e3e7a85730a4, abaa0835b4f3, 264d8fd2794f, 28d5df7b7274, 537ec2b15fdd, 681f3b68f435, cf27412f19c9, 2e83e2ce34ff, 69d38c792c53: touch shared files only in places away from downstream hunks; no interaction. No downstream code references DEBUG_WX, VM_SPECIAL, is_vm_hugetlb_page, kho_scratch or hv_setup_kexec_handler.

Builds

Rebuilt in the repair run, at d58f6bea5d31:

  • x86_64: pass (kernel-build.sh x86_64, Edera host.config from edera-dev/linux-kernel-oci@530e23bbf906, the same config commit as the rebase run). The workflow's build left no x86_64 log, so whatever it saw there could not be reproduced or diagnosed from what this run was given.
  • arm64: pass (kernel-build.sh arm64, defconfig). This matches the workflow's own build-arm64.log, which also passed.

verify-upstream-rebase.sh gives the same result as before the repair: base and linearity pass, and the 2 changed commits and the drift are exactly the conflict resolutions above. There is no new drift.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.