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]
Date:	Mon, 29 Feb 2016 01:39:51 +0000 (GMT)
From:	"Maciej W. Rozycki" <macro@...ux-mips.org>
To:	Alexander Duyck <alexander.duyck@...il.com>
cc:	Tom Herbert <tom@...bertland.com>,
	David Miller <davem@...emloft.net>,
	Netdev <netdev@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Peter Anvin <hpa@...or.com>,
	the arch/x86 maintainers <x86@...nel.org>,
	Kernel Team <kernel-team@...com>
Subject: Re: [PATCH v4 net-next] net: Implement fast csum_partial for
 x86_64

On Sun, 28 Feb 2016, Alexander Duyck wrote:

> I actually found the root cause.  The problem is in add32_with_carry3.
> 
> > +static inline unsigned int add32_with_carry3(unsigned int a, unsigned int b,
> > +                                            unsigned int c)
> > +{
> > +       asm("addl %2,%0\n\t"
> > +           "adcl %3,%0\n\t"
> > +           "adcl $0,%0"
> > +           : "=r" (a)
> > +           : "" (a), "rm" (b), "rm" (c));
> > +
> > +       return a;
> > +}
> > +
> 
> You need to set the 'a' input variable attribute to "0" instead of ""
> and then things work for me correctly.

 Or alternatively you can reduce the number of operands by one, by using 
`"+r" (a)' as output, and then removing `a' as a separate input and 
renumbering references to `b' and `c' accordingly.  It would IMHO actually 
better match the in-place operation as well.

 FWIW,

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ