lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <PH3PPF7A88A980A2874FA7C4CE826958826E59FA@PH3PPF7A88A980A.namprd11.prod.outlook.com>
Date: Fri, 30 Jan 2026 17:52:07 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: "Vecera, Ivan" <ivecera@...hat.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: Eric Dumazet <edumazet@...gle.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, Leon Romanovsky <leon@...nel.org>, "Lobakin,
 Aleksander" <aleksander.lobakin@...el.com>, "linux-rdma@...r.kernel.org"
	<linux-rdma@...r.kernel.org>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, "Kubalewski, Arkadiusz"
	<arkadiusz.kubalewski@...el.com>, "intel-wired-lan@...ts.osuosl.org"
	<intel-wired-lan@...ts.osuosl.org>, Jakub Kicinski <kuba@...nel.org>, "Paolo
 Abeni" <pabeni@...hat.com>, Jiri Pirko <jiri@...nulli.us>, Richard Cochran
	<richardcochran@...il.com>, Prathosh Satish <Prathosh.Satish@...rochip.com>,
	Vadim Fedorenko <vadim.fedorenko@...ux.dev>, Mark Bloch <mbloch@...dia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Tariq Toukan
	<tariqt@...dia.com>, Andrew Lunn <andrew+netdev@...n.ch>, Jonathan Lemon
	<jonathan.lemon@...il.com>, Saeed Mahameed <saeedm@...dia.com>, "David S.
 Miller" <davem@...emloft.net>
Subject: RE: [Intel-wired-lan] [PATCH net-next v3 7/9] dpll: Add reference
 count tracking support



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Ivan Vecera
> Sent: Friday, January 30, 2026 5:54 PM
> To: netdev@...r.kernel.org
> Cc: Eric Dumazet <edumazet@...gle.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Leon Romanovsky <leon@...nel.org>;
> Lobakin, Aleksander <aleksander.lobakin@...el.com>; linux-
> rdma@...r.kernel.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>; Kubalewski, Arkadiusz
> <arkadiusz.kubalewski@...el.com>; intel-wired-lan@...ts.osuosl.org;
> Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>;
> Jiri Pirko <jiri@...nulli.us>; Richard Cochran
> <richardcochran@...il.com>; Prathosh Satish
> <Prathosh.Satish@...rochip.com>; Vadim Fedorenko
> <vadim.fedorenko@...ux.dev>; Mark Bloch <mbloch@...dia.com>; linux-
> kernel@...r.kernel.org; Tariq Toukan <tariqt@...dia.com>; Andrew Lunn
> <andrew+netdev@...n.ch>; Jonathan Lemon <jonathan.lemon@...il.com>;
> Saeed Mahameed <saeedm@...dia.com>; David S. Miller
> <davem@...emloft.net>
> Subject: [Intel-wired-lan] [PATCH net-next v3 7/9] dpll: Add reference
> count tracking support
> 
> Add support for the REF_TRACKER infrastructure to the DPLL subsystem.
> 
> When enabled, this allows developers to track and debug reference
> counting leaks or imbalances for dpll_device and dpll_pin objects. It
> records stack traces for every get/put operation and exposes this
> information via debugfs at:
>   /sys/kernel/debug/ref_tracker/dpll_device_*
>   /sys/kernel/debug/ref_tracker/dpll_pin_*
> 
> The following API changes are made to support this:
> 1. dpll_device_get() / dpll_device_put() now accept a 'dpll_tracker *'
>    (which is a typedef to 'struct ref_tracker *' when enabled, or an
> empty
>    struct otherwise).
> 2. dpll_pin_get() / dpll_pin_put() and fwnode_dpll_pin_find()
> similarly
>    accept the tracker argument.
> 3. Internal registration structures now hold a tracker to associate
> the
>    reference held by the registration with the specific owner.
> 
> All existing in-tree drivers (ice, mlx5, ptp_ocp, zl3073x) are updated
> to pass NULL for the new tracker argument, maintaining current
> behavior while enabling future debugging capabilities.
> 
> Co-developed-by: Petr Oros <poros@...hat.com>
> Signed-off-by: Petr Oros <poros@...hat.com>
> Signed-off-by: Ivan Vecera <ivecera@...hat.com>
> ---
> v3:
> * added Kconfig dependency on STACKTRACE_SUPPORT and DEBUG_KERNEL
> ---
>  drivers/dpll/Kconfig                          | 15 +++
>  drivers/dpll/dpll_core.c                      | 98 ++++++++++++++----
> -
>  drivers/dpll/dpll_core.h                      |  5 +
>  drivers/dpll/zl3073x/dpll.c                   | 12 +--
>  drivers/net/ethernet/intel/ice/ice_dpll.c     | 14 +--
>  .../net/ethernet/mellanox/mlx5/core/dpll.c    | 13 +--
>  drivers/ptp/ptp_ocp.c                         | 15 +--
>  include/linux/dpll.h                          | 19 +++-
>  8 files changed, 138 insertions(+), 53 deletions(-)
> 
> diff --git a/drivers/dpll/Kconfig b/drivers/dpll/Kconfig index
> ade872c915ac6..be98969f040ab 100644
> --- a/drivers/dpll/Kconfig
> +++ b/drivers/dpll/Kconfig
> @@ -8,6 +8,21 @@ menu "DPLL device support"
>  config DPLL
>  	bool
> 
> +config DPLL_REFCNT_TRACKER
> +	bool "DPLL reference count tracking"
> +	depends on DEBUG_KERNEL && STACKTRACE_SUPPORT && DPLL
> +	select REF_TRACKER
> +	help
> +	  Enable reference count tracking for DPLL devices and pins.
> +	  This helps debugging reference leaks and use-after-free bugs
> +	  by recording stack traces for each get/put operation.
> +
> +	  The tracking information is exposed via debugfs at:
> +	    /sys/kernel/debug/ref_tracker/dpll_device_*
> +	    /sys/kernel/debug/ref_tracker/dpll_pin_*
> +
> +	  If unsure, say N.
> +
>  source "drivers/dpll/zl3073x/Kconfig"
> 
>  endmenu
> diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c index
> 33333bc2f0cc8..52b2398b9f3ec 100644

...

> --
> 2.52.0

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ