News for hackers. Stuff that matters.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by protomyth on Sunday October 02, 2016 @10:53PM (#12625326)
Can someone give a bit of the why on this one? Is there something wrong with AVX or is this a run on other chips thing? I'm at a bit of a loss on the history.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by yuhong on Sunday October 02, 2016 @10:54PM (#12625328)
AVX is normally 256-bit, but it also allows 128-bit instructions with a VEX prefix. Benefits of that include three operands and unaligned access, as well as higher performance when mixed with 256-bit instructions. Of course, you need a AVX-capable CPU and an OS that support AVX XSAVE to be able to use them.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by glandium on Monday October 03, 2016 @01:56AM (#12625690)
Why don't you write that information in the bug you filed?
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by creshal on Monday October 03, 2016 @03:37AM (#12625900)
Sooo… why move away from AVX? What CPUs support AESNI, but not AVX, and actually matter?
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by pdw on Monday October 03, 2016 @04:02AM (#12625956)
According to Wikipedia, most Celerons and Pentiums lack AVX but have the AES instructions.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by yuhong on Monday October 03, 2016 @10:37AM (#12627696)
Westmere
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by DeepYogurt on Monday October 03, 2016 @03:56AM (#12625943)
The issue might be due to not all intel chips have AVX support. That said, many have hardware AES support so.... alternate code path?
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by dogma1138 on Monday October 03, 2016 @04:57AM (#12626101)
AES-NI and AVX were proposed by AMD and Intel at the same time, and were introduced in the same generation of CPUs. I have a strong feeling that they are interconnected.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by ngneer on Sunday October 02, 2016 @11:46PM (#12625443)
Why is this on HN?
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by mkj on Monday October 03, 2016 @01:15AM (#12625616)
You get automatic upvotes if you mention crypto and performance?
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by afsina on Monday October 03, 2016 @01:25AM (#12625634)
And Firefox.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by sbose78 on Monday October 03, 2016 @01:45AM (#12625664)
The bug report has way too less information for folks of other disciplines ( inside CS ) to understand.

Could someone please provide a context?

Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by pdw on Monday October 03, 2016 @04:17AM (#12625998)
The x86 architecture has a large number of optional instruction sets. One of these, AES-NI, provides accelerated AES instructions. Another one, AVX, is a collection of general-purpose vector instructions. These were announced at the same time, but it seems like a large number of Intel's low-end CPUs (Celerons & Pentiums) only implement AES-NI.

Firefox's current implementation of the AES-GCM encryption mode uses AVX instructions. The bug report is a submission of a modified implementation that avoids them.

Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by yuhong on Sunday October 02, 2016 @10:39PM (#12625293)
I really should also submit this to OpenSSL at some point.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by honkhonkpants on Sunday October 02, 2016 @11:10PM (#12625365)
Benchmarks?
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by yuhong on Sunday October 02, 2016 @11:11PM (#12625367)
None that I know of, but performance penalty should be minimal. The main difference is extra movdqu instructions to deal with unaligned access.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by dewyatt on Sunday October 02, 2016 @10:56PM (#12625331)
It seems weird that mozilla doesn't have something like phabricator so I can view a pretty diff of this easily.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by cbhl on Monday October 03, 2016 @12:26AM (#12625513)
Mozilla set its stuff up before Facebook (2004) even existed, let alone Phabricator.

Bugzilla (1998) predates Phabricator (2010) by about 12 years. It was written in Perl, which was the popular language at the time (similar to PHP around when Facebook happened, or JavaScript now). The first versions of Firefox (2002) predate Phabricator by about 8 years.

Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by dboreham on Monday October 03, 2016 @12:48AM (#12625563)
And Bugzilla is still the best bug management system decades later.

Fwiw I was using Bugzilla in 1996. Perhaps it was open sourced in 1998?

Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by slavik81 on Monday October 03, 2016 @01:46AM (#12625667)
The 1998 release announcement says it was rewritten. https://groups.google.com/forum/#!topic/netscape.public.mozi...
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by riffraff on Monday October 03, 2016 @01:47AM (#12625668)
If you think bugzilla is better than everything that came after (e.g. trac, jira, redline, phabricator etc) it would be interesting to know why.

I feel it's functional but not great.

Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by mschuster91 on Monday October 03, 2016 @02:17AM (#12625731)
JIRA is not free, and its main appeals are geared towards enterprise bean counters. Not to mention it is written in Java and as a result has quite heavy requirements on the CPU and RAM.

Upside: it is extremely flexible in ticket workflow design.

(Source: maintaining a 300-user JIRA/Confluence instance at work)

Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by reubenmorais on Sunday October 02, 2016 @11:18PM (#12625379)
Mozilla does have something like Phabricator, it's called Bugzilla and it's what this thread links to… The only reason you didn't see a pretty diff is because the bug doesn't have a patch attached to it.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by dewyatt on Sunday October 02, 2016 @11:27PM (#12625403)
I know bugzilla has this feature but IIRC it requires much more explicit actions on the part of the user. Like in this case, the user did not upload a patch and mark it as a patch.

Phab, IIRC, kind of forces you to upload a patch and not some random file. Could be remembering wrong, though.

Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by TD-Linux on Monday October 03, 2016 @02:52AM (#12625805)
Well, Bugzilla uses the same namespace for bugs and patches. The submitter didn't upload patches at all, just asm text files, so from Bugzilla's point of view this is a bug. Not really sure there's anything to "fix" here.
Re:Bug 1283585 – Fix Intel's AES-GCM code to not depend on AVX by dogma1138 on Monday October 03, 2016 @04:53AM (#12626086)
AVX is a standardized x86 ISE proposed by both Intel and AMD. Intel implemented AVX support with Ivy Bridge, AMD has implemented it with Bulldozer these 2 platforms are nearly 6 years old, is there an actual reason to drop support for AVX?