Re: RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator)

2020-11-02 Thread Maurizio Cimadamore
On Sun, 1 Nov 2020 16:06:32 GMT, Alan Bateman wrote: > Now that MemorySegment is AutoCloseable then maybe the term "alive" should be > replaced with "open" or "closed" and isAlive replaced with isOpen is isClosed. While the reason for the method being called "isAlive" are mostly historical (th

Re: RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator)

2020-11-02 Thread Maurizio Cimadamore
On Sun, 1 Nov 2020 16:06:32 GMT, Alan Bateman wrote: > The javadoc for copyFrom isn't changed in this update but I notice it > specifies IndexOutOfBoundException when the source segment is larger than the > receiver, have other exceptions been examined? This exception is consistent with other

Re: RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator) [v20]

2020-11-02 Thread Maurizio Cimadamore
> This patch contains the changes associated with the third incubation round of > the foreign memory access API incubation (see JEP 393 [1]). This iteration > focus on improving the usability of the API in 3 main ways: > > * first, by providing a way to obtain truly *shared* segments, which can

Re: RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator) [v20]

2020-11-02 Thread Sergey Bylokhov
On Mon, 2 Nov 2020 11:59:09 GMT, Maurizio Cimadamore wrote: >> This patch contains the changes associated with the third incubation round >> of the foreign memory access API incubation (see JEP 393 [1]). This >> iteration focus on improving the usability of the API in 3 main ways: >> >> * fi

Re: RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator) [v21]

2020-11-02 Thread Maurizio Cimadamore
> This patch contains the changes associated with the third incubation round of > the foreign memory access API incubation (see JEP 393 [1]). This iteration > focus on improving the usability of the API in 3 main ways: > > * first, by providing a way to obtain truly *shared* segments, which can

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: 8244154: Update SunPKCS11 provider with PKCS11 v3.0 header files

2020-11-02 Thread Valerie Peng
On Sat, 31 Oct 2020 03:28:24 GMT, Weijun Wang wrote: > > > > > The constants in PKCS11Exception are duplicated in PKCS11Constants. > > > ``` > > > 0x, > > > ``` > > > > > > > > > vs > > > ``` > > > public static final long CKR_OK = 0xL; > > > ``` >

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 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 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 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 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: 8244154: Update SunPKCS11 provider with PKCS11 v3.0 header files [v2]

2020-11-02 Thread Valerie Peng
> Could someone please help review this PKCS#11 v3.0 header files update? > > Changes are straight-forward as below: > 1) Updated pkcs11.h, pkcs11f.h, pkcs11t.h to v3.0 > 2) Updated java side w/ the new constants definitions and name/error code > mappings. > > For the native headers, it's a dire

Re: RFR: 8244154: Update SunPKCS11 provider with PKCS11 v3.0 header files [v2]

2020-11-02 Thread Valerie Peng
On Sat, 31 Oct 2020 00:06:01 GMT, Hai-May Chao wrote: >> These three are just by themselves, so unless you feel strongly about, I >> prefer just leave them here which matches the ordering of pkcs11t.h, i.e. >> right before the CKM_VENDOR_DEFINED line. > > Just thought they could be moved like C

Re: RFR: 8244154: Update SunPKCS11 provider with PKCS11 v3.0 header files [v2]

2020-11-02 Thread Weijun Wang
On Fri, 30 Oct 2020 21:47:51 GMT, Valerie Peng wrote: > > Just curious, can the Java files be generated during the build process? > > Hmm, maybe, by the java files, do you just mean PKCS11Constants class or > more? I am not familiar with how to generate Java files during the build > process, c

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 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 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 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