From 2c57e9bb0cc6540004f23d75b63781c2200b4c90 Mon Sep 17 00:00:00 2001 From: kuenking111 Date: Mon, 20 Dec 2021 12:16:45 +0800 Subject: [PATCH 1/3] I4N9PE: add wrap_memcpy to libsaproc --- add-wrap_memcpy-to-libsaproc.patch | 27 +++++++++++++++++++++++++++ openjdk-1.8.0.spec | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 add-wrap_memcpy-to-libsaproc.patch diff --git a/add-wrap_memcpy-to-libsaproc.patch b/add-wrap_memcpy-to-libsaproc.patch new file mode 100755 index 0000000..a4d5204 --- /dev/null +++ b/add-wrap_memcpy-to-libsaproc.patch @@ -0,0 +1,27 @@ +From: zhangyipeng +Date: Thu, 4 Mar 2021 11:10:07 +0800 +Subject: add wrap_memcpy to libsaproc + +--- + hotspot/make/linux/makefiles/saproc.make | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make +index dfeb254da..258585366 100644 +--- a/hotspot/make/linux/makefiles/saproc.make ++++ b/hotspot/make/linux/makefiles/saproc.make +@@ -46,6 +46,11 @@ SASRCFILES = $(SASRCDIR)/salibelf.c \ + $(SASRCDIR)/LinuxDebuggerLocal.c \ + $(AGENT_DIR)/src/share/native/sadis.c + ++# wrap memcpy ++ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86) ++ SASRCFILES += $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp ++endif ++ + -include $(HS_ALT_MAKE)/linux/makefiles/saproc.make + + SAMAPFILE = $(SASRCDIR)/mapfile +-- +2.19.0 + diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 6eaccef..79fc2dc 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 7 +Release: 8 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1124,6 +1124,7 @@ Patch224: G1Ucommit-Refactor-Trigger-mechanism.patch Patch225: G1-Full-GC-parallel-mark.patch Patch226: G1Uncommit-add-G1UncommitLog-limit-before-G1Uncommit.patch Patch227: Delete-expired-certificate-globalsignr2ca.patch +Patch228: add-wrap_memcpy-to-libsaproc.patch # 8u322 @@ -1596,6 +1597,7 @@ pushd %{top_level_dir_name} %patch225 -p1 %patch226 -p1 %patch227 -p1 +%patch228 -p1 popd # System library fixes @@ -2213,6 +2215,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Mon Dec 20 2021 kuenking111 - 1:1.8.0.312-b07.8 +- add wrap_memcpy to libsaproc + * Thu Dec 16 2021 kuenking111 - 1:1.8.0.312-b07.7 - add Delete-expired-certificate-globalsignr2ca.patch -- Gitee From f60435498095fe3c7c1064cd751818654d003f1c Mon Sep 17 00:00:00 2001 From: kuenking111 Date: Mon, 20 Dec 2021 20:27:35 +0800 Subject: [PATCH 2/3] I4N9PR: downgrade the symver of fcntl64 --- downgrade-the-symver-of-fcntl64.patch | 26 ++++++++++++++++++++++++++ openjdk-1.8.0.spec | 7 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 downgrade-the-symver-of-fcntl64.patch diff --git a/downgrade-the-symver-of-fcntl64.patch b/downgrade-the-symver-of-fcntl64.patch new file mode 100755 index 0000000..9d21dad --- /dev/null +++ b/downgrade-the-symver-of-fcntl64.patch @@ -0,0 +1,26 @@ +From: zhangyipeng +Date: Thu, 4 Mar 2021 09:38:42 +0800 + +--- + jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c +index 9b3ff8194..bb9be2ccb 100644 +--- a/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c ++++ b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c +@@ -63,6 +63,11 @@ + #include "sun_nio_ch_FileDispatcherImpl.h" + #include "java_lang_Long.h" + ++#if defined(aarch64) ++ __asm__(".symver fcntl64,fcntl@GLIBC_2.17"); ++#elif defined(amd64) ++ __asm__(".symver fcntl64,fcntl@GLIBC_2.2.5"); ++#endif + static int preCloseFD = -1; /* File descriptor to which we dup other fd's + before closing them for real */ + +-- +2.19.0 + diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 79fc2dc..cfda2a4 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 8 +Release: 9 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1125,6 +1125,7 @@ Patch225: G1-Full-GC-parallel-mark.patch Patch226: G1Uncommit-add-G1UncommitLog-limit-before-G1Uncommit.patch Patch227: Delete-expired-certificate-globalsignr2ca.patch Patch228: add-wrap_memcpy-to-libsaproc.patch +Patch229: downgrade-the-symver-of-fcntl64.patch # 8u322 @@ -1598,6 +1599,7 @@ pushd %{top_level_dir_name} %patch226 -p1 %patch227 -p1 %patch228 -p1 +%patch229 -p1 popd # System library fixes @@ -2215,6 +2217,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Mon Dec 20 2021 kuenking111 - 1:1.8.0.312-b07.9 +- add downgrade-the-symver-of-fcntl64.patch + * Mon Dec 20 2021 kuenking111 - 1:1.8.0.312-b07.8 - add wrap_memcpy to libsaproc -- Gitee From d01fb9e3ce1df9858ede915d570977d382b71860 Mon Sep 17 00:00:00 2001 From: kuenking111 Date: Tue, 21 Dec 2021 14:41:24 +0800 Subject: [PATCH 3/3] I4NGWZ: delete stack protection --- openjdk-1.8.0.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index cfda2a4..ee40fb0 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 9 +Release: 10 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1673,10 +1673,10 @@ export ARCH_DATA_MODEL=64 # We use ourcppflags because the OpenJDK build seems to # pass EXTRA_CFLAGS to the HotSpot C++ compiler... -EXTRA_CFLAGS="%ourcppflags -Wno-error -fcommon -fsigned-char -fstack-protector-all" +EXTRA_CFLAGS="%ourcppflags -Wno-error -fcommon -fsigned-char" EXTRA_CPP_FLAGS="%ourcppflags -Wno-error" -EXTRA_ASFLAGS="${EXTRA_CFLAGS} -Wa,--generate-missing-build-notes=yes -fstack-protector-all" +EXTRA_ASFLAGS="${EXTRA_CFLAGS} -Wa,--generate-missing-build-notes=yes" export EXTRA_CFLAGS EXTRA_ASFLAGS for suffix in %{build_loop} ; do @@ -2217,6 +2217,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Tue Dec 21 2021 kuenking111 - 1:1.8.0.312-b07.10 +- delete stack protection + * Mon Dec 20 2021 kuenking111 - 1:1.8.0.312-b07.9 - add downgrade-the-symver-of-fcntl64.patch -- Gitee