Re: Undo deprecation of brainpool EC

2022-11-15 Thread Xuelei Fan
Hi Benjamin, May I ask what are the sizes of brainpool curves used in practice? Thank, Xuelei > On Nov 14, 2022, at 12:36 AM, benjamin.marw...@f-i.de wrote: > > Hello everyone! > > To our surprise, brainpool EC have been deprecated with Java 14+ [1]. > However, JDK-8234924 [1] does not add

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v3]

2022-11-15 Thread Sean Mullan
On Thu, 10 Nov 2022 17:59:44 GMT, Weijun Wang wrote: >> An `EncryptedPrivateKeyInfo` object can be created with an uninitialized >> `AlgorithmParameters`, but before you call `getEncoded` on it you need to >> remember to initialize the params. This is unfortunate but since this is a >> public

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Xue-Lei Andrew Fan
On Tue, 15 Nov 2022 18:37:50 GMT, Sean Mullan wrote: > > As you are already there, it may be nice to cover more options that the > > protocol may not be used for the handshaking. Here are some cases I'm aware > > of: > > > > 1. the protocol is disabled with Security property > > 2. the

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Xue-Lei Andrew Fan
On Tue, 15 Nov 2022 19:07:05 GMT, Xue-Lei Andrew Fan wrote: > It may be not an option to stop at SSLContext.getInstance() if the protocol > is disabled rather than delay to handshaking, as an application still can > have the protocol back by overriding the default security properties. I may

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v17]

2022-11-15 Thread Volodymyr Paprotski
> Handcrafted x86_64 asm for Poly1305. Main optimization is to process 16 > message blocks at a time. For more details, left a lot of comments in > `macroAssembler_x86_poly.cpp`. > > - Added new KAT test for Poly1305 and a fuzz test to compare intrinsic and > java. > - Would like to add an

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]

2022-11-15 Thread Volodymyr Paprotski
On Tue, 15 Nov 2022 00:16:19 GMT, Vladimir Ivanov wrote: >> Volodymyr Paprotski has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 23 commits: >> >> - Merge remote-tracking branch 'origin/master' into avx512-poly >> - Vladimir's

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]

2022-11-15 Thread Volodymyr Paprotski
On Tue, 15 Nov 2022 17:42:08 GMT, Volodymyr Paprotski wrote: >> src/hotspot/cpu/x86/stubGenerator_x86_64_poly.cpp line 384: >> >>> 382: void StubGenerator::poly1305_limbs(const Register limbs, const >>> Register a0, const Register a1, const Register a2, bool only128) >>> 383: { >>> 384:

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]

2022-11-15 Thread Volodymyr Paprotski
On Tue, 15 Nov 2022 00:45:54 GMT, Vladimir Ivanov wrote: >> library_call.cpp takes care of that, it passes the address of 0'th element >> to the stub. > > Ah, got it. Worth elaborating that in the comments. Otherwise, they confuse > rather than help: > > // void processBlocks(byte[] input,

Re: RFR: 8296742: Illegal X509 Extension should not be created [v3]

2022-11-15 Thread Weijun Wang
> Inside JDK we support a lot of X.509 certificate extensions. Almost every > extension has a rule about what is legal or not. For example, the names in > `SubjectAlternativeNameExtension` cannot be missing or empty. Usually, a rule > is enforced in the `encode()` method, where the extension

Re: RFR: 8297074: Use enhanced-for cycle instead of Enumeration in javax.crypto

2022-11-15 Thread Andrey Turbanov
On Tue, 15 Nov 2022 16:07:37 GMT, Weijun Wang wrote: >> java.util.Enumeration is a legacy interface from java 1.0. >> There are a few places with cycles which use it to iterate over collections. >> We can replace this manual cycle with enchanced-for, which is shorter and >> easier to read. > >

RFR: 8297074: Use enhanced-for cycle instead of Enumeration in javax.crypto

2022-11-15 Thread Andrey Turbanov
java.util.Enumeration is a legacy interface from java 1.0. There are a few places with cycles which use it to iterate over collections. We can replace this manual cycle with enchanced-for, which is shorter and easier to read. - Commit messages: - 8297074: Use enhanced-for cycle

Re: RFR: 8297074: Use enhanced-for cycle instead of Enumeration in javax.crypto

2022-11-15 Thread Weijun Wang
On Mon, 7 Nov 2022 16:54:32 GMT, Andrey Turbanov wrote: > java.util.Enumeration is a legacy interface from java 1.0. > There are a few places with cycles which use it to iterate over collections. > We can replace this manual cycle with enchanced-for, which is shorter and > easier to read.

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]

2022-11-15 Thread Volodymyr Paprotski
On Tue, 15 Nov 2022 00:43:16 GMT, Vladimir Ivanov wrote: >> Volodymyr Paprotski has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 23 commits: >> >> - Merge remote-tracking branch 'origin/master' into avx512-poly >> - Vladimir's

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v18]

2022-11-15 Thread Volodymyr Paprotski
> Handcrafted x86_64 asm for Poly1305. Main optimization is to process 16 > message blocks at a time. For more details, left a lot of comments in > `macroAssembler_x86_poly.cpp`. > > - Added new KAT test for Poly1305 and a fuzz test to compare intrinsic and > java. > - Would like to add an

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v19]

2022-11-15 Thread Volodymyr Paprotski
> Handcrafted x86_64 asm for Poly1305. Main optimization is to process 16 > message blocks at a time. For more details, left a lot of comments in > `macroAssembler_x86_poly.cpp`. > > - Added new KAT test for Poly1305 and a fuzz test to compare intrinsic and > java. > - Would like to add an

Re: RFR: 8296746: NativePRNG SecureRandom doesn't scale with threads [v2]

2022-11-15 Thread Xubo Zhang
On Mon, 14 Nov 2022 16:37:41 GMT, Xubo Zhang wrote: >> NativePRNG SecureRandom doesn’t scale with number of threads. The >> performance starts dropping as we increase the number of threads. Even going >> from 1 thread to 2 threads shows significant drop. The bottleneck is the >> singleton

Re: RFR: 8296818: Enhance JMH tests java/security/Signatures.java [v3]

2022-11-15 Thread Weijun Wang
On Tue, 15 Nov 2022 17:35:02 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I get the micro benchmarking enhancement reviewed? >> >> Benchmark cases for RSA(SSA-PSS)/DSA are added in the PR. Here is the >> benchmarking number on a Linux X86_64 platform. >> >> Benchmark

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Sean Mullan
On Tue, 15 Nov 2022 19:07:05 GMT, Xue-Lei Andrew Fan wrote: > If it will be addressed in the future issue, the current specification may > need to weight the impact in. Otherwise, the specification added here might > need to re-work to cover more cases. Which is fine. But we can still cover

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]

2022-11-15 Thread Vladimir Ivanov
On Tue, 15 Nov 2022 17:42:08 GMT, Volodymyr Paprotski wrote: >> src/hotspot/cpu/x86/stubGenerator_x86_64_poly.cpp line 384: >> >>> 382: void StubGenerator::poly1305_limbs(const Register limbs, const >>> Register a0, const Register a1, const Register a2, bool only128) >>> 383: { >>> 384:

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]

2022-11-15 Thread Vladimir Ivanov
On Tue, 15 Nov 2022 19:38:26 GMT, Volodymyr Paprotski wrote: >> Ah, got it. Worth elaborating that in the comments. Otherwise, they confuse >> rather than help: >> >> // void processBlocks(byte[] input, int len, int[5] a, int[5] r) >> const Register input= rdi; //input+offset >>

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Sean Mullan
On Tue, 15 Nov 2022 19:12:19 GMT, Xue-Lei Andrew Fan wrote: > > It may be not an option to stop at SSLContext.getInstance() if the protocol > > is disabled rather than delay to handshaking, as an application still can > > have the protocol back by overriding the default security properties. >

Re: RFR: 8297074: Use enhanced-for cycle instead of Enumeration in javax.crypto

2022-11-15 Thread Weijun Wang
On Mon, 7 Nov 2022 16:54:32 GMT, Andrey Turbanov wrote: > java.util.Enumeration is a legacy interface from java 1.0. > There are a few places with cycles which use it to iterate over collections. > We can replace this manual cycle with enchanced-for, which is shorter and > easier to read.

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v17]

2022-11-15 Thread Volodymyr Paprotski
On Tue, 15 Nov 2022 19:41:25 GMT, Vladimir Ivanov wrote: >> Volodymyr Paprotski has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 25 commits: >> >> - Vladimir's review comments >> - Merge remote-tracking branch 'origin/master'

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]

2022-11-15 Thread Vladimir Ivanov
On Mon, 14 Nov 2022 17:58:36 GMT, Volodymyr Paprotski wrote: >> Handcrafted x86_64 asm for Poly1305. Main optimization is to process 16 >> message blocks at a time. For more details, left a lot of comments in >> `macroAssembler_x86_poly.cpp`. >> >> - Added new KAT test for Poly1305 and a fuzz

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v3]

2022-11-15 Thread Weijun Wang
On Tue, 15 Nov 2022 21:13:59 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> expected > > src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 62: > >> 60: // The

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v3]

2022-11-15 Thread Sean Mullan
On Thu, 10 Nov 2022 17:59:44 GMT, Weijun Wang wrote: >> An `EncryptedPrivateKeyInfo` object can be created with an uninitialized >> `AlgorithmParameters`, but before you call `getEncoded` on it you need to >> remember to initialize the params. This is unfortunate but since this is a >> public

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v3]

2022-11-15 Thread Sean Mullan
On Tue, 15 Nov 2022 21:39:03 GMT, Weijun Wang wrote: >> src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line >> 62: >> >>> 60: // The "encryptionAlgorithm" field. If this object is created by >>> 61: // {@link #EncryptedPrivateKeyInfo(AlgorithmParameters, byte[])}

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v3]

2022-11-15 Thread Weijun Wang
On Tue, 15 Nov 2022 21:44:52 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> expected > > src/java.base/share/classes/sun/security/pkcs12/MacData.java line 119: > >> 117: } >> 118: >> 119:

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v3]

2022-11-15 Thread Sean Mullan
On Thu, 10 Nov 2022 15:03:21 GMT, Weijun Wang wrote: >> src/java.base/share/classes/sun/security/x509/AlgorithmId.java line 113: >> >>> 111: } catch (IOException ioe) { >>> 112: throw new IllegalStateException( >>> 113: "AlgorithmParameters

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v3]

2022-11-15 Thread Weijun Wang
On Tue, 15 Nov 2022 21:48:54 GMT, Sean Mullan wrote: >> The only left caller is `EncryptedPrivateKeyInfo`. If new callers start >> using this constructor, this will be the expected behavior. The message can >> be enhanced a little since there could be other reasons. (Ex: >> `PSSParameters`

RFR: 8296507: GCM using more memory than necessary with in-place operations

2022-11-15 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 the

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v17]

2022-11-15 Thread Vladimir Ivanov
On Tue, 15 Nov 2022 19:43:11 GMT, Volodymyr Paprotski wrote: >> Handcrafted x86_64 asm for Poly1305. Main optimization is to process 16 >> message blocks at a time. For more details, left a lot of comments in >> `macroAssembler_x86_poly.cpp`. >> >> - Added new KAT test for Poly1305 and a fuzz

Integrated: 8296736: Some PKCS9Attribute can be created but cannot be encoded

2022-11-15 Thread Weijun Wang
On Wed, 9 Nov 2022 21:54:49 GMT, Weijun Wang wrote: > One `PKCS9Attribute` can be created but cannot be encoded. Since the > `SigningCertificateInfo::parse` method has not fully parsed the data > (`PolicyInformation` is left out), this code change add the encoding itself > as a field to the

Re: RFR: 8296818: Enhance JMH tests java/security/Signatures.java [v3]

2022-11-15 Thread Xue-Lei Andrew Fan
> Hi, > > May I get the micro benchmarking enhancement reviewed? > > Benchmark cases for RSA(SSA-PSS)/DSA are added in the PR. Here is the > benchmarking number on a Linux X86_64 platform. > > Benchmark(algorithm) (messageLength) Mode Cnt > ScoreError

Re: RFR: 8296736: Some PKCS9Attribute can be created but cannot be encoded [v2]

2022-11-15 Thread Weijun Wang
On Tue, 15 Nov 2022 00:49:23 GMT, Valerie Peng wrote: >> You mean comparing it with the original value? I tried that but not always >> the same. For example, a string might be an IA5String at the beginning but >> becomes a UTF8String after re-encoding. > > I see, not surprising, perhaps just

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v3]

2022-11-15 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Reviewer feedback - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new:

Re: RFR: 8296818: Enhance JMH tests java/security/Signatures.java [v2]

2022-11-15 Thread Xue-Lei Andrew Fan
> Hi, > > May I get the micro benchmarking enhancement reviewed? > > Benchmark cases for RSA(SSA-PSS)/DSA are added in the PR. Here is the > benchmarking number on a Linux X86_64 platform. > > Benchmark(algorithm) (messageLength) Mode Cnt > ScoreError

Re: RFR: 8296818: Enhance JMH tests java/security/Signatures.java [v2]

2022-11-15 Thread Xue-Lei Andrew Fan
On Tue, 15 Nov 2022 16:00:36 GMT, Weijun Wang wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> use hash algorithm for RSASSA-PSS > > test/micro/org/openjdk/bench/java/security/Signatures.java line 39: > >>

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Xue-Lei Andrew Fan
On Tue, 15 Nov 2022 17:41:19 GMT, Sean Mullan wrote: > Please review this PR to add an implementation note to > the`SSLContext.getInstance` methods to document the behavior when a protocol > is disabled. As you are already there, it may be nice to cover more options that the protocol may not

Re: RFR: 8296736: Some PKCS9Attribute can be created but cannot be encoded [v4]

2022-11-15 Thread Weijun Wang
> One `PKCS9Attribute` can be created but cannot be encoded. Since the > `SigningCertificateInfo::parse` method has not fully parsed the data > (`PolicyInformation` is left out), this code change add the encoding itself > as a field to the `SigningCertificateInfo` class so we can encode it. >

Integrated: 8294731: Improve multiplicative inverse for secp256r1 implementation

2022-11-15 Thread Xue-Lei Andrew Fan
On Mon, 3 Oct 2022 19:00:44 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this patch reviewed? > > This is one of a few steps to improve the EC performance. The multiplicative > inverse implementation could be improved for better performance. > > For secp256r1 prime p, the current

Re: RFR: 8296818: Enhance JMH tests java/security/Signatures.java

2022-11-15 Thread Weijun Wang
On Mon, 14 Nov 2022 05:11:33 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I get the micro benchmarking enhancement reviewed? > > Benchmark cases for RSA(SSA-PSS)/DSA are added in the PR. Here is the > benchmarking number on a Linux X86_64 platform. > > Benchmark

Re: RFR: 8288047: Accelerate Poly1305 on x86_64 using AVX512 instructions [v16]

2022-11-15 Thread Volodymyr Paprotski
On Tue, 15 Nov 2022 00:06:40 GMT, Vladimir Ivanov wrote: >> Volodymyr Paprotski has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 23 commits: >> >> - Merge remote-tracking branch 'origin/master' into avx512-poly >> - Vladimir's

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Joe Darcy
On Tue, 15 Nov 2022 17:41:19 GMT, Sean Mullan wrote: > Please review this PR to add an implementation note to > the`SSLContext.getInstance` methods to document the behavior when a protocol > is disabled. Marked as reviewed by darcy (Reviewer). - PR:

RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Sean Mullan
Please review this PR to add an implementation note to the`SSLContext.getInstance` methods to document the behavior when a protocol is disabled. - Commit messages: - Update wording for SunJSSE provider. - Initial revision. Changes: https://git.openjdk.org/jdk/pull/11172/files

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Sean Mullan
On Tue, 15 Nov 2022 18:27:27 GMT, Xue-Lei Andrew Fan wrote: > As you are already there, it may be nice to cover more options that the > protocol may not be used for the handshaking. Here are some cases I'm aware > of: > > 1. the protocol is disabled with Security property > 2. the protocol is

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Xuelei Fan
> The wording in this PR specifically refers to the protocol version that was specified. It isn't covering other optional protocols that may be supported. Sorry, I may not make it clear. The protocol specified in SSLContext.getInstance is not TLS protocol version. I think the protocol disabled

Re: RFR: 8297074: Use enhanced-for cycle instead of Enumeration in javax.crypto

2022-11-15 Thread Bradford Wetmore
On Mon, 7 Nov 2022 16:54:32 GMT, Andrey Turbanov wrote: > java.util.Enumeration is a legacy interface from java 1.0. > There are a few places with cycles which use it to iterate over collections. > We can replace this manual cycle with enchanced-for, which is shorter and > easier to read.

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Xue-Lei Andrew Fan
On Tue, 15 Nov 2022 18:37:50 GMT, Sean Mullan wrote: > > As you are already there, it may be nice to cover more options that the > > protocol may not be used for the handshaking. Here are some cases I'm aware > > of: > > > > 1. the protocol is disabled with Security property > > 2. the

Re: RFR: 8296820: Add implementation note to SSLContext.getInstance noting subsequent behavior if protocol is disabled

2022-11-15 Thread Xue-Lei Andrew Fan
On Tue, 15 Nov 2022 22:53:35 GMT, Sean Mullan wrote: > > BTW, the protocol for SSLContext.getInstance() method is not a TLS > > protocol. It is more of a context-algorithm. For example, > > SSLContext.getInstance("TLSv1.3") could support TLS 1.0/1.1/1.2/1.3. It may > > be not usual, but if

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v4]

2022-11-15 Thread Weijun Wang
> An `EncryptedPrivateKeyInfo` object can be created with an uninitialized > `AlgorithmParameters`, but before you call `getEncoded` on it you need to > remember to initialize the params. This is unfortunate but since this is a > public API, I hesitate to make a change. > > Instead, this code

Re: RFR: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters [v3]

2022-11-15 Thread Weijun Wang
On Tue, 15 Nov 2022 21:14:57 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> expected > > src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line 65: > >> 63: // In all

Re: Undo deprecation of brainpool EC

2022-11-15 Thread benjamin.marwell
Hi Xuelei and Sean, We use/see mostly brainpoolP512r1. But it is not just us! > , although I will note that the IANA registry >still lists them as not recommended for TLS [1]. I agree that brainpoolP512r1 are not particularly interesting when it comes to TLS, but we still see server

Re: RFR: 8296734: JarVerifier:: mapSignersToCodeSource should cache in map

2022-11-15 Thread pandaapo
On Mon, 14 Nov 2022 18:41:41 GMT, Sean Mullan wrote: > Yes. I believe the `setEagerValidation` method can also be removed and all > code that calls it. OK, I will remove it and all methods that calls it: ![jdk issue

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

2022-11-15 Thread Daniel Jeliński
On Mon, 14 Nov 2022 23:01:13 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8293412 > > Mark Powers has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-15 Thread Julian Waters
On Mon, 14 Nov 2022 13:06:28 GMT, Kim Barrett wrote: >> Yep, just something that C++ does a little neater, at least in my view > > We (the HotSpot Group) have not discussed or approved the use of the new C++ > attribute syntax, whether for standard attributes or compiler-specific ones. > That

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v6]

2022-11-15 Thread Ferenc Rakoczi
On Sat, 12 Nov 2022 18:52:59 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this patch reviewed? >> >> This is one of a few steps to improve the EC performance. The multiplicative >> inverse implementation could be improved for better performance. >> >> For secp256r1 prime p, the

RFR: JDK-8277074: Qualified exported types show up in JavaDoc

2022-11-15 Thread Hannes Wallnöfer
Please review a simple change to hide internal classes in generated documentation by adding doc comments containing a `@hidden` tag. I verified the fix by making sure `grep -r jdk.internal` returns no matches in the generated documentation tree. - Commit messages: - JDK-8277074:

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-15 Thread Julian Waters
On Tue, 15 Nov 2022 06:12:52 GMT, Kim Barrett wrote: >> Reverted to use the original, less intrusive solution from >> [8274980](https://github.com/openjdk/jdk/pull/11081/commits/83ed3deb29d7344bbc95a3831f2388d077bc59e9) >> that initially could not work with the older Visual C++ compiler (With

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-15 Thread Coleen Phillimore
On Mon, 14 Nov 2022 16:12:48 GMT, Julian Waters wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features

RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Andrew Haley
JEP 429 implementation. - Commit messages: - Update StressStackOverflow - Release _scopedValueCache after use - Merge branch 'JDK-828' of https://github.com/theRealAph/jdk into JDK-828 - Update src/java.base/share/classes/jdk/internal/vm/ScopedValueContainer.java -

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Dean Long
On Wed, 2 Nov 2022 16:23:34 GMT, Andrew Haley wrote: > JEP 429 implementation. src/hotspot/share/prims/jvm.cpp line 1410: > 1408: loc = 3; > 1409: } else if (method == resolver.thread_run_method) { > 1410: loc = 2; This depends on how javac numbers locals, right? It seems a

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Andrew Haley
On Fri, 4 Nov 2022 23:17:32 GMT, Dean Long wrote: >> JEP 429 implementation. > > src/hotspot/share/prims/jvm.cpp line 1410: > >> 1408: loc = 3; >> 1409: } else if (method == resolver.thread_run_method) { >> 1410: loc = 2; > > This depends on how javac numbers locals, right? It

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Andrew Haley
On Thu, 10 Nov 2022 17:42:38 GMT, Andrew Haley wrote: >> src/hotspot/share/prims/jvm.cpp line 1410: >> >>> 1408: loc = 3; >>> 1409: } else if (method == resolver.thread_run_method) { >>> 1410: loc = 2; >> >> This depends on how javac numbers locals, right? It seems a bit

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Alan Bateman
On Wed, 2 Nov 2022 16:23:34 GMT, Andrew Haley wrote: > JEP 429 implementation. src/hotspot/share/prims/jvm.cpp line 4072: > 4070: */ > 4071: JVM_ENTRY(void, JVM_EnsureMaterializedForStackWalk_func(JNIEnv* env, > jobject vthread, jobject value)) > 4072: //asm("nop"); The asm("nop") was

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread ExE Boss
On Wed, 2 Nov 2022 16:23:34 GMT, Andrew Haley wrote: > JEP 429 implementation. src/java.base/share/classes/java/lang/Thread.java line 1610: > 1608: ensureMaterializedForStackWalk(bindings); > 1609: task.run(); > 1610: Reference.reachabilityFence(bindings);

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Andrew Haley
On Thu, 3 Nov 2022 11:50:17 GMT, ExE Boss wrote: >> JEP 429 implementation. > > src/java.base/share/classes/java/lang/Thread.java line 1610: > >> 1608: ensureMaterializedForStackWalk(bindings); >> 1609: task.run(); >> 1610:

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Andrew Haley
On Mon, 14 Nov 2022 17:34:31 GMT, Alan Bateman wrote: >> JEP 429 implementation. > > src/java.base/share/classes/java/lang/VirtualThread.java line 318: > >> 316: } >> 317: } >> 318: @Hidden > > Can we rename this to runWith(Runnable, Object) in both Thread and > VirtualThread

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Andrew Haley
On Wed, 2 Nov 2022 16:23:34 GMT, Andrew Haley wrote: > JEP 429 implementation. src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/ScopedValue.java line 475: > 473: // ??? Do we want to search cache for this? In most cases we > don't expect > 474: // this

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-11-15 Thread Dean Long
On Fri, 4 Nov 2022 09:53:39 GMT, Andrew Haley wrote: >> src/java.base/share/classes/java/lang/Thread.java line 1610: >> >>> 1608: ensureMaterializedForStackWalk(bindings); >>> 1609: task.run(); >>> 1610: Reference.reachabilityFence(bindings); >> >> This 

Re: Undo deprecation of brainpool EC

2022-11-15 Thread Sean Mullan
Hi, Thanks for your questions about brainpool. See below for more details. On 11/14/22 3:36 AM, benjamin.marw...@f-i.de wrote: Hello everyone! To our surprise, brainpool EC have been deprecated with Java 14+ [1]. However, JDK-8234924 [1] does not add any information on WHY they would have

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v2]

2022-11-15 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Update test - Reviewer feedback - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new:

Re: RFR: 8247645: ChaCha20 intrinsics [v3]

2022-11-15 Thread Jamil Nimeh
On Tue, 1 Nov 2022 18:38:21 GMT, Vladimir Ivanov wrote: >> Jamil Nimeh has updated the pull request incrementally with one additional >> commit since the last revision: >> >> replace hi/lo word shuffles and left-right shift/or operations for vpshufd >> on byte-aligned rotations > >

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v2]

2022-11-15 Thread Alan Bateman
On Tue, 15 Nov 2022 14:15:26 GMT, Andrew Haley wrote: >> src/java.base/share/classes/java/lang/VirtualThread.java line 318: >> >>> 316: } >>> 317: } >>> 318: @Hidden >> >> Can we rename this to runWith(Runnable, Object) in both Thread and >> VirtualThread to keep the naming