Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8293412 Remove unnecessary java.security.egd overrides #10716

Closed
wants to merge 8 commits into from

Conversation

mcpowers
Copy link
Contributor

@mcpowers mcpowers commented Oct 14, 2022

https://bugs.openjdk.org/browse/JDK-8293412


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8293412: Remove unnecessary java.security.egd overrides

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10716/head:pull/10716
$ git checkout pull/10716

Update a local copy of the PR:
$ git checkout pull/10716
$ git pull https://git.openjdk.org/jdk pull/10716/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10716

View PR using the GUI difftool:
$ git pr show -t 10716

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10716.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 14, 2022

👋 Welcome back mpowers! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 14, 2022

@mcpowers The following labels will be automatically applied to this pull request:

  • core-libs
  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added security security-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Oct 14, 2022
@mcpowers
Copy link
Contributor Author

mcpowers commented Oct 28, 2022

No failures were noticed during mach5 and jtreg testing.

@mcpowers mcpowers marked this pull request as ready for review October 29, 2022 02:04
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 29, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 29, 2022

Webrevs

Copy link
Member

@XueleiFan XueleiFan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good clean up so that the default one get used in testing.

@openjdk
Copy link

openjdk bot commented Oct 29, 2022

@mcpowers This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8293412: Remove unnecessary java.security.egd overrides

Reviewed-by: xuelei, djelinski

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 58 new commits pushed to the master branch:

  • ea83cb9: 8297450: ScaledTextFieldBorderTest.java fails when run with -show parameter
  • 336d230: 8297958: NMT: Display peak values
  • 0d2a9ee: 8298142: Update internal comment on language features in SourceVersion
  • 203251f: 8297379: Enable the ByteBuffer path of Poly1305 optimizations
  • 1e46832: 8297602: Compiler crash with type annotation and generic record during pattern matching
  • b0e5432: 8297687: new URI(S,S,S,S) throws exception with incorrect index position reported in the error message
  • 2243646: 8298145: Remove ContiguousSpace::capacity
  • 84b927a: 8296024: Usage of DirectBuffer::address should be guarded
  • a9e6c62: 8297186: G1 triggers unnecessary full GCs when heap utilization is low
  • 4458de9: 8297172: Fix some issues of auto-vectorization of Long.bitCount/numberOfTrailingZeros/numberOfLeadingZeros()
  • ... and 48 more: https://git.openjdk.org/jdk/compare/2821fa9883cc9687b53e3bb5655732a614cff8fc...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@XueleiFan, @djelinski) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 29, 2022
@AlanBateman
Copy link
Contributor

/label remove core-libs

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Oct 29, 2022
@openjdk
Copy link

openjdk bot commented Oct 29, 2022

@AlanBateman
The core-libs label was successfully removed.

Copy link
Member

@djelinski djelinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still verifying the jarsigner and the SecurityTools changes, but all of the other files actually need the EGD override.

@@ -40,8 +40,6 @@ public class EnoughSeedTest {
= Security.getProperty(DRBG_CONFIG);

public static void main(String[] args) {
System.setProperty("java.security.egd", "file:/dev/urandom");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test uses generateSeed and needs egd to avoid reading from /dev/random

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backing out change. I hadn't considered the fact that this test might be run on slower hardware.

@@ -27,7 +27,7 @@
* @bug 8156709
* @summary Cannot call setSeed on NativePRNG on Mac if EGD is /dev/urandom
* @requires os.name == "Mac OS X"
* @run main/othervm -Djava.security.egd=file:/dev/urandom MacNativePRNGSetSeed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change makes this test pointless, see summary 2 lines above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backing out change.

@@ -41,7 +41,7 @@
* @library /lib/testlibrary
* @summary Test behavior of a shared SecureRandom object when it is operated
* by multiple threads concurrently.
* @run main/othervm -Djava.security.egd=file:/dev/urandom MultiThreadTest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses generateSeed and needs egd to avoid using dev/random

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backing out change.

@@ -53,8 +53,6 @@ public class ApiTest {
= Security.getProperty(DRBG_CONFIG);

public static void main(String[] args) throws Exception {
System.setProperty("java.security.egd", "file:/dev/urandom");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test uses generateSeed and needs egd.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backing out change.

@@ -29,7 +29,7 @@
* as well from its serialized instance in the same time then the
* generated random numbers should be different when one or both are
* reseeded.
* @run main/othervm -Djava.security.egd=file:/dev/urandom SerializedSeedTest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses generateSeed and needs egd to avoid using dev/random

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backing out change.

@@ -33,8 +33,6 @@
public class Serialize {

public static void main(String args[]) throws Exception {
System.setProperty("java.security.egd", "file:/dev/urandom");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses generateSeed and needs egd to avoid using dev/random

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backing out change.

@@ -26,7 +26,7 @@
* @bug 6998583 8141039
* @summary NativeSeedGenerator is making 8192 byte read requests from
* entropy pool on each init.
* @run main/othervm -Djava.security.egd=file:/dev/random SeedGeneratorChoice
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test uses generateSeed and should be run with egd pointing to /dev/urandom to avoid reading from /dev/random

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backing out change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to /dev/urandom.

@@ -28,7 +28,7 @@
* @test
* @bug 8051408
* @summary make sure nextBytes etc can be called before setSeed
* @run main/othervm -Djava.security.egd=file:/dev/urandom AutoReseed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test uses generateSeed and needs egd to avoid reading from /dev/random

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backing out change.

Copy link
Member

@djelinski djelinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

@mcpowers
Copy link
Contributor Author

Verified with testing that /dev/urandom is used when overrides are removed from Compatibility.java and SecurityTools.java.

@mcpowers
Copy link
Contributor Author

mcpowers commented Dec 6, 2022

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Dec 6, 2022
@openjdk
Copy link

openjdk bot commented Dec 6, 2022

@mcpowers
Your change (at version 8076b61) is now ready to be sponsored by a Committer.

@wangweij
Copy link
Contributor

wangweij commented Dec 6, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Dec 6, 2022

Going to push as commit 79d163d.
Since your change was applied there have been 58 commits pushed to the master branch:

  • ea83cb9: 8297450: ScaledTextFieldBorderTest.java fails when run with -show parameter
  • 336d230: 8297958: NMT: Display peak values
  • 0d2a9ee: 8298142: Update internal comment on language features in SourceVersion
  • 203251f: 8297379: Enable the ByteBuffer path of Poly1305 optimizations
  • 1e46832: 8297602: Compiler crash with type annotation and generic record during pattern matching
  • b0e5432: 8297687: new URI(S,S,S,S) throws exception with incorrect index position reported in the error message
  • 2243646: 8298145: Remove ContiguousSpace::capacity
  • 84b927a: 8296024: Usage of DirectBuffer::address should be guarded
  • a9e6c62: 8297186: G1 triggers unnecessary full GCs when heap utilization is low
  • 4458de9: 8297172: Fix some issues of auto-vectorization of Long.bitCount/numberOfTrailingZeros/numberOfLeadingZeros()
  • ... and 48 more: https://git.openjdk.org/jdk/compare/2821fa9883cc9687b53e3bb5655732a614cff8fc...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 6, 2022
@openjdk openjdk bot closed this Dec 6, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Dec 6, 2022
@openjdk
Copy link

openjdk bot commented Dec 6, 2022

@wangweij @mcpowers Pushed as commit 79d163d.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@mcpowers mcpowers deleted the JDK-8293412 branch December 7, 2022 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

5 participants