Re: Authorization layer API and low level access checks.

2021-06-22 Thread Alan Bateman
On 23/06/2021 04:02, Peter Firmstone wrote: Note: I'm not sure how to replace an inherited AccessControlContext (with a new implementation based on StackWalker functionality) at thread creation time, as it must be created when threads are created, possibly by using ThreadFactory everywhere, b

Re: [jdk17] RFR: 8269034: AccessControlException for SunPKCS11 daemon threads [v2]

2021-06-22 Thread Alan Bateman
On Tue, 22 Jun 2021 20:08:03 GMT, Sean Coffey wrote: >> Sufficient permissions missing if this code was ever to run with >> SecurityManager. >> >> Cleanest approach appears to be use of InnocuousThread to create the >> cleaner/poller threads. >> Test case coverage extended to cover the Securi

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v8]

2021-06-22 Thread Yi Yang
> After JDK-8265518(#3615), it's possible to replace all variants of checkIndex > by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in > the whole JDK codebase. Yi Yang has updated the pull request incrementally with one additional commit since the last revision: test

Authorization layer API and low level access checks.

2021-06-22 Thread Peter Firmstone
Java developers such as myself need a light weight API that allows developers to continue to support authorization and access controls, without dictating how that should be implemented or whether these controls are fine grained, course grained, based solely on user authorization or also include

Re: RFR: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance [v5]

2021-06-22 Thread Dongbo He
On Tue, 22 Jun 2021 06:41:02 GMT, Dongbo He wrote: >> Now AlgorithmConstraints:checkAlgorithm uses List to check if an algorithm >> has been disabled. It is less efficient when there are more disabled >> elements in the list, we can use Set instead of List to speed up the search. >> >> Patch c

Integrated: Merge jdk17

2021-06-22 Thread Jesper Wilhelmsson
On Wed, 23 Jun 2021 00:21:57 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 17 -> JDK 18 This pull request has now been integrated. Changeset: b6cfca8a Author:Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/b6cfca8a89810c7ed63ebc34ed9855b66ebcb5d9 Stats: 1931

Re: RFR: Merge jdk17 [v2]

2021-06-22 Thread Jesper Wilhelmsson
> Forwardport JDK 17 -> JDK 18 Jesper Wilhelmsson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 59 commits: - Merge - 8268290: Improve LockFreeQueue<> utility Reviewed-by: iwalulya, tschatzl - 8264941: Remove CodeCache::ma

RFR: Merge jdk17

2021-06-22 Thread Jesper Wilhelmsson
Forwardport JDK 17 -> JDK 18 - Commit messages: - Merge - 8268404: [TESTBUG] tools/jpackage/windows/WinInstallerIconTest.java failed "AssertionError: Failed: Check icon" - 8267652: c2 loop unrolling by 8 results in reading memory past array - 8267399: C2: java/text/Normalizer/Con

Re: [jdk17] RFR: 8269034: AccessControlException for SunPKCS11 daemon threads

2021-06-22 Thread Peter Firmstone
Was ever to run with SecurityManager? When you see an AccessControlException, I'd recommend setting the following security debug property, so you can capture the ProtectionDomain that failed the access check: -Djava.security.debug=access:failure  Clearly there's a ProtectionDomain on the call

Re: [jdk17] RFR: 8269034: AccessControlException for SunPKCS11 daemon threads [v2]

2021-06-22 Thread Sean Coffey
> Sufficient permissions missing if this code was ever to run with > SecurityManager. > > Cleanest approach appears to be use of InnocuousThread to create the > cleaner/poller threads. > Test case coverage extended to cover the SecurityManager scenario. > > Reviewer request: @valeriepeng Sean

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v7]

2021-06-22 Thread Paul Sandoz
On Tue, 22 Jun 2021 02:58:28 GMT, Yi Yang wrote: > I found that after solving the problem that Preconditions cannot be used > during the VM startup, a series of functions such as > String.checkIndex/checkOffset/.. can also be harmlessly replaced, but this > changeset is somewhat large and may

Re: RFR: 8266182: Create a manual test for jdk/sun/security/pkcs12/ParamsTest.java [v3]

2021-06-22 Thread Xue-Lei Andrew Fan
On Fri, 18 Jun 2021 13:24:17 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 >> manua

Re: RFR: 8268967: Update java.security to use switch expressions

2021-06-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Jun 2021 10:56:00 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my code for updating the code in the > `java.security` packages to make use of the switch expressions? > > Kind regards, > Patrick Looks good to me. Thanks for the nice update. - M

Re: RFR: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance [v5]

2021-06-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Jun 2021 06:41:02 GMT, Dongbo He wrote: >> Now AlgorithmConstraints:checkAlgorithm uses List to check if an algorithm >> has been disabled. It is less efficient when there are more disabled >> elements in the list, we can use Set instead of List to speed up the search. >> >> Patch c

[jdk17] RFR: 8269034: AccessControlException for SunPKCS11 daemon threads

2021-06-22 Thread Sean Coffey
Sufficient permissions missing if this code was ever to run with SecurityManager. Cleanest approach appears to be use of InnocuousThread to create the cleaner/poller threads. Test case coverage extended to cover the SecurityManager scenario. Reviewer request: @valeriepeng - Commi

Re: RFR: 8268873: Unnecessary Vector usage in java.base

2021-06-22 Thread Сергей Цыпанов
On Mon, 14 Jun 2021 11:34:50 GMT, Andrey Turbanov wrote: > Usage of thread-safe collection `Vector` is unnecessary. It's recommended to > use `ArrayList` if a thread-safe implementation is not needed. > I checked only places where `Vector` was used as local variable. Marked as reviewed by stsy

Re: RFR: 8269034: AccessControlException for SunPKCS11 daemon threads

2021-06-22 Thread Sean Coffey
On Tue, 22 Jun 2021 12:01:07 GMT, Sean Coffey wrote: > Sufficient permissions missing if this code was ever to run with > SecurityManager. > > Cleanest approach appears to be use of InnocuousThread to create the > cleaner/poller threads. > Test case coverage extended to cover the SecurityMana

Withdrawn: 8269034: AccessControlException for SunPKCS11 daemon threads

2021-06-22 Thread Sean Coffey
On Tue, 22 Jun 2021 12:01:07 GMT, Sean Coffey wrote: > Sufficient permissions missing if this code was ever to run with > SecurityManager. > > Cleanest approach appears to be use of InnocuousThread to create the > cleaner/poller threads. > Test case coverage extended to cover the SecurityMana

RFR: 8269034: AccessControlException for SunPKCS11 daemon threads

2021-06-22 Thread Sean Coffey
Sufficient permissions missing if this code was ever to run with SecurityManager. Cleanest approach appears to be use of InnocuousThread to create the cleaner/poller threads. Test case coverage extended to cover the SecurityManager scenario. Reviewer request: @valeriepeng - Commi

RFR: 8268967: Update java.security to use switch expressions

2021-06-22 Thread Patrick Concannon
Hi, Could someone please review my code for updating the code in the `java.security` packages to make use of the switch expressions? Kind regards, Patrick - Commit messages: - Merge remote-tracking branch 'origin/master' into JDK-8268967 - 8268967: Update java.security to use swi