Re: RFR: 8253821: Improve ByteBuffer performance with GCM

2021-01-19 Thread Chen Li
On Tue, 29 Sep 2020 20:22:55 GMT, Anthony Scarpino wrote: > 8253821: Improve ByteBuffer performance with GCM Hi @ascarpino, could you please share which Flink test you ran? Thanks! - PR: https://git.openjdk.java.net/jdk/pull/411

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v6]

2020-12-23 Thread Andrey Turbanov
On Wed, 2 Dec 2020 05:01:28 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > comments v4 src/java.base/share/classes/com/sun/crypto/provid

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v6]

2020-12-02 Thread Valerie Peng
On Wed, 2 Dec 2020 04:58:13 GMT, Anthony Scarpino wrote: >> The biggest part of this change is the addition of overlap protection and >> the tests to verify it for GCM, as there were none in the open repo. >> Additionally, GCMBufferTest had some significant changes to clean it up and >> handl

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v6]

2020-12-02 Thread Valerie Peng
On Wed, 2 Dec 2020 05:01:28 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > comments v4 Marked as reviewed by valeriep (Reviewer). -

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v6]

2020-12-01 Thread Anthony Scarpino
> 8253821: Improve ByteBuffer performance with GCM Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision: comments v4 - Changes: - all: https://git.openjdk.java.net/jdk/pull/411/files - new: https://git.openjdk.java.net

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v6]

2020-12-01 Thread Anthony Scarpino
On Thu, 26 Nov 2020 02:18:00 GMT, Anthony Scarpino wrote: >> The latest update should address all outstanding comments. The biggest >> change was to the test, which had major reorganization and created tests >> that increments data sizes for update and doFinal ops byte-by-byte to check >> fo

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-12-01 Thread Anthony Scarpino
On Wed, 2 Dec 2020 00:02:52 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with five >> additional commits since the last revision: >> >> - test updates >> - test check mixup >> - Overlap protection >> - Updated code comments, all tests pass >> - Up

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-12-01 Thread Anthony Scarpino
On Tue, 1 Dec 2020 23:14:19 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with five >> additional commits since the last revision: >> >> - test updates >> - test check mixup >> - Overlap protection >> - Updated code comments, all tests pass >> - Up

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-12-01 Thread Anthony Scarpino
On Tue, 1 Dec 2020 22:53:10 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with five >> additional commits since the last revision: >> >> - test updates >> - test check mixup >> - Overlap protection >> - Updated code comments, all tests pass >> - Up

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-12-01 Thread Anthony Scarpino
On Tue, 1 Dec 2020 22:44:44 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with five >> additional commits since the last revision: >> >> - test updates >> - test check mixup >> - Overlap protection >> - Updated code comments, all tests pass >> - Up

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-12-01 Thread Anthony Scarpino
On Tue, 1 Dec 2020 22:42:54 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with five >> additional commits since the last revision: >> >> - test updates >> - test check mixup >> - Overlap protection >> - Updated code comments, all tests pass >> - Up

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-12-01 Thread Valerie Peng
On Thu, 26 Nov 2020 02:14:40 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with five > additional commits since the last revision: > > - test updates > - test check mixup > - Overlap protectio

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-12-01 Thread Valerie Peng
On Thu, 26 Nov 2020 02:14:40 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with five > additional commits since the last revision: > > - test updates > - test check mixup > - Overlap protectio

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-11-25 Thread Anthony Scarpino
On Thu, 12 Nov 2020 16:34:29 GMT, Anthony Scarpino wrote: >> This is an update for all of Valerie's comments and adding a test to verify >> different buffer types and configurations > > The latest update should address all outstanding comments. The biggest > change was to the test, which had

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v5]

2020-11-25 Thread Anthony Scarpino
> 8253821: Improve ByteBuffer performance with GCM Anthony Scarpino has updated the pull request incrementally with five additional commits since the last revision: - test updates - test check mixup - Overlap protection - Updated code comments, all tests pass - Updated code comments, all te

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-19 Thread Valerie Peng
On Wed, 18 Nov 2020 05:14:11 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 560: >> >>> 558: System.arraycopy(buffer, 0, block, 0, blockSize); >>> 559: buflen -= block.length; >>> 560: retur

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-19 Thread Valerie Peng
On Wed, 18 Nov 2020 04:28:38 GMT, Anthony Scarpino wrote: >> The current impl of constructBlock() seems to have code handling ibuffer >= >> blocksize scenario. Could you fix that and also pass the input offset into >> constructBlock() for this RFE? > > I redid the whole code Sure, I will be w

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-17 Thread Anthony Scarpino
On Fri, 13 Nov 2020 21:00:20 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code review comment update >> Major change to test to detect corruption with incremental buffers test > > src/jav

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-17 Thread Anthony Scarpino
On Mon, 16 Nov 2020 19:23:20 GMT, Valerie Peng wrote: >> You don't know what 'len', which includes ibuffer data, until this point in >> the code. > > Well, didn't you already calcuate the 'len' value in the beginning of the > copied-from-GCTR RuntimeException check? I'm removing the runtime ch

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-17 Thread Anthony Scarpino
On Mon, 16 Nov 2020 19:17:55 GMT, Valerie Peng wrote: >> This is a very seldom used code path, There was only one existing test that >> accesses this code and it has not offset. >> >> constructBlock() is a generic method. There should be no case where ibuffer >> is >= blocksize during this m

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-17 Thread Anthony Scarpino
On Fri, 6 Nov 2020 23:09:31 GMT, Valerie Peng wrote: >> This is not an optimized path for bytebuffers and will never have any data >> in ibuffer. > > Hmm, ok, can we add a check on ibuffer size here just to be sure? I've rewritten checkDataLength so it can include more values to calculate. ---

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-17 Thread Anthony Scarpino
On Fri, 6 Nov 2020 23:08:10 GMT, Valerie Peng wrote: >> I does not. CipherCore only sends block sized data, and the ByteBuffer code >> uses this method during final operations. > > Hmm, ok, this is getting obscure and the correctness is depending on the > calling pattern. Can we add a check on

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-17 Thread Anthony Scarpino
On Fri, 6 Nov 2020 23:02:54 GMT, Valerie Peng wrote: >> If the output buffer provided is not big enough, it creates an internal one. >> Two things happened here, one the variable was renamed because I felt >> "outWithPadding" was misleading. The second was to only create this buffer >> when

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-17 Thread Anthony Scarpino
On Thu, 12 Nov 2020 20:17:39 GMT, Valerie Peng wrote: >> checkOutputCapacity: Yes.. The method includes the offsets for the output >> buffer, which I believe would verify that the output area in the buffer with >> offsets is large enough. >> >> outWithPadding: I understand the situation and

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-16 Thread Valerie Peng
On Sat, 14 Nov 2020 00:33:35 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 818: >> >>> 816: // do this check here can also catch the potential integer >>> overflow >>> 817: // scenario for the subsequent outp

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-16 Thread Valerie Peng
On Fri, 13 Nov 2020 22:43:17 GMT, Anthony Scarpino wrote: >> The assumption of this whole block here seems to be that ibuffer would not >> contain more than a block of buffered data? If that's the case, maybe we can >> just use 'ibuffer' instead of allocating a local 'block' and copy the data

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-16 Thread Valerie Peng
On Sat, 14 Nov 2020 00:29:41 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 777: >> >>> 775: if ((src.remaining() + ((ibuffer != null) ? ibuffer.size() : >>> 0) - >>> 776: tagLenBytes) > dst.remaining()) {

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Anthony Scarpino
On Fri, 13 Nov 2020 22:25:13 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code review comment update >> Major change to test to detect corruption with incremental buffers test > > src/jav

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Anthony Scarpino
On Fri, 13 Nov 2020 20:47:53 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code review comment update >> Major change to test to detect corruption with incremental buffers test > > src/jav

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Anthony Scarpino
On Fri, 13 Nov 2020 20:54:15 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code review comment update >> Major change to test to detect corruption with incremental buffers test > > src/jav

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Valerie Peng
On Thu, 12 Nov 2020 16:34:30 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Code review comment update > Major change to test to detec

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Anthony Scarpino
On Fri, 13 Nov 2020 20:13:42 GMT, Valerie Peng wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 518: >> >>> 516: ArrayUtil.nullAndBoundsCheck(out, outOfs, inLen); >>> 517: byte[] block = new byte[blockSize]; >>> 518:

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Valerie Peng
On Thu, 12 Nov 2020 16:34:30 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Code review comment update > Major change to test to detec

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Valerie Peng
On Thu, 12 Nov 2020 16:34:30 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Code review comment update > Major change to test to detec

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Valerie Peng
On Thu, 12 Nov 2020 16:34:30 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Code review comment update > Major change to test to detec

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Valerie Peng
On Thu, 12 Nov 2020 16:34:30 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Code review comment update > Major change to test to detec

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Valerie Peng
On Thu, 12 Nov 2020 16:34:30 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Code review comment update > Major change to test to detec

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Valerie Peng
On Fri, 13 Nov 2020 20:11:45 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code review comment update >> Major change to test to detect corruption with incremental buffers test > > src/jav

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-13 Thread Valerie Peng
On Thu, 12 Nov 2020 16:34:30 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Code review comment update > Major change to test to detec

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-12 Thread Valerie Peng
On Mon, 2 Nov 2020 22:30:45 GMT, Anthony Scarpino wrote: >>> * It was my expectation that checkOutputCapacity() is making sure all >>> the inOfs ==<> outOfs are going to work. Does that not catch all cases? >> checkOutputCapacity() as the name has, only changes that the output buffer >> is

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-12 Thread Anthony Scarpino
On Fri, 23 Oct 2020 16:35:10 GMT, Anthony Scarpino wrote: >> I will take a look as well. > > This is an update for all of Valerie's comments and adding a test to verify > different buffer types and configurations The latest update should address all outstanding comments. The biggest change w

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v4]

2020-11-12 Thread Anthony Scarpino
> 8253821: Improve ByteBuffer performance with GCM Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision: Code review comment update Major change to test to detect corruption with incremental buffers test - Changes: - a

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-06 Thread Valerie Peng
On Thu, 5 Nov 2020 16:51:34 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 514: >> >>> 512: } >>> 513: len -= remainder; >>> 514: ibuffer.write(in, len, remainder); >> >> Any chance that 'ib

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-06 Thread Valerie Peng
On Mon, 2 Nov 2020 22:06:15 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 943: >> >>> 941: } >>> 942: } >>> 943: byte[] outBuffer = (internalOutput != null) ? internalOutput : >>> output; >> >> With this lin

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-05 Thread Anthony Scarpino
On Thu, 5 Nov 2020 22:54:45 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - style >> - style & comments >> - full update >> - remove old >> - update >> - outputsize > > test/jdk/com/sun

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-05 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-05 Thread Anthony Scarpino
On Mon, 12 Oct 2020 20:57:50 GMT, Valerie Peng wrote: >> I didn't see a way to override this because CipherSpi is a public class, any >> methods I added would become a new API. >> Also bufferCrypt is private, so I had to copy it. CipherSpi does not know >> which mode is being used, but AESCi

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-05 Thread Anthony Scarpino
On Wed, 4 Nov 2020 00:46:13 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - style >> - style & comments >> - full update >> - remove old >> - update >> - outputsize > > src/java.base/sh

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-05 Thread Anthony Scarpino
On Tue, 3 Nov 2020 21:03:02 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - style >> - style & comments >> - full update >> - remove old >> - update >> - outputsize > > src/java.base/sh

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-05 Thread Anthony Scarpino
On Tue, 3 Nov 2020 01:31:37 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - style >> - style & comments >> - full update >> - remove old >> - update >> - outputsize > > src/java.base/sh

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-03 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-03 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-03 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-03 Thread Anthony Scarpino
On Tue, 3 Nov 2020 01:07:12 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GCTR.java line 153: >> >>> 151: while (processed > MAX_LEN) { >>> 152: encrypt(in, offset, MAX_LEN, out, 0); >>> 153: dst.get(out, 0, MAX_LE

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Anthony Scarpino
On Tue, 3 Nov 2020 00:15:37 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - style >> - style & comments >> - full update >> - remove old >> - update >> - outputsize > > src/java.base/sh

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Anthony Scarpino
On Mon, 2 Nov 2020 17:51:03 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - style >> - style & comments >> - full update >> - remove old >> - update >> - outputsize > > src/java.base/sh

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Anthony Scarpino
On Mon, 2 Nov 2020 19:55:26 GMT, Valerie Peng wrote: >>> * I do not understand where the corruption comes from. The user >>> provides a buffer that output is suppose to be placed into, what could it >>> be corrupting? >> Existing tests may not catch/check all error cases. Especially, in

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Anthony Scarpino
On Mon, 2 Nov 2020 19:56:20 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - style >> - style & comments >> - full update >> - remove old >> - update >> - outputsize > > src/java.base/sh

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Thu, 8 Oct 2020 15:32:46 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line >> 1253: >> >>> 1251: if (decrypting) { >>> 1252: if (buffered > 0) { >>> 1253: cipher.decrypt(buffer, 0, buffered, new byte[0

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Mon, 2 Nov 2020 19:31:14 GMT, Valerie Peng wrote: >> I wrote a whole new tests to exercise all the buffers with and without >> offsets. Hopefully that covers the concern. The test found 4 bugs.. > >> * I do not understand where the corruption comes from. The user >> provides a buffer

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Wed, 7 Oct 2020 20:50:14 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 947: >> >>> 945: // create temporary output buffer if the estimated size is >>> larger >>> 946: // than the user-provided buffer. >>> 947:

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Thu, 22 Oct 2020 20:11:55 GMT, Anthony Scarpino wrote: >> - I do not understand where the corruption comes from. The user provides a >> buffer that output is suppose to be placed into, what could it be >> corrupting? The existing tests (SameBuffer, in particular) works fine with >> this

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-11-02 Thread Valerie Peng
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with six > additional commits since the last revision: > > - style > - style & comments > - full update > - remove o

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-10-23 Thread Anthony Scarpino
On Wed, 7 Oct 2020 19:16:12 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - style >> - style & comments >> - full update >> - remove old >> - update >> - outputsize > > I will take a lo

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

2020-10-23 Thread Anthony Scarpino
> 8253821: Improve ByteBuffer performance with GCM Anthony Scarpino has updated the pull request incrementally with six additional commits since the last revision: - style - style & comments - full update - remove old - update - outputsize - Changes: - all: https://git.open

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-22 Thread Anthony Scarpino
On Thu, 8 Oct 2020 00:13:37 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 939: >> >>> 937: // if the size of specified output buffer is less than >>> 938: // the length of the cipher text, then the current >>> 939

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-22 Thread Anthony Scarpino
On Fri, 9 Oct 2020 02:38:05 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 614: > >> 61

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-22 Thread Anthony Scarpino
On Mon, 12 Oct 2020 17:35:48 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GCTR.java line 146: > >> 144: private

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-22 Thread Anthony Scarpino
On Mon, 12 Oct 2020 18:26:14 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GCTR.java line 165: > >> 163: } >> 164

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-22 Thread Anthony Scarpino
On Mon, 12 Oct 2020 18:45:28 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GCTR.java line 237: > >> 235:

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-12 Thread Valerie Peng
On Thu, 8 Oct 2020 01:22:09 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/AESCipher.java line 744: >> >>> 742: } else { >>> 743: return core.doFinal(input, output); >>> 744: } >> >> It seems this block is

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-12 Thread Valerie Peng
On Thu, 8 Oct 2020 06:51:08 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Xuelei comments src/java.base/share/classes/com/sun/crypto/pr

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-12 Thread Valerie Peng
On Thu, 8 Oct 2020 06:51:08 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Xuelei comments src/java.base/share/classes/com/sun/crypto/pr

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Fri, 9 Oct 2020 03:58:38 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 621: > >> 61

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Fri, 9 Oct 2020 00:48:42 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 550: > >> 54

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Fri, 9 Oct 2020 03:20:40 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 635: > >> 63

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Fri, 9 Oct 2020 01:01:47 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 595: > >> 59

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Fri, 9 Oct 2020 01:04:26 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 593: > >> 59

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Valerie Peng
On Thu, 8 Oct 2020 06:51:08 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Xuelei comments src/java.base/share/classes/com/sun/crypto/pr

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Fri, 9 Oct 2020 00:42:57 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 545: > >> 54

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Valerie Peng
On Thu, 8 Oct 2020 06:51:08 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Xuelei comments src/java.base/share/classes/com/sun/crypto/pr

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Thu, 8 Oct 2020 01:08:44 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/AESCipher.java line 658: >> >>> 656: BadPaddingException { >>> 657: return bufferCrypt(input, output, false); >>> 658: } >> >> Is the override of this method f

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Valerie Peng
On Thu, 8 Oct 2020 06:51:08 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Xuelei comments src/java.base/share/classes/com/sun/crypto/pr

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Thu, 8 Oct 2020 03:21:46 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 528: > >> 52

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Wed, 7 Oct 2020 20:56:28 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 1258: > >> 1256:

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Wed, 7 Oct 2020 20:56:06 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 1253: > >> 1251:

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-08 Thread Anthony Scarpino
On Wed, 7 Oct 2020 20:34:21 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 816: > >> 814: } >

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-07 Thread Anthony Scarpino
On Wed, 7 Oct 2020 19:42:11 GMT, Valerie Peng wrote: >> src/java.base/share/classes/com/sun/crypto/provider/AESCipher.java line 664: >> >>> 662: * engineUpdate() and engineDoFinal(). >>> 663: */ >>> 664: private int bufferCrypt(ByteBuffer input, ByteBuffer output, >> >> It looks l

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-07 Thread Valerie Peng
On Thu, 8 Oct 2020 03:21:46 GMT, Anthony Scarpino wrote: >> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Xuelei comments src/java.base/share/classes/com/sun/crypto/pr

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-07 Thread Anthony Scarpino
On Wed, 7 Oct 2020 16:29:32 GMT, Xue-Lei Andrew Fan wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 947: > >> 945:

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-07 Thread Valerie Peng
On Wed, 7 Oct 2020 16:17:38 GMT, Xue-Lei Andrew Fan wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/AESCipher.java line 664: > >> 662:

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-07 Thread Anthony Scarpino
On Wed, 7 Oct 2020 22:38:21 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Xuelei comments > > src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 939: > >> 937:

Re: RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

2020-10-07 Thread Anthony Scarpino
> 8253821: Improve ByteBuffer performance with GCM Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision: Xuelei comments - Changes: - all: https://git.openjdk.java.net/jdk/pull/411/files - new: https://git.openjdk.java

Re: RFR: 8253821: Improve ByteBuffer performance with GCM

2020-10-07 Thread Valerie Peng
On Tue, 29 Sep 2020 20:22:55 GMT, Anthony Scarpino wrote: > 8253821: Improve ByteBuffer performance with GCM I will take a look as well. - PR: https://git.openjdk.java.net/jdk/pull/411

Re: RFR: 8253821: Improve ByteBuffer performance with GCM

2020-10-07 Thread Xue-Lei Andrew Fan
On Tue, 29 Sep 2020 20:22:55 GMT, Anthony Scarpino wrote: > 8253821: Improve ByteBuffer performance with GCM Impressive update and performance improvement! I have no major concerns, all comments are just about trivial details like indents. src/java.base/share/classes/com/sun/crypto/provider/

  1   2   >