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: <20251105070402.GB31761@j66a10360.sqa.eu95>
Date: Wed, 5 Nov 2025 15:04:02 +0800
From: "D. Wythe" <alibuda@...ux.alibaba.com    >
To: Martin KaFai Lau <martin.lau@...ux.dev>
Cc: "D. Wythe" <alibuda@...ux.alibaba.com>, ast@...nel.org,
	daniel@...earbox.net, andrii@...nel.org, pabeni@...hat.com,
	song@...nel.org, sdf@...gle.com, haoluo@...gle.com, yhs@...com,
	edumazet@...gle.com, john.fastabend@...il.com, kpsingh@...nel.org,
	jolsa@...nel.org, mjambigi@...ux.ibm.com, wenjia@...ux.ibm.com,
	wintera@...ux.ibm.com, dust.li@...ux.alibaba.com,
	tonylu@...ux.alibaba.com, guwen@...ux.alibaba.com,
	bpf@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
	netdev@...r.kernel.org, sidraya@...ux.ibm.com, jaka@...ux.ibm.com
Subject: Re: [PATCH bpf-next v4 3/3] bpf/selftests: add selftest for
 bpf_smc_hs_ctrl

On Tue, Nov 04, 2025 at 04:13:39PM -0800, Martin KaFai Lau wrote:
> On 11/2/25 11:31 PM, D. Wythe wrote:
> >+static bool setup_netns(void)
> >+{
> >+	test_netns = netns_new(TEST_NS, true);
> >+	if (!ASSERT_OK_PTR(test_netns, "open net namespace"))
> >+		goto fail_netns;
> >+
> >+	if (!ASSERT_OK(system("ip addr add 127.0.1.0/8 dev lo"),
> 
> SYS(fail_ip, "ip addr add ...")
> >+		       "add server node"))
> >+		goto fail_ip;
> >+
> >+	if (!ASSERT_OK(system("ip addr add 127.0.2.0/8 dev lo"),
> 
> same here.
> 
Take it.
> >+		       "server via risk path"))
> >+		goto fail_ip;
> >+
> >+	return true;
> >+fail_ip:
> >+	netns_free(test_netns);
> >+fail_netns:
> >+	return false;
> >+}
> >+
> >+static void cleanup_netns(void)
> >+{
> >+	netns_free(test_netns);
> >+	remove_netns(TEST_NS);
> 
> remove_netns should not be needed. netns_free() should have removed it.
Take it.
> 
> [ ... ]
> 
> >+	system("sysctl -w net.smc.hs_ctrl=linkcheck");
> 
> The "sysctl -w" will echo useless output to test_progs. just use
> write_sysctl().
>
Take it.
Thanks for the review, I'll address these points in the next
version.

Best wishes,
D. Wythe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ