From nobody Sat Dec 21 09:06:39 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 4YFdgz5LSSz5YpRY for ; Sat, 21 Dec 2024 09:06:39 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YFdgz1FTnz4j99 for ; Sat, 21 Dec 2024 09:06:39 +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=1734771999; 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=/J4BT5YqKoIq0d+9uMWipQfFAmbRpVvx5PaQTYhthic=; b=VkWmk9yMYXVoT/BtvOQf59Nfy6rAMe9OS6ASqh5R+3cVbyBlAg35hhjkyLAgz4VdR4oY8Q FHgph/sviBCStObhT/cUACwz66z48BzvvhS1VMAzygrHgHezWDoVPSNPhMoPgmZIOlTeu2 9t0FQxMhv0kV51oDmsJClzh/mKWSPmxk3oa0H98OYZrNzbjUpFNhQNlWPpHgwJrmmKAO9/ cucuH/IsUiwp0WnWZuKBRivyh1Il3DvNLn1Y479Tc04dOVuE2o50TSuiPRr17JpoASgbXx 0gk+udk/OIYT0jNBZnQtqxvMyA/Af+InQr+ibvoOvlwb6TTj5SojiHWVCK6ldw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734771999; a=rsa-sha256; cv=none; b=PnuowrWVZRQJ0mxmKWq5TAD4Ftp7tIPTqmZv1G5R6/hFhryoQCPVJB3Rj4T0FE/fnj65+/ brxt0X0B5SQhUl3j0pNJIput6SA3w7M+QH2SbcmpC8b8aHm1aJNkHPQvDg8y4GY8hnDUbK M8efjhXtpof38BffT40q4GzyXoCWeyc56b/iiIWPfADzMUvGT6VQCG2yCiMB1fkmy1k24F x10pTytfiIhUSpH83JtwLd/OOjiGFev7c0BO8TRvHnWIzaYNzqNSxj91UkxX4jTA1k1KAs ALdmX+I7ayNKYKIlO1bAExiZboyACGw08x5mF+XWvsarRQUTPTtUGw+1zvwPKQ== 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 4YFdgz0klTzHwC for ; Sat, 21 Dec 2024 09:06:39 +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 4BL96cVR021553 for ; Sat, 21 Dec 2024 09:06:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4BL96cSE021551 for fs@FreeBSD.org; Sat, 21 Dec 2024 09:06:38 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: Sat, 21 Dec 2024 09:06:39 +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: satanist+freebsd@bureaucracy.de 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: cc 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 satanist+freebsd@bureaucracy.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |satanist+freebsd@bureaucrac | |y.de --- Comment #259 from satanist+freebsd@bureaucracy.de --- I think you looking at the wrong direction. The question is where does the = NULL pointer is from. So lets look at the 'found_modules->tqh_first->link.tqe_next->. . .->link.tqe_next' instance. This list only managed by sys/kern/kern_linker.= c. And only at one point there is an insert: ``` static modlist_t 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); if (mod =3D=3D NULL) panic("no memory for module list"); mod->container =3D container; mod->name =3D modname; mod->version =3D version; TAILQ_INSERT_TAIL(&found_modules, mod, link);=20 return (mod); } ``` So I would guess the +7 is from the TAILQ list and the fake NULL pointer is directly from malloc(9). So a build with MALLOC_DEBUG might help. Also I have looked a bit a for PHYS_TO_DMAP in sys/compat/linuxkpi and found arch_io_reserve_memtype_wc(). This function is used at drm-kmod/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: ``` int r =3D arch_io_reserve_memtype_wc(adev->gmc.aper_base, adev->gmc.aper_size); if (r) { DRM_ERROR("Unable to set WC memtype for the aperture base\n"); #ifdef __linux__ /* * BSDFIXME: On recent AMD GPU requested area cross= es * DMAP boundries resulting in error. Ignore it for= now */ return r; #endif } ``` This could also sneak in a fake NULL pointer and cause UB. --=20 You are receiving this mail because: You are on the CC list for the bug.=