From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8922B23EA85 for ; Wed, 19 Nov 2025 01:35:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763516120; cv=none; b=dKtmWwQNX59olJrNp46UvmzMUlCDv+WiVZd+D80tJc5GzBQ1xS7Rzax87lXFXYmS/pUK9ZTnAk8WwyAfyIYLCwmkkvXPCNzLtpmtDmAHhTqYsNERTtDGKdq7uwqFjoKhC9A9h6U65pYDpHNvlyZTLjmgYxzDVL175a0edbzUJ+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763516120; c=relaxed/simple; bh=z4UfWY+HM96cS+bJaC20iX0R65MVaVlNduumbzVjT/w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jE27XEDpLnNn42sml8Mu/yr1O10KkyU+QZqv8bKZKs790dM44VaPa3xUeLyyChw9rqaMjbUgbb5mwDyevI7K2PDMnTxzeCaycXfZwgLUmwggPBHov922m0IKBstlx7fa3cQAC3Sdwp5W1/heCS9rfmlHQpOyJz+lq68iuX+XJkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ddIHUIHW; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ddIHUIHW" Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-340e525487eso3993059a91.3 for ; Tue, 18 Nov 2025 17:35:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763516118; x=1764120918; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zs/dwUydWhNQ3xB5pbgWRyDUzvf3IvljLzh3ebv5mDk=; b=ddIHUIHWpaZNOCFDa9a/8MEU3jCI4GypH4glVWT+LBadCh+N4EOSPbCokNsuFSfisY ADxCD26zgW9r40gcg4Kvo4VLTbhkV1FCZUAVzMkdnsvaJNkvt6vyXU2lSNxT6uCvqoCM 1/f+IYWGd54XroRhIgL3hu6WQT3Alaok7s9ItjBIWsLhuP3CfhTbYgSt7QyzhZgzPBvP 3IQkp3siHqNn+99RWjmaHMC8KYW080/4GBb/Fk4+ym0viuuhYJoL6ytZttidFzTq1t0I rAJV/h9ie0x42qw3a4rcvHj/CfYHq3ImUS+XXzXLr/1gLFwEPMsXSVCB3YgIJGgijtZE dZxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763516118; x=1764120918; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zs/dwUydWhNQ3xB5pbgWRyDUzvf3IvljLzh3ebv5mDk=; b=VMGVY4gSJvx4ozaFLsfPbz4lDcnyYAPZSLqIarGlILc53ngFxvVR8ogF8kQP2QLf+x RYsvHu5rMAFpnOJWYd3zGyKpZjnrFqjtlFW9HngOqtIxQyKItFC0vq6c3AcP30Q2RxPs 2sbj4mfXE/AGQuELkWhBfzZLud5sWwtuJ7Pn3pxxqNvGXAF4M+JbmXN//HyT36wvKfv8 l8AJtQQA+gLS0vAhdCLxdi2m5ifYYpuGSV1Py/Wqf6Z3fXiR4Tt7vQm130L7ZUZghV4D HUHV/1x5ngzQVAIIHF4lbPd7UEzDpu/lNJfPsLrTs+EGKbTFdFArhUmxMIZeQ3jDFQV8 S9Qg== X-Forwarded-Encrypted: i=1; AJvYcCXubSfK0TBIIOPizeeBgtvlJe32+9/7ym2uUbSjgw+FJcsy753EX4eYNmxWkdNFNcfEJ0QfOQ8SNjDQHls=@vger.kernel.org X-Gm-Message-State: AOJu0YxZhO9ZnMqgeWcjlGwil4SsJodhtzGt9fAbPE+KvNGjL75Tc7eN 85Pc0OTvBsw6p7+G/95paBCGJbCMRDCl87bvCuVeRYufeYocHHd3EkwN X-Gm-Gg: ASbGncuvnGf43E5mItIZ5GCJa/VdXtgSiCdTHfmvsOCpvl88Zz4gMRnQdmYE515mIcP p1fLuiBYZ0ovmFDO8O4M30of+GyxO4Of2COsDj0jk6PVvxVs9feZHd92Tgcj3pG6DMdn0c5SxgH N5dCQZ3xMA3hRAr2IhPSlpZJMS052UjWn6o2l3Tz5mJBEykbiKKWt5wNPkeWlmY8Mx36ct1UVbg 44LWSpM6stN46c/8NoZgHhrOaxdm8dzvmd6yqWiWTAdIHiSsRP5joRqf33JlGHxlqVPqF1khFwK GjXAnG9xotvorT34q+r/mSJCDrMLfHwIaWV+sfSPzu5+l1tjdjBq242+GNVlj4fOH7frbgH9Hjg rpJv27kiar2jq8qupFI2ctDeyuNHgDIgPkz9rJ4tqg4/4/gvb/Sxsv/czdbAEIefcAIcx5teulO Adz5n8zqYV7xZ3iPvhKAzUbA== X-Google-Smtp-Source: AGHT+IFUja3/j3EoVg79fastISz1kS2CRT1ZWS1NK7BvrEoAPMWebw9Qo1+2OQ1pKE6G+mdOAAP4CA== X-Received: by 2002:a17:90b:3a45:b0:32b:9750:10e4 with SMTP id 98e67ed59e1d1-343fa74fc58mr20924125a91.27.1763516117776; Tue, 18 Nov 2025 17:35:17 -0800 (PST) Received: from archie.me ([210.87.74.117]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-345bc25fffasm728132a91.14.2025.11.18.17.35.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Nov 2025 17:35:16 -0800 (PST) Received: by archie.me (Postfix, from userid 1000) id 1C63F437DEF5; Wed, 19 Nov 2025 08:35:15 +0700 (WIB) Date: Wed, 19 Nov 2025 08:35:14 +0700 From: Bagas Sanjaya To: Jim Cromie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, gregkh@linuxfoundation.org, jbaron@akamai.com Cc: ukaszb@chromium.org, louis.chauvet@bootlin.com Subject: Re: [PATCH v6 00/31] drm/dyndbg: Fix dynamic debug classmap regression Message-ID: References: <20251118201842.1447666-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7NG7/GLbwQ6+GyNO" Content-Disposition: inline In-Reply-To: <20251118201842.1447666-1-jim.cromie@gmail.com> --7NG7/GLbwQ6+GyNO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 18, 2025 at 01:18:10PM -0700, Jim Cromie wrote: > hello all, >=20 > commit aad0214f3026 ("dyndbg: add DECLARE_DYNDBG_CLASSMAP macro") >=20 > added dyndbg's "classmaps" feature, which brought dyndbg's 0-off-cost > debug to DRM. Dyndbg wired to /sys/module/drm/parameters/debug, > mapped its bits to classes named "DRM_UT_*", and effected the callsite > enablements only on updates to the sys-node (and underlying >control). >=20 > Sadly, it hit a CI failure, resulting in: > commit bb2ff6c27bc9 ("drm: Disable dynamic debug as broken") >=20 > The regression was that drivers, when modprobed, did not get the > drm.debug=3D0xff turn-on action, because that had already been done for > drm.ko itself. >=20 > The core design bug is in the DECLARE_DYNDBG_CLASSMAP macro. Its use > in both drm.ko (ie core) and all drivers.ko meant that they couldn't > fundamentally distinguish their respective roles. They each > "re-defined" the classmap separately, breaking K&R-101. >=20 > My ad-hoc test scripting helped to hide the error from me, by 1st > testing various combos of boot-time module.dyndbg=3D... and > drm.debug=3D... configurations, and then inadvertently relying upon > those initializations. >=20 > This series addresses both failings: >=20 > It replaces DECLARE_DYNDBG_CLASSMAP with >=20 > - `DYNAMIC_DEBUG_CLASSMAP_DEFINE`: Used by core modules (e.g., > `drm.ko`) to define their classmaps. Based upon DECLARE, it exports > the classmap so USE can use it. >=20 > - `DYNAMIC_DEBUG_CLASSMAP_USE`: this lets other "subsystem" users > create a linkage to the classmap defined elsewhere (ie drm.ko). > These users can then find their "parent" and apply its settings. >=20 > It adds a selftest script, and a 2nd "sub-module" to recapitulate > DRM's multi-module "subsystem" use-case, including the specific > failure scenario. >=20 > It also adds minor parsing enhancements, allowing easier construction > of multi-part debug configurations. These enhancements are used to > test classmaps in particular, but are not otherwize required. What commit/tree this series is based on? Confused... --=20 An old man doll... just what I always wanted! - Clara --7NG7/GLbwQ6+GyNO Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCaR0exgAKCRD2uYlJVVFO o2hqAP9JIsHiw0TSJg1pW0e4Xips9yEj2FH7p7nP4ehEsL+1NwD+Pmi/0eq3gpEV f7h988/+aMniaCsrVH8kEUCHA38UTAs= =pou0 -----END PGP SIGNATURE----- --7NG7/GLbwQ6+GyNO--