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]
Date:   Tue, 8 Nov 2022 20:32:13 +0800
From:   "J.J. Mars" <mars14850@...il.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     netdev@...r.kernel.org
Subject: Re: Confused about ip_summed member in sk_buff

Thanks for your reply. I've been busy these days so that I can't reply on time.
I've read the annotation about ip_summed in skbuff.h many times but it
still puzzles me so I write my questions here directly.

First of all, I focus on the receive direction only.

Q1: In section 'CHECKSUM_COMPLETE' it said 'The device supplied
checksum of the _whole_ packet as seen by netif_rx() and fills out in
skb->csum. Meaning, the hardware doesn't need to parse L3/L4 headers
to implement this.' So I assume the 'device' is a nic or something
like that which supplied checksum, but the 'hardware' doesn't need to
parse L3/L4 headers. So what's the difference between 'device' and
'hardware'? Which one is the nic?

Q2: Which layer does the checksum refer in section 'CHECKSUM_COMPLETE'
as it said 'The device supplied checksum of the _whole_ packet'. I
assume it refers to both L3 and L4 checksum because of the word
'whole'.

Q3: The full checksum is not calculated when 'CHECKSUM_UNNECESSARY' is
set. What does the word 'full' mean? Does it refer to both L3 and L4?
As it said 'CHECKSUM_UNNECESSARY' is set for some L4 packets, what's
the status of L3 checksum now? Does L3 checksum MUST be right when
'CHECKSUM_UNNECESSARY' is set?

Q4: In section 'CHECKSUM_PARTIAL' it described status of SOME part of
the checksum is valid. As it said this value is set in GRO path, does
it refer to L4 only?

Q5: 'CHECKSUM_COMPLETE' and 'CHECKSUM_UNNECESSARY', which one supplies
the most complete status of checksum? I assume it's
CHECKSUM_UNNECESSARY.

Q6: The name ip_summed doesn't describe the status of L3 only but also
L4? Or just L4?

Hope to receive replies from all you guys.

Best wishes.

Cong Wang <xiyou.wangcong@...il.com> 于2022年10月23日周日 03:51写道:
>
> On Fri, Oct 21, 2022 at 02:29:26PM +0800, J.J. Mars wrote:
> > Hi everyone, I'm new here and I hope this mail won't disturb you :)
> >
> > Recently I was working with something about ip_summed, and I'm really
> > confused about the question what does ip_summed exactly mean?
> > This member is defined with comment Driver fed us an IP checksum'. So
> > I guess it's about IP/L3 checksum status.
> > But the possible value of ip_summed like CHECKSUM_UNNECESSARY is about L4.
> >
> > What confused me a lot is ip_summed seems to tell us the checksum of
> > IP/L3 layer is available from its name.
> > But it seems to tell us the checksum status of L4 layer from its value.
> >
> > Besides, in ip_rcv() it seems the ip_summed is not used before
> > calculating the checksum of IP header.
> >
> > So does ip_summed indicate the status of L3 checksum status or L4
> > checksum status?
> > If L4, why is it named like that?
>
> The name itself is indeed confusing, however, there are some good
> explanations in the code, at the beginning of include/linux/skbuff.h. I
> think that could help you to clear your confusions here.
>
> Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ