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: <1398548627.16049.8.camel@deadeye.wl.decadent.org.uk>
Date:	Sat, 26 Apr 2014 22:43:47 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Tom Herbert <therbert@...gle.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 5/9 v2] net: Generalize checksum_init functions

On Sat, 2014-04-26 at 22:42 +0100, Ben Hutchings wrote:
> On Sat, 2014-04-26 at 14:25 -0700, Tom Herbert wrote:
[...]
> > +/*
> > + * Perform checksum validate (init). Note that this is a macro since we only
> > + * want to calculate the pseudo header which is an input function if necessary.
> > + * First we try to validate without any computation (checksum unnecessary) and
> > + * then calculate based on checksum complete calling the function to compute
> > + * pseudo header.
> > + */
> > +#define __skb_checksum_validate(skb, proto, complete,                  \
> > +                               zero_okay, check, compute_pseudo)       \
> > +({                                                                     \
> > +       __sum16 __ret = __skb_checksum_validate_unnecessary(skb,        \
> > +                               zero_okay, check);                      \
> > +       if (__ret)                                                      \
> > +               __ret = __skb_checksum_validate_complete(skb,           \
> > +                               complete, compute_pseudo(skb, proto));  \
> > +       __ret;                                                          \
> > +})
> 
> This may or may not yield an actual checksum, which is not obvious from
> the comment.
[...]

Sorry, this is incorrect; it does yield an actual checksum.

Ben.

-- 
Ben Hutchings
The most exhausting thing in life is being insincere. - Anne Morrow Lindberg

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ