RFR: 8272120: Avoid looking for standard encodings in "java." modules

2021-08-09 Thread Sergey Bylokhov
This is the continuation of JDK-8233884 and JDK-8271456. This change affects fewer cases so I fix all "java." modules at once. In many places standard charsets are looked up via their names, for example: absolutePath.getBytes("UTF-8"); This could be done more efficiently(up to x20 time faster) w

Re: RFR: 8270137: Kerberos Credential Retrieval from Cache not Working in Cross-Realm Setup

2021-08-09 Thread Weijun Wang
On Fri, 6 Aug 2021 19:27:30 GMT, Martin Balao wrote: > I'd like to propose a fix for JDK-8270137 [1]. > > This bug is triggered when using a previously stored referral ticket (in the > Referrals Cache) at the moment of following a S4U2Proxy cross-realm referral. > The mistakenly-used referral

Re: RFR: 8271566: DSA signature length value is not accurate in P11Signature

2021-08-09 Thread Valerie Peng
On Fri, 6 Aug 2021 20:51:23 GMT, Martin Balao wrote: > > > Yes, I see what you mean. Contrary to P11PrivateKey::getFormat and > P11PrivateKey::getEncodedInternal where a 'null' returned value is documented > in java.security.Key, we don't have that documentation for the other > interfaces su

Re: RFR: 8267125: AES Galois CounterMode (GCM) interleaved implementation using AVX512 + VAES instructions [v7]

2021-08-09 Thread Valerie Peng
On Fri, 6 Aug 2021 19:35:23 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 1779: >> >>> 1777: int len = 0; >>> 1778: if (inLen >= PARALLEL_LEN) { >>> 1779: implGCMCrypt(in, inOfs, inLen,

Re: RFR: 8267125: AES Galois CounterMode (GCM) interleaved implementation using AVX512 + VAES instructions [v8]

2021-08-09 Thread Valerie Peng
On Mon, 9 Aug 2021 15:49:07 GMT, Smita Kamath wrote: >> I would like to submit AES-GCM optimization for x86_64 architectures >> supporting AVX3+VAES (Evex encoded AES). This optimization interleaves AES >> and GHASH operations. >> Performance gain of ~1.5x - 2x for message sizes 8k and above. >

Re: RFR: 8267125: AES Galois CounterMode (GCM) interleaved implementation using AVX512 + VAES instructions [v7]

2021-08-09 Thread Valerie Peng
On Fri, 6 Aug 2021 20:37:22 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 1120: >> >>> 1118: inOfs += r; >>> 1119: inLen -= r; >>> 1120: } >> >> Have you considered move the "if (in

Re: RFR: 8267125: AES Galois CounterMode (GCM) interleaved implementation using AVX512 + VAES instructions [v7]

2021-08-09 Thread Valerie Peng
On Fri, 6 Aug 2021 19:53:28 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 87: >> >>> 85: private static final int MAX_BUF_SIZE = Integer.MAX_VALUE; >>> 86: // data size when buffer is divided up to aid in intrinsics >>

Re: RFR: 8267125: AES Galois CounterMode (GCM) interleaved implementation using AVX512 + VAES instructions [v8]

2021-08-09 Thread Smita Kamath
> I would like to submit AES-GCM optimization for x86_64 architectures > supporting AVX3+VAES (Evex encoded AES). This optimization interleaves AES > and GHASH operations. > Performance gain of ~1.5x - 2x for message sizes 8k and above. Smita Kamath has updated the pull request incrementally wit

Re: RFR: 8270137: Kerberos Credential Retrieval from Cache not Working in Cross-Realm Setup

2021-08-09 Thread Raytion
On Fri, 6 Aug 2021 19:27:30 GMT, Martin Balao wrote: > I'd like to propose a fix for JDK-8270137 [1]. > > This bug is triggered when using a previously stored referral ticket (in the > Referrals Cache) at the moment of following a S4U2Proxy cross-realm referral. > The mistakenly-used referral

Re: RFR: 8266182: Automate manual steps listed in the test jdk/sun/security/pkcs12/ParamsTest.java [v4]

2021-08-09 Thread Weijun Wang
On Mon, 9 Aug 2021 11:06:25 GMT, Abdul Kolarkunnu wrote: >> ParamsTest is an interop test between keytool <-> openssl. There are some >> manual steps listed in jdk/sun/security/pkcs12/params/README to perform >> after the execution of jtreg execution. So this test is to perform that >> manual

Re: RFR: 8266182: Automate manual steps listed in the test jdk/sun/security/pkcs12/ParamsTest.java [v4]

2021-08-09 Thread Abdul Kolarkunnu
> ParamsTest is an interop test between keytool <-> openssl. There are some > manual steps listed in jdk/sun/security/pkcs12/params/README to perform after > the execution of jtreg execution. So this test is to perform that manual > steps. Abdul Kolarkunnu has updated the pull request increment

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-08-09 Thread Andrey Turbanov
On Mon, 26 Jul 2021 19:15:55 GMT, Brett Okken wrote: >> I found few places, where code initially perform `Object[] >> Colleciton.toArray()` call and then manually copy array into another array >> with required type. >> This PR cleanups such places to more shorter call `T[] >> Collection.toArr

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-08-09 Thread Andrey Turbanov
On Mon, 26 Jul 2021 19:55:09 GMT, Brett Okken wrote: >> I found few places, where code initially perform `Object[] >> Colleciton.toArray()` call and then manually copy array into another array >> with required type. >> This PR cleanups such places to more shorter call `T[] >> Collection.toArr