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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8a16184-964e-4359-89a5-b2a464e262b3@oracle.com>
Date: Tue, 6 Aug 2024 13:26:40 +0100
From: Alan Maguire <alan.maguire@...cle.com>
To: Alexis Lothoré <alexis.lothore@...tlin.com>,
        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>
Cc: ebpf@...uxfoundation.org, Thomas Petazzoni
 <thomas.petazzoni@...tlin.com>,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf-next 4/4] selftests/bpf: convert
 test_skb_cgroup_id_user to test_progs

On 01/08/2024 11:12, Alexis Lothoré wrote:
> On 8/1/24 10:49, Alan Maguire wrote:
>> On 31/07/2024 11:38, Alexis Lothoré (eBPF Foundation) wrote:
> 
> [...]
> 
>>> +static int wait_local_ip(void)
>>> +{
>>> +	char *ping_cmd = ping_command(AF_INET6);
>>> +	int i, err;
>>> +
>>> +	for (i = 0; i < WAIT_AUTO_IP_MAX_ATTEMPT; i++) {
>>> +		err = SYS_NOFAIL("%s -c 1 -W 1 %s%%%s", ping_cmd, DST_ADDR,
>>> +				 VETH_1);
>>> +		if (!err)
>>> +			break;
>>> +	}
>>
>>
>> thinking about the risks of CI flakiness, would a small sleep between
>> checks be worth doing here?
> 
> I assumed that adding -W 1 (ping timeout duration) to the command would be
> enough to make sure that there is a proper wait between each attempt (so
> currently, waiting at most 10s for network configuration between the 2 veths).
> Don't you think it is enough to prevent issues in CI ?
>

Yep, that should be fine, I missed the wait option.

>>> +
> 
> [...]
> 
>>> +
>>> +	expected_ids[0] = get_cgroup_id("/.."); /* root cgroup */
>>> +	expected_ids[1] = get_cgroup_id("");
>>> +	expected_ids[2] = get_cgroup_id(CGROUP_PATH);
>>> +	expected_ids[3] = 0; /* non-existent cgroup */
>>> +
>>> +	for (level = 0; level < NUM_CGROUP_LEVELS; level++) {
>>> +		err = bpf_map__lookup_elem(t->skel->maps.cgroup_ids, &level,
>>> +					   sizeof(level), &actual_ids[level],
>>> +					   sizeof(__u64), 0);
>>
>> could probably simplify this + the BPF prog using a global array of
>> actual_ids[], then compare it to the expected values using
>> skel->bss->actual_ids
> 
> ACK, I'll update this.
>

Great, thanks!

Alan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ