From nobody Wed Mar 22 16:59:21 2023 X-Original-To: bugs@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 4PhZSp4km6z413wB for ; Wed, 22 Mar 2023 16:59:22 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PhZSp3FXXz3lhB for ; Wed, 22 Mar 2023 16:59:22 +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=1679504362; 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=DcgaboIKxRpU528SRobmEr17eMz5/FGWMbJLPzVa+Wk=; b=e6w+Zv06+sfF1z/oHNW6XFlvBypnokosTtRXUhkmY6oINlfJCfIwfix4tK41b1xeX4xbUb gjm/mh/03j/4PsEywBaOdAy3vVoZkvGUlwIqG2aticmxqrQJVs9K1GfLhPsOFwAZ/LJlVJ D0oxVylApftxs533IwARztyr0g/2sIdYm4fhAPvy/npkdoQYRITEY3aFjio3nbuhfYRUJ3 gx9UxFcaUp5Lhal+VoMjwqa8DmsYjw4R9nRuZmJoZQn//IGPPyg0GHzzsiVlajQgTZBjaT i3GnCMuwHitTAdtqfTHOQTiPFlJgxp4PKNpOsAj2zbpRkDF5ijvlpWuzL0G45Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679504362; a=rsa-sha256; cv=none; b=CGqwHnE+g1/6vn7EUATG6okRKqz/PB6FUPco2IyUZqRU2ZuLOSHZDPxW6/gJlWM7acINaV Q0H7ILkAkzywBdB5rBD3VMe/LkAafbWgeuokffZKyZDPBdfTnb7jZTablE9vHUukNlHLhD ocNuo7mS/PHtOWR2zkwfF7fNYDxPFHe4K3CS+tauLhWQxbvO8aIwsP0wRkuqjvMHun6UIj regNDkV7oPDFjtcn4YGIPdxG3G9b+4CnpJ+J5AJwTcbuS46GtIdx3TYQvdkKHyr1NzzIgi OQfy60r4M3G5kwGScgJWYfd6yGbIwiVoOn99qrJfsIx0we3+7w78BHunkt8Afw== 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 4PhZSp2Jwyz11yN for ; Wed, 22 Mar 2023 16:59:22 +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 32MGxMHC087672 for ; Wed, 22 Mar 2023 16:59:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 32MGxMla087671 for bugs@FreeBSD.org; Wed, 22 Mar 2023 16:59:22 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: bugs@FreeBSD.org Subject: [Bug 265484] Adding INVARIANTS to GENERIC 13.1 kernel causes panic in mrsas Date: Wed, 22 Mar 2023 16:59:21 +0000 X-Bugzilla-Reason: AssignedTo 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: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jeremie.jourdin@advens.fr X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265484 J=C3=A9r=C3=A9mie Jourdin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremie.jourdin@advens.fr --- Comment #7 from J=C3=A9r=C3=A9mie Jourdin -= -- (In reply to Mark Johnston from comment #6) Hello,=20 I faced the same issue running HardenedBSD (13-stable and current) on a HP Server DL360 Gen 10 plus with BROADCOM AERO-10E2 SAS Raid Controller. kernel panic occurs as soon as a write access is attempted on /dev/da0. So I decided to test on FreeBSD and I can confirm that : - On FreeBSD-13.2-RC3 -> it works - On FreeBSD-14.0-CURRENT -> kernel panic According to me this problem is related to the "INVARIANTS" options in kern= el : the mrsas driver source code has not been modified to deal with these optio= ns. kernel panic occurs when trying to unlock the "sim_lock" mutex. With a custom GENERIC kernel without these options (tested on HardenedBSD),= it works. As a proof of concept, I patched sys/kern/kern_mutex.c to not panic in case= of wrong assertion (!mtx_owned(m)) on the mutex "mrsas_sim_lock" used in sys/dev/mrsas/mrsas.c. With this workaround in place, even with INVARIANTS options, no problem with mrsas driver anymore. Hope it can help to fix this issue, I would be happy to help testing a patc= h or anything, do not hesitate. --=20 You are receiving this mail because: You are the assignee for the bug.=