From nobody Wed Dec 25 04:27:56 2024 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YHzJX629qz5hCZQ for ; Wed, 25 Dec 2024 04:27:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YHzJX2zTxz4Bsx for ; Wed, 25 Dec 2024 04:27:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735100876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R07fv8w/fgyP9mkrcVc9rEvL3UVkroUcMttoba897Yo=; b=bAs8OGhPCYtngyvOkFVDKmd1UGtF3A5Pw9+2w9ioJVS6GII4N4eUPts1pgL0jcFzpAUaDT 0jDy5Tw+zxxPXKK9kT5xpbHXazmjYS2nuXU94d2HN4VKS71iA//aDaIvM8Y2lsNC3ymXIV hTcr6W0CkF3Ts6gMTCkDr35fju5kZ4VcFGjrnWWwnZHhJvQehkE20UONoghG8WX0OlYj7R mZ20zcG2x/ueWX+1xdAKlV5R6dI/fP9wbhCINEFd1O5rqU3XUhzUmWLRITqY7iHYLy85Tp YaYBsAxk08Me5KQoSO1QOy2kfb42NnSQxGamX1ZM3P7fEJqH8GnrD4WrYSSRog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735100876; a=rsa-sha256; cv=none; b=Kjf86RDjYeUhbVFwthwr+XeTnUQ2n0HEfjEr8ZZVhlX0jn6SUFWaFOc0p5+Sk3tnRVwr7+ 73ow3cG+K4LKhcQ6nASW+b4f95O2VXWVxD0d/m52/iQitz+l/CXnvcU09k1yu42FBvQ9D0 E4Vo3vSmCPfT7mILUQXRXp7WzxIPR/2BD0EeuDQmSWW0IHQTwG/ibyjceWwSZCqGXC+i0R 5yMPgB9hDu8xyGKE5Eiqr5tiUb7yNRLsSILVk/O3HJ+zQ/T6tQZAgKC2IhIhrBekyvdI10 J24vi/wkeyw2JOZH76z6T62NvSKtCo7cHlcML5yuZDwGp1E4QSq9/au0ZpnMgA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YHzJX2B8sz187H for ; Wed, 25 Dec 2024 04:27:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4BP4Rud3022100 for ; Wed, 25 Dec 2024 04:27:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4BP4RupE022099 for fs@FreeBSD.org; Wed, 25 Dec 2024 04:27:56 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Wed, 25 Dec 2024 04:27:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267028 --- Comment #297 from Mark Millard --- (In reply to Mark Millard from comment #294) Updated patch that does some checking of the stages between which the odd value shows up: # 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..2f94d2cca356 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -1475,6 +1475,18 @@ sys_kldsym(struct thread *td, struct kldsym_args *ua= p) return (error); } +#define MODLIST_NEWMOD_HIST_SLOTS 256 +static char const* modlist_newmod_lookup_name=3D NULL;=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 // NULL: No problem found. +static int modlist_newmod_hist_pos=3D=20=20=20=20=20=20=20=20=20= =20=20 MODLIST_NEWMOD_HIST_SLOTS; // First use will wrap to 0 first. +static int modlist_newmod_tqe_next_changed_at=3D MODLIST_NEWMOD_HIST_SLOTS; // I.E.: No such found. +static modlist_t modlist_newmod_tqe_next_newvalue=3D NULL;=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 // NULL: No such found. +static struct modlist_newmod_hist_type { + modlist_t modAddr; + linker_file_t containerAddr; + char const* modnameAddr; + int version; +} modlist_newmod_hist[MODLIST_NEWMOD_HIST_SLOTS]; + /* * Preloaded module support */ @@ -1484,6 +1496,17 @@ modlist_lookup(const char *name, int ver) { modlist_t mod; + int modlist_newmod_rescan_start_at =3D 0; + if (16 <=3D modlist_newmod_hist_pos) modlist_newmod_rescan_start_at= =3D modlist_newmod_hist_pos-16; + for (int scan_pos=3D modlist_newmod_rescan_start_at; scan_poslink.tqe_next !=3D modlist_newmod_hist[scan_pos+1].modAddr) + { + modlist_newmod_lookup_name=3D name; + modlist_newmod_tqe_next_changed_at=3D scan_pos; + modlist_newmod_tqe_next_newvalue=3D=20=20 modlist_newmod_hist[scan_pos].modAddr->link.tqe_next; + panic("modlist_lookup: a prior tqe_next changed!"); + } + TAILQ_FOREACH(mod, &found_modules, link) { if (strcmp(mod->name, name) =3D=3D 0 && (ver =3D=3D 0 || mod->version =3D=3D ver)) @@ -1521,8 +1544,21 @@ 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); + + ++modlist_newmod_hist_pos; + if (MODLIST_NEWMOD_HIST_SLOTS<=3Dmodlist_newmod_hist_pos) modlist_newmod_hist_pos=3D 0; +#undef MODLIST_NEWMOD_HIST_SLOTS + modlist_newmod_hist[modlist_newmod_hist_pos].modAddr=3D mod; + modlist_newmod_hist[modlist_newmod_hist_pos].containerAddr=3D conta= iner; + modlist_newmod_hist[modlist_newmod_hist_pos].modnameAddr=3D modna= me; + modlist_newmod_hist[modlist_newmod_hist_pos].version=3D versi= on; + 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; --=20 You are receiving this mail because: You are on the CC list for the bug.=