Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Aug 2004 18:59:39 -0400
From:      Brian Fundakowski Feldman <green@FreeBSD.org>
To:        "David E. O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/include in_cksum.h
Message-ID:  <20040825225939.GM77326@green.homeunix.org>
In-Reply-To: <200408251828.i7PISFtH078796@repoman.freebsd.org>
References:  <200408251828.i7PISFtH078796@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 25, 2004 at 06:28:15PM +0000, David E. O'Brien wrote:
> obrien      2004-08-25 18:28:15 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/i386/include     in_cksum.h 
>   Log:
>   Fix a bug in in_cksum_hdr w/o -O.
>   
>   The C code assumes that the carry bit is always kept from the previous
>   operation. However, the pointer indexing requires another add operation.
>   Thus, the carry bit from the first operation is tromped over by the
>   "addl" operation that ends up following it, so the "adcl" that follows
>   that has no effect because the carry bit is cleared before it.
>   The result is checksum failure on received packets.

Good job!  Did you see any similar bugs in other in-line asm you might have
glanced at?

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040825225939.GM77326>