Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator)

2021-04-28 Thread Chris Hegarty
On Tue, 27 Apr 2021 18:40:24 GMT, Alan Bateman wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjdk.java.n

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator)

2021-04-28 Thread Chris Hegarty
On Mon, 26 Apr 2021 17:10:13 GMT, Maurizio Cimadamore wrote: > This PR contains the API and implementation changes for JEP-412 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.jav

Re: RFR: 8185127: Add tests to cover hashCode() method for java supported crypto key types [v9]

2021-04-28 Thread Sibabrata Sahoo
On Wed, 28 Apr 2021 06:56:21 GMT, Sibabrata Sahoo wrote: >> This is a simple Test to add few additional API coverage for all java >> supported key types. The objective of this Test is to cover equals() and >> hashcode() methods for each key types. > > Sibabrata Sahoo has updated the pull reques

Integrated: 8185127: Add tests to cover hashCode() method for java supported crypto key types

2021-04-28 Thread Sibabrata Sahoo
On Wed, 14 Apr 2021 13:38:06 GMT, Sibabrata Sahoo wrote: > This is a simple Test to add few additional API coverage for all java > supported key types. The objective of this Test is to cover equals() and > hashcode() methods for each key types. This pull request has now been integrated. Chang

Re: JEP411: Missing use-case: Monitoring / restricting libraries

2021-04-28 Thread Lim
Hi Markus, thank you for giving me the guidance for performing the JFR programmatically. I am able to test if my use case is suitable. Where do I provide my feedback/issue of using the streamed JFR? On Wed, Apr 21, 2021 at 10:32 PM Markus Gronlund wrote: > If the existing event probes in the JDK

Re: JEP411: Missing use-case: Monitoring / restricting libraries

2021-04-28 Thread Lim
On Wed, Apr 21, 2021 at 8:38 PM Ron Pressler wrote: > Its current events might be not have everything you want, but will be > expanded, in > part to address the functionality that will be lost with the removal of > Security Manager. I agree that monitoring needs to be improved since there is a

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator)

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 09:06:29 GMT, Chris Hegarty wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjdk.java.

RE: JEP411: Missing use-case: Monitoring / restricting libraries

2021-04-28 Thread Markus Gronlund
Hi Lim, JFR specific feedback can be posted to: hotspot-jfr-...@openjdk.java.net Thanks Markus -Original Message- From: Lim Sent: den 28 april 2021 12:18 To: Markus Gronlund Cc: Ron Pressler ; security-dev@openjdk.java.net Subject: Re: JEP411: Missing use-case: Monitoring / restrictin

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 09:10:37 GMT, Chris Hegarty wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > > src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/Resour

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-412 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.java.net/jeps/412 Maurizio Cimadamore has updated the pull request

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Chris Hegarty
On Wed, 28 Apr 2021 09:06:29 GMT, Chris Hegarty wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > > src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/Resour

Re: JEP411: Missing use-case: Monitoring / restricting libraries

2021-04-28 Thread Chris Hegarty
On 28 Apr 2021, at 11:38, Markus Gronlund mailto:markus.gronl...@oracle.com>> wrote: Hi Lim, JFR specific feedback can be posted to: hotspot-jfr-...@openjdk.java.net Thanks Markus. That is the appropriate list to send JFR feedback. Just to add, I fil

RE: JEP411: Missing use-case: Monitoring / restricting libraries

2021-04-28 Thread Markus Gronlund
Thanks Chris, I like that approach very much. Thanks again Markus From: Chris Hegarty Sent: den 28 april 2021 12:51 To: Markus Gronlund Cc: Lim ; Ron Pressler ; security-dev@openjdk.java.net Subject: Re: JEP411: Missing use-case: Monitoring / restricting libraries On 28 Apr 2021, at 11:38

Re: RFR: 8236671: NullPointerException in JKS keystore [v2]

2021-04-28 Thread Sean Coffey
> Trivial enough change. Improved the exception thrown from JceKeyStore also. Sean Coffey 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 request contains four additiona

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Chris Hegarty
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 13:08:26 GMT, Chris Hegarty wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > > src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/Memory

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 12:47:36 GMT, Chris Hegarty wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > > src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinke

Re: JEP 411: methods in j.u.c.Executors

2021-04-28 Thread Sean Mullan
On 4/20/21 12:06 PM, Anthony Vanelverdinghe wrote: The JEP should also address the following methods in java.util.concurrent.Executors: privilegedCallable, privilegedCallableUsingCurrentClassLoader​, privilegedThreadFactory Since AccessController et al. will be terminally deprecated, I'd ass

RFR: 8266220: keytool still prompt for store password on a password-less pkcs12 file if -storetype pkcs12 is specified

2021-04-28 Thread Weijun Wang
It's awkward that for a password-less pkcs12 keystore, `keytool -list` does not prompt for a password but `keytool -list -storetype pkcs12` does. - Commit messages: - 8266220: keytool still prompt for store password on a password-less pkcs12 file if -storetype pkcs12 is specified

Integrated: 8228442: DHKeyExchange/LegacyDHEKeyExchange.java failed due to "SSLException: An established connection was aborted by the software in your host machine"

2021-04-28 Thread Fernando Guallini
On Thu, 22 Apr 2021 11:41:40 GMT, Fernando Guallini wrote: > Test DHKeyExchange/LegacyDHEKeyExchange.java has been seen to fail > intermittently. There is a thread synchronisation issue that is fixed by: > > - Using SSLSocketTemplate that handles client/server socket configuration and > synch

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Alan Bateman
On Wed, 28 Apr 2021 13:47:43 GMT, Maurizio Cimadamore wrote: >> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java >> line 270: >> >>> 268: >>> 269: /** >>> 270: * Converts a Java string into a null-terminated C string, using >>> the platform's default charse

Integrated: 8196415: Disable SHA-1 Signed JARs

2021-04-28 Thread Sean Mullan
On Mon, 26 Apr 2021 17:29:26 GMT, Sean Mullan wrote: > This change will restrict JARs signed with SHA-1 algorithms and treat them as > if they were unsigned. This applies to the algorithms used to digest, sign, > and optionally timestamp the JAR. It also applies to the signature and digest > a

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Daniel Fuchs
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Mandy Chung
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Daniel Fuchs
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:02:03 GMT, Mandy Chung wrote: > I reviewed the `--enable-native-access` related change that looks fine. > > > Access to restricted methods from any other module not in the list is > > disallowed and will result in an IllegalAccessException. > > I think you meant to say `

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:07:32 GMT, Daniel Fuchs wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > > src/java.base/share/classes/jdk/internal/module/IllegalNativeAccessCh

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Mandy Chung
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 17:53:44 GMT, Daniel Fuchs wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > > src/java.base/share/classes/jdk/internal/module/IllegalNativeAccessCh

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v3]

2021-04-28 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-412 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.java.net/jeps/412 Maurizio Cimadamore has updated the pull request

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:23:41 GMT, Mandy Chung wrote: > > I believe that we had to move @CallerSensitive out of interfaces because > > there was a test that was checking that @cs was not put on "virtual" > > methods. > > Good if we do have such test. We need to re-examine this with the security

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Mandy Chung
On Wed, 28 Apr 2021 18:26:30 GMT, Maurizio Cimadamore wrote: > test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java Yes that's the test. That test misses to catch your case where aliasing may be possible. - PR: https://git.openjdk.java.net/jdk/pull/3699

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Daniel Fuchs
On Wed, 28 Apr 2021 18:19:14 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/module/IllegalNativeAccessChecker.java >> line 78: >> >>> 76: int index = 0; >>> 77: // the system property is removed after decoding >>> 78: String value = getAndRe

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Daniel Fuchs
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8241248: NullPointerException in sun.security.ssl.HKDF.extract(HKDF.java:93)

2021-04-28 Thread Alexey Bakhtin
On Tue, 27 Apr 2021 16:00:33 GMT, Jamil Nimeh wrote: > I think this looks good. Thank you. > Since you've done all the work on this one, it seems fitting that you'd > become the owner of the issue in JBS. Also this might be a noreg-hard > candidate since the failure is intermittent and requires

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 19:02:57 GMT, Daniel Fuchs wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > > src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryA

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v3]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:33:36 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v3]

2021-04-28 Thread Mandy Chung
On Wed, 28 Apr 2021 20:38:47 GMT, Maurizio Cimadamore wrote: > To be clear - by aliasing you mean when the @CallerSensitive implementation > is called with invokeinterface - so, e.g. doing > `MethodHandles.lookup().findVirtual(CLinker.class, ...)` right? Yes. The caller would be java.base i

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v3]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 20:40:49 GMT, Mandy Chung wrote: > > To be clear - by aliasing you mean when the @CallerSensitive implementation > > is called with invokeinterface - so, e.g. doing > > `MethodHandles.lookup().findVirtual(CLinker.class, ...)` right? > > Yes. The caller would be java.base if

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:44:18 GMT, Daniel Fuchs wrote: >> I think the method is called during module bootstrap - I don't think there >> is a race in practice. This method is also called in other parts of >> ModuleBootstrap. The code you allude to is called during initialization of >> the Illega

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v3]

2021-04-28 Thread Mandy Chung
On Wed, 28 Apr 2021 21:10:33 GMT, Maurizio Cimadamore wrote: > I just did a test: > > ``` > public class TestLookup { > public static void main(String[] args) throws Throwable { > MethodHandle handle = > MethodHandles.lookup().findVirtual(CLinker.class, "downcallHandle", > MethodT

Re: New candidate JEP: 411: Deprecate the Security Manager for Removal

2021-04-28 Thread Peter Firmstone
Which version of Java is this planned for?   Will the last version supporting the security manager be a long term support version, eg back ports of security patches and TLS technologies? We have our own security manager implementation and policy provider implementations.  Both of these are hig

Re: New candidate JEP: 411: Deprecate the Security Manager for Removal

2021-04-28 Thread Geertjan Wielenga
Also, from the point of view of Apache NetBeans, here’s a list of our concerns with these developments: https://blogs.apache.org/netbeans/entry/jep-411-deprecate-the-security Apache NetBeans doesn't use java.lang.SecurityManager to guarantee security, but rather to gain additional insight into th

Re: New candidate JEP: 411: Deprecate the Security Manager for Removal

2021-04-28 Thread Peter Firmstone
We also use the SecurityManager for caller sensitive method calls. I re-implemented a secure implementation of Java Serialization, using a public API and fewer features (eg no circular links), in this implementation, each class in an object's hierarchy has its own namespace, the calling class