Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 2024 18:25:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        fs@FreeBSD.org
Subject:   [Bug 267028] kernel panics when booting with both (zfs,ko or vboxnetflt,ko or acpi_wmi.ko) and amdgpu.ko
Message-ID:  <bug-267028-3630-RDQtoohRYf@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-267028-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-267028-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267028

--- Comment #289 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
I do not know if you want to be making debug/diagnostic
hacks to the 13.4 source code or not. But I know that
you already build your own kernel.

The following suggests such a temporary debug/diagnostic
hack. It has only been compile tested. It is possible that
pasting it here could modify the text in some way. So
take it as suggestive if lines split in problematical spots
or other such.

# git -C /usr/alt-src/ diff sys/kern/kern_linker.c
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 5271d002fba4..8b81a1b64722 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -1521,8 +1521,12 @@ modlist_newmodule(const char *modname, int version,
linker_file_t container)
        modlist_t mod;

        mod =3D malloc(sizeof(struct modlist), M_LINKER, M_NOWAIT | M_ZERO);
+       printf("modlist_newmodule: new node addr %p name %s: container addr=
 %p,
modname addr %p, version %d\n",
+               (void*)mod, modname, (void*)container, (void const*)modname,
version);
        if (mod =3D=3D NULL)
                panic("no memory for module list");
+       if (mod < (modlist_t)0xfffff80000000100)
+               panic("modlist_newmodule: mod <
(modlist_t)PHYS_TO_DMAP(0x100)");
        mod->container =3D container;
        mod->name =3D modname;
        mod->version =3D version;



For reference:

# git worktree list
/usr/official-src  7a4f370a352f [stable/14]
/usr/alt-src       3f40d5821eca [releng/13.4]
/usr/main-src      45d5b9f0324a [main]

so /usr/alt-src/ is based on releng/13.4 at this time.

I'll note that my compile testing was based on main's LLVM 19 based clang.
It did reject some 13.4-RELEASE source code that compared enum variables
with values from a different enum. So I made adjustments at those points
to be more like the modern code --but mostly to just avoid these places
stopping the build:

# git -C /usr/alt-src/ status
On branch releng/13.4
Your branch is up to date with 'freebsd/releng/13.4'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h
        modified:   sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c
        modified:   sys/dev/iavf/iavf_lib.c
        modified:   sys/dev/isci/scil/scif_sas_smp_remote_device.c
        modified:   sys/kern/kern_linker.c

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        sys/amd64/conf/GENERIC-DBG
        sys/amd64/conf/GENERIC-NODBG

no changes added to commit (use "git add" and/or "git commit -a")


GENERIC-DBG and GENERIC-NODBG were created just to match my local
conventions used in my scripts (both include GENERIC and then
specify more specific content for the purpose intended).

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267028-3630-RDQtoohRYf>