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: <19ba918f-d8de-4aa6-881b-47f7e0e10b7a@rbox.co>
Date: Fri, 23 Jan 2026 18:33:25 +0100
From: Michal Luczaj <mhal@...x.co>
To: bot+bpf-ci@...nel.org, ast@...nel.org, daniel@...earbox.net,
 andrii@...nel.org, martin.lau@...ux.dev, eddyz87@...il.com, song@...nel.org,
 yonghong.song@...ux.dev, john.fastabend@...il.com, kpsingh@...nel.org,
 sdf@...ichev.me, haoluo@...gle.com, jolsa@...nel.org, shuah@...nel.org,
 kuniyu@...gle.com
Cc: bpf@...r.kernel.org, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org, martin.lau@...nel.org, clm@...a.com,
 ihor.solodrai@...ux.dev
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: Add test for connect() racing
 sockmap update and signal

On 1/23/26 18:09, bot+bpf-ci@...nel.org wrote:
>> diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_interrupted_connect.c b/tools/testing/selftests/bpf/prog_tests/sockmap_interrupted_connect.c
>> new file mode 100644
>> index 000000000000..aa48ae483dab
>> --- /dev/null
>> +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_interrupted_connect.c
>> @@ -0,0 +1,200 @@
>> +// SPDX-License-Identifier: GPL-2.0
> 
> [ ... ]
> 
>> +#include "sockmap_helpers.h"
> 
> [ ... ]
> 
>> +void serial_test_sockmap_interrupted_connect(void)
>> +{
>> +	sighandler_t orig_handler;
>> +	struct context ctx = {0};
>> +	pthread_t tid;
>> +
>> +	orig_handler = signal(SIGUSR1, handler);
>> +	if (!ASSERT_NEQ(orig_handler, SIG_ERR, "signal"))
>> +		return;
>> +
>> +	if (xpthread_create(&tid, NULL, racer, &ctx))
>> +		goto restore;
>> +
>> +	test_map(&ctx, BPF_MAP_TYPE_SOCKMAP);
>> +
>> +	if (!xpthread_cancel(tid))
>               ^^^^^^^^^^^^^^^^
> 
> Is xpthread_cancel() defined somewhere? I see sockmap_helpers.h defines
> xpthread_create() and xpthread_join(), but there does not appear to be a
> definition for xpthread_cancel(). This would cause a compilation failure.

xpthread_cancel() is defined in patch 1/2 of this series.
But apparently patch 1/2 is still missing from https://lore.kernel.org/bpf.
FWIW, it's already here:
https://lore.kernel.org/lkml/20260123-selftest-signal-on-connect-v1-1-b0256e7025b6@rbox.co/


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ