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: <895c8713-85a7-48a6-a42c-2c1ac4fe2274@linux.dev>
Date: Thu, 13 Jun 2024 12:18:02 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Andrii Nakryiko <andrii@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
 Mykola Lysenko <mykolal@...com>, Jakub Kicinski <kuba@...nel.org>,
 Martin KaFai Lau <martin.lau@...ux.dev>, bpf@...r.kernel.org,
 netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v4 1/2] bpf: add CHECKSUM_COMPLETE to bpf test
 progs

On 12/06/2024 15:49, Jakub Kicinski wrote:
> On Thu, 6 Jun 2024 07:58:50 -0700 Vadim Fedorenko wrote:
>> @@ -1060,9 +1062,19 @@ int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,
>>   		__skb_push(skb, hh_len);
>>   	if (is_direct_pkt_access)
>>   		bpf_compute_data_pointers(skb);
>> +
>>   	ret = convert___skb_to_skb(skb, ctx);
>>   	if (ret)
>>   		goto out;
>> +
>> +	if (kattr->test.flags & BPF_F_TEST_SKB_CHECKSUM_COMPLETE) {
>> +		const int off = skb_network_offset(skb);
>> +		int len = skb->len - off;
>> +
>> +		skb->csum = skb_checksum(skb, off, len, 0);
>> +		skb->ip_summed = CHECKSUM_COMPLETE;
>> +	}
> 
> Looks good, overall, although I'd be tempted to place this before
> the L2 is pushed, a few lines up, so that we don't need to worry
> about network offset. Then again, with you approach there is a nice
> symmetry between the pre- and post- if blocks so either way is fine:
> 
> Reviewed-by: Jakub Kicinski <kuba@...nel.org>

Hi Daniel!

Could you please take a look and merge the series?

Thanks,
Vadim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ