Skip to content

Rebase edera/mainline onto master @ 4843f6873f7c - #130

Closed
edera-rebase-app[bot] wants to merge 10000 commits into
edera/mainlinefrom
rebase/edera-mainline/20261122-1f12a9499e15-4843f6873f7c
Closed

edera-rebase-app[bot] wants to merge 10000 commits into
edera/mainlinefrom
rebase/edera-mainline/20261122-1f12a9499e15-4843f6873f7c

Conversation

@edera-rebase-app

Copy link
Copy Markdown

Nightly rebase of edera/mainline (1f12a9499e15) onto master (4843f6873f7c), driven by Claude. Not pushed automatically because the checker found drift 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 1f12a9499e15, and keeps a backup.

Independent checks

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

Old tip 1f12a9499e15
New tip 4d2a996ccd7d
Old upstream base 864c07de0c7d
New upstream base 4843f6873f7c
  • New branch is based on the upstream tip.
  • Downstream series is linear.
  • Downstream commit set changed: 134 before, 134 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 → c542022e3d46
  • d8221bf28f22 x86/CPU/AMD: avoid printing reset reasons on Xen domU → 49e0bc67bc07
  • bd1c0dba57c3 sysctl: wire up PaX softmode setting → 28adfa6f1bc9
  • 849ed61740ea use maximum supported mmap rnd entropy by default → 5ad6e6b4a5f1
  • 5b1ff5bbc8cb 9p/xen: carry the 9P session across a restore → 3431016efeed
  • 85e1da02b838 9p/xen: end foreign access on the grant refs we granted, not the intf page's → 731ff70ce778
Commits lost, added, or whose own +/- lines changed
Before After
f492e4d0cb26 9p/xen: reconnect to the backend on resume cfed65f8abba 9p/xen: reconnect to the backend on resume
3f7ca89e3d70 xen/gntdev: don't copy to user space under priv->lock (#79) 6b2631020b1c xen/gntdev: don't copy to user space under priv->lock (#79)
Drift (changed lines: upstream delta vs. actual change)
--- upstream-files
+++ actual-files
@@ -24420,8 +24420,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
@@ -804678,14 +804678,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);
@@ -903646,6 +903638,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",
@@ -903693,6 +903697,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;
 +}
@@ -903726,6 +903733,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
 -	{
@@ -903775,6 +903794,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;
 -}
@@ -941585,64 +941607,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 (1f12a9499e15) onto torvalds master 4843f6873f7c (v7.2-rc5-44189-g4843f6873f7c). The old base was 864c07de0c7d (v7.2-rc5-26646-g864c07de0c7d), so the upstream range is 16498 non-merge commits (merge window). All 134 downstream commits were replayed onto rebase-result in their original order. There was no merge commit to flatten and no commit was dropped. Five commits conflicted and I resolved each one. Four of the resolutions show up as drift; the fifth (Kconfig) does not. x86_64 and arm64 both build. verify-upstream-rebase.sh passes on base, linearity and commit count. It fails on two items, both expected from the resolutions below:

  • "commit set changed": 9p/xen: reconnect to the backend on resume and xen/gntdev: don't copy to user space under priv->lock now have different +/- lines.
  • "drift": in kernel/sysctl.c, net/9p/trans_xen.c and drivers/xen/gntdev.c.

Needs a decision

  • UNSURE: xen/gntdev: don't copy to user space under priv->lock (#79) (3f7ca89 → 6b26310) fixes the same mmap_lock/priv->lock deadlock as upstream 7620a99 xen/gntdev: fix deadlock between map ioctl and mmap (Cc: stable, same Fixes: tag). The two fixes differ:

    • Upstream: drops priv->lock before copy_to_user(). On failure it re-takes the lock and looks the map up again with gntdev_find_map_index().
    • Downstream: drops the lock too, but first takes an extra reference on the map. On failure it removes the map only if that exact pointer is still on priv->maps, then drops both references.

    What I committed: the downstream version as-is. After the resolution, gntdev_ioctl_map_grant_ref() is byte-identical to what it was on the old tip, and upstream's lookup-by-index lines are gone (that is the gntdev drift). I believe the downstream version covers everything upstream's fix does: the lock is dropped across the copy, and a concurrent unmap is tolerated. It also avoids a case upstream's version can hit: a concurrent unmap followed by a new map that reuses the same index, after which the index lookup would unlist and put somebody else's map.

    Other reading: the fix is upstream now, so take upstream's code and let the downstream commit shrink to nothing or be dropped. That leaves less downstream delta, but brings in the index-reuse case above.

    A maintainer should choose. If the downstream version stays, it may be worth sending upstream.

  • UNSURE: upstream 228e217 Drivers: hv: Run VMBus kexec cleanup from syscore shutdown changes behaviour for the Hyper-V-nested-on-Xen feature, although no lines collided.

    • Before: hv_kexec_handler() ran only from hv_machine_shutdown(). That hook is installed by ms_hyperv_init_platform(), i.e. only when x86_hyper_type == X86_HYPER_MS_HYPERV, so it never ran on a Xen PV dom0 nested under Hyper-V.
    • Now: it runs from VMBus's syscore .shutdown on any kexec. On a nested-on-Xen dom0 that is new behaviour: vmbus_initiate_unload(), hv_stimer_global_cleanup() and the SynIC cpuhp teardown. The Xen VMBus VIRQ bridge (hyperv_remove_xen_vmbus_irq()) is still not torn down on that path.

    One reading: this is an improvement, since the L0 host gets a VMBus unload before kexec, as on native Hyper-V.

    Other reading: this teardown has never run on Xen-proxied SynIC MSRs, so kexec on a nested dom0 is now an untested path. It may also need the Xen bridge removed.

    I left upstream's code unchanged and made no downstream change. Someone who owns the nested-on-Xen feature should confirm kexec still works (or doesn't matter) there.

Conflicts resolved

  • sysctl: wire up PaX softmode setting (bd1c0db → 28adfa6), kernel/sysctl.c. Collided with upstream 443bea2 sysctl: consolidate CONFIG_SYSCTL into a single block in kernel/sysctl.c (and acd19f2), which moved sysctl_subsys_table and sysctl_init_bases() into the single #ifdef CONFIG_SYSCTL block. I put the pax_table definition and the register_sysctl_init("kernel/pax", pax_table) call in their new location, unchanged, and dropped the stale copy of the old block that git left after the #else stubs. Upstream's layout is kept as it is. The drift is the PaX lines moving with the code they belong to.

  • use maximum supported mmap rnd entropy by default (849ed61 → 5ad6e6b), arch/Kconfig. Collided with upstream 8cdae75 arch/Kconfig: fix dead conditions by removing dead options. Upstream removed ARCH_MMAP_RND_{,COMPAT_}BITS_DEFAULT and their default ... if ... lines; using an int symbol as a condition always evaluated false, so those lines never had any effect. I kept that removal and applied the downstream change, falling back to ..._MAX instead of ..._MIN. The behaviour is the same as before. The commit's own +/- lines are unchanged, so this one is not drift.

  • 9p/xen: reconnect to the backend on resume (f492e4d → cfed65f), net/9p/trans_xen.c. Collided with two upstream commits:

    • b3d07d6 9p/xen: Use array for data rings: priv->rings became a fixed array inside priv.
    • 7b6f2e3 9p/xen: drain response work after unbinding IRQ (Fixes:, Cc: stable).

    What I kept:

    • Upstream's fixed rings[XEN_9PFS_NUM_RINGS] array, with the downstream ring_order, rings_sem and connected fields added after it.
    • The downstream split of the teardown into xen_9pfs_front_free_rings() / xen_9pfs_front_free(), but with upstream's ordering in free_rings: unbind_from_irqhandler() first, then cancel_work_sync(). The fix wins, and the downstream disconnect/reconnect path, which calls free_rings, gets the same guarantee.
    • xen_9pfs_front_free() no longer null-checks or kfrees priv->rings.
    • xen_9pfs_front_init() keeps the downstream ring_order/init_rwsem setup and drops the downstream kzalloc of the rings array.
  • 9p/xen: carry the 9P session across a restore (5b1ff5b → 3431016), net/9p/trans_xen.c. Collided with upstream 9b4cf60 9p/xen: validate the response size from the backend (Fixes:, Cc: stable) in p9_xen_response(), and with b3d07d6 as above.

    • Upstream's h.size range check comes before the downstream ring-0 P9_NOTAG control-reply branch. That branch also advances cons by h.size and copies up to h.size bytes, so it is now covered by the check.
    • ring == priv->rings is still valid with the array: it decays to &priv->rings[0].
    • The free path and init kept the session-list free and INIT_LIST_HEAD/init_completion, without the rings kzalloc/kfree.

    The commit's own +/- lines are unchanged; only the context moved.

  • xen/gntdev: don't copy to user space under priv->lock (#79) (3f7ca89 → 6b26310), drivers/xen/gntdev.c. Collided with upstream 7620a99. I kept the downstream version; see the first item under Needs a decision.

Dropped downstream commits

None.

Build fixes

None.

Upstream commits that meet the series

Fixes (Fixes:/CVE/stable) on files the series touches, checked in the final tree:

  • 7b6f2e3c29fb 9p/xen: drain response work after unbinding IRQ: intact. xen_9pfs_front_free_rings() unbinds before cancel_work_sync(), and the downstream disconnect path uses that same function.
  • 9b4cf60c6b73 9p/xen: validate the response size from the backend: intact, and it runs before the downstream control-reply branch (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(). The downstream control path in xen_9pfs_front_ctl() already rejects ecode == 0 / > MAX_ERRNO with -EPROTO on its own.
  • 7620a997e485 xen/gntdev: fix deadlock between map ioctl and mmap: superseded by the downstream version (UNSURE above). The deadlock stays fixed because priv->lock is not held across copy_to_user().
  • a02926f7c89b xen-blkback: Avoid UAF when reading I/O statistics (XSA-528 / CVE-2026-100082): intact. The rings_lock covers ring alloc/free and the sysfs readers. The downstream NUMA changes only add host_node and kthread/IRQ placement and don't touch the locked sections.
  • bfddc420afe8 xen-netback: defer xenvif_mcast_addr_list_free() (XSA-527 / CVE-2026-100081): intact. The call is no longer in xenvif_disconnect_data() and comes after synchronize_net() in backend_disconnect(). The downstream interface.c changes only touch IRQ/kthread placement.
  • ea51d1a4c31f x86/CPU/AMD: Don't print reset reason in VMs: intact. Its X86_FEATURE_HYPERVISOR check covers the narrower downstream d8221bf28f22 x86/CPU/AMD: avoid printing reset reasons on Xen domU check (XENPV && !dom0), which replayed cleanly next to it. The downstream commit is now redundant but harmless; a maintainer may want to drop it later.
  • 13fc99f46399, c386d799f423, ff82ce7f90f5, f987d9f38a46, b1ee87802111, 0193e8336802, 4c2dec1dce36, 168ed9c5d5ec, 769417e410dd, 8146c6478224, aa09311c40f6, 68cb098eadda, 7135a05838e8 (mm/vma hotfixes): these don't reach OpenPaX. OpenPaX keeps its state in a separate mm->pax_flags word, not in VMA flags. Its only mm/vma.c hook (the MPROTECT strip in do_brk_flags()) and the map_deny_write_exec() change both still apply to the new vma_flags_t API, and both builds pass.
  • 0f4a9e682f7f xattr: always invoke cap_convert_nscap() for security.capability writes: no interaction with the downstream pax_getxattr().
  • 51e766bcd35e, b82ed0e3a1da (init/main argv/env fixes): no interaction with pax_softmode=.
  • 2b66f2cc7532, 4ebb3b8d129c (gnttab_dma_* error handling / PV restriction): intact. No downstream code calls gnttab_dma_{alloc,free}_pages().
  • dd57772e36f7 Drivers: hv: vmbus: Check ACPI companion before use: intact, no interaction.
  • 228e21764b38 Drivers: hv: Run VMBus kexec cleanup from syscore shutdown: see UNSURE above.

Other upstream commits that touch files the series touches, with no conflict or interaction found:

  • 6eecb67b69af xen/grant-table: stop setting PG_private on pages for grant mapping. The downstream gnttab_alloc_pages_node() and the gntdev placeholder relocation go through gnttab_pages_set_private()/gnttab_free_pages(). Nothing downstream uses PagePrivate/PG_private (grepped).
  • 704f812cdab8 xen/grant-table: annotate on-stack work in gnttab_unmap_refs_sync().
  • 1ae140d0f272 iommu: Make iommu-dma helpers private. This adds #include "iommu-priv.h" to dma-iommu.c, which the downstream PV-IOMMU commits also add, so the header is now included twice (header-guarded, harmless). I left the downstream commit unchanged; the line can be dropped there later.
  • fdd81f15fc43, 1c8f6308e557 (dma-iommu cleanups). The downstream xen_iommu_manages_iova() exception in iova_reserve_iommu_regions() is intact.
  • 2690d4156b51 iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest. It sets x86_init.iommu.iommu_init only in hyperv_init(), which the nested-on-Xen path (hyperv_init_nested_on_xen()) does not run.
  • 118bdac10546 Drivers: hv: Add logical device ID registry for vPCI devices. It applies to the nested-on-Xen vPCI path unchanged; the downstream MSI root-domain/vector overrides are separate.
  • 56fb075b77f8 mshv: Redesign hypervisor memory deposit logic.
  • d0ec95a8a4e7 hv_netvsc: Advertise the SR-IOV capability for CoCo VMs.
  • 0af298e62e5c treewide: refresh kmalloc_obj() conversions.
  • 9p: b3d07d64832c 9p/xen: Use array for data rings (see Conflicts), 2acd800de882 9p: fix caches_show() out-of-bounds write, 9eb9b583ea35, 8bb0279930cc, 7fb9bd365905, 5852cdf0006f, 33625427a382 net/9p: add vsock transport (does not set share_client).
  • sysctl: 443bea2f71c5, acd19f2c56f2 (see Conflicts), 242bac52294e, d08ab285b096, 2bfbb09b505c.
  • 8cdae75cebe0 arch/Kconfig: fix dead conditions by removing dead options (see Conflicts), 2e83e2ce34ff arch, mm: promote DEBUG_WX to CHECK_WX, 47e725702b0b mm: make per-VMA locks available universally.
  • The remaining mm/vma refactors on mm/vma.c, mm/vma.h, mm/mmap.c, mm/util.c, mm/vma_internal.h and tools/testing/vma/include/{dup,stubs}.h (72a993449cb0, 44debd840ec9, c911e7ebebf5, 9201d0f5b9d5, 7fdbc26b69c0, b7b4d8f37a4f, 9cae38dc11da, 86a779c53204, f85eb0656c40, e59c9a971a9f, 4b019e056f6c, 35e340a47888, 69d38c792c53 and others in the range). The downstream randomisation/brk hunks replayed unchanged. I did not run the userland VMA tests in tools/testing/vma.
  • init/bootconfig/kernel-parameters: 278b2abf660a, 084100a1b579, aabe6e1b36ce, 677f83795fdf, 958c01049e0a, 10823ced2f18, 8ebd2eb87f50, f000a06da2a5, cf27412f19c9, 5728d3523f12, 799203afd298, e3e7a85730a4, 681f3b68f435, 28d5df7b7274, 537ec2b15fdd, 38828d44f31e, abaa0835b4f3, 264d8fd2794f, bbe5d3b3d402.
  • iommu build plumbing: 0bf031ba8c49, 42eed9bb9ca4.
  • dma-mapping: 641a9b9cc697, 95d2fec40c48.

Builds

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.