Re: RFR: 8330133: libj2pkcs11.so crashes on some pkcs#11 v3.0 libraries

2024-04-15 Thread Daniel Jeliński
On Tue, 16 Apr 2024 00:15:34 GMT, Valerie Peng wrote: > It is reported that some PKCS#11 library/vendor reports major version 3, but > doesn't implement the C_GetInterface function and the resulting 'interface' > variable value may be NULL and cause unexpected crash later. > > This PR would ch

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-15 Thread Jatin Bhateja
On Mon, 15 Apr 2024 22:04:14 GMT, Volodymyr Paprotski wrote: >> src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 394: >> >>> 392: __ lea(aLimbs, Address(aLimbs,8)); >>> 393: __ lea(bLimbs, Address(bLimbs,8)); >>> 394: __ jmp(L_DefaultLoop); >> >> Both sub and cmp are flag affec

Integrated: 8307143: CredentialsCache.cacheName should not be static

2024-04-15 Thread Weijun Wang
On Sun, 30 Apr 2023 13:03:38 GMT, Weijun Wang wrote: > The CC can be loaded with any file and its name is not static. > > `MemoryCredentialsCache` is removed since it's not used anywhere. We've > already supported native ccache reading directly with JNI method > `Credentials::acquireDefaultNat

Re: RFR: 8307143: CredentialsCache.cacheName should not be static [v5]

2024-04-15 Thread Weijun Wang
> The CC can be loaded with any file and its name is not static. > > `MemoryCredentialsCache` is removed since it's not used anywhere. We've > already supported native ccache reading directly with JNI method > `Credentials::acquireDefaultNativeCreds`. Weijun Wang has updated the pull request in

RFR: 8330133: libj2pkcs11.so crashes on some pkcs#11 v3.0 libraries

2024-04-15 Thread Valerie Peng
It is reported that some PKCS#11 library/vendor reports major version 3, but doesn't implement the C_GetInterface function and the resulting 'interface' variable value may be NULL and cause unexpected crash later. This PR would check the 'interface' variable value to be non-NULL. Reproducing thi

Re: RFR: 8307143: CredentialsCache.cacheName should not be static [v4]

2024-04-15 Thread Valerie Peng
On Fri, 12 Apr 2024 14:12:56 GMT, Weijun Wang wrote: >> The CC can be loaded with any file and its name is not static. >> >> `MemoryCredentialsCache` is removed since it's not used anywhere. We've >> already supported native ccache reading directly with JNI method >> `Credentials::acquireDefau

Re: RFR: 8307143: CredentialsCache.cacheName should not be static [v4]

2024-04-15 Thread Valerie Peng
On Fri, 12 Apr 2024 14:12:56 GMT, Weijun Wang wrote: >> The CC can be loaded with any file and its name is not static. >> >> `MemoryCredentialsCache` is removed since it's not used anywhere. We've >> already supported native ccache reading directly with JNI method >> `Credentials::acquireDefau

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-15 Thread Volodymyr Paprotski
On Fri, 5 Apr 2024 07:19:28 GMT, Jatin Bhateja wrote: >> Volodymyr Paprotski has updated the pull request incrementally with one >> additional commit since the last revision: >> >> remove use of jdk.crypto.ec > > src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 39: > >> 37: }; >>

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-15 Thread Volodymyr Paprotski
On Thu, 11 Apr 2024 17:15:21 GMT, Anthony Scarpino wrote: >>> In `ECOperations.java`, if I understand this correctly, it is to replace >>> the existing `PointMultiplier` with montgomery-based PointMuliplier. But >>> when I look at the code, I see both are still options. If I read this >>> cor

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-15 Thread Volodymyr Paprotski
On Wed, 10 Apr 2024 23:56:52 GMT, Volodymyr Paprotski wrote: > Few early comments. > > Please update the copyright year of all the modified files. > > You can even consider splitting this into two patches, Java side changes in > one and x86 optimized intrinsic in next one. Fixed all copyright

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v3]

2024-04-15 Thread Volodymyr Paprotski
> Performance. Before: > > Benchmark(algorithm) (dataSize) (keyLength) > (provider) Mode Cnt ScoreError Units > SignatureBench.ECDSA.signSHA256withECDSA1024 256 > thrpt3 6443.934 ± 6.491 ops/s > SignatureBench.ECDSA.

Re: RFR: 8330108: Increase CipherInputStream buffer size

2024-04-15 Thread Anthony Scarpino
On Fri, 12 Apr 2024 16:49:49 GMT, Anthony Scarpino wrote: >> Increase buffer size in CipherInputStream from 512 bytes to 8192 bytes. >> >> I have seen applications where this small buffer size significantly reduces >> throughput, and I've even seen applications which use reflection to modify

Re: RFR: 8293345: SunPKCS11 provider checks on PKCS11 Mechanism are problematic [v2]

2024-04-15 Thread dems54
On Tue, 9 Apr 2024 22:15:23 GMT, Valerie Peng wrote: >> What about testing? > >> What about testing? > > I tested the change manually by changing some behavior to simulate the case. > However, this cannot be done by regression test since NSS does not have > legacy mechanisms. @valeriepeng can

Re: RFR: 8330108: Increase CipherInputStream buffer size

2024-04-15 Thread Oli Gillespie
On Fri, 12 Apr 2024 15:34:01 GMT, Oli Gillespie wrote: > Increase buffer size in CipherInputStream from 512 bytes to 8192 bytes. > > I have seen applications where this small buffer size significantly reduces > throughput, and I've even seen applications which use reflection to modify > the bu

Re: RFR: 8330108: Increase CipherInputStream buffer size

2024-04-15 Thread Oli Gillespie
On Fri, 12 Apr 2024 16:49:49 GMT, Anthony Scarpino wrote: >> Increase buffer size in CipherInputStream from 512 bytes to 8192 bytes. >> >> I have seen applications where this small buffer size significantly reduces >> throughput, and I've even seen applications which use reflection to modify