Re: RFR: 8296507: GCM using more memory than necessary with in-place operations [v3]

2022-11-30 Thread Anthony Scarpino
> I would like a review of an update to the GCM code. A recent report showed > that GCM memory usage for TLS was very large. This was a result of in-place > buffers, which TLS uses, and how the code handled the combined intrinsic > method during decryption. A temporary buffer was used because

Re: RFR: 8296507: GCM using more memory than necessary with in-place operations [v2]

2022-11-30 Thread Anthony Scarpino
On Thu, 1 Dec 2022 02:10:01 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> comment cleanup & finesse ByteBuffer implGCMCrypt better > > src/java.base/share/classes/com/sun/crypto/provider/Gal

Re: RFR: 8297505: Declare fields in some sun.security.pkcs11 classes as final

2022-11-30 Thread Valerie Peng
On Thu, 24 Nov 2022 08:13:58 GMT, Per Minborg wrote: > This PR proposes declaring some fields as `final` to potentially unlock > performance optimisations and improve thread visibility (e.g. for GC > threads). The PR also fixes a "synchronising on a non-final field" > anti-pattern. Looks fine

Re: RFR: 8296507: GCM using more memory than necessary with in-place operations [v2]

2022-11-30 Thread Valerie Peng
On Mon, 21 Nov 2022 18:20:09 GMT, Anthony Scarpino wrote: >> I would like a review of an update to the GCM code. A recent report showed >> that GCM memory usage for TLS was very large. This was a result of in-place >> buffers, which TLS uses, and how the code handled the combined intrinsic

Re: RFR: JDK-8293412 Remove unnecessary java.security.egd overrides [v3]

2022-11-30 Thread Bradford Wetmore
On Tue, 22 Nov 2022 22:14:07 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8293412 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > javadoc update Would you consider removing SHA1PRNG from sun/security/ssl/

Re: RFR: 8296507: GCM using more memory than necessary with in-place operations [v2]

2022-11-30 Thread Valerie Peng
On Mon, 21 Nov 2022 18:20:09 GMT, Anthony Scarpino wrote: >> I would like a review of an update to the GCM code. A recent report showed >> that GCM memory usage for TLS was very large. This was a result of in-place >> buffers, which TLS uses, and how the code handled the combined intrinsic

Re: RFR: 8296507: GCM using more memory than necessary with in-place operations [v2]

2022-11-30 Thread Valerie Peng
On Wed, 16 Nov 2022 16:55:39 GMT, Mark Powers wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> comment cleanup & finesse ByteBuffer implGCMCrypt better > > src/java.base/share/classes/com/sun/crypto/provider/Gal

Re: RFR: 8295803: Console should be usable in jshell and other environments [v2]

2022-11-30 Thread Naoto Sato
> This is to allow Console to be used even when it is not attached to the > platform provided terminal, such as the case when the standard input is > redirected. `System.console()` now returns a Console implementation based on > `jdk.internal.le` terminal by default, or jshell implementation if

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

2022-11-30 Thread Bradford Wetmore
On Mon, 7 Nov 2022 09:04:45 GMT, yansendao wrote: > 8296384: [TESTBUG] > sun/security/provider/SecureRandom/AbstractDrbg/SpecTest.java intermittently > timeout Copyrights in both files need to be updated to include ", 2022". Approval granted contingent on these changes. - Marked

Integrated: 8297519: Improve expressions and modernise code in PKCS

2022-11-30 Thread Per Minborg
On Thu, 24 Nov 2022 08:24:37 GMT, Per Minborg wrote: > 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

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

2022-11-30 Thread Weijun Wang
On Mon, 7 Nov 2022 09:04:45 GMT, yansendao wrote: > 8296384: [TESTBUG] > sun/security/provider/SecureRandom/AbstractDrbg/SpecTest.java intermittently > timeout Change looks good. Thanks for the fix! - Marked as reviewed by weijun (Reviewer). PR: https://git.openjdk.org/jdk/pull/

Re: RFR: 8297505: Declare fields in some sun.security.pkcs11 classes as final

2022-11-30 Thread Valerie Peng
On Thu, 24 Nov 2022 08:13:58 GMT, Per Minborg wrote: > This PR proposes declaring some fields as `final` to potentially unlock > performance optimisations and improve thread visibility (e.g. for GC > threads). The PR also fixes a "synchronising on a non-final field" > anti-pattern. I will tak

Re: RFR: 8294248: Use less limbs for P256 in EC implementation [v4]

2022-11-30 Thread Xue-Lei Andrew Fan
On Wed, 30 Nov 2022 07:46:19 GMT, Daniel JeliƄski wrote: > Please add a test that verifies that the worst case calculation still > produces correct results. That is: > > * build a number where the limb values are as high as possible > (2^(numLimbs*bitsPerLimb)-1, or something close) > * sum th

Re: RFR: 8297519: Improve expressions and modernise code in PKCS [v3]

2022-11-30 Thread Weijun Wang
On Wed, 30 Nov 2022 08:03:50 GMT, Per Minborg wrote: >> 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 >> simplify

Re: RFR: 8295803: Console should be usable in jshell and other environments

2022-11-30 Thread Naoto Sato
On Wed, 30 Nov 2022 17:07:35 GMT, Jim Laskey wrote: >> This is to allow Console to be used even when it is not attached to the >> platform provided terminal, such as the case when the standard input is >> redirected. `System.console()` now returns a Console implementation based on >> `jdk.inte

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

2022-11-30 Thread Roger Riggs
On Wed, 30 Nov 2022 08:03:50 GMT, Per Minborg wrote: >> 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 >> simplify

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

2022-11-30 Thread Weijun Wang
On Wed, 30 Nov 2022 08:03:50 GMT, Per Minborg wrote: >> 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 >> simplify

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

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 09:40:58 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: 8295803: Console should be usable in jshell and other environments

2022-11-30 Thread Jim Laskey
On Tue, 29 Nov 2022 19:38:02 GMT, Naoto Sato wrote: > This is to allow Console to be used even when it is not attached to the > platform provided terminal, such as the case when the standard input is > redirected. `System.console()` now returns a Console implementation based on > `jdk.internal

RFR: 8295803: Console should be usable in jshell and other environments

2022-11-30 Thread Naoto Sato
This is to allow Console to be used even when it is not attached to the platform provided terminal, such as the case when the standard input is redirected. `System.console()` now returns a Console implementation based on `jdk.internal.le` terminal by default, or jshell implementation if availabl

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v3]

2022-11-30 Thread Per Minborg
> This PR proposes a variety of modernisations to the `jdk.sctp` module. > > During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several > improvement areas were identified including: > > * Replacing duplicate code segments > * Making certain fields final > * Using enhanced switch

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v2]

2022-11-30 Thread Alan Bateman
On Wed, 30 Nov 2022 09:22:00 GMT, Per Minborg wrote: >> This PR proposes a variety of modernisations to the `jdk.sctp` module. >> >> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several >> improvement areas were identified including: >> >> * Replacing duplicate code segments

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v2]

2022-11-30 Thread Per Minborg
> This PR proposes a variety of modernisations to the `jdk.sctp` module. > > During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several > improvement areas were identified including: > > * Replacing duplicate code segments > * Making certain fields final > * Using enhanced switch

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 20:25:19 GMT, Alan Bateman wrote: >> src/jdk.sctp/macosx/classes/sun/nio/ch/sctp/SctpChannelImpl.java line 44: >> >>> 42: * Unimplemented. >>> 43: */ >>> 44: public class SctpChannelImpl extends SctpChannel { >> >> Going a bit beyond just updating syntax; but that's a diff

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 17:17:12 GMT, Daniel Fuchs wrote: >> This PR proposes a variety of modernisations to the `jdk.sctp` module. >> >> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several >> improvement areas were identified including: >> >> * Replacing duplicate code segment

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 17:08:50 GMT, Daniel Fuchs wrote: >> This PR proposes a variety of modernisations to the `jdk.sctp` module. >> >> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several >> improvement areas were identified including: >> >> * Replacing duplicate code segment

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 17:44:18 GMT, Daniel Fuchs wrote: > It is a bit unusual to use a local class as a holder class (the typical > manner is to a have a private static final nested class) but we didn't have > local classes until recently - so maybe that's OK. I assume there's only one > version

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

2022-11-30 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