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: <b5814f3f-d262-4577-834c-a48bbcc8d005@bootlin.com>
Date: Tue, 10 Sep 2024 09:15:26 +0200
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
 Martin KaFai Lau <martin.lau@...ux.dev>, Eduard Zingerman
 <eddyz87@...il.com>, 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>, Mykola Lysenko <mykolal@...com>,
 Shuah Khan <shuah@...nel.org>, "David S. Miller" <davem@...emloft.net>,
 Jakub Kicinski <kuba@...nel.org>, Jesper Dangaard Brouer <hawk@...nel.org>,
 Lorenzo Bianconi <lorenzo@...nel.org>, ebpf@...uxfoundation.org,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
 linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
 linux-kselftest@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next] selftests/bpf: convert test_xdp_features.sh to
 test_progs

Hey Maxime,

On 9/9/24 23:18, Maxime Chevallier wrote:
> Hi Alexis,
> 
> On Mon, 09 Sep 2024 22:02:07 +0200
> Alexis Lothoré (eBPF Foundation) <alexis.lothore@...tlin.com> wrote:

[...]

>> +static void *run_dut_echo_thread(void *arg)
>> +{
>> +	struct test_data *t = (struct test_data *)arg;
>> +	__u32 magic;
>> +
>> +	while (!t->quit_dut_echo_thread) {
>> +		struct sockaddr_storage addr;
>> +		socklen_t addrlen;
>> +		size_t n;
>> +
>> +		n = recvfrom(t->echo_server_sock, &magic, sizeof(magic),
>> +			     MSG_WAITALL, (struct sockaddr *)&addr, &addrlen);
>> +		if (n != sizeof(magic)) {
>> +			usleep(LOOP_DELAY_US);
>> +			continue;
>> +		}
>> +
>> +		if (htonl(magic) != CMD_ECHO)
>> +			continue;
> 
> Shouldn't it be ntohl here ? The former code used the ntohs helper for
> that command, and you're sending the magic in send_echo_msg with a
> htonl() so I guess here you might want to convert the value back to
> host endianness.

You are right, silly mistake from me here :) That will be fixed in v2. I'll
delay a bit before sending it to allow others to take a look at v1 too.

Thanks,

Alexis
> 
> Thanks,
> 
> Maxime
> 

-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ