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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251125112304.493ea1ee@gandalf.local.home>
Date: Tue, 25 Nov 2025 11:23:04 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Leon Hwang <leon.hwang@...ux.dev>
Cc: netdev@...r.kernel.org, hawk@...nel.org, ilias.apalodimas@...aro.org,
 mhiramat@...nel.org, mathieu.desnoyers@...icios.com, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
 kerneljasonxing@...il.com, lance.yang@...ux.dev, jiayuan.chen@...ux.dev,
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Leon
 Huang Fu <leon.huangfu@...pee.com>
Subject: Re: [RFC PATCH net-next] page_pool: Add page_pool_release_stalled
 tracepoint

On Tue, 25 Nov 2025 16:22:07 +0800
Leon Hwang <leon.hwang@...ux.dev> wrote:

> +TRACE_EVENT(page_pool_release_stalled,
> +
> +	TP_PROTO(const struct page_pool *pool, int inflight, int sec),
> +
> +	TP_ARGS(pool, inflight, sec),
> +
> +	TP_STRUCT__entry(
> +		__field(const struct page_pool *, pool)
> +		__field(int,			  inflight)
> +		__field(int,			  sec)
> +	),
> +
> +	TP_fast_assign(
> +		__entry->pool		= pool;
> +		__entry->inflight	= inflight;
> +		__entry->sec		= sec;
> +	),
> +
> +	TP_printk("page_pool=%p id=%d inflight=%d sec=%d",
> +		  __entry->pool, __entry->pool->user.id, __entry->inflight, __entry->sec)

You can't do: __entry->pool->user.id

The TP_fast_assign() is executed when the tracepoint is triggered. The
TP_printk() is executed when the trace is read. That can happen seconds,
minutes, hours, days, even months after the pool was assigned.

That __entry->pool can very well be freed a long time ago.

If you need the id, you need to record it in the TP_fast_assign():

	__entry->id		= pool->user.id

and print that.

-- Steve


> +);
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ