From aph at openjdk.java.net Mon Mar 1 10:33:59 2021 From: aph at openjdk.java.net (Andrew Haley) Date: Mon, 1 Mar 2021 10:33:59 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v21] In-Reply-To: References: Message-ID: On Fri, 26 Feb 2021 19:17:12 GMT, Anton Kozlov wrote: >> Please review the implementation of JEP 391: macOS/AArch64 Port. >> >> It's heavily based on existing ports to linux/aarch64, macos/x86_64, and windows/aarch64. >> >> Major changes are in: >> * src/hotspot/cpu/aarch64: support of the new calling convention (subtasks JDK-8253817, JDK-8253818) >> * src/hotspot/os_cpu/bsd_aarch64: copy of os_cpu/linux_aarch64 with necessary adjustments (JDK-8253819) >> * src/hotspot/share, test/hotspot/gtest: support of write-xor-execute (W^X), required on macOS/AArch64 platform. It's implemented with pthread_jit_write_protect_np provided by Apple. The W^X mode is local to a thread, so W^X mode change relates to the java thread state change (for java threads). In most cases, JVM executes in write-only mode, except when calling a generated stub like SafeFetch, which requires a temporary switch to execute-only mode. The same execute-only mode is enabled when a java thread executes in java or native states. This approach of managing W^X mode turned out to be simple and efficient enough. >> * src/jdk.hotspot.agent: serviceability agent implementation (JDK-8254941) > > Anton Kozlov has updated the pull request incrementally with two additional commits since the last revision: > > - Merge remote-tracking branch 'origin/jdk/jdk-macos' into jdk-macos > - Minor fixes src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp line 62: > 60: > 61: #if defined(__APPLE__) || defined(_WIN64) > 62: #define R18_RESERVED #define R18_RESERVED true``` ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From aph at openjdk.java.net Mon Mar 1 11:09:56 2021 From: aph at openjdk.java.net (Andrew Haley) Date: Mon, 1 Mar 2021 11:09:56 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v10] In-Reply-To: References: Message-ID: On Thu, 4 Feb 2021 23:01:52 GMT, Gerard Ziemski wrote: >> Anton Kozlov has updated the pull request incrementally with six additional commits since the last revision: >> >> - Merge remote-tracking branch 'origin/jdk/jdk-macos' into jdk-macos >> - Add comments to WX transitions >> >> + minor change of placements >> - Use macro conditionals instead of empty functions >> - Add W^X to tests >> - Do not require known W^X state >> - Revert w^x in gtests > > src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 652: > >> 650: >> 651: void os::setup_fpu() { >> 652: } > > Is there really nothing to do here, or does still need to be implemented? A clarification comment here would help/. There is really nothing to do here. > src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 198: > >> 196: >> 197: NOINLINE frame os::current_frame() { >> 198: intptr_t *fp = *(intptr_t **)__builtin_frame_address(0); > > In the bsd_x86 counter part we initialize `fp` to `_get_previous_fp()` - do we need to implement it on aarch64 as well (and using address 0 is just a temp workaround) or is it doing the right thing here? (0)``` looks right to me. > src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 291: > >> 289: bool is_unsafe_arraycopy = (thread->doing_unsafe_access() && UnsafeCopyMemory::contains_pc(pc)); >> 290: if ((nm != NULL && nm->has_unsafe_access()) || is_unsafe_arraycopy) { >> 291: address next_pc = pc + NativeCall::instruction_size; > > Replace > > address next_pc = pc + NativeCall::instruction_size; > > with > > address next_pc = Assembler::locate_next_instruction(pc); > > there is at least one other place that needs it. Why is this change needed? AFAICS ```locate_next_instruction()``` is an x86 thing for variable-length instructions, and no other port uses it. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From aph at openjdk.java.net Mon Mar 1 11:09:55 2021 From: aph at openjdk.java.net (Andrew Haley) Date: Mon, 1 Mar 2021 11:09:55 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v21] In-Reply-To: References: Message-ID: <5l97Ac1W-JbLiCBJMoWut-c-RZEPN6wBHABym2nHeRE=.6d060249-e315-486b-a0ab-1992de6f54d5@github.com> On Fri, 26 Feb 2021 19:17:12 GMT, Anton Kozlov wrote: >> Please review the implementation of JEP 391: macOS/AArch64 Port. >> >> It's heavily based on existing ports to linux/aarch64, macos/x86_64, and windows/aarch64. >> >> Major changes are in: >> * src/hotspot/cpu/aarch64: support of the new calling convention (subtasks JDK-8253817, JDK-8253818) >> * src/hotspot/os_cpu/bsd_aarch64: copy of os_cpu/linux_aarch64 with necessary adjustments (JDK-8253819) >> * src/hotspot/share, test/hotspot/gtest: support of write-xor-execute (W^X), required on macOS/AArch64 platform. It's implemented with pthread_jit_write_protect_np provided by Apple. The W^X mode is local to a thread, so W^X mode change relates to the java thread state change (for java threads). In most cases, JVM executes in write-only mode, except when calling a generated stub like SafeFetch, which requires a temporary switch to execute-only mode. The same execute-only mode is enabled when a java thread executes in java or native states. This approach of managing W^X mode turned out to be simple and efficient enough. >> * src/jdk.hotspot.agent: serviceability agent implementation (JDK-8254941) > > Anton Kozlov has updated the pull request incrementally with two additional commits since the last revision: > > - Merge remote-tracking branch 'origin/jdk/jdk-macos' into jdk-macos > - Minor fixes Thanks. With this, I think we're done. ------------- Changes requested by aph (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/2200 From aph at openjdk.java.net Mon Mar 1 11:09:57 2021 From: aph at openjdk.java.net (Andrew Haley) Date: Mon, 1 Mar 2021 11:09:57 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9] In-Reply-To: References: Message-ID: On Fri, 5 Feb 2021 17:20:55 GMT, Anton Kozlov wrote: >> src/hotspot/cpu/aarch64/vm_version_aarch64.hpp line 93: >> >>> 91: CPU_MARVELL = 'V', >>> 92: CPU_INTEL = 'i', >>> 93: CPU_APPLE = 'a', >> >> The `ARM Architecture Reference Manual ARMv8, for ARMv8-A architecture profile` has 8538 pages, can we be more specific and point to the particular section of the document where the CPU codes are defined? > > They are defined in 13.2.95. MIDR_EL1, Main ID Register. Apple's code is not there, but "Arm can assign codes that are not published in this manual. All values not assigned by Arm are reserved and must not be used.". I assume the value was obtained by digging around https://github.com/apple/darwin-xnu/blob/main/osfmk/arm/cpuid.h#L62 Anton, this paragraph looks like an excellent comment. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From aph at openjdk.java.net Mon Mar 1 11:09:58 2021 From: aph at openjdk.java.net (Andrew Haley) Date: Mon, 1 Mar 2021 11:09:58 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v10] In-Reply-To: References: <9Nasu4m7orJoGYjX4EYCuz5-aevYNno3Ru3jPHgwkvc=.168cfdf0-648b-46e4-9cb4-b24956eeba7d@github.com> Message-ID: On Fri, 12 Feb 2021 11:42:59 GMT, Vladimir Kempik wrote: >> src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 194: >> >>> 192: // may get turned off by -fomit-frame-pointer. >>> 193: frame os::get_sender_for_C_frame(frame* fr) { >>> 194: return frame(fr->link(), fr->link(), fr->sender_pc()); >> >> Why is it >> >> return frame(fr->link(), fr->link(), fr->sender_pc()); >> >> and not >> >> return frame(fr->sender_sp(), fr->link(), fr->sender_pc()); >> >> like in the bsd-x86 counter part? > > bsd_aarcb64 was based on linux_aarch64, with addition of bsd-specific things from bsd_x86 > You think the bsd-x86 way is better here ? There's no point copying x86. We don't have any way to know what the sender's SP was in a C frame without using unwind info. I think this is just used when trying to print the stack in a crash dump. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From jjiang at openjdk.java.net Mon Mar 1 11:15:47 2021 From: jjiang at openjdk.java.net (John Jiang) Date: Mon, 1 Mar 2021 11:15:47 GMT Subject: RFR: JDK-8262509: JSSE Server should check the legacy version in TLSv1.3 ClientHello Message-ID: <2l1USLNeal5qhOCN_c4o3dHH9ZeuwAHrdOa0oNW7oog=.2633c33d-89ce-4630-8f9e-6ba9e26e722f@github.com> Per RFC 8446, section 4.1.2, the legacy_version field in ClientHello message MUST be set to 0x0303 (TLSv1.2). T13ClientHelloConsumer should do this check like that T13ServerHelloConsumer does. ------------- Commit messages: - JDK-8262509: JSSE Server should check the legacy version in TLSv1.3 ClientHello Changes: https://git.openjdk.java.net/jdk/pull/2772/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2772&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262509 Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/2772.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2772/head:pull/2772 PR: https://git.openjdk.java.net/jdk/pull/2772 From jlaskey at openjdk.java.net Mon Mar 1 13:27:54 2021 From: jlaskey at openjdk.java.net (Jim Laskey) Date: Mon, 1 Mar 2021 13:27:54 GMT Subject: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v25] In-Reply-To: References: Message-ID: On Fri, 26 Feb 2021 19:30:09 GMT, Roger Riggs wrote: >> Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 57 commits: >> >> - Merge branch 'master' into 8248862 >> - Adjust ThreadLocalRandom javadoc inheritence >> - L32X64StarStarRandom -> L32X64MixRandom >> - Various corrects >> - Revised javadoc per CSR reviews >> - Remove tabs from random/package-info.java >> - Correct copyright notice. >> - Merge branch 'master' into 8248862 >> - Update tests for RandomGeneratorFactory.all() >> - Merge branch 'master' into 8248862 >> - ... and 47 more: https://git.openjdk.java.net/jdk/compare/0257caad...b9094279 > > src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line 232: > >> 230: Provider provider = fm.get(name); >> 231: if (!isSubclass(category, provider)) { >> 232: throw new IllegalArgumentException(name + " is an unknown random number generator"); > > The message is a bit vague. How about: > > "The random number generator does not support the category" throw new IllegalArgumentException("The random number generator "" + name + "" can not be located"); ------------- PR: https://git.openjdk.java.net/jdk/pull/1292 From jlaskey at openjdk.java.net Mon Mar 1 13:37:58 2021 From: jlaskey at openjdk.java.net (Jim Laskey) Date: Mon, 1 Mar 2021 13:37:58 GMT Subject: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v25] In-Reply-To: References: Message-ID: On Fri, 26 Feb 2021 21:25:38 GMT, Roger Riggs wrote: >> Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 57 commits: >> >> - Merge branch 'master' into 8248862 >> - Adjust ThreadLocalRandom javadoc inheritence >> - L32X64StarStarRandom -> L32X64MixRandom >> - Various corrects >> - Revised javadoc per CSR reviews >> - Remove tabs from random/package-info.java >> - Correct copyright notice. >> - Merge branch 'master' into 8248862 >> - Update tests for RandomGeneratorFactory.all() >> - Merge branch 'master' into 8248862 >> - ... and 47 more: https://git.openjdk.java.net/jdk/compare/0257caad...b9094279 > > src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line 240: > >> 238: * Returns a {@link RandomGenerator} that utilizes the {@code name} >> 239: * algorithm. >> 240: * > > In javadoc, this seems like is should read as: "utilizes the named algorithm". > The use of the parameter name is unnecessary in this case because it is obvious and readability suffers as is. Modified. ------------- PR: https://git.openjdk.java.net/jdk/pull/1292 From jlaskey at openjdk.java.net Mon Mar 1 13:59:53 2021 From: jlaskey at openjdk.java.net (Jim Laskey) Date: Mon, 1 Mar 2021 13:59:53 GMT Subject: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v25] In-Reply-To: References: Message-ID: On Fri, 26 Feb 2021 21:32:12 GMT, Roger Riggs wrote: >> Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 57 commits: >> >> - Merge branch 'master' into 8248862 >> - Adjust ThreadLocalRandom javadoc inheritence >> - L32X64StarStarRandom -> L32X64MixRandom >> - Various corrects >> - Revised javadoc per CSR reviews >> - Remove tabs from random/package-info.java >> - Correct copyright notice. >> - Merge branch 'master' into 8248862 >> - Update tests for RandomGeneratorFactory.all() >> - Merge branch 'master' into 8248862 >> - ... and 47 more: https://git.openjdk.java.net/jdk/compare/0257caad...b9094279 > > src/java.base/share/classes/java/util/random/RandomGenerator.java line 1313: > >> 1311: * furthermore can easily jump to an arbitrarily specified distant >> 1312: * point in the state cycle. >> 1313: * > > The similarity of the first sentence of each of the Jumpable, Leapable, and arbitrarlyJumpable interface is so similar as to obscure the differences. You have to read 25 words in to be able to find the description that makes them different. The italics help but should include the whole of the phrase that distinguishes them. > Alternatively, move the phrase to the beginning of the sentence or drop the redundant phrasing. > "provide a common protocol of objects that generate pseudorandom sequences of numbers of Boolean values", etc. Jumpable: * This interface is designed to provide a common protocol for objects that * generate pseudorandom sequences of numbers (or Boolean values) and * furthermore can easily jump forward, by a moderate amount (ex. * 264) to a distant point in the state cycle. Leapable: * This interface is designed to provide a common protocol for objects that * generate sequences of pseudorandom numbers (or Boolean values) and * furthermore can easily not only jump but also * leap forward, by a large amount (ex. 2128), to a * very distant point in the state cycle. ArbitrarilyJumpable: * This interface is designed to provide a common protocol for objects that * generate sequences of pseudorandom numbers (or Boolean values) and * furthermore can easily jump forward, by an arbitrary amount, to a * distant point in the state cycle. > src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line 55: > >> 53: * >> 54: * A specific {@link RandomGeneratorFactory} can be located by using the >> 55: * {@link RandomGenerator#factoryOf(String)} method, where the argument string > > Broken link: the method is in this class. should be just "#factoryOf". Modified > src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line 600: > >> 598: try { >> 599: ensureConstructors(); >> 600: return ctorBytes.newInstance((Object)seed); > > IntelliJ warns that the cast to (Object) is redundant. Modified > src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line 29: > >> 27: >> 28: import java.lang.reflect.Constructor; >> 29: import java.lang.reflect.Method; > > Used import. Modified ------------- PR: https://git.openjdk.java.net/jdk/pull/1292 From rriggs at openjdk.java.net Mon Mar 1 15:15:59 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Mon, 1 Mar 2021 15:15:59 GMT Subject: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v25] In-Reply-To: References: Message-ID: <0dwfSfa8BoyK8VmDxjszhf1qmRX9nT6Rg5xtxbfBfWg=.3d7ddeb3-a6de-42d6-bb8d-82b1504d448d@github.com> On Mon, 1 Mar 2021 13:23:48 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java line 232: >> >>> 230: Provider provider = fm.get(name); >>> 231: if (!isSubclass(category, provider)) { >>> 232: throw new IllegalArgumentException(name + " is an unknown random number generator"); >> >> The message is a bit vague. How about: >> >> "The random number generator does not support the category" > > throw new IllegalArgumentException("The random number generator "" + name + "" can not be located"); The message only captures the failure if the result of `fm.get()` is null. It does not capture the failure if the name is found but does not support the category. ------------- PR: https://git.openjdk.java.net/jdk/pull/1292 From jlaskey at openjdk.java.net Mon Mar 1 15:42:43 2021 From: jlaskey at openjdk.java.net (Jim Laskey) Date: Mon, 1 Mar 2021 15:42:43 GMT Subject: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v25] In-Reply-To: <0dwfSfa8BoyK8VmDxjszhf1qmRX9nT6Rg5xtxbfBfWg=.3d7ddeb3-a6de-42d6-bb8d-82b1504d448d@github.com> References: <0dwfSfa8BoyK8VmDxjszhf1qmRX9nT6Rg5xtxbfBfWg=.3d7ddeb3-a6de-42d6-bb8d-82b1504d448d@github.com> Message-ID: On Mon, 1 Mar 2021 15:12:46 GMT, Roger Riggs wrote: >> throw new IllegalArgumentException("The random number generator "" + name + "" can not be located"); > > The message only captures the failure if the result of `fm.get()` is null. > It does not capture the failure if the name is found but does not support the category. if (provider == null) { throw new IllegalArgumentException("No implementation of the random number generator algorithm "" + name + "" is available"); } else if (!isSubclass(category, provider)) { throw new IllegalArgumentException("The random number generator algorithm "" + name + "" is not implemented with the interface "" + category.simpleName() + """); } ------------- PR: https://git.openjdk.java.net/jdk/pull/1292 From xuelei at openjdk.java.net Mon Mar 1 16:11:52 2021 From: xuelei at openjdk.java.net (Xue-Lei Andrew Fan) Date: Mon, 1 Mar 2021 16:11:52 GMT Subject: RFR: JDK-8262509: JSSE Server should check the legacy version in TLSv1.3 ClientHello In-Reply-To: <2l1USLNeal5qhOCN_c4o3dHH9ZeuwAHrdOa0oNW7oog=.2633c33d-89ce-4630-8f9e-6ba9e26e722f@github.com> References: <2l1USLNeal5qhOCN_c4o3dHH9ZeuwAHrdOa0oNW7oog=.2633c33d-89ce-4630-8f9e-6ba9e26e722f@github.com> Message-ID: On Mon, 1 Mar 2021 03:07:12 GMT, John Jiang wrote: > Per RFC 8446, section 4.1.2, the legacy_version field in ClientHello message MUST be set to 0x0303 (TLSv1.2). > T13ClientHelloConsumer should do this check like that T13ServerHelloConsumer does. Marked as reviewed by xuelei (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/2772 From wetmore at openjdk.java.net Mon Mar 1 16:28:49 2021 From: wetmore at openjdk.java.net (Bradford Wetmore) Date: Mon, 1 Mar 2021 16:28:49 GMT Subject: RFR: JDK-8262509: JSSE Server should check the legacy version in TLSv1.3 ClientHello In-Reply-To: <2l1USLNeal5qhOCN_c4o3dHH9ZeuwAHrdOa0oNW7oog=.2633c33d-89ce-4630-8f9e-6ba9e26e722f@github.com> References: <2l1USLNeal5qhOCN_c4o3dHH9ZeuwAHrdOa0oNW7oog=.2633c33d-89ce-4630-8f9e-6ba9e26e722f@github.com> Message-ID: <3G20kPP5gHliRwaQzFexM3k3VYER36LunV04QAfoNqc=.ed4f0a53-a4a8-4e43-9a8b-95ede9b9bffb@github.com> On Mon, 1 Mar 2021 03:07:12 GMT, John Jiang wrote: > Per RFC 8446, section 4.1.2, the legacy_version field in ClientHello message MUST be set to 0x0303 (TLSv1.2). > T13ClientHelloConsumer should do this check like that T13ServerHelloConsumer does. Marked as reviewed by wetmore (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/2772 From jlaskey at openjdk.java.net Mon Mar 1 20:01:19 2021 From: jlaskey at openjdk.java.net (Jim Laskey) Date: Mon, 1 Mar 2021 20:01:19 GMT Subject: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v26] In-Reply-To: References: Message-ID: > This PR is to introduce a new random number API for the JDK. The primary API is found in RandomGenerator and RandomGeneratorFactory. Further description can be found in the JEP https://openjdk.java.net/jeps/356 . > > javadoc can be found at http://cr.openjdk.java.net/~jlaskey/prng/doc/api/java.base/java/util/random/package-summary.html > > old PR: https://github.com/openjdk/jdk/pull/1273 Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Update javadoc ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1292/files - new: https://git.openjdk.java.net/jdk/pull/1292/files/b9094279..99e92dd1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1292&range=25 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1292&range=24-25 Stats: 460 lines in 7 files changed: 183 ins; 85 del; 192 mod Patch: https://git.openjdk.java.net/jdk/pull/1292.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1292/head:pull/1292 PR: https://git.openjdk.java.net/jdk/pull/1292 From jjiang at openjdk.java.net Mon Mar 1 22:29:44 2021 From: jjiang at openjdk.java.net (John Jiang) Date: Mon, 1 Mar 2021 22:29:44 GMT Subject: Integrated: JDK-8262509: JSSE Server should check the legacy version in TLSv1.3 ClientHello In-Reply-To: <2l1USLNeal5qhOCN_c4o3dHH9ZeuwAHrdOa0oNW7oog=.2633c33d-89ce-4630-8f9e-6ba9e26e722f@github.com> References: <2l1USLNeal5qhOCN_c4o3dHH9ZeuwAHrdOa0oNW7oog=.2633c33d-89ce-4630-8f9e-6ba9e26e722f@github.com> Message-ID: On Mon, 1 Mar 2021 03:07:12 GMT, John Jiang wrote: > Per RFC 8446, section 4.1.2, the legacy_version field in ClientHello message MUST be set to 0x0303 (TLSv1.2). > T13ClientHelloConsumer should do this check like that T13ServerHelloConsumer does. This pull request has now been integrated. Changeset: 353416ff Author: John Jiang URL: https://git.openjdk.java.net/jdk/commit/353416ff Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod 8262509: JSSE Server should check the legacy version in TLSv1.3 ClientHello Reviewed-by: xuelei, wetmore ------------- PR: https://git.openjdk.java.net/jdk/pull/2772 From akozlov at openjdk.java.net Tue Mar 2 07:48:33 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 07:48:33 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v22] In-Reply-To: References: Message-ID: > Please review the implementation of JEP 391: macOS/AArch64 Port. > > It's heavily based on existing ports to linux/aarch64, macos/x86_64, and windows/aarch64. > > Major changes are in: > * src/hotspot/cpu/aarch64: support of the new calling convention (subtasks JDK-8253817, JDK-8253818) > * src/hotspot/os_cpu/bsd_aarch64: copy of os_cpu/linux_aarch64 with necessary adjustments (JDK-8253819) > * src/hotspot/share, test/hotspot/gtest: support of write-xor-execute (W^X), required on macOS/AArch64 platform. It's implemented with pthread_jit_write_protect_np provided by Apple. The W^X mode is local to a thread, so W^X mode change relates to the java thread state change (for java threads). In most cases, JVM executes in write-only mode, except when calling a generated stub like SafeFetch, which requires a temporary switch to execute-only mode. The same execute-only mode is enabled when a java thread executes in java or native states. This approach of managing W^X mode turned out to be simple and efficient enough. > * src/jdk.hotspot.agent: serviceability agent implementation (JDK-8254941) Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision: Update comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2200/files - new: https://git.openjdk.java.net/jdk/pull/2200/files/663cb4a1..e42b82db Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2200&range=21 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2200&range=20-21 Stats: 4 lines in 2 files changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/2200.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2200/head:pull/2200 PR: https://git.openjdk.java.net/jdk/pull/2200 From akozlov at openjdk.java.net Tue Mar 2 07:48:34 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 07:48:34 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9] In-Reply-To: References: Message-ID: On Mon, 1 Mar 2021 10:46:34 GMT, Andrew Haley wrote: >> They are defined in 13.2.95. MIDR_EL1, Main ID Register. Apple's code is not there, but "Arm can assign codes that are not published in this manual. All values not assigned by Arm are reserved and must not be used.". I assume the value was obtained by digging around https://github.com/apple/darwin-xnu/blob/main/osfmk/arm/cpuid.h#L62 > > Anton, this paragraph looks like an excellent comment. Thanks, I've added the comment. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From akozlov at openjdk.java.net Tue Mar 2 07:48:36 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 07:48:36 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9] In-Reply-To: References: Message-ID: On Mon, 15 Feb 2021 17:59:54 GMT, Vladimir Kempik wrote: >> src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp line 810: >> >>> 808: #ifdef __APPLE__ >>> 809: // Less-than word types are stored one after another. >>> 810: // The code unable to handle this, bailout. >> >> Perhaps: // The code is unable to handle this so bailout. > > Hello, we have updated PR, now this bailout is used only by the code which can handle it (native wrapper generator), for the rest it will cause guarantee failed if this bailout is triggered I've fixed the spelling. Sorry for it to take so long :( >> src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 195: >> >>> 193: frame os::get_sender_for_C_frame(frame* fr) { >>> 194: return frame(fr->link(), fr->link(), fr->sender_pc()); >>> 195: } >> >> Is this file going to be built by GCC or just macOS compilers? > > there is no support for compiling java with gcc on macos since about jdk11, only clang. > considering this and the absence of gcc for macos_m1, the answer is - just macOS compilers. I've fixed the comment. Now it states `JVM compiled with -fno-omit-frame-pointer, so RFP is saved on the stack.` ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From akozlov at openjdk.java.net Tue Mar 2 08:06:49 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 08:06:49 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9] In-Reply-To: References: Message-ID: On Fri, 12 Feb 2021 12:40:09 GMT, Florian Weimer wrote: >> only macos comiplers > > The comment is also wrong for glibc: The AArch64 ABI requires a 64 KiB guard region independently of page size, otherwise `-fstack-clash-protection` is not reliable. Thanks, I deleted the comment. It describes implementation distinguishing initial and regular thread http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/548cb3b7b713#l12.7. I'm not sure why the comment was preserved for the bsd_x86, but I don't think it makes sense here. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From akozlov at openjdk.java.net Tue Mar 2 08:14:46 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 08:14:46 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9] In-Reply-To: References: Message-ID: On Fri, 12 Feb 2021 13:32:52 GMT, Vladimir Kempik wrote: >> src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 486: >> >>> 484: } >>> 485: } >>> 486: } >> >> This appears to be a mix for Mavericks (10.9) and 10.12 >> work arounds. Is this code needed by this project? > > I wasn't able to replicate JDK-8020753 and JDK-8186286. So will remove these workaround > @gerard-ziemski, 8020753 was originally your fix, do you know if it still needed on intel-mac ? The x86_bsd still carries the workaround https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp#L745. It's worth having macos ports to be aligned by features. I would propose to have this workaround for now, and decide on it later for macos/x86 and macos/aarch64 at once. Sorry for chiming in so late. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From akozlov at openjdk.java.net Tue Mar 2 09:02:10 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 09:02:10 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9] In-Reply-To: References: Message-ID: On Tue, 2 Feb 2021 22:18:43 GMT, Daniel D. Daugherty wrote: >> Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision: >> >> support macos_aarch64 in hsdis > > src/hotspot/os_cpu/bsd_aarch64/thread_bsd_aarch64.cpp line 43: > >> 41: assert(Thread::current() == this, "caller must be current thread"); >> 42: return pd_get_top_frame(fr_addr, ucontext, isInJava); >> 43: } > > Is AsyncGetCallTrace() being supported by this port? I assume answer to be yes (I have a little experience with AsyncGetCallTrace). This code is identical to one in bsd/x86 and linux/aarch64. After few changes in the build system, I got jtreg/serviceability/AsyncGetCallTrace test compiled and passed. I've filed JDK-8262839 to enable the test. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From akozlov at openjdk.java.net Tue Mar 2 09:36:51 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 09:36:51 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9] In-Reply-To: References: Message-ID: <0dfmwagb4EGbnQnZIzpQ_36c9_fpvvebrgnKDW4E9Ps=.e54e9fb2-7500-40d8-8202-ce4903fd106f@github.com> On Tue, 2 Feb 2021 22:47:04 GMT, Daniel D. Daugherty wrote: >> Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision: >> >> support macos_aarch64 in hsdis > > src/hotspot/share/prims/nativeEntryPoint.cpp line 45: > >> 43: guarantee(status == JNI_OK && !env->ExceptionOccurred(), >> 44: "register jdk.internal.invoke.NativeEntryPoint natives"); >> 45: JNI_END > > I thought that jcheck caught a missing new-line? It seems it did not https://github.com/openjdk/jdk/commit/0fb31dbf3a2adc0f7fb2f9924083908724dcde5a#diff-f39cd3f794a337734adf30863f702725ee04182fee2345b2669e59ebed17a2ccR44. Anyway I reverted this change as it is the only change in the file, thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From akolarkunnu at openjdk.java.net Tue Mar 2 10:33:44 2021 From: akolarkunnu at openjdk.java.net (Abdul Kolarkunnu) Date: Tue, 2 Mar 2021 10:33:44 GMT Subject: RFR: 8260923: Add more tests for SSLSocket input/output shutdown In-Reply-To: References: Message-ID: <7wLKOz0zuJxRxEDVlQvEroHgb50BkhVVY2ZjmBxQwdw=.b23ee12d-cdc8-4b76-9ab4-bd064d075bce@github.com> On Fri, 26 Feb 2021 11:12:08 GMT, Abdul Kolarkunnu wrote: > There is a lack of tests in the area of java.net.Socket.shutdownInput() and java.net.Socket.shutdownOutput() , so added more tests in this area of with different TLS versions. Please review. @coffeys ------------- PR: https://git.openjdk.java.net/jdk/pull/2745 From akozlov at openjdk.java.net Tue Mar 2 11:07:56 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 11:07:56 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v9] In-Reply-To: References: Message-ID: On Tue, 2 Feb 2021 23:10:17 GMT, Daniel D. Daugherty wrote: > For platform files that were copied from other ports to this port, if the file wasn't > changed I presume the copyright years are left alone. If the file required changes > for this port, I expect the year to be updated to 2021. How are you verifying that > these copyright years are being properly managed on the new files? There are no exact copies, based on git -c diff.renameLimit=10000000 diff --find-copies-harder -C75% --name-status upstream/master... So every file changed in the branch potentially needs the copyright update. All file diffs are not trivial, IMHO. I'll run the copyright update after we fix a few remaining issues with the PR, to avoid updating copyright and changing/reverting the actual content. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From jlaskey at openjdk.java.net Tue Mar 2 13:19:13 2021 From: jlaskey at openjdk.java.net (Jim Laskey) Date: Tue, 2 Mar 2021 13:19:13 GMT Subject: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v27] In-Reply-To: References: Message-ID: > This PR is to introduce a new random number API for the JDK. The primary API is found in RandomGenerator and RandomGeneratorFactory. Further description can be found in the JEP https://openjdk.java.net/jeps/356 . > > javadoc can be found at http://cr.openjdk.java.net/~jlaskey/prng/doc/api/java.base/java/util/random/package-summary.html > > old PR: https://github.com/openjdk/jdk/pull/1273 Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Introduce isDeprecated ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/1292/files - new: https://git.openjdk.java.net/jdk/pull/1292/files/99e92dd1..7439c2ba Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1292&range=26 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1292&range=25-26 Stats: 25 lines in 1 file changed: 23 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/1292.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1292/head:pull/1292 PR: https://git.openjdk.java.net/jdk/pull/1292 From valeriep at openjdk.java.net Tue Mar 2 13:19:50 2021 From: valeriep at openjdk.java.net (Valerie Peng) Date: Tue, 2 Mar 2021 13:19:50 GMT Subject: RFR: 8261355: No data buffering in SunPKCS11 Cipher encryption when the underlying mechanism has no padding In-Reply-To: References: Message-ID: On Wed, 10 Feb 2021 15:06:35 GMT, Martin Balao wrote: > Hi, > > I'd like to propose a fix for JDK-8261355 [1]. > > The scheme used for holding data and padding while performing encryption operations is almost the same than the existing one for decryption. The only difference is that encryption does not require a block-sized buffer to be always held because there is no need, upon an update call, to determine which bytes are real output for the caller and which are padding -as it's required for decryption-. I added a couple of comments in implUpdate to explain this. > > No regressions observed in jdk/sun/security/pkcs11. > > Thanks, > Martin.- > > -- > [1] - https://bugs.openjdk.java.net/browse/JDK-8261355 src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Cipher.java line 595: > 593: // NSS throws up when called with data not in multiple > 594: // of blocks. Try to work around this by holding the > 595: // extra data in padBuffer. Well, I am not sure if other PKCS#11 libraries are like NSS which requires input size to be multiple of blocks for every multi-part encryption/decryption calls. We are paying the cost of buffering non-blocksize data ourselves and the associated byte copying as a result. Oh-well. With this change, you should also update the implDoFinal() impl which calls paddingObj.setPaddingBytes(byte[], int) for encryption and writes the padding bytes "after" the existing buffered bytes, i.e. padBufferLen. Otherwise, the existing buffered bytes may be overwritten w/ padding bytes and things will fail. The new regression test should cover this scenario also. It currently only tests the changes made to update() calls. ------------- PR: https://git.openjdk.java.net/jdk/pull/2510 From akozlov at openjdk.java.net Tue Mar 2 14:34:51 2021 From: akozlov at openjdk.java.net (Anton Kozlov) Date: Tue, 2 Mar 2021 14:34:51 GMT Subject: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v10] In-Reply-To: References: Message-ID: On Thu, 4 Feb 2021 22:15:47 GMT, Gerard Ziemski wrote: >> Anton Kozlov has updated the pull request incrementally with six additional commits since the last revision: >> >> - Merge remote-tracking branch 'origin/jdk/jdk-macos' into jdk-macos >> - Add comments to WX transitions >> >> + minor change of placements >> - Use macro conditionals instead of empty functions >> - Add W^X to tests >> - Do not require known W^X state >> - Revert w^x in gtests > > src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 322: > >> 320: #ifdef __APPLE__ >> 321: } else if (sig == SIGFPE && info->si_code == FPE_NOOP) { >> 322: Unimplemented(); > > Is there a follow up issue for this? Thanks, this is a leftover from the development phase, it will be removed. In macos/x86, this looks like a workaround. We've never met with this condition and it looks recent darwin kernel should correctly report the cause in si_code: https://github.com/apple/darwin-xnu/blob/33eb9835cd948dbbcdd8741aa52457cbe507c765/bsd/dev/arm/unix_signal.c#L436. ------------- PR: https://git.openjdk.java.net/jdk/pull/2200 From ewhelan at openjdk.java.net Tue Mar 2 15:08:01 2021 From: ewhelan at openjdk.java.net (Evan Whelan) Date: Tue, 2 Mar 2021 15:08:01 GMT Subject: RFR: 8262438: sun/security/ssl/SSLLogger/LoggingFormatConsistency.java failed with "SocketException: Socket is closed" [v2] In-Reply-To: References: Message-ID: > Hi all, > > Please review my test fix relating to JDK-8262438 > > This patch introduces as Thread.sleep at the start of each iteration which creates a new test jvm. > This allows the server socket sufficient time to release the previous connection and allows the port to be used again. > > I also refactored the behaviour for when the exitCode is not 0, allowing for an easier to read output. > An incorrect HttpsUrlConnection.disconnect() was also removed. > > The test was ran 100 times on all platforms and no failures were seen. > > Thanks, > Evan Evan Whelan has updated the pull request incrementally with two additional commits since the last revision: - 8262438: Stream operations on new lines - 8262438: Ensure all streams are emptied in socket connection ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2749/files - new: https://git.openjdk.java.net/jdk/pull/2749/files/363466f8..ae1acb21 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2749&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2749&range=00-01 Stats: 22 lines in 1 file changed: 12 ins; 4 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/2749.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2749/head:pull/2749 PR: https://git.openjdk.java.net/jdk/pull/2749 From ewhelan at openjdk.java.net Tue Mar 2 15:08:01 2021 From: ewhelan at openjdk.java.net (Evan Whelan) Date: Tue, 2 Mar 2021 15:08:01 GMT Subject: RFR: 8262438: sun/security/ssl/SSLLogger/LoggingFormatConsistency.java failed with "SocketException: Socket is closed" In-Reply-To: References: Message-ID: On Fri, 26 Feb 2021 17:17:09 GMT, Daniel Fuchs wrote: >> Hi all, >> >> Please review my test fix relating to JDK-8262438 >> >> This patch introduces as Thread.sleep at the start of each iteration which creates a new test jvm. >> This allows the server socket sufficient time to release the previous connection and allows the port to be used again. >> >> I also refactored the behaviour for when the exitCode is not 0, allowing for an easier to read output. >> An incorrect HttpsUrlConnection.disconnect() was also removed. >> >> The test was ran 100 times on all platforms and no failures were seen. >> >> Thanks, >> Evan > > Hi Evan - I am a bit skeptical that the proposed fix will solve the issue. AFAICS the exception is raised by the server side - and if I read it correctly it happens when the server finds that the socket is already closed when it tries to close it. How could sleeping between 2 process invocation solve this? The port used is an ephemeral port - so it should never be the same? > Does the log show that the same port was being reused? Hi Daniel, >From speaking with you offline, I have ensured that the server-side and client-side socket input streams are emptied. I have also added some debugging info should this test fail in the future. I've removed the proposed `Thread.sleep` and the test does not fail in 400 runs Regards, Evan ------------- PR: https://git.openjdk.java.net/jdk/pull/2749 From dfuchs at openjdk.java.net Tue Mar 2 15:16:49 2021 From: dfuchs at openjdk.java.net (Daniel Fuchs) Date: Tue, 2 Mar 2021 15:16:49 GMT Subject: RFR: 8262438: sun/security/ssl/SSLLogger/LoggingFormatConsistency.java failed with "SocketException: Socket is closed" [v2] In-Reply-To: References: Message-ID: On Tue, 2 Mar 2021 15:08:01 GMT, Evan Whelan wrote: >> Hi all, >> >> Please review my test fix relating to JDK-8262438 >> >> This patch introduces as Thread.sleep at the start of each iteration which creates a new test jvm. >> This allows the server socket sufficient time to release the previous connection and allows the port to be used again. >> >> I also refactored the behaviour for when the exitCode is not 0, allowing for an easier to read output. >> An incorrect HttpsUrlConnection.disconnect() was also removed. >> >> The test was ran 100 times on all platforms and no failures were seen. >> >> Thanks, >> Evan > > Evan Whelan has updated the pull request incrementally with two additional commits since the last revision: > > - 8262438: Stream operations on new lines > - 8262438: Ensure all streams are emptied in socket connection test/jdk/sun/security/ssl/SSLLogger/LoggingFormatConsistency.java line 133: > 131: out.flush(); > 132: } finally { > 133: socket.getInputStream().readAllBytes(); This will cause the server side to block until the client closes the socket. Is that what you really want to do? (It may be - but if the client is a regular HTTP client (HttpURLConnection / HttpClient) it will not close the connection until its keep-alive delay (may be up to 20mins) is expired. ------------- PR: https://git.openjdk.java.net/jdk/pull/2749 From ascarpino at openjdk.java.net Tue Mar 2 16:23:38 2021 From: ascarpino at openjdk.java.net (Anthony Scarpino) Date: Tue, 2 Mar 2021 16:23:38 GMT Subject: RFR: 8261462: GCM ByteBuffer decryption problems In-Reply-To: References: Message-ID: On Tue, 9 Feb 2021 19:54:43 GMT, Anthony Scarpino wrote: > Hi, > > I need a review of these two simple fixes. One just sets the input bytebuffer position to the limit upon completion of decryption. The second calls the CipherCore method to clear the state from the previous operation. > > Thanks > > Tony Ping ------------- PR: https://git.openjdk.java.net/jdk/pull/2487 From luoziyi at openjdk.java.net Tue Mar 2 17:26:15 2021 From: luoziyi at openjdk.java.net (Ziyi Luo) Date: Tue, 2 Mar 2021 17:26:15 GMT Subject: RFR: 8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards [v2] In-Reply-To: References: Message-ID: > All of the "isAssignableFrom" checks in "engineGetKeySpec" appear to be backwards in Java's KeyFactorySpi.engineGetKeySpec implementations. In most cases, the requested KeySpec is equal to the concrete implementation so the inversion does not matter. But there are few cases, as presented in the added jtreg test, will cause unexpected behavior (e.g., ClassCastException rather than an InvalidKeySpecException). The fix is trivial. > > Co-author @SalusaSecondus Ziyi Luo has updated the pull request incrementally with one additional commit since the last revision: 8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards (r2) ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2682/files - new: https://git.openjdk.java.net/jdk/pull/2682/files/0e4956db..d1972302 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2682&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2682&range=00-01 Stats: 26 lines in 15 files changed: 2 ins; 0 del; 24 mod Patch: https://git.openjdk.java.net/jdk/pull/2682.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2682/head:pull/2682 PR: https://git.openjdk.java.net/jdk/pull/2682 From luoziyi at openjdk.java.net Tue Mar 2 17:26:15 2021 From: luoziyi at openjdk.java.net (Ziyi Luo) Date: Tue, 2 Mar 2021 17:26:15 GMT Subject: RFR: 8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards In-Reply-To: References: Message-ID: On Wed, 24 Feb 2021 02:39:57 GMT, Jamil Nimeh wrote: >> All of the "isAssignableFrom" checks in "engineGetKeySpec" appear to be backwards in Java's KeyFactorySpi.engineGetKeySpec implementations. In most cases, the requested KeySpec is equal to the concrete implementation so the inversion does not matter. But there are few cases, as presented in the added jtreg test, will cause unexpected behavior (e.g., ClassCastException rather than an InvalidKeySpecException). The fix is trivial. >> >> Co-author @SalusaSecondus > > The fix itself makes sense and looks good to me. However I think it will cause two other tests to break. Please try running the following two tests with your changes and see if they fail for you as they did for me: > open/test/jdk/sun/security/rsa/TestKeyFactory.java > open/test/jdk/sun/security/rsa/pss/TestPSSKeySupport.java > > Also just a minor nit: some of the modified files should have their copyright dates updated to 2021. Hi Jamil, Thanks for reviewing this PR. > The fix itself makes sense and looks good to me. However I think it will cause two other tests to break. Please try running the following two tests with your changes and see if they fail for you as they did for me: > open/test/jdk/sun/security/rsa/TestKeyFactory.java > open/test/jdk/sun/security/rsa/pss/TestPSSKeySupport.java Nice catch. I updated both tests in rev-2. > Also just a minor nit: some of the modified files should have their copyright dates updated to 2021. Done ------------- PR: https://git.openjdk.java.net/jdk/pull/2682 From luoziyi at openjdk.java.net Tue Mar 2 17:26:16 2021 From: luoziyi at openjdk.java.net (Ziyi Luo) Date: Tue, 2 Mar 2021 17:26:16 GMT Subject: RFR: 8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards [v2] In-Reply-To: References: Message-ID: On Wed, 24 Feb 2021 02:40:36 GMT, Jamil Nimeh wrote: >> Ziyi Luo has updated the pull request incrementally with one additional commit since the last revision: >> >> 8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards (r2) > > test/jdk/java/security/KeyFactory/KeyFactoryGetKeySpecForInvalidSpec.java line 2: > >> 1: /* >> 2: * Copyright (c) 2011, Amazon.com, Inc. or its affiliates. All rights reserved. > > Nit: Should this be 2021? Good catch! Fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/2682 From jnimeh at openjdk.java.net Tue Mar 2 18:32:40 2021 From: jnimeh at openjdk.java.net (Jamil Nimeh) Date: Tue, 2 Mar 2021 18:32:40 GMT Subject: RFR: 8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards [v2] In-Reply-To: References: Message-ID: On Tue, 2 Mar 2021 17:26:15 GMT, Ziyi Luo wrote: >> All of the "isAssignableFrom" checks in "engineGetKeySpec" appear to be backwards in Java's KeyFactorySpi.engineGetKeySpec implementations. In most cases, the requested KeySpec is equal to the concrete implementation so the inversion does not matter. But there are few cases, as presented in the added jtreg test, will cause unexpected behavior (e.g., ClassCastException rather than an InvalidKeySpecException). The fix is trivial. >> >> Co-author @SalusaSecondus > > Ziyi Luo has updated the pull request incrementally with one additional commit since the last revision: > > 8254717: isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards (r2) Thanks for fixing those two tests and the nits. Looks good. ------------- Marked as reviewed by jnimeh (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/2682 From jjg at openjdk.java.net Tue Mar 2 19:41:03 2021 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Tue, 2 Mar 2021 19:41:03 GMT Subject: RFR: JDK-8262875: doccheck: empty paragraphs, etc in java.base module Message-ID: Please review some minor doc fixes, for issues found by _doccheck_. There are two kinds of errors that are addressed. 1. Incorrect use of `

`. In HTML, `

` marks the *beginning* of a paragraph. It is not a terminator, to mark the end of a paragraph, or a separator to mark the boundary between paragraphs. In particular, it should not be used at the end of a description before a javadoc block tag, such as `@param` or before other HTML block tags, like `