!1 I54NOQ: init jdk17.0.3-ga

From: @kuenking111 
Reviewed-by: @jvmboy 
Signed-off-by: @jvmboy
This commit is contained in:
openeuler-ci-bot 2022-04-27 06:00:47 +00:00 committed by Gitee
commit bbc9135b79
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
30 changed files with 3765 additions and 73 deletions

View File

@ -0,0 +1,44 @@
From 8f29e9c5ec26a5f726ddd0557e046e66c1c94e10 Mon Sep 17 00:00:00 2001
Date: Wed, 8 Dec 2021 16:23:26 +0800
Subject: [PATCH] [Backport] 8272138: ZGC: Adopt relaxed ordering for self-healing
Reference: https://bugs.openjdk.java.net/browse/JDK-8272138
---
src/hotspot/share/gc/z/zBarrier.inline.hpp | 2 +-
src/hotspot/share/gc/z/zForwarding.inline.hpp | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/hotspot/share/gc/z/zBarrier.inline.hpp b/src/hotspot/share/gc/z/zBarrier.inline.hpp
index 0fa611005..2eaebfcfd 100644
--- a/src/hotspot/share/gc/z/zBarrier.inline.hpp
+++ b/src/hotspot/share/gc/z/zBarrier.inline.hpp
@@ -117,7 +117,7 @@ inline void ZBarrier::self_heal(volatile oop* p, uintptr_t addr, uintptr_t heal_
for (;;) {
// Heal
- const uintptr_t prev_addr = Atomic::cmpxchg((volatile uintptr_t*)p, addr, heal_addr);
+ const uintptr_t prev_addr = Atomic::cmpxchg((volatile uintptr_t*)p, addr, heal_addr, memory_order_relaxed);
if (prev_addr == addr) {
// Success
return;
diff --git a/src/hotspot/share/gc/z/zForwarding.inline.hpp b/src/hotspot/share/gc/z/zForwarding.inline.hpp
index 31bf72929..cff6d7a90 100644
--- a/src/hotspot/share/gc/z/zForwarding.inline.hpp
+++ b/src/hotspot/share/gc/z/zForwarding.inline.hpp
@@ -136,8 +136,12 @@ inline uintptr_t ZForwarding::insert(uintptr_t from_index, uintptr_t to_offset,
const ZForwardingEntry new_entry(from_index, to_offset);
const ZForwardingEntry old_entry; // Empty
+ // Make sure that object copy is finished
+ // before forwarding table installation
+ OrderAccess::release();
+
for (;;) {
- const ZForwardingEntry prev_entry = Atomic::cmpxchg(entries() + *cursor, old_entry, new_entry);
+ const ZForwardingEntry prev_entry = Atomic::cmpxchg(entries() + *cursor, old_entry, new_entry, memory_order_relaxed);
if (!prev_entry.populated()) {
// Success
return to_offset;
--
2.19.0

View File

@ -0,0 +1,449 @@
From 15b363b8dd4f2ecd58981582725a8d5650743992 Mon Sep 17 00:00:00 2001
Date: Thu, 28 Oct 2021 10:38:19 +0800
Subject: [PATCH] 8273111: Default timezone should return zone ID if
/etc/localtime is valid but not canonicalization on linux
---
.../unix/native/libjava/TimeZone_md.c | 30 ++++
.../unix/native/libjava/canonicalize_md.c | 147 +---------------
src/java.base/unix/native/libjava/path_util.c | 166 ++++++++++++++++++
src/java.base/unix/native/libjava/path_util.h | 31 ++++
4 files changed, 229 insertions(+), 145 deletions(-)
create mode 100644 src/java.base/unix/native/libjava/path_util.c
create mode 100644 src/java.base/unix/native/libjava/path_util.h
diff --git a/src/java.base/unix/native/libjava/TimeZone_md.c b/src/java.base/unix/native/libjava/TimeZone_md.c
index 94dfc207f..b1db666df 100644
--- a/src/java.base/unix/native/libjava/TimeZone_md.c
+++ b/src/java.base/unix/native/libjava/TimeZone_md.c
@@ -38,6 +38,7 @@
#include "jvm.h"
#include "TimeZone_md.h"
+#include "path_util.h"
static char *isFileIdentical(char* buf, size_t size, char *pathname);
@@ -77,6 +78,33 @@ static const char *ETC_ENVIRONMENT_FILE = "/etc/environment";
#if defined(__linux__) || defined(MACOSX)
+/*
+ * remove repeated path separators ('/') in the given 'path'.
+ */
+static void
+removeDuplicateSlashes(char *path)
+{
+ char *left = path;
+ char *right = path;
+ char *end = path + strlen(path);
+
+ for (; right < end; right++) {
+ // Skip sequence of multiple path-separators.
+ while (*right == '/' && *(right + 1) == '/') {
+ right++;
+ }
+
+ while (*right != '\0' && !(*right == '/' && *(right + 1) == '/')) {
+ *left++ = *right++;
+ }
+
+ if (*right == '\0') {
+ *left = '\0';
+ break;
+ }
+ }
+}
+
/*
* Returns a pointer to the zone ID portion of the given zoneinfo file
* name, or NULL if the given string doesn't contain "zoneinfo/".
@@ -296,6 +324,8 @@ getPlatformTimeZoneID()
return NULL;
}
linkbuf[len] = '\0';
+ removeDuplicateSlashes(linkbuf);
+ collapse(linkbuf);
tz = getZoneName(linkbuf);
if (tz != NULL) {
tz = strdup(tz);
diff --git a/src/java.base/unix/native/libjava/canonicalize_md.c b/src/java.base/unix/native/libjava/canonicalize_md.c
index 2bb896bf3..82b6f1077 100644
--- a/src/java.base/unix/native/libjava/canonicalize_md.c
+++ b/src/java.base/unix/native/libjava/canonicalize_md.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,155 +33,12 @@
#include <sys/stat.h>
#include <errno.h>
#include <limits.h>
-#if !defined(_ALLBSD_SOURCE)
-#include <alloca.h>
-#endif
-
#include "jdk_util.h"
+#include "path_util.h"
/* Note: The comments in this file use the terminology
defined in the java.io.File class */
-
-/* Check the given name sequence to see if it can be further collapsed.
- Return zero if not, otherwise return the number of names in the sequence. */
-
-static int
-collapsible(char *names)
-{
- char *p = names;
- int dots = 0, n = 0;
-
- while (*p) {
- if ((p[0] == '.') && ((p[1] == '\0')
- || (p[1] == '/')
- || ((p[1] == '.') && ((p[2] == '\0')
- || (p[2] == '/'))))) {
- dots = 1;
- }
- n++;
- while (*p) {
- if (*p == '/') {
- p++;
- break;
- }
- p++;
- }
- }
- return (dots ? n : 0);
-}
-
-
-/* Split the names in the given name sequence,
- replacing slashes with nulls and filling in the given index array */
-
-static void
-splitNames(char *names, char **ix)
-{
- char *p = names;
- int i = 0;
-
- while (*p) {
- ix[i++] = p++;
- while (*p) {
- if (*p == '/') {
- *p++ = '\0';
- break;
- }
- p++;
- }
- }
-}
-
-
-/* Join the names in the given name sequence, ignoring names whose index
- entries have been cleared and replacing nulls with slashes as needed */
-
-static void
-joinNames(char *names, int nc, char **ix)
-{
- int i;
- char *p;
-
- for (i = 0, p = names; i < nc; i++) {
- if (!ix[i]) continue;
- if (i > 0) {
- p[-1] = '/';
- }
- if (p == ix[i]) {
- p += strlen(p) + 1;
- } else {
- char *q = ix[i];
- while ((*p++ = *q++));
- }
- }
- *p = '\0';
-}
-
-
-/* Collapse "." and ".." names in the given path wherever possible.
- A "." name may always be eliminated; a ".." name may be eliminated if it
- follows a name that is neither "." nor "..". This is a syntactic operation
- that performs no filesystem queries, so it should only be used to cleanup
- after invoking the realpath() procedure. */
-
-static void
-collapse(char *path)
-{
- char *names = (path[0] == '/') ? path + 1 : path; /* Preserve first '/' */
- int nc;
- char **ix;
- int i, j;
- char *p, *q;
-
- nc = collapsible(names);
- if (nc < 2) return; /* Nothing to do */
- ix = (char **)alloca(nc * sizeof(char *));
- splitNames(names, ix);
-
- for (i = 0; i < nc; i++) {
- int dots = 0;
-
- /* Find next occurrence of "." or ".." */
- do {
- char *p = ix[i];
- if (p[0] == '.') {
- if (p[1] == '\0') {
- dots = 1;
- break;
- }
- if ((p[1] == '.') && (p[2] == '\0')) {
- dots = 2;
- break;
- }
- }
- i++;
- } while (i < nc);
- if (i >= nc) break;
-
- /* At this point i is the index of either a "." or a "..", so take the
- appropriate action and then continue the outer loop */
- if (dots == 1) {
- /* Remove this instance of "." */
- ix[i] = 0;
- }
- else {
- /* If there is a preceding name, remove both that name and this
- instance of ".."; otherwise, leave the ".." as is */
- for (j = i - 1; j >= 0; j--) {
- if (ix[j]) break;
- }
- if (j < 0) continue;
- ix[j] = 0;
- ix[i] = 0;
- }
- /* i will be incremented at the top of the loop */
- }
-
- joinNames(names, nc, ix);
-}
-
-
/* Convert a pathname to canonical form. The input path is assumed to contain
no duplicate slashes. On Solaris we can use realpath() to do most of the
work, though once that's done we still must collapse any remaining "." and
diff --git a/src/java.base/unix/native/libjava/path_util.c b/src/java.base/unix/native/libjava/path_util.c
new file mode 100644
index 000000000..8a533f812
--- /dev/null
+++ b/src/java.base/unix/native/libjava/path_util.c
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#if !defined(_ALLBSD_SOURCE)
+#include <alloca.h>
+#endif
+#include "path_util.h"
+
+/* Check the given name sequence to see if it can be further collapsed.
+ Return zero if not, otherwise return the number of names in the sequence. */
+
+static int
+collapsible(char *names)
+{
+ char *p = names;
+ int dots = 0, n = 0;
+
+ while (*p) {
+ if ((p[0] == '.') && ((p[1] == '\0')
+ || (p[1] == '/')
+ || ((p[1] == '.') && ((p[2] == '\0')
+ || (p[2] == '/'))))) {
+ dots = 1;
+ }
+ n++;
+ while (*p) {
+ if (*p == '/') {
+ p++;
+ break;
+ }
+ p++;
+ }
+ }
+ return (dots ? n : 0);
+}
+
+/* Split the names in the given name sequence,
+ replacing slashes with nulls and filling in the given index array */
+
+static void
+splitNames(char *names, char **ix)
+{
+ char *p = names;
+ int i = 0;
+
+ while (*p) {
+ ix[i++] = p++;
+ while (*p) {
+ if (*p == '/') {
+ *p++ = '\0';
+ break;
+ }
+ p++;
+ }
+ }
+}
+
+/* Join the names in the given name sequence, ignoring names whose index
+ entries have been cleared and replacing nulls with slashes as needed */
+
+static void
+joinNames(char *names, int nc, char **ix)
+{
+ int i;
+ char *p;
+
+ for (i = 0, p = names; i < nc; i++) {
+ if (!ix[i]) continue;
+ if (i > 0) {
+ p[-1] = '/';
+ }
+ if (p == ix[i]) {
+ p += strlen(p) + 1;
+ } else {
+ char *q = ix[i];
+ while ((*p++ = *q++));
+ }
+ }
+ *p = '\0';
+}
+
+/* Collapse "." and ".." names in the given path wherever possible.
+ A "." name may always be eliminated; a ".." name may be eliminated if it
+ follows a name that is neither "." nor "..". This is a syntactic operation
+ that performs no filesystem queries, so it should only be used to cleanup
+ after invoking the realpath() procedure. */
+
+void
+collapse(char *path)
+{
+ char *names = (path[0] == '/') ? path + 1 : path; /* Preserve first '/' */
+ int nc;
+ char **ix;
+ int i, j;
+ char *p, *q;
+
+ nc = collapsible(names);
+ if (nc < 2) return; /* Nothing to do */
+ ix = (char **)alloca(nc * sizeof(char *));
+ splitNames(names, ix);
+
+ for (i = 0; i < nc; i++) {
+ int dots = 0;
+
+ /* Find next occurrence of "." or ".." */
+ do {
+ char *p = ix[i];
+ if (p[0] == '.') {
+ if (p[1] == '\0') {
+ dots = 1;
+ break;
+ }
+ if ((p[1] == '.') && (p[2] == '\0')) {
+ dots = 2;
+ break;
+ }
+ }
+ i++;
+ } while (i < nc);
+ if (i >= nc) break;
+
+ /* At this point i is the index of either a "." or a "..", so take the
+ appropriate action and then continue the outer loop */
+ if (dots == 1) {
+ /* Remove this instance of "." */
+ ix[i] = 0;
+ }
+ else {
+ /* If there is a preceding name, remove both that name and this
+ instance of ".."; otherwise, leave the ".." as is */
+ for (j = i - 1; j >= 0; j--) {
+ if (ix[j]) break;
+ }
+ if (j < 0) continue;
+ ix[j] = 0;
+ ix[i] = 0;
+ }
+ /* i will be incremented at the top of the loop */
+ }
+
+ joinNames(names, nc, ix);
+}
diff --git a/src/java.base/unix/native/libjava/path_util.h b/src/java.base/unix/native/libjava/path_util.h
new file mode 100644
index 000000000..7b0fd5eb1
--- /dev/null
+++ b/src/java.base/unix/native/libjava/path_util.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef PATH_UTIL_H
+#define PATH_UTIL_H
+
+void collapse(char *path);
+
+#endif
--
2.19.0

View File

@ -0,0 +1,25 @@
From 02cc67fd514c34cffc61bc89da39a9ff8a05ae69 Mon Sep 17 00:00:00 2001
Date: Wed, 8 Dec 2021 09:59:36 +0800
Subject: [PATCH] Add prefetch before copy in
PSPromotionManager::copy_to_survivor_space
---
src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
index 5eb6a20b0..a0149e447 100644
--- a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
+++ b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
@@ -248,6 +248,8 @@ inline oop PSPromotionManager::copy_unmarked_to_survivor_space(oop o,
assert(new_obj != NULL, "allocation should have succeeded");
+ Prefetch::write(new_obj, PrefetchCopyIntervalInBytes);
+
// Copy obj
Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(o), cast_from_oop<HeapWord*>(new_obj), new_obj_size);
--
2.19.0

View File

@ -0,0 +1,25 @@
From a012a1db673ee941cf71e52c2a7dbbd42e841a5c Mon Sep 17 00:00:00 2001
Date: Thu, 16 Dec 2021 11:17:31 +0800
Subject: [PATCH] Clean up JDK17 codeDEX fix Non-static numa_node_distance is
not initialized
---
src/hotspot/share/gc/g1/g1NUMA.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/share/gc/g1/g1NUMA.cpp b/src/hotspot/share/gc/g1/g1NUMA.cpp
index 2c2431a39..be7a7d254 100644
--- a/src/hotspot/share/gc/g1/g1NUMA.cpp
+++ b/src/hotspot/share/gc/g1/g1NUMA.cpp
@@ -83,7 +83,7 @@ bool G1NUMA::use_nearest_node() const {
G1NUMA::G1NUMA() :
_node_id_to_index_map(NULL), _len_node_id_to_index_map(0),
- _node_ids(NULL), _num_active_node_ids(0), _use_nearest(false),
+ _node_ids(NULL), _num_active_node_ids(0), _numa_node_distance(NULL), _use_nearest(false),
_region_size(0), _page_size(0), _stats(NULL) {
}
--
2.23.0

View File

@ -0,0 +1,23 @@
From 5c29b63d8151f397764a4a63b9487754cf748ee1 Mon Sep 17 00:00:00 2001
Date: Mon, 13 Dec 2021 16:17:31 +0800
Subject: [PATCH] Clean up JDK17 codeDEX
---
src/java.base/unix/native/libjava/path_util.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/java.base/unix/native/libjava/path_util.c b/src/java.base/unix/native/libjava/path_util.c
index 8a533f812..4b978206f 100644
--- a/src/java.base/unix/native/libjava/path_util.c
+++ b/src/java.base/unix/native/libjava/path_util.c
@@ -116,7 +116,6 @@ collapse(char *path)
int nc;
char **ix;
int i, j;
- char *p, *q;
nc = collapsible(names);
if (nc < 2) return; /* Nothing to do */
--
2.23.0

View File

@ -0,0 +1,155 @@
From 81e5f144710e946f70db91329a79b9ebcd76c2f3 Mon Sep 17 00:00:00 2001
Date: Wed, 15 Dec 2021 17:04:17 +0800
Subject: [PATCH] Delete expired certificate
diff --git a/make/data/cacerts/geotrustglobalca b/make/data/cacerts/geotrustglobalca
deleted file mode 100644
index 7f8bf9a66..000000000
--- a/make/data/cacerts/geotrustglobalca
+++ /dev/null
@@ -1,27 +0,0 @@
-Owner: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US
-Issuer: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US
-Serial number: 23456
-Valid from: Tue May 21 04:00:00 GMT 2002 until: Sat May 21 04:00:00 GMT 2022
-Signature algorithm name: SHA1withRSA
-Subject Public Key Algorithm: 2048-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
-MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
-YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
-EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
-R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
-9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
-fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
-iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
-1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
-bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
-MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
-ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
-uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
-Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
-tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
-PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
-hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
-5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
------END CERTIFICATE-----
diff --git a/make/data/cacerts/luxtrustglobalrootca b/make/data/cacerts/luxtrustglobalrootca
deleted file mode 100644
index 7fb3d818f..000000000
--- a/make/data/cacerts/luxtrustglobalrootca
+++ /dev/null
@@ -1,28 +0,0 @@
-Owner: CN=LuxTrust Global Root, O=LuxTrust s.a., C=LU
-Issuer: CN=LuxTrust Global Root, O=LuxTrust s.a., C=LU
-Serial number: bb8
-Valid from: Thu Mar 17 09:51:37 GMT 2011 until: Wed Mar 17 09:51:37 GMT 2021
-Signature algorithm name: SHA256withRSA
-Subject Public Key Algorithm: 2048-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIDZDCCAkygAwIBAgICC7gwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCTFUx
-FjAUBgNVBAoTDUx1eFRydXN0IHMuYS4xHTAbBgNVBAMTFEx1eFRydXN0IEdsb2Jh
-bCBSb290MB4XDTExMDMxNzA5NTEzN1oXDTIxMDMxNzA5NTEzN1owRDELMAkGA1UE
-BhMCTFUxFjAUBgNVBAoTDUx1eFRydXN0IHMuYS4xHTAbBgNVBAMTFEx1eFRydXN0
-IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsn+n
-QPAiygz267Hxyw6VV0B1r6A/Ps7sqjJX5hmxZ0OYWmt8s7j6eJyqpoSyYBuAQc5j
-zR8XCJmk9e8+EsdMsFeaXHhAePxFjdqRZ9w6Ubltc+a3OY52OrQfBfVpVfmTz3iI
-Sr6qm9d7R1tGBEyCFqY19vx039a0r9jitScRdFmiwmYsaArhmIiIPIoFdRTjuK7z
-CISbasE/MRivJ6VLm6T9eTHemD0OYcqHmMH4ijCc+j4z1aXEAwfh95Z0GAAnOCfR
-K6qq4UFFi2/xJcLcopeVx0IUM115hCNq52XAV6DYXaljAeew5Ivo+MVjuOVsdJA9
-x3f8K7p56aTGEnin/wIDAQABo2AwXjAMBgNVHRMEBTADAQH/MA4GA1UdDwEB/wQE
-AwIBBjAfBgNVHSMEGDAWgBQXFYWJCS8kh28/HRvk8pZ5g0gTzjAdBgNVHQ4EFgQU
-FxWFiQkvJIdvPx0b5PKWeYNIE84wDQYJKoZIhvcNAQELBQADggEBAFrwHNDUUM9B
-fua4nX3DcNBeNv9ujnov3kgR1TQuPLdFwlQlp+HBHjeDtpSutkVIA+qVvuucarQ3
-XB8u02uCgUNbCj8RVWOs+nwIAjegPDkEM/6XMshS5dklTbDG7mgfcKpzzlcD3H0K
-DTPy0lrfCmw7zBFRlxqkIaKFNQLXgCLShLL4wKpov9XrqsMLq6F8K/f1O4fhVFfs
-BSTveUJO84ton+Ruy4KZycwq3FPCH3CDqyEPVrRI/98HIrOM+R2mBN8tAza53W/+
-MYhm/2xtRDSvCHc+JtJy9LtHVpM8mGPhM7uZI5K1g3noHZ9nrWLWidb2/CfeMifL
-hNp3hSGhEiE=
------END CERTIFICATE-----
diff --git a/make/data/cacerts/quovadisrootca b/make/data/cacerts/quovadisrootca
deleted file mode 100644
index 0c195ff51..000000000
--- a/make/data/cacerts/quovadisrootca
+++ /dev/null
@@ -1,41 +0,0 @@
-Owner: CN=QuoVadis Root Certification Authority, OU=Root Certification Authority, O=QuoVadis Limited, C=BM
-Issuer: CN=QuoVadis Root Certification Authority, OU=Root Certification Authority, O=QuoVadis Limited, C=BM
-Serial number: 3ab6508b
-Valid from: Mon Mar 19 18:33:33 GMT 2001 until: Wed Mar 17 18:33:33 GMT 2021
-Signature algorithm name: SHA1withRSA
-Subject Public Key Algorithm: 2048-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC
-TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAzMTkxODMzMzNaFw0yMTAzMTcxODMz
-MzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUw
-IwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQDEyVR
-dW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Yp
-li4kVEAkOPcahdxYTMukJ0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2D
-rOpm2RgbaIr1VxqYuvXtdj182d6UajtLF8HVj71lODqV0D1VNk7feVcxKh7YWWVJ
-WCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeLYzcS19Dsw3sgQUSj7cug
-F+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWenAScOospU
-xbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCC
-Ak4wPQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVv
-dmFkaXNvZmZzaG9yZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREw
-ggENMIIBCQYJKwYBBAG+WAABMIH7MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNl
-IG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBh
-c3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFy
-ZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
-Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYI
-KwYBBQUHAgEWFmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3T
-KbkGGew5Oanwl4Rqy+/fMIGuBgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rq
-y+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1p
-dGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYD
-VQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCL
-MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSk
-fnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf8
-7C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1R
-cHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0y
-mQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQW
-xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK
-SnQ2+Q==
------END CERTIFICATE-----
diff --git a/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java b/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java
index f39dca74a..c404ed613 100644
--- a/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java
+++ b/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java
@@ -120,8 +120,6 @@ public class VerifyCACerts {
"7E:37:CB:8B:4C:47:09:0C:AB:36:55:1B:A6:F4:5D:B8:40:68:0F:BA:16:6A:95:2D:B1:00:71:7F:43:05:3F:C2");
put("digicerthighassuranceevrootca [jdk]",
"74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF");
- put("geotrustglobalca [jdk]",
- "FF:85:6A:2D:25:1D:CD:88:D3:66:56:F4:50:12:67:98:CF:AB:AA:DE:40:79:9C:72:2D:E4:D2:B5:DB:36:A7:3A");
put("geotrustprimaryca [jdk]",
"37:D5:10:06:C5:12:EA:AB:62:64:21:F1:EC:8C:92:01:3F:C5:F8:2A:E9:8E:E5:33:EB:46:19:B8:DE:B4:D0:6C");
put("geotrustprimarycag2 [jdk]",
@@ -154,10 +152,6 @@ public class VerifyCACerts {
"5D:56:49:9B:E4:D2:E0:8B:CF:CA:D0:8A:3E:38:72:3D:50:50:3B:DE:70:69:48:E4:2F:55:60:30:19:E5:28:AE");
put("letsencryptisrgx1 [jdk]",
"96:BC:EC:06:26:49:76:F3:74:60:77:9A:CF:28:C5:A7:CF:E8:A3:C0:AA:E1:1A:8F:FC:EE:05:C0:BD:DF:08:C6");
- put("luxtrustglobalrootca [jdk]",
- "A1:B2:DB:EB:64:E7:06:C6:16:9E:3C:41:18:B2:3B:AA:09:01:8A:84:27:66:6D:8B:F0:E2:88:91:EC:05:19:50");
- put("quovadisrootca [jdk]",
- "A4:5E:DE:3B:BB:F0:9C:8A:E1:5C:72:EF:C0:72:68:D6:93:A2:1C:99:6F:D5:1E:67:CA:07:94:60:FD:6D:88:73");
put("quovadisrootca1g3 [jdk]",
"8A:86:6F:D1:B2:76:B5:7E:57:8E:92:1C:65:82:8A:2B:ED:58:E9:F2:F2:88:05:41:34:B7:F1:F4:BF:C9:CC:74");
put("quovadisrootca2 [jdk]",
@@ -260,12 +254,6 @@ public class VerifyCACerts {
add("addtrustexternalca [jdk]");
// Valid until: Sat May 30 10:44:50 GMT 2020
add("addtrustqualifiedca [jdk]");
- // Valid until: Wed Mar 17 02:51:37 PDT 2021
- add("luxtrustglobalrootca [jdk]");
- // Valid until: Wed Mar 17 11:33:33 PDT 2021
- add("quovadisrootca [jdk]");
- // Valid until: Sat May 21 04:00:00 GMT 2022
- add("geotrustglobalca [jdk]");
}
};

View File

@ -0,0 +1,241 @@
From e28327b74af8fdab2df76733eff3ba560dcbc2e6 Mon Sep 17 00:00:00 2001
Date: Wed, 8 Dec 2021 16:07:54 +0800
Subject: [PATCH] G1 GC NUMA feature preferentially selects the nearest NUMA
node for memory allocation
---
src/hotspot/os/aix/os_aix.cpp | 4 +++
src/hotspot/os/bsd/os_bsd.cpp | 4 ++-
src/hotspot/os/linux/os_linux.cpp | 4 +++
src/hotspot/os/windows/os_windows.cpp | 4 +++
src/hotspot/share/gc/g1/g1NUMA.cpp | 31 ++++++++++++++++++-
src/hotspot/share/gc/g1/g1NUMA.hpp | 9 ++++++
.../share/gc/g1/heapRegionSet.inline.hpp | 24 +++++++++++++-
src/hotspot/share/runtime/os.hpp | 1 +
8 files changed, 78 insertions(+), 3 deletions(-)
diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp
index 1d2ce086b..5b5c6c449 100644
--- a/src/hotspot/os/aix/os_aix.cpp
+++ b/src/hotspot/os/aix/os_aix.cpp
@@ -279,6 +279,10 @@ bool os::have_special_privileges() {
return privileges;
}
+uint os::numa_distance(uint node_index, uint node_index_other) {
+ return 0;
+}
+
// Helper function, emulates disclaim64 using multiple 32bit disclaims
// because we cannot use disclaim64() on AS/400 and old AIX releases.
static bool my_disclaim64(char* addr, size_t size) {
diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp
index d71d44d1d..ba3d1568c 100644
--- a/src/hotspot/os/bsd/os_bsd.cpp
+++ b/src/hotspot/os/bsd/os_bsd.cpp
@@ -191,7 +191,9 @@ bool os::have_special_privileges() {
return privileges;
}
-
+uint os::numa_distance(uint node_index, uint node_index_other) {
+ return 0;
+}
// Cpu architecture string
#if defined(ZERO)
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index b4c89b518..fc3800edd 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -2862,6 +2862,10 @@ int os::numa_get_group_id_for_address(const void* address) {
return id;
}
+uint os::numa_distance(uint node_index, uint node_index_other) {
+ return Linux::numa_distance(node_index, node_index_other);
+}
+
int os::Linux::get_existing_num_nodes() {
int node;
int highest_node_number = Linux::numa_max_node();
diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp
index 4f9d54029..fe52ffb22 100644
--- a/src/hotspot/os/windows/os_windows.cpp
+++ b/src/hotspot/os/windows/os_windows.cpp
@@ -278,6 +278,10 @@ void os::run_periodic_checks() {
return;
}
+uint os::numa_distance(uint node_index, uint node_index_other) {
+ return 0;
+}
+
// previous UnhandledExceptionFilter, if there is one
static LPTOP_LEVEL_EXCEPTION_FILTER prev_uef_handler = NULL;
diff --git a/src/hotspot/share/gc/g1/g1NUMA.cpp b/src/hotspot/share/gc/g1/g1NUMA.cpp
index 95d9d8c15..2c2431a39 100644
--- a/src/hotspot/share/gc/g1/g1NUMA.cpp
+++ b/src/hotspot/share/gc/g1/g1NUMA.cpp
@@ -70,9 +70,20 @@ uint G1NUMA::index_of_node_id(int node_id) const {
return node_index;
}
+// Returns numa distance
+const uint G1NUMA::calc_numa_node_distance(uint node_index, uint other_node_index) const {
+ if (node_index >= _num_active_node_ids || other_node_index >= _num_active_node_ids) {
+ return UINT_MAX;
+ }
+ return _numa_node_distance[node_index][other_node_index];
+}
+bool G1NUMA::use_nearest_node() const {
+ return _use_nearest;
+}
+
G1NUMA::G1NUMA() :
_node_id_to_index_map(NULL), _len_node_id_to_index_map(0),
- _node_ids(NULL), _num_active_node_ids(0),
+ _node_ids(NULL), _num_active_node_ids(0), _use_nearest(false),
_region_size(0), _page_size(0), _stats(NULL) {
}
@@ -104,10 +115,24 @@ void G1NUMA::initialize(bool use_numa) {
for (uint i = 0; i < _num_active_node_ids; i++) {
max_node_id = MAX2(max_node_id, _node_ids[i]);
}
+ if (_num_active_node_ids > 2) {
+ _use_nearest = true;
+ }
// Create a mapping between node_id and index.
_len_node_id_to_index_map = max_node_id + 1;
_node_id_to_index_map = NEW_C_HEAP_ARRAY(uint, _len_node_id_to_index_map, mtGC);
+ _numa_node_distance = NEW_C_HEAP_ARRAY(uint*, _num_active_node_ids * _num_active_node_ids, mtGC);
+ // Set node disctance
+ for (uint node_i = 0; node_i < _num_active_node_ids; node_i++) {
+ _numa_node_distance[node_i] = NEW_C_HEAP_ARRAY(uint, _num_active_node_ids*_num_active_node_ids, mtGC);
+ }
+ for (uint node_i = 0; node_i < _num_active_node_ids; node_i++) {
+ for (uint node_j = 0; node_j < _num_active_node_ids; node_j++) {
+ uint distance = os::numa_distance(node_i, node_j);
+ _numa_node_distance[node_i][node_j] = distance;
+ }
+ }
// Set all indices with unknown node id.
for (int i = 0; i < _len_node_id_to_index_map; i++) {
@@ -126,6 +151,10 @@ G1NUMA::~G1NUMA() {
delete _stats;
FREE_C_HEAP_ARRAY(int, _node_id_to_index_map);
FREE_C_HEAP_ARRAY(int, _node_ids);
+ for (uint node_i = 0; node_i < _num_active_node_ids; node_i++) {
+ FREE_C_HEAP_ARRAY(uint, _numa_node_distance[node_i]);
+ }
+ FREE_C_HEAP_ARRAY(uint*, _numa_node_distance);
}
void G1NUMA::set_region_info(size_t region_size, size_t page_size) {
diff --git a/src/hotspot/share/gc/g1/g1NUMA.hpp b/src/hotspot/share/gc/g1/g1NUMA.hpp
index 83117b8ec..24ae9712d 100644
--- a/src/hotspot/share/gc/g1/g1NUMA.hpp
+++ b/src/hotspot/share/gc/g1/g1NUMA.hpp
@@ -45,6 +45,10 @@ class G1NUMA: public CHeapObj<mtGC> {
int* _node_ids;
// Total number of node ids.
uint _num_active_node_ids;
+ // numa node distance
+ uint** _numa_node_distance;
+ // Use nearest numa node
+ bool _use_nearest;
// HeapRegion size
size_t _region_size;
@@ -84,6 +88,8 @@ public:
// Returns active memory node count.
uint num_active_nodes() const;
+ bool use_nearest_node() const;
+
bool is_enabled() const;
int numa_id(int index) const;
@@ -91,6 +97,9 @@ public:
// Returns memory node ids
const int* node_ids() const;
+ // Returns numa distance
+ const uint calc_numa_node_distance(uint node_index, uint other_node_index) const;
+
// Returns node index of current calling thread.
uint index_of_current_thread() const;
diff --git a/src/hotspot/share/gc/g1/heapRegionSet.inline.hpp b/src/hotspot/share/gc/g1/heapRegionSet.inline.hpp
index 1f509ff3e..67b3ade50 100644
--- a/src/hotspot/share/gc/g1/heapRegionSet.inline.hpp
+++ b/src/hotspot/share/gc/g1/heapRegionSet.inline.hpp
@@ -183,26 +183,48 @@ inline HeapRegion* FreeRegionList::remove_region_with_node_index(bool from_head,
// Find the region to use, searching from _head or _tail as requested.
size_t cur_depth = 0;
+ bool exist_region = false;
+ uint numa_distance_min = UINT_MAX;
+ HeapRegion* remote_node_region = NULL;
+
if (from_head) {
for (cur = _head;
cur != NULL && cur_depth < max_search_depth;
cur = cur->next(), ++cur_depth) {
if (requested_node_index == cur->node_index()) {
+ exist_region = true;
break;
}
+ if (G1NUMA::numa()->use_nearest_node()) {
+ uint distance = G1NUMA::numa()->calc_numa_node_distance(requested_node_index, cur->node_index());
+ if (distance < numa_distance_min) {
+ remote_node_region = cur;
+ numa_distance_min = distance;
+ }
+ }
}
} else {
for (cur = _tail;
cur != NULL && cur_depth < max_search_depth;
cur = cur->prev(), ++cur_depth) {
if (requested_node_index == cur->node_index()) {
+ exist_region = true;
break;
}
+ if (G1NUMA::numa()->use_nearest_node()) {
+ uint distance = G1NUMA::numa()->calc_numa_node_distance(requested_node_index, cur->node_index());
+ if (distance < numa_distance_min) {
+ remote_node_region = cur;
+ numa_distance_min = distance;
+ }
+ }
}
}
// Didn't find a region to use.
- if (cur == NULL || cur_depth >= max_search_depth) {
+ if (G1NUMA::numa()->use_nearest_node() && !exist_region && remote_node_region != NULL) {
+ cur = remote_node_region;
+ } else if (cur == NULL || cur_depth >= max_search_depth) {
return NULL;
}
diff --git a/src/hotspot/share/runtime/os.hpp b/src/hotspot/share/runtime/os.hpp
index 7eaaa9db9..34dcebd9e 100644
--- a/src/hotspot/share/runtime/os.hpp
+++ b/src/hotspot/share/runtime/os.hpp
@@ -418,6 +418,7 @@ class os: AllStatic {
static bool numa_topology_changed();
static int numa_get_group_id();
static int numa_get_group_id_for_address(const void* address);
+ static uint numa_distance(uint node_index, uint node_index_other);
// Page manipulation
struct page_info {
--
2.23.0

347
LICENSE Normal file
View File

@ -0,0 +1,347 @@
The GNU General Public License (GPL)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public License is intended to
guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to
most of the Free Software Foundation's software and to any other program whose
authors commit to using it. (Some other Free Software Foundation software is
covered by the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom to
distribute copies of free software (and charge for this service if you wish),
that you receive source code or can get it if you want it, that you can change
the software or use pieces of it in new free programs; and that you know you
can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny
you these rights or to ask you to surrender the rights. These restrictions
translate to certain responsibilities for you if you distribute copies of the
software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for
a fee, you must give the recipients all the rights that you have. You must
make sure that they, too, receive or can get the source code. And you must
show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software.
Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If the
software is modified by someone else and passed on, we want its recipients to
know that what they have is not the original, so that any problems introduced
by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program proprietary.
To prevent this, we have made it clear that any patent must be licensed for
everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification
follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms of
this General Public License. The "Program", below, refers to any such program
or work, and a "work based on the Program" means either the Program or any
derivative work under copyright law: that is to say, a work containing the
Program or a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is included
without limitation in the term "modification".) Each licensee is addressed as
"you".
Activities other than copying, distribution and modification are not covered by
this License; they are outside its scope. The act of running the Program is
not restricted, and the output from the Program is covered only if its contents
constitute a work based on the Program (independent of having been made by
running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as
you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this License
and to the absence of any warranty; and give any other recipients of the
Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may
at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus
forming a work based on the Program, and copy and distribute such modifications
or work under the terms of Section 1 above, provided that you also meet all of
these conditions:
a) You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to be
licensed as a whole at no charge to all third parties under the terms of
this License.
c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the
most ordinary way, to print or display an announcement including an
appropriate copyright notice and a notice that there is no warranty (or
else, saying that you provide a warranty) and that users may redistribute
the program under these conditions, and telling the user how to view a copy
of this License. (Exception: if the Program itself is interactive but does
not normally print such an announcement, your work based on the Program is
not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License, and
its terms, do not apply to those sections when you distribute them as separate
works. But when you distribute the same sections as part of a whole which is a
work based on the Program, the distribution of the whole must be on the terms
of this License, whose permissions for other licensees extend to the entire
whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise the
right to control the distribution of derivative or collective works based on
the Program.
In addition, mere aggregation of another work not based on the Program with the
Program (or with a work based on the Program) on a volume of a storage or
distribution medium does not bring the other work under the scope of this
License.
3. You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1 and
2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above
on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to
give any third party, for a charge no more than your cost of physically
performing source distribution, a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to
distribute corresponding source code. (This alternative is allowed only
for noncommercial distribution and only if you received the program in
object code or executable form with such an offer, in accord with
Subsection b above.)
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all
the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and installation
of the executable. However, as a special exception, the source code
distributed need not include anything that is normally distributed (in either
source or binary form) with the major components (compiler, kernel, and so on)
of the operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the source
code from the same place counts as distribution of the source code, even though
third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically terminate
your rights under this License. However, parties who have received copies, or
rights, from you under this License will not have their licenses terminated so
long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it.
However, nothing else grants you permission to modify or distribute the Program
or its derivative works. These actions are prohibited by law if you do not
accept this License. Therefore, by modifying or distributing the Program (or
any work based on the Program), you indicate your acceptance of this License to
do so, and all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program),
the recipient automatically receives a license from the original licensor to
copy, distribute or modify the Program subject to these terms and conditions.
You may not impose any further restrictions on the recipients' exercise of the
rights granted herein. You are not responsible for enforcing compliance by
third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues), conditions
are imposed on you (whether by court order, agreement or otherwise) that
contradict the conditions of this License, they do not excuse you from the
conditions of this License. If you cannot distribute so as to satisfy
simultaneously your obligations under this License and any other pertinent
obligations, then as a consequence you may not distribute the Program at all.
For example, if a patent license would not permit royalty-free redistribution
of the Program by all those who receive copies directly or indirectly through
you, then the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply and
the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or
other property right claims or to contest validity of any such claims; this
section has the sole purpose of protecting the integrity of the free software
distribution system, which is implemented by public license practices. Many
people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose that
choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Program under this License may add an explicit
geographical distribution limitation excluding those countries, so that
distribution is permitted only in or among countries not thus excluded. In
such case, this License incorporates the limitation as if written in the body
of this License.
9. The Free Software Foundation may publish revised and/or new versions of the
General Public License from time to time. Such new versions will be similar in
spirit to the present version, but may differ in detail to address new problems
or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any later
version", you have the option of following the terms and conditions either of
that version or of any later version published by the Free Software Foundation.
If the Program does not specify a version number of this License, you may
choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs
whose distribution conditions are different, write to the author to ask for
permission. For software which is copyrighted by the Free Software Foundation,
write to the Free Software Foundation; we sometimes make exceptions for this.
Our decision will be guided by the two goals of preserving the free status of
all derivatives of our free software and of promoting the sharing and reuse of
software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible
use to the public, the best way to achieve this is to make it free software
which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach
them to the start of each source file to most effectively convey the exclusion
of warranty; and each file should have at least the "copyright" line and a
pointer to where the full notice is found.
One line to give the program's name and a brief idea of what it does.
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it
starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
software, and you are welcome to redistribute it under certain conditions;
type 'show c' for details.
The hypothetical commands 'show w' and 'show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may be
called something other than 'show w' and 'show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school,
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
'Gnomovision' (which makes passes at compilers) written by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General Public
License instead of this License.
"CLASSPATH" EXCEPTION TO THE GPL
Certain source files distributed by Oracle America and/or its affiliates are
subject to the following clarification and special exception to the GPL, but
only where Oracle has expressly included in the particular source file's header
the words "Oracle designates this particular file as subject to the "Classpath"
exception as provided by Oracle in the LICENSE file that accompanied this code."
Linking this library statically or dynamically with other modules is making
a combined work based on this library. Thus, the terms and conditions of
the GNU General Public License cover the whole combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,
and to copy and distribute the resulting executable under terms of your
choice, provided that you also meet, for each linked independent module,
the terms and conditions of the license of that module. An independent
module is a module which is not derived from or based on this library. If
you modify this library, you may extend this exception to your version of
the library, but you are not obligated to do so. If you do not wish to do
so, delete this exception statement from your version.

View File

@ -1,36 +0,0 @@
# openjdk-17
#### Description
openEuler Community builds of OpenJDK 17
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,37 +0,0 @@
# openjdk-17
#### 介绍
openEuler Community builds of OpenJDK 17
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

72
TestCryptoLevel.java Normal file
View File

@ -0,0 +1,72 @@
/* TestCryptoLevel -- Ensure unlimited crypto policy is in use.
Copyright (C) 2012 Red Hat, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import java.security.Permission;
import java.security.PermissionCollection;
public class TestCryptoLevel
{
public static void main(String[] args)
throws NoSuchFieldException, ClassNotFoundException,
IllegalAccessException, InvocationTargetException
{
Class<?> cls = null;
Method def = null, exempt = null;
try
{
cls = Class.forName("javax.crypto.JceSecurity");
}
catch (ClassNotFoundException ex)
{
System.err.println("Running a non-Sun JDK.");
System.exit(0);
}
try
{
def = cls.getDeclaredMethod("getDefaultPolicy");
exempt = cls.getDeclaredMethod("getExemptPolicy");
}
catch (NoSuchMethodException ex)
{
System.err.println("Running IcedTea with the original crypto patch.");
System.exit(0);
}
def.setAccessible(true);
exempt.setAccessible(true);
PermissionCollection defPerms = (PermissionCollection) def.invoke(null);
PermissionCollection exemptPerms = (PermissionCollection) exempt.invoke(null);
Class<?> apCls = Class.forName("javax.crypto.CryptoAllPermission");
Field apField = apCls.getDeclaredField("INSTANCE");
apField.setAccessible(true);
Permission allPerms = (Permission) apField.get(null);
if (defPerms.implies(allPerms) && (exemptPerms == null || exemptPerms.implies(allPerms)))
{
System.err.println("Running with the unlimited policy.");
System.exit(0);
}
else
{
System.err.println("WARNING: Running with a restricted crypto policy.");
System.exit(-1);
}
}
}

49
TestECDSA.java Normal file
View File

@ -0,0 +1,49 @@
/* TestECDSA -- Ensure ECDSA signatures are working.
Copyright (C) 2016 Red Hat, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import java.math.BigInteger;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.Signature;
/**
* @test
*/
public class TestECDSA {
public static void main(String[] args) throws Exception {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
KeyPair key = keyGen.generateKeyPair();
byte[] data = "This is a string to sign".getBytes("UTF-8");
Signature dsa = Signature.getInstance("NONEwithECDSA");
dsa.initSign(key.getPrivate());
dsa.update(data);
byte[] sig = dsa.sign();
System.out.println("Signature: " + new BigInteger(1, sig).toString(16));
Signature dsaCheck = Signature.getInstance("NONEwithECDSA");
dsaCheck.initVerify(key.getPublic());
dsaCheck.update(data);
boolean success = dsaCheck.verify(sig);
if (!success) {
throw new RuntimeException("Test failed. Signature verification error");
}
System.out.println("Test passed.");
}
}

19
add-version-txt.patch Normal file
View File

@ -0,0 +1,19 @@
From c03172e8b0e4ccca42fdf6a3accdb8b7a4422a8e Mon Sep 17 00:00:00 2001
Date: Mon, 8 Nov 2021 17:32:55 +0800
Subject: [PATCH] [Huawei] add .gitignore and version.txt
---
version.txt | 1 +
1 files changed, 1 insertions(+)
create mode 100644 version.txt
diff --git a/version.txt b/version.txt
new file mode 100644
index 000000000..b717bafbe
--- /dev/null
+++ b/version.txt
@@ -0,0 +1 @@
+17.0.3.0.13
--
2.19.0

View File

@ -0,0 +1,45 @@
From f03f70daa59157adcab807b393db21d57da33e23 Mon Sep 17 00:00:00 2001
Date: Tue, 26 Oct 2021 15:49:42 +0800
Subject: [PATCH] downgrade the glibc symver of log2f & posix_spawn
---
src/hotspot/share/opto/parse2.cpp | 8 ++++++++
src/java.base/unix/native/libjava/ProcessImpl_md.c | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/src/hotspot/share/opto/parse2.cpp b/src/hotspot/share/opto/parse2.cpp
index becd187a5..9bbcb0cb8 100644
--- a/src/hotspot/share/opto/parse2.cpp
+++ b/src/hotspot/share/opto/parse2.cpp
@@ -45,6 +45,14 @@
#include "runtime/deoptimization.hpp"
#include "runtime/sharedRuntime.hpp"
+#ifdef AARCH64
+ __asm__(".symver log2f,log2f@GLIBC_2.17");
+#endif
+
+#ifdef AMD64
+ __asm__(".symver log2f,log2f@GLIBC_2.2.5");
+#endif
+
#ifndef PRODUCT
extern int explicit_null_checks_inserted,
explicit_null_checks_elided;
diff --git a/src/java.base/unix/native/libjava/ProcessImpl_md.c b/src/java.base/unix/native/libjava/ProcessImpl_md.c
index 3854f36da..26cf41cbb 100644
--- a/src/java.base/unix/native/libjava/ProcessImpl_md.c
+++ b/src/java.base/unix/native/libjava/ProcessImpl_md.c
@@ -48,6 +48,10 @@
#include "childproc.h"
+#if defined(amd64)
+ __asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2.5");
+#endif
+
/*
*
* When starting a child on Unix, we need to do three things:
--
2.19.0

View File

@ -0,0 +1,94 @@
From 2e5e3cc58933e166cba5a3f0e3c59d0ca3849196 Mon Sep 17 00:00:00 2001
Date: Thu, 24 Mar 2022 11:12:46 +0800
Subject: [PATCH] downgrade the glibc symver of memcpy
---
make/common/NativeCompilation.gmk | 9 +++++++++
make/hotspot/lib/CompileJvm.gmk | 8 ++++++++
src/hotspot/share/runtime/memcpy.cpp | 20 ++++++++++++++++++++
.../linux/native/applauncher/LinuxPackage.c | 3 +++
4 files changed, 40 insertions(+)
create mode 100644 src/hotspot/share/runtime/memcpy.cpp
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
index 1e2b170..4f22e2d 100644
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -1102,6 +1102,15 @@ define SetupNativeCompilationBody
endif
endif
+ # if ldflags contain --wrap=memcpy, add memcpy.o to OBJS
+ ifneq ($$(findstring wrap=memcpy, $$($1_LDFLAGS)$$($1_EXTRA_LDFLAGS)),)
+ ifeq ($$(findstring memcpy$(OBJ_SUFFIX), $$($1_ALL_OBJS)),)
+ $$($1_BUILD_INFO):
+ $(ECHO) 'Adding $(SUPPORT_OUTPUTDIR)/memcpy/memcpy$(OBJ_SUFFIX) to $1_ALL_OBJS'
+ $1_ALL_OBJS += $(SUPPORT_OUTPUTDIR)/memcpy/memcpy$(OBJ_SUFFIX)
+ endif
+ endif
+
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
$$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk
index 65edd04..d5b689e 100644
--- a/make/hotspot/lib/CompileJvm.gmk
+++ b/make/hotspot/lib/CompileJvm.gmk
@@ -167,6 +167,14 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
PRECOMPILED_HEADER_EXCLUDE := $(JVM_PRECOMPILED_HEADER_EXCLUDE), \
))
+MEMCPY_OBJECT_FILE := $(JVM_OUTPUTDIR)/objs/memcpy$(OBJ_SUFFIX)
+
+$(eval $(call SetupCopyFiles, COPY_MEMCPY_OBJECT_FILE, \
+ DEST := $(SUPPORT_OUTPUTDIR)/memcpy, \
+ FILES :=$(MEMCPY_OBJECT_FILE), \
+))
+TARGETS += $(COPY_MEMCPY_OBJECT_FILE)
+
# Always recompile abstract_vm_version.cpp if libjvm needs to be relinked. This ensures
# that the internal vm version is updated as it relies on __DATE__ and __TIME__
# macros.
diff --git a/src/hotspot/share/runtime/memcpy.cpp b/src/hotspot/share/runtime/memcpy.cpp
new file mode 100644
index 0000000..6ab4ddb
--- /dev/null
+++ b/src/hotspot/share/runtime/memcpy.cpp
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2018-2021. All rights reserved.
+ */
+
+#if defined( __GNUC__ ) && \
+(__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+#include <string.h>
+
+#if (defined AMD64) || (defined amd64)
+/* some systems do not have newest memcpy@@GLIBC_2.14 - stay with old good one */
+asm (".symver memcpy, memcpy@GLIBC_2.2.5");
+
+extern "C"{
+ void *__wrap_memcpy(void *dest, const void *src, size_t n)
+ {
+ return memcpy(dest, src, n);
+ }
+}
+#endif
+#endif
diff --git a/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c b/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c
index 5e3ef36..55a7e9c 100644
--- a/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c
+++ b/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c
@@ -33,6 +33,9 @@
#include "JvmLauncher.h"
#include "LinuxPackage.h"
+#if (defined AMD64) || (defined amd64)
+__asm__(".symver memcpy, memcpy@GLIBC_2.2.5");
+#endif
static char* getModulePath(void) {
char modulePath[PATH_MAX] = { 0 };
--
1.8.3.1

156
generate_source_tarball.sh Normal file
View File

@ -0,0 +1,156 @@
#!/bin/bash
# Generates the 'source tarball' for JDK projects.
#
# Example:
# When used from local repo set REPO_ROOT pointing to file:// with your repo
# If your local repo follows upstream forests conventions, it may be enough to set OPENJDK_URL
# If you want to use a local copy of patch PR3788, set the path to it in the PR3788 variable
#
# In any case you have to set PROJECT_NAME REPO_NAME and VERSION. eg:
# PROJECT_NAME=jdk
# REPO_NAME=jdk
# VERSION=tip
# or to eg prepare systemtap:
# icedtea7's jstack and other tapsets
# VERSION=6327cf1cea9e
# REPO_NAME=icedtea7-2.6
# PROJECT_NAME=release
# OPENJDK_URL=http://icedtea.classpath.org/hg/
# TO_COMPRESS="*/tapset"
#
# They are used to create correct name and are used in construction of sources url (unless REPO_ROOT is set)
# This script creates a single source tarball out of the repository
# based on the given tag and removes code not allowed. For
# consistency, the source tarball will always contain 'openjdk' as the top
# level folder, name is created, based on parameter
#
if [ ! "x$PR3788" = "x" ] ; then
if [ ! -f "$PR3788" ] ; then
echo "You have specified PR3788 as $PR3788 but it does not exist. Exiting"
exit 1
fi
fi
set -e
OPENJDK_URL_DEFAULT=http://hg.openjdk.java.net
COMPRESSION_DEFAULT=xz
if [ "x$1" = "xhelp" ] ; then
echo -e "Behaviour may be specified by setting the following variables:\n"
echo "VERSION - the version of the specified OpenJDK project"
echo "PROJECT_NAME -- the name of the OpenJDK project being archived (optional; only needed by defaults)"
echo "REPO_NAME - the name of the OpenJDK repository (optional; only needed by defaults)"
echo "OPENJDK_URL - the URL to retrieve code from (optional; defaults to ${OPENJDK_URL_DEFAULT})"
echo "COMPRESSION - the compression type to use (optional; defaults to ${COMPRESSION_DEFAULT})"
echo "FILE_NAME_ROOT - name of the archive, minus extensions (optional; defaults to PROJECT_NAME-REPO_NAME-VERSION)"
echo "TO_COMPRESS - what part of clone to pack (default is openjdk)"
echo "PR3788 - the path to the PR3788 patch to apply (optional; downloaded if unavailable)"
exit 1;
fi
if [ "x$VERSION" = "x" ] ; then
echo "No VERSION specified"
exit -2
fi
echo "Version: ${VERSION}"
# REPO_NAME is only needed when we default on REPO_ROOT and FILE_NAME_ROOT
if [ "x$FILE_NAME_ROOT" = "x" -o "x$REPO_ROOT" = "x" ] ; then
if [ "x$PROJECT_NAME" = "x" ] ; then
echo "No PROJECT_NAME specified"
exit -1
fi
echo "Project name: ${PROJECT_NAME}"
if [ "x$REPO_NAME" = "x" ] ; then
echo "No REPO_NAME specified"
exit -3
fi
echo "Repository name: ${REPO_NAME}"
fi
if [ "x$OPENJDK_URL" = "x" ] ; then
OPENJDK_URL=${OPENJDK_URL_DEFAULT}
echo "No OpenJDK URL specified; defaulting to ${OPENJDK_URL}"
else
echo "OpenJDK URL: ${OPENJDK_URL}"
fi
if [ "x$COMPRESSION" = "x" ] ; then
# rhel 5 needs tar.gz
COMPRESSION=${COMPRESSION_DEFAULT}
fi
echo "Creating a tar.${COMPRESSION} archive"
if [ "x$FILE_NAME_ROOT" = "x" ] ; then
FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
echo "No file name root specified; default to ${FILE_NAME_ROOT}"
fi
if [ "x$REPO_ROOT" = "x" ] ; then
REPO_ROOT="${OPENJDK_URL}/${PROJECT_NAME}/${REPO_NAME}"
echo "No repository root specified; default to ${REPO_ROOT}"
fi;
if [ "x$TO_COMPRESS" = "x" ] ; then
TO_COMPRESS="openjdk"
echo "No to be compressed targets specified, ; default to ${TO_COMPRESS}"
fi;
if [ -d ${FILE_NAME_ROOT} ] ; then
echo "exists exists exists exists exists exists exists "
echo "reusing reusing reusing reusing reusing reusing "
echo ${FILE_NAME_ROOT}
else
mkdir "${FILE_NAME_ROOT}"
pushd "${FILE_NAME_ROOT}"
echo "Cloning ${VERSION} root repository from ${REPO_ROOT}"
hg clone ${REPO_ROOT} openjdk -r ${VERSION}
popd
fi
pushd "${FILE_NAME_ROOT}"
if [ -d openjdk/src ]; then
pushd openjdk
echo "Removing EC source code we don't build"
CRYPTO_PATH=src/jdk.crypto.ec/share/native/libsunec/impl
rm -vf ${CRYPTO_PATH}/ec2.h
rm -vf ${CRYPTO_PATH}/ec2_163.c
rm -vf ${CRYPTO_PATH}/ec2_193.c
rm -vf ${CRYPTO_PATH}/ec2_233.c
rm -vf ${CRYPTO_PATH}/ec2_aff.c
rm -vf ${CRYPTO_PATH}/ec2_mont.c
rm -vf ${CRYPTO_PATH}/ecp_192.c
rm -vf ${CRYPTO_PATH}/ecp_224.c
echo "Syncing EC list with NSS"
if [ "x$PR3788" = "x" ] ; then
# originally for 8:
# get PR3788.patch (from http://icedtea.classpath.org/hg/icedtea14) from most correct tag
# Do not push it or publish it (see https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3788)
echo "PR3788 not found. Downloading..."
wget http://icedtea.classpath.org/hg/icedtea14/raw-file/fabce78297b7/patches/pr3788.patch
echo "Applying ${PWD}/pr3788.patch"
patch -Np1 < pr3788.patch
rm pr3788.patch
else
echo "Applying ${PR3788}"
patch -Np1 < $PR3788
fi;
find . -name '*.orig' -exec rm -vf '{}' ';'
popd
fi
echo "Compressing remaining forest"
if [ "X$COMPRESSION" = "Xxz" ] ; then
SWITCH=cJf
else
SWITCH=czf
fi
tar --exclude-vcs -$SWITCH ${FILE_NAME_ROOT}.tar.${COMPRESSION} $TO_COMPRESS
mv ${FILE_NAME_ROOT}.tar.${COMPRESSION} ..
popd
echo "Done. You may want to remove the uncompressed version - $FILE_NAME_ROOT."

10
jconsole.desktop.in Normal file
View File

@ -0,0 +1,10 @@
[Desktop Entry]
Name=OpenJDK @JAVA_MAJOR_VERSION@ Monitoring & Management Console @ARCH@
Comment=Monitor and manage OpenJDK @JAVA_MAJOR_VERSION@ applications for @ARCH@
Exec=@JAVA_HOME@/jconsole
Icon=java-@JAVA_MAJOR_VERSION@-@JAVA_VENDOR@
Terminal=false
Type=Application
StartupWMClass=sun-tools-jconsole-JConsole
Categories=Development;Profiling;Java;
Version=1.0

Binary file not shown.

5
nss.cfg.in Normal file
View File

@ -0,0 +1,5 @@
name = NSS
nssLibraryDirectory = @NSS_LIBDIR@
nssDbMode = noDb
attributes = compatibility
handleStartupErrors = ignoreMultipleInitialisation

1763
openjdk-17.spec Normal file

File diff suppressed because it is too large Load Diff

5
openjdk-17.yaml Normal file
View File

@ -0,0 +1,5 @@
---
version_control: git
src_repo: https://github.com/openjdk/jdk17u
tag_prefix: jdk-
seperator: "."

View File

@ -0,0 +1,87 @@
# HG changeset patch
# User andrew
# Date 1478057514 0
# Node ID 1c4d5cb2096ae55106111da200b0bcad304f650c
# Parent 3d53f19b48384e5252f4ec8891f7a3a82d77af2a
diff -r 3d53f19b4838 -r 1c4d5cb2096a src/java.base/share/classes/java/security/Security.java
--- a/src/java.base/share/classes/java/security/Security.java Wed Oct 26 03:51:39 2016 +0100
+++ b/src/java.base/share/classes/java/security/Security.java Wed Nov 02 03:31:54 2016 +0000
@@ -43,6 +43,9 @@
* implementation-specific location, which is typically the properties file
* {@code conf/security/java.security} in the Java installation directory.
*
+ * <p>Additional default values of security properties are read from a
+ * system-specific location, if available.</p>
+ *
* @author Benjamin Renaud
* @since 1.1
*/
@@ -52,6 +55,10 @@
private static final Debug sdebug =
Debug.getInstance("properties");
+ /* System property file*/
+ private static final String SYSTEM_PROPERTIES =
+ "/etc/crypto-policies/back-ends/java.config";
+
/* The java.security properties */
private static Properties props;
@@ -93,6 +100,7 @@
if (sdebug != null) {
sdebug.println("reading security properties file: " +
propFile);
+ sdebug.println(props.toString());
}
} catch (IOException e) {
if (sdebug != null) {
@@ -114,6 +122,31 @@
}
if ("true".equalsIgnoreCase(props.getProperty
+ ("security.useSystemPropertiesFile"))) {
+
+ // now load the system file, if it exists, so its values
+ // will win if they conflict with the earlier values
+ try (BufferedInputStream bis =
+ new BufferedInputStream(new FileInputStream(SYSTEM_PROPERTIES))) {
+ props.load(bis);
+ loadedProps = true;
+
+ if (sdebug != null) {
+ sdebug.println("reading system security properties file " +
+ SYSTEM_PROPERTIES);
+ sdebug.println(props.toString());
+ }
+ } catch (IOException e) {
+ if (sdebug != null) {
+ sdebug.println
+ ("unable to load security properties from " +
+ SYSTEM_PROPERTIES);
+ e.printStackTrace();
+ }
+ }
+ }
+
+ if ("true".equalsIgnoreCase(props.getProperty
("security.overridePropertiesFile"))) {
String extraPropFile = System.getProperty
diff -r 3d53f19b4838 -r 1c4d5cb2096a src/java.base/share/conf/security/java.security
--- a/src/java.base/share/conf/security/java.security Wed Oct 26 03:51:39 2016 +0100
+++ b/src/java.base/share/conf/security/java.security Wed Nov 02 03:31:54 2016 +0000
@@ -276,6 +276,13 @@
security.overridePropertiesFile=true
#
+# Determines whether this properties file will be appended to
+# using the system properties file stored at
+# /etc/crypto-policies/back-ends/java.config
+#
+security.useSystemPropertiesFile=true
+
+#
# Determines the default key and trust manager factory algorithms for
# the javax.net.ssl package.
#

View File

@ -0,0 +1,16 @@
diff -r 618ad1237e73 src/java.desktop/share/classes/java/awt/Toolkit.java
--- a/src/java.desktop/share/classes/java/awt/Toolkit.java Thu Jun 13 19:37:49 2019 +0200
+++ b/src/java.desktop/share/classes/java/awt/Toolkit.java Thu Jul 04 10:35:42 2019 +0200
@@ -595,7 +595,11 @@
toolkit = new HeadlessToolkit(toolkit);
}
if (!GraphicsEnvironment.isHeadless()) {
- loadAssistiveTechnologies();
+ try {
+ loadAssistiveTechnologies();
+ } catch (AWTError error) {
+ // ignore silently
+ }
}
}
return toolkit;

View File

@ -0,0 +1,12 @@
diff -r e3f940bd3c8f src/java.base/share/conf/security/java.security
--- openjdk/src/java.base/share/conf/security/java.security Thu Jun 11 21:54:51 2020 +0530
+++ openjdk/src/java.base/share/conf/security/java.security Mon Aug 24 10:14:31 2020 +0200
@@ -77,7 +77,7 @@
#ifdef macosx
security.provider.tbd=Apple
#endif
-security.provider.tbd=SunPKCS11
+#security.provider.tbd=SunPKCS11 ${java.home}/lib/security/nss.cfg
#
# A list of preferred providers for specific algorithms. These providers will

View File

@ -0,0 +1,20 @@
--- openjdk/src/java.base/share/conf/security/java.security
+++ openjdk/src/java.base/share/conf/security/java.security
@@ -304,6 +304,8 @@
#
package.access=sun.misc.,\
sun.reflect.,\
+ org.GNOME.Accessibility.,\
+ org.GNOME.Bonobo.,\
#
# List of comma-separated packages that start with or equal this string
@@ -316,6 +318,8 @@
#
package.definition=sun.misc.,\
sun.reflect.,\
+ org.GNOME.Accessibility.,\
+ org.GNOME.Bonobo.,\
#
# Determines whether this properties file can be appended to

View File

@ -0,0 +1,13 @@
--- openjdk/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java 2013-03-01 10:48:12.038189968 +0100
+++ openjdk/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java 2013-03-01 10:48:11.913188505 +0100
@@ -48,8 +48,8 @@
private final static String PROP_NAME = "sun.security.smartcardio.library";
- private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so";
- private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so";
+ private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so.1";
+ private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so.1";
private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC";
PlatformPCSC() {

View File

@ -0,0 +1,19 @@
Remove uses of FAR in jpeg code
Upstream libjpeg-trubo removed the (empty) FAR macro:
http://sourceforge.net/p/libjpeg-turbo/code/1312/
Adjust our code to not use the undefined FAR macro anymore.
diff --git a/jdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c b/jdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c
--- openjdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c
+++ openjdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c
@@ -1385,7 +1385,7 @@
/* and fill it in */
dst_ptr = icc_data;
for (seq_no = first; seq_no < last; seq_no++) {
- JOCTET FAR *src_ptr = icc_markers[seq_no]->data + ICC_OVERHEAD_LEN;
+ JOCTET *src_ptr = icc_markers[seq_no]->data + ICC_OVERHEAD_LEN;
unsigned int length =
icc_markers[seq_no]->data_length - ICC_OVERHEAD_LEN;

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (jdk-updates-jdk16u-jdk-17.0.1+12.tar.gz) = 872cde89ff936fe782b463df500de62a8e3b5d342652106ad590bb9ef669d7f0c3acc68311cbe7231cbc0f916bdb4bd0d61d3cf2dcf39b72ec44ffb4c2ceae48
SHA512 (systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz) = 9f5bbc1a6bf2ee44e4f846b0ef9c1cd93dc9cf01b17b17f31f081229c98222ee92897286a3d57e4b607de1ea4c6edc8d798e0887409ad60713b714daa8f4ee18

Binary file not shown.

69
update_package.sh Normal file
View File

@ -0,0 +1,69 @@
#!/bin/bash -x
# this file contains defaults for currently generated source tarballs
set -e
# TAPSET
export PROJECT_NAME="hg"
export REPO_NAME="icedtea8"
export VERSION="9d464368e06d"
export COMPRESSION=xz
export OPENJDK_URL=http://icedtea.classpath.org
export FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
export TO_COMPRESS="*/tapset"
# warning, filename and filenameroot creation is duplicated here from generate_source_tarball.sh
CLONED_FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION}
TAPSET_VERSION=3.2
TAPSET=systemtap_"$TAPSET_VERSION"_tapsets_$CLONED_FILENAME
if [ ! -f ${TAPSET} ] ; then
if [ ! -f ${CLONED_FILENAME} ] ; then
echo "Generating ${CLONED_FILENAME}"
sh ./generate_source_tarball.sh
else
echo "exists exists exists exists exists exists exists "
echo "reusing reusing reusing reusing reusing reusing "
echo ${CLONED_FILENAME}
fi
mv -v $CLONED_FILENAME $TAPSET
else
echo "exists exists exists exists exists exists exists "
echo "reusing reusing reusing reusing reusing reusing "
echo ${TAPSET}
fi
# OpenJDK from Shenandoah project
export PROJECT_NAME="jdk-updates"
export REPO_NAME="jdk14u"
export VERSION="jdk-14.0.2-ga"
export COMPRESSION=xz
# unset tapsets overrides
export OPENJDK_URL=""
export TO_COMPRESS=""
# warning, filename and filenameroot creation is duplicated here from generate_source_tarball.sh
export FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION}
if [ ! -f ${FILENAME} ] ; then
echo "Generating ${FILENAME}"
sh ./generate_source_tarball.sh
else
echo "exists exists exists exists exists exists exists "
echo "reusing reusing reusing reusing reusing reusing "
echo ${FILENAME}
fi
set +e
major=`echo $REPO_NAME | sed 's/[a-zA-Z]*//g'`
build=`echo $VERSION | sed 's/.*+//g'`
name_helper=`echo $FILENAME | sed s/$major/'%{majorver}'/g `
name_helper=`echo $name_helper | sed s/$build/'%{buildver}'/g `
echo "align specfile acordingly:"
echo " sed 's/^Source0:.*/Source0: $name_helper/' -i *.spec"
echo " sed 's/^Source8:.*/Source8: $TAPSET/' -i *.spec"
echo " sed 's/^%global buildver.*/%global buildver $build/' -i *.spec"
echo " sed 's/Release:.*/Release: 1%{?dist}/' -i *.spec"
echo "and maybe others...."
echo "you should fedpkg/rhpkg new-sources $TAPSET $FILENAME"
echo "you should fedpkg/rhpkg prep --arch XXXX on all architectures: x86_64 i386 i586 i686 ppc ppc64 ppc64le s390 s390x aarch64 armv7hl"