Re: RFR: 8267319: Use larger default key sizes and algorithms based on CNSA [v7]

2022-03-23 Thread Xue-Lei Andrew Fan
On Wed, 23 Mar 2022 21:59:02 GMT, Valerie Peng wrote: >> I see. >> >> Would you mind add a comment about the provider loading impact, just in case >> someone else have similar questions in the future? > > Sure, I can do that. Will add a comment about this. Thank you. I have no more comment ex

Re: RFR: 8267319: Use larger default key sizes and algorithms based on CNSA [v8]

2022-03-23 Thread Xue-Lei Andrew Fan
On Wed, 23 Mar 2022 22:48:41 GMT, Valerie Peng wrote: >> It's been several years since we increased the default key sizes. Before >> shifting to PQC, NSA replaced its Suite B cryptography recommendations with >> the Commercial National Security Algorithm Suite which suggests: >> >> - SHA-384 f

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread David Holmes
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap src/java.base/share/classes/java/util/Collections.java line 5822: > 5820: * @param the type of keys maintained by this map > 5821: * @param the type of mapped valu

Re: RFR: 8282162: [vector] Optimize vector negation API [v2]

2022-03-23 Thread Xiaohong Gong
On Tue, 22 Mar 2022 09:58:23 GMT, Xiaohong Gong wrote: >> The current vector `"NEG"` is implemented with substraction a vector by zero >> in case the architecture does not support the negation instruction. And to >> fit the predicate feature for architectures that support it, the masked >> vec

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread liach
On Thu, 24 Mar 2022 00:40:19 GMT, XenoAmess wrote: > still I think it better to put these functions to Collections as they can > share a same calculation function. You can just keep these methods in `Collections` but make them package-private, so the moved factories can call. (Note that the me

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread XenoAmess
On Thu, 24 Mar 2022 00:39:27 GMT, XenoAmess wrote: >> src/java.base/share/classes/java/util/Collections.java line 5826: >> >>> 5824: * @since 19 >>> 5825: */ >>> 5826: public static HashMap newHashMap(int expectedSize) { >> >> Stuart [in a JBS >> comment](https://bugs.openjdk.ja

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread XenoAmess
On Wed, 23 Mar 2022 21:26:02 GMT, liach wrote: >> 8186958: Need method to create pre-sized HashMap > > src/java.base/share/classes/java/util/Collections.java line 5826: > >> 5824: * @since 19 >> 5825: */ >> 5826: public static HashMap newHashMap(int expectedSize) { > > Stuart [in

Re: RFR: JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver [v3]

2022-03-23 Thread Mandy Chung
On Wed, 23 Mar 2022 03:37:01 GMT, Mandy Chung wrote: >> src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line >> 424: >> >>> 422: throw new IncompatibleClassChangeError(msg); >>> 423: } else { >>> 424: throw new NullPoi

Re: RFR: JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver [v4]

2022-03-23 Thread Mandy Chung
> A simple patch to call `Objects.requireNonNull(recv)` for an explicit null > receiver check rather than NPE thrown by `Object::getClass`. The message of > NPE generated by JEP 358 (Helpful NullPointerExceptions) is supposed to be > helpful but not in this case. Mandy Chung has updated the pu

Re: RFR: 8267319: Use larger default key sizes and algorithms based on CNSA [v8]

2022-03-23 Thread Valerie Peng
> It's been several years since we increased the default key sizes. Before > shifting to PQC, NSA replaced its Suite B cryptography recommendations with > the Commercial National Security Algorithm Suite which suggests: > > - SHA-384 for secure hashing > - AES-256 for symmetric encryption > - RS

Re: RFR: 8267319: Use larger default key sizes and algorithms based on CNSA [v7]

2022-03-23 Thread Valerie Peng
On Wed, 23 Mar 2022 21:51:51 GMT, Xue-Lei Andrew Fan wrote: >> My very first prototype is to implement the AES keysize calculation as you >> commented, i.e. in the static block and use an int for DEF_AES_KEY_SIZE. >> However, it is later discovered through testing that this leads to deadlocks

Re: RFR: 8267319: Use larger default key sizes and algorithms based on CNSA [v7]

2022-03-23 Thread Xue-Lei Andrew Fan
On Wed, 23 Mar 2022 20:45:22 GMT, Valerie Peng wrote: >> src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java >> line 129: >> >>> 127: return currVal; >>> 128: } >>> 129: >> >> I'm not very sure of this method. Is it performance friendly if making the >>

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread liach
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap src/java.base/share/classes/java/util/Collections.java line 5826: > 5824: * @since 19 > 5825: */ > 5826: public static HashMap newHashMap(int expectedSize) { Stuart [in a JBS c

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread liach
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap test/jdk/java/util/Collections/CalculateHashMapCapacityTestJMH.java line 42: > 40: public class CalculateHashMapCapacityTestJMH { > 41: > 42: private void consume(int tmp) { You should pa

Re: RFR: 8267319: Use larger default key sizes and algorithms based on CNSA [v7]

2022-03-23 Thread Valerie Peng
On Wed, 23 Mar 2022 04:46:48 GMT, Xue-Lei Andrew Fan wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor code refactoring > > src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java > line 1

Re: Unused class jdk.internal.reflect.SignatureIterator

2022-03-23 Thread Mandy Chung
It's not used by the VM.  I believe it was no longer used due to JDK-4479184 long ago. Mandy On 3/23/22 7:03 AM, Andrey Turbanov wrote: Hello. As I can see, the class 'jdk.internal.reflect.SignatureIterator' is unused in JDK java code. Is it somehow used by VM, or is it just leftovers from som

Integrated: 8283465: Character.UnicodeBlock.NUM_ENTITIES is out of date

2022-03-23 Thread Naoto Sato
On Tue, 22 Mar 2022 18:44:09 GMT, Naoto Sato wrote: > Fixing the out-of-date number of entries in > `Character.UnicodeBlock.NUM_ENTITIES` field. The regression test has been > renamed and now repurposed just to examine whether the `NUM_ENTITIES` > correctly has the `map.size()` value. This pu

Re: RFR: 8283426: Fix 'exeption' typo [v4]

2022-03-23 Thread Andrey Turbanov
> Fix repeated typo `exeption` Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8283426: Fix 'exeption' typo Co-authored-by: Alexey Ivanov <70774172+aivanov-...@users.noreply.github.com> - Changes: - all: https:

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread XenoAmess
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap I do have a local test to make sure the 3 functions I provided can produce equal capacity HashMap, but I think it does not need to be added into jdk. import java.lang.reflect.Array; import jav

Re: RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread XenoAmess
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap @stuart-marks I think making these functions at Collections is slightly better than place them to their own classes. The first step is to make such functions. The second step is to change s

RFR: 8186958: Need method to create pre-sized HashMap

2022-03-23 Thread XenoAmess
8186958: Need method to create pre-sized HashMap - Commit messages: - 8186958: Need method to create pre-sized HashMap Changes: https://git.openjdk.java.net/jdk/pull/7928/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7928&range=00 Issue: https://bugs.openjdk.java.ne

Re: RFR: 8283349 : Robustness improvements to java/util/prefs/AddNodeChangeListener.jar

2022-03-23 Thread Naoto Sato
On Tue, 22 Mar 2022 17:59:15 GMT, Brent Christian wrote: > Please review this change to the java/util/prefs/AddNodeChangeListener.jar > test. > > Although the test specifies "-Djava.util.prefs.userRoot=." to ensure a fresh > Preferences on each test run, MacOS does not seem to honor this, and

Re: RFR: 8283470: Update java.lang.invoke.VarHandle to use sealed classes

2022-03-23 Thread Joe Darcy
On Wed, 23 Mar 2022 16:27:29 GMT, Mandy Chung wrote: > This patch changes VarHandle and its implementation hierarchy to use sealed > classes. All VarHandle permitted classes are package-private and either > final or sealed abstract classes. > > Please also review the CSR: https://bugs.openjdk

Integrated: 8283237: CallSite should be a sealed class

2022-03-23 Thread liach
On Wed, 16 Mar 2022 13:09:30 GMT, liach wrote: > Change `CallSite` to a sealed class, as `CallSite` is an abstract class which > does not allow direct subclassing by users per its documentation. Since I > don't have a JBS account, I posted the content for the CSR in a GitHub Gist > at https://

Re: RFR: 8283237: CallSite should be a sealed class [v4]

2022-03-23 Thread Mandy Chung
On Tue, 22 Mar 2022 23:18:21 GMT, liach wrote: >> Change `CallSite` to a sealed class, as `CallSite` is an abstract class >> which does not allow direct subclassing by users per its documentation. >> Since I don't have a JBS account, I posted the content for the CSR in a >> GitHub Gist at http

RFR: 8283470: Update java.lang.invoke.VarHandle to use sealed classes

2022-03-23 Thread Mandy Chung
This patch changes VarHandle and its implementation hierarchy to use sealed classes. All VarHandle permitted classes are package-private and either final or sealed abstract classes. Please also review the CSR: https://bugs.openjdk.java.net/browse/JDK-8283540 - Commit messages: -

Re: RFR: 8283279: [Testbug] Improve TestGetSwapSpaceSize [v2]

2022-03-23 Thread Severin Gehwolf
On Wed, 23 Mar 2022 09:27:07 GMT, Severin Gehwolf wrote: >> Please review this container test improvement. The test in question only >> makes sense iff the total swap space size as reported by the container aware >> OperatingSystemMXBean is `0`. If that's not the case, then something else >> m

Integrated: 8283279: [Testbug] Improve TestGetSwapSpaceSize

2022-03-23 Thread Severin Gehwolf
On Thu, 17 Mar 2022 13:40:53 GMT, Severin Gehwolf wrote: > Please review this container test improvement. The test in question only > makes sense iff the total swap space size as reported by the container aware > OperatingSystemMXBean is `0`. If that's not the case, then something else > might

Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v5]

2022-03-23 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-424 [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/424 Maurizio Cimadamore has updated the pull request

Unused class jdk.internal.reflect.SignatureIterator

2022-03-23 Thread Andrey Turbanov
Hello. As I can see, the class 'jdk.internal.reflect.SignatureIterator' is unused in JDK java code. Is it somehow used by VM, or is it just leftovers from some refactorings? I wonder if we can drop it. Andrey Turbanov

jpackage Windows support for 4 digits version

2022-03-23 Thread Sverre Moe
Could jpackage instruct WiX when building a native application on Windows, to support 4 digits in the version? 14:41:18 Detected [light.exe] version [3.11.2.4516]. 14:41:18 Detected [candle.exe] version [3.11.2.4516]. 14:41:18 WiX 3.11.2.4516 detected. Enabling advanced cleanup action. 14:41:18

Re: RFR: 8283349 : Robustness improvements to java/util/prefs/AddNodeChangeListener.jar

2022-03-23 Thread Daniel Fuchs
On Tue, 22 Mar 2022 17:59:15 GMT, Brent Christian wrote: > Please review this change to the java/util/prefs/AddNodeChangeListener.jar > test. > > Although the test specifies "-Djava.util.prefs.userRoot=." to ensure a fresh > Preferences on each test run, MacOS does not seem to honor this, and

Re: RFR: 8283279: [Testbug] Improve TestGetSwapSpaceSize [v2]

2022-03-23 Thread Jie Fu
On Wed, 23 Mar 2022 09:27:07 GMT, Severin Gehwolf wrote: >> Please review this container test improvement. The test in question only >> makes sense iff the total swap space size as reported by the container aware >> OperatingSystemMXBean is `0`. If that's not the case, then something else >> m

Re: RFR: 8283426: Fix 'exeption' typo [v3]

2022-03-23 Thread Alexey Ivanov
On Wed, 23 Mar 2022 07:31:23 GMT, Andrey Turbanov wrote: >> Fix repeated typo `exeption` > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8283426: Fix 'exeption' typo > fix more typos, found by Sean Coffey Marked as re

Integrated: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes

2022-03-23 Thread Jaikiran Pai
On Sun, 20 Mar 2022 04:24:07 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which handles > https://bugs.openjdk.java.net/browse/JDK-8283411? > > The commit here moves the temporary byte array from being a member of the > class to a local variable within the `skip` method

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes [v2]

2022-03-23 Thread Jaikiran Pai
On Sun, 20 Mar 2022 14:05:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which handles >> https://bugs.openjdk.java.net/browse/JDK-8283411? >> >> The commit here moves the temporary byte array from being a member of the >> class to a local variable within the `skip` me

Re: RFR: 8283279: [Testbug] Improve TestGetSwapSpaceSize [v2]

2022-03-23 Thread Severin Gehwolf
On Wed, 23 Mar 2022 03:06:00 GMT, Jie Fu wrote: >> Severin Gehwolf 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 three additional >> commits s

Re: RFR: 8283279: [Testbug] Improve TestGetSwapSpaceSize [v2]

2022-03-23 Thread Severin Gehwolf
> Please review this container test improvement. The test in question only > makes sense iff the total swap space size as reported by the container aware > OperatingSystemMXBean is `0`. If that's not the case, then something else > might be amiss, e.g. OperatingSystemMXBean reporting the host sw

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes [v2]

2022-03-23 Thread Alan Bateman
On Sun, 20 Mar 2022 14:05:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which handles >> https://bugs.openjdk.java.net/browse/JDK-8283411? >> >> The commit here moves the temporary byte array from being a member of the >> class to a local variable within the `skip` me

Re: RFR: 8283426: Fix 'exeption' typo [v3]

2022-03-23 Thread Andrey Turbanov
> Fix repeated typo `exeption` Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8283426: Fix 'exeption' typo fix more typos, found by Sean Coffey - Changes: - all: https://git.openjdk.java.net/jdk/pull/7879/files

Re: RFR: 8276799: Implementation of JEP 422: Linux/RISC-V Port [v4]

2022-03-23 Thread Aleksey Shipilev
On Wed, 23 Mar 2022 02:03:26 GMT, Fei Yang wrote: >> This PR implements JEP 422: Linux/RISC-V Port [1]. >> The PR starts as a squashed merge of the >> https://openjdk.java.net/projects/riscv-port branch. >> >> This has been tested with jtreg tier{1,2,3,4} and jcstress on HiFive >> Unmatched bo

Re: RFR: 8279508: Auto-vectorize Math.round API [v18]

2022-03-23 Thread Tobias Hartmann
On Fri, 18 Mar 2022 20:19:08 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing fra