Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Per Minborg
On Mon, 28 Nov 2022 19:35:24 GMT, Paul Sandoz wrote: > I prefer methods that do not expose the scope implementation so access is > limited to just to the acquire/release methods, but i am unsure of the > performance implications. These methods might not reliably inline, and we may > need to en

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions [v2]

2022-11-28 Thread Valerie Peng
On Sun, 27 Nov 2022 16:25:55 GMT, Weijun Wang wrote: >> src/java.base/share/classes/sun/security/x509/X509CRLImpl.java line 300: >> >>> 298: * @exception CRLException on encoding errors. >>> 299: */ >>> 300: public byte[] encodeInfo() throws CRLException { >> >> "throw

Re: RFR: 8247645: ChaCha20 intrinsics [v6]

2022-11-28 Thread Anthony Scarpino
On Tue, 29 Nov 2022 01:54:39 GMT, Jamil Nimeh wrote: >> This PR delivers ChaCha20 intrinsics that accelerate the core block function >> that generates key stream from the key, counter and nonce. Intrinsics have >> been written for the following platforms and instruction sets: >> >> - x86_64:

Re: RFR: 8297271: AccessFlags should be specific to class file version

2022-11-28 Thread Joe Darcy
On Mon, 28 Nov 2022 22:56:27 GMT, Roger Riggs wrote: > The accessFlags() methods added (in JDK 20, the current release) to > java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field > assume the access flags are from the current/most recent class file format > version. For cu

Re: RFR: 8247645: ChaCha20 intrinsics [v5]

2022-11-28 Thread Jamil Nimeh
On Mon, 28 Nov 2022 22:58:26 GMT, Anthony Scarpino wrote: >> Jamil Nimeh has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 50 commits: >> >> - Merge with main >> - Add AVX assertion guard >> - Pull out common macro code into fun

Re: RFR: 8247645: ChaCha20 intrinsics [v6]

2022-11-28 Thread Jamil Nimeh
> This PR delivers ChaCha20 intrinsics that accelerate the core block function > that generates key stream from the key, counter and nonce. Intrinsics have > been written for the following platforms and instruction sets: > > - x86_64: AVX, AVX2 and AVX512 > - aarch64: platforms that support the

Re: RFR: 8297379: Enable the ByteBuffer path of Poly1305 optimizations

2022-11-28 Thread Sandhya Viswanathan
On Wed, 23 Nov 2022 23:33:32 GMT, Volodymyr Paprotski wrote: > Regarding mainline: > - I decided not to 'unroll' the top while loop (i.e. `engineUpdate(byte[] > input, int offset, int len)` is unrolled) >- It is debatable which version is easier to understand. If this version > is 'too comp

Re: RFR: 8247645: ChaCha20 intrinsics [v5]

2022-11-28 Thread Anthony Scarpino
On Tue, 22 Nov 2022 05:28:05 GMT, Jamil Nimeh wrote: >> This PR delivers ChaCha20 intrinsics that accelerate the core block function >> that generates key stream from the key, counter and nonce. Intrinsics have >> been written for the following platforms and instruction sets: >> >> - x86_64:

Re: RFR: 8296408: Make the PCSCException public accessible

2022-11-28 Thread Michael StJohns
On 11/28/2022 1:10 PM, Sean Mullan wrote: PCSCException is an internal API and is strongly encapsulated by default as of JDK 17 [1]. Applications should not be accessing it. Making an internal API public is not the solution. Your suggestion to extend CardException with methods to provide/acces

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-28 Thread Phil Race
On Wed, 23 Nov 2022 18:57:03 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >> li

RFR: 8297271: AccessFlags should be specific to class file version

2022-11-28 Thread Roger Riggs
The accessFlags() methods added (in JDK 20, the current release) to java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field assume the access flags are from the current/most recent class file format version. For current and past class file format versions there are few signif

Re: RFR: 8296142: CertAttrSet::(getName|getElements|delete) are mostly useless

2022-11-28 Thread Weijun Wang
On Sun, 27 Nov 2022 13:39:20 GMT, Andrey Turbanov wrote: >> This code change removes `getElements()` and `delete()` from `CertAttrSet` >> and all its subclasses. The `getName()` method is moved to `s.s.x.Extension` >> since it's only useful there. >> >> Except for removing lines, the only plac

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions [v3]

2022-11-28 Thread Weijun Wang
On Mon, 28 Nov 2022 13:40:15 GMT, Weijun Wang wrote: >> This is mostly cleanup. Everything around `DerOutputStream` no longer throws >> an `IOException`. This includes: >> >> - Remove unnecessary `throws IOException` in code and spec >> - Remove `catch (IOException ioe)` blocks. If new exceptio

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions [v4]

2022-11-28 Thread Weijun Wang
> This is mostly cleanup. Everything around `DerOutputStream` no longer throws > an `IOException`. This includes: > > - Remove unnecessary `throws IOException` in code and spec > - Remove `catch (IOException ioe)` blocks. If new exception is thrown, remove > further `throws` in code and spec > -

Integrated: 8297276: Remove thread text from Subject.current

2022-11-28 Thread Weijun Wang
On Tue, 22 Nov 2022 16:26:30 GMT, Weijun Wang wrote: > With the introduction of Virtual Threads, the current subject is no longer > guaranteed to be inherited in a new thread. Remove this requirement until we > find another way to implement `Subject::current`. This pull request has now been in

Re: RFR: 8288050: Add support of SHA-512/224 and SHA-512/256 to the PBKDF2 and PBES2 impls in SunJCE provider [v2]

2022-11-28 Thread Weijun Wang
On Sun, 27 Nov 2022 09:09:23 GMT, Valerie Peng wrote: >> This RFE enhances existing PBE algorithms with the "SHA512/224" and >> "SHA512/256" support. >> Current transformation parsing in javax.crypto.Cipher class is re-written to >> handle the additional "/" in the "SHA512/224" and "SHA512/256

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Paul Sandoz
On Mon, 28 Nov 2022 10:47:47 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed by

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions [v3]

2022-11-28 Thread Sean Mullan
On Mon, 28 Nov 2022 13:40:15 GMT, Weijun Wang wrote: >> This is mostly cleanup. Everything around `DerOutputStream` no longer throws >> an `IOException`. This includes: >> >> - Remove unnecessary `throws IOException` in code and spec >> - Remove `catch (IOException ioe)` blocks. If new exceptio

Re: RFR: 8296408: Make the PCSCException public accessible

2022-11-28 Thread Sean Mullan
PCSCException is an internal API and is strongly encapsulated by default as of JDK 17 [1]. Applications should not be accessing it. Making an internal API public is not the solution. Your suggestion to extend CardException with methods to provide/access the underlying error code seems more rea

RFR: 8296384: [TESTBUG] sun/security/provider/SecureRandom/AbstractDrbg/SpecTest.java intermittently timeout

2022-11-28 Thread yansendao
8296384: [TESTBUG] sun/security/provider/SecureRandom/AbstractDrbg/SpecTest.java intermittently timeout - Commit messages: - 8296384: [TESTBUG] sun/security/provider/SecureRandom/AbstractDrbg/SpecTest.java intermittently timeout Changes: https://git.openjdk.org/jdk/pull/11014/fi

Re: RFR: 8297515: serialVersionUID fields are not annotated with @Serial

2022-11-28 Thread Lance Andersen
On Thu, 24 Nov 2022 08:19:17 GMT, Per Minborg wrote: > This PR proposes adding `@Serial` annotations to certain fields participating > in serialisation. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11347

Re: RFR: 8297515: serialVersionUID fields are not annotated with @Serial

2022-11-28 Thread Roger Riggs
On Thu, 24 Nov 2022 08:19:17 GMT, Per Minborg wrote: > This PR proposes adding `@Serial` annotations to certain fields participating > in serialisation. LGTM - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11347

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Maurizio Cimadamore
On Mon, 21 Nov 2022 12:05:31 GMT, Alan Bateman wrote: >> The reason for the comment is to make it clear why `DirectBuffer::address` >> can be used directly without guarding. This will also reduce the probability >> of unnecessary guarding being added in the future. However, if the consensus >>

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-11-28 Thread Daniel Fuchs
On Mon, 28 Nov 2022 10:02:47 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which fixes the typos in the test >> packages? @mernst submitted this as a separate PR >> https://github.com/openjdk/jdk/pull/10029 but given the number of areas and >> files that other PR touches

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Alan Bateman
On Mon, 28 Nov 2022 10:47:47 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed by

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions [v3]

2022-11-28 Thread Weijun Wang
On Mon, 28 Nov 2022 13:40:15 GMT, Weijun Wang wrote: >> This is mostly cleanup. Everything around `DerOutputStream` no longer throws >> an `IOException`. This includes: >> >> - Remove unnecessary `throws IOException` in code and spec >> - Remove `catch (IOException ioe)` blocks. If new exceptio

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions [v3]

2022-11-28 Thread Weijun Wang
> This is mostly cleanup. Everything around `DerOutputStream` no longer throws > an `IOException`. This includes: > > - Remove unnecessary `throws IOException` in code and spec > - Remove `catch (IOException ioe)` blocks. If new exception is thrown, remove > further `throws` in code and spec > -

Re: RFR: 8297519: Improve expressions and modernise code [v2]

2022-11-28 Thread Per Minborg
> During the work of another PR (https://github.com/openjdk/jdk/pull/11260), > several improvement areas were identified. These are now adressed in this > separate PR proposing the use of more modern Java constructs as well as > simplifying a large number of logical expressions that were previou

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-11-28 Thread Lance Andersen
On Mon, 28 Nov 2022 10:02:47 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which fixes the typos in the test >> packages? @mernst submitted this as a separate PR >> https://github.com/openjdk/jdk/pull/10029 but given the number of areas and >> files that other PR touches

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v15]

2022-11-28 Thread Alan Bateman
On Mon, 28 Nov 2022 10:36:40 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed by

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v15]

2022-11-28 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-11-28 Thread Jaikiran Pai
On Mon, 28 Nov 2022 09:54:08 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address review comment - don't change WithHelperPublisher.java > > test/jdk/java/net/httpclient/reactivestreams-tck/org

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-11-28 Thread Jaikiran Pai
> Can I please get a review of this change which fixes the typos in the test > packages? @mernst submitted this as a separate PR > https://github.com/openjdk/jdk/pull/10029 but given the number of areas and > files that other PR touches, the progress has been stalled. > > I'll raise separate PR

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni

2022-11-28 Thread Alan Bateman
On Mon, 28 Nov 2022 08:58:29 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the typos in the test > packages? @mernst submitted this as a separate PR > https://github.com/openjdk/jdk/pull/10029 but given the number of areas and > files that other PR touches, th

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni

2022-11-28 Thread Alan Bateman
On Mon, 28 Nov 2022 08:58:29 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the typos in the test > packages? @mernst submitted this as a separate PR > https://github.com/openjdk/jdk/pull/10029 but given the number of areas and > files that other PR touches, th

RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni

2022-11-28 Thread Jaikiran Pai
Can I please get a review of this change which fixes the typos in the test packages? @mernst submitted this as a separate PR https://github.com/openjdk/jdk/pull/10029 but given the number of areas and files that other PR touches, the progress has been stalled. I'll raise separate PRs in the oth

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-11-28 Thread Jaikiran Pai
On Sun, 27 Nov 2022 17:49:57 GMT, Michael Ernst wrote: > Could someone who knows the undocumented ins and outs of creating JDK pull > requests could split this pull request up into multiple PRs? Then it can be > merged, rather than wasting all the effort that went into it. I've raised https://

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v14]

2022-11-28 Thread Per Minborg
On Thu, 24 Nov 2022 16:21:42 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed by