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: <a2578a0ee81f5e5bde327192b1544d5d1c9840fb.camel@gmail.com>
Date: Wed, 12 Nov 2025 12:28:41 -0800
From: Eduard Zingerman <eddyz87@...il.com>
To: Paul Houssel <paulhoussel2@...il.com>, bpf@...r.kernel.org, 
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Martin Horth <martin.horth@...ecom-sudparis.eu>, Ouail Derghal	
 <ouail.derghal@...-atlantique.fr>, Guilhem Jazeron
 <guilhem.jazeron@...ia.fr>,  Ludovic Paillat <ludovic.paillat@...ia.fr>,
 Robin Theveniaut <robin.theveniaut@...t.fr>, Tristan d'Audibert	
 <tristan.daudibert@...il.com>, Alexei Starovoitov <ast@...nel.org>, Daniel
 Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
 Martin KaFai Lau	 <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
 Yonghong Song	 <yonghong.song@...ux.dev>, John Fastabend
 <john.fastabend@...il.com>, KP Singh	 <kpsingh@...nel.org>, Stanislav
 Fomichev <sdf@...ichev.me>, Hao Luo	 <haoluo@...gle.com>, Jiri Olsa
 <jolsa@...nel.org>, Shuah Khan <shuah@...nel.org>,  Paul Houssel
 <paul.houssel@...nge.com>
Subject: Re: [PATCH v2 2/2] selftests/bpf: add BTF dedup tests for recursive
 typedef definitions

On Wed, 2025-11-12 at 15:11 +0100, Paul Houssel wrote:

Lgtm, one nit below:

> +{
> +	.descr = "dedup: recursive typedef",
> +	/*
> +	 * This test simulates a recursive typedef, which in GO is defined as such:
> +	 *
> +	 *   type Foo func() Foo
> +	 *
> +	 * In BTF terms, this is represented as a TYPEDEF referencing
> +	 * a FUNC_PROTO that returns the same TYPEDEF.
> +	 */
> +	.input = {
> +		.raw_types = {
> +			/*
> +			 * [1] typedef Foo -> func() Foo
> +			 * [2] func_proto() -> Foo
> +			 */
> +			BTF_TYPEDEF_ENC(NAME_NTH(1), 2),	/* [1] */
> +			BTF_FUNC_PROTO_ENC(1, 0),		/* [2] */

Nit:
Maybe repeat the above two types, just to make sure that deduplication happens?

> +			BTF_END_RAW,
> +		},
> +		BTF_STR_SEC("\0Foo"),
> +	},
> +	.expect = {
> +		.raw_types = {
> +			BTF_TYPEDEF_ENC(NAME_NTH(1), 2),	/* [1] */
> +			BTF_FUNC_PROTO_ENC(1, 0),		/* [2] */
> +			BTF_END_RAW,
> +		},
> +		BTF_STR_SEC("\0Foo"),
> +	},
> +},

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ