The package rpms/java-1.8.0-openjdk-aarch32.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/java-1.8.0-openjdk-aarch32.git/commi....
Change: -%ifarch %{ix86}
Thanks.
Full change: ============
commit 87957282ec8dfa2dc2faf8b5cd22d01ac4c6ad2e Author: Alex Kashchenko akashche@redhat.com Date: Mon Sep 16 06:28:03 2019 -0400
8u222 update
diff --git a/.gitignore b/.gitignore index 1d7656d..265811f 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz /tapsets-icedtea-3.11.0.tar.xz /aarch32-port-jdk8u-jdk8u212-b04-aarch32-190430.tar.xz +/aarch32-port-jdk8u-jdk8u222-ga-aarch32-190717.tar.xz diff --git a/icedtea_sync.sh b/icedtea_sync.sh new file mode 100755 index 0000000..a9d5881 --- /dev/null +++ b/icedtea_sync.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +# Copyright (C) 2019 Red Hat, Inc. +# Written by Andrew John Hughes gnu.andrew@redhat.com. +# +# 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/. + +ICEDTEA_VERSION=3.11.0 +ICEDTEA_URL=https://icedtea.classpath.org/download/source +ICEDTEA_SIGNING_KEY=CFDA0F9B35964222 + +set -e + +if test "x${WGET}" = "x"; then + WGET=$(which wget); + if test "x${WGET}" = "x"; then + echo "wget not found"; + exit 1; + fi +fi + +if test "x${CHECKSUM}" = "x"; then + CHECKSUM=$(which sha256sum) + if test "x${CHECKSUM}" = "x"; then + echo "sha256sum not found"; + exit 2; + fi +fi + +if test "x${PGP}" = "x"; then + PGP=$(which gpg) + if test "x${PGP}" = "x"; then + echo "gpg not found"; + exit 3; + fi +fi + +if test "x${TAR}" = "x"; then + TAR=$(which tar) + if test "x${TAR}" = "x"; then + echo "tar not found"; + exit 4; + fi +fi + +echo "Dependencies:"; +echo -e "\tWGET: ${WGET}"; +echo -e "\tCHECKSUM: ${CHECKSUM}"; +echo -e "\tPGP: ${PGP}\n"; +echo -e "\tTAR: ${TAR}\n"; + +echo "Checking for IcedTea signing key ${ICEDTEA_SIGNING_KEY}..."; +if ! gpg --list-keys ${ICEDTEA_SIGNING_KEY}; then + echo "IcedTea signing key ${ICEDTEA_SIGNING_KEY} not installed."; + exit 5; +fi + +echo "Downloading IcedTea release tarball..."; +${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz +echo "Downloading IcedTea tarball signature..."; +${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz.sig +echo "Downloading IcedTea tarball checksums..."; +${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.sha256 + +echo "Verifying checksums..."; +${CHECKSUM} --check --ignore-missing icedtea-${ICEDTEA_VERSION}.sha256 + +echo "Checking signature..."; +${PGP} --verify icedtea-${ICEDTEA_VERSION}.tar.xz.sig + +echo "Extracting files..."; +${TAR} xJf icedtea-${ICEDTEA_VERSION}.tar.xz \ + icedtea-${ICEDTEA_VERSION}/tapset \ + icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in \ + icedtea-${ICEDTEA_VERSION}/policytool.desktop.in + +echo "Replacing desktop files..."; +mv -v icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in . +mv -v icedtea-${ICEDTEA_VERSION}/policytool.desktop.in . + +echo "Adding temporary fix to policytool.desktop (PR3718)"; +sed -i 's#Development#Settings#' policytool.desktop.in +echo "Adding temporary fix to policytool.desktop (PR3719)"; +sed -i 's#_BINDIR_#_JREBINDIR_#' policytool.desktop.in + +echo "Creating new tapset tarball..."; +mv -v icedtea-${ICEDTEA_VERSION} openjdk +${TAR} cJf tapsets-icedtea-${ICEDTEA_VERSION}.tar.xz openjdk + +rm -rvf openjdk +rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz +rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz.sig +rm -vf icedtea-${ICEDTEA_VERSION}.sha256 diff --git a/java-1.8.0-openjdk-aarch32.spec b/java-1.8.0-openjdk-aarch32.spec index eec7404..c645dfd 100644 --- a/java-1.8.0-openjdk-aarch32.spec +++ b/java-1.8.0-openjdk-aarch32.spec @@ -76,13 +76,6 @@ %global include_debug_build 0 %endif
-# Shenandoah HotSpot used everywhere, but built only on x86_64 and AArch64 -%ifarch x86_64 %{aarch64} -%global use_shenandoah_hotspot 1 -%else -%global use_shenandoah_hotspot 0 -%endif - %if %{include_debug_build} %global build_loop2 %{debug_suffix} %else @@ -102,11 +95,12 @@ %endif
%if %{bootstrap_build} -%global targets bootcycle-images docs +%global release_targets bootcycle-images zip-docs %else -%global targets all +%global release_targets images zip-docs %endif - +# No docs nor bootcycle for debug builds +%global debug_targets images
# Filter out flags from the optflags macro that cause problems with the OpenJDK build # We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs) @@ -194,8 +188,6 @@ %global archinstall %{_arch} %endif
- - %ifarch %{jit_arches} %global with_systemtap 0 %else @@ -232,20 +224,39 @@ # note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there. %global shenandoah_project aarch64-port %global shenandoah_repo jdk8u-shenandoah -%global shenandoah_revision aarch64-shenandoah-jdk8u212-b04 +%global shenandoah_revision aarch64-shenandoah-jdk8u222-b10 # Define old aarch64/jdk8u tree variables for compatibility %global project aarch32-port %global repo jdk8u -%global revision jdk8u212-b04-aarch32-190430 +%global revision jdk8u222-b10-aarch32-190717 # Define IcedTea version used for SystemTap tapsets and desktop files %global icedteaver 3.11.0
+# e.g. aarch64-shenandoah-jdk8u212-b04-shenandoah-merge-2019-04-30 -> aarch64-shenandoah-jdk8u212-b04 +%global version_tag %(VERSION=%{shenandoah_revision}; echo ${VERSION%%-shenandoah-merge*}) # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) -%global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*}) +%global whole_update %(VERSION=%{version_tag}; echo ${VERSION%%-*}) # eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60 -%global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u} | sed s/-.*//) +%global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u}) # eg jdk8u60-b27 -> b27 -%global buildver %(VERSION=%{revision}; echo ${VERSION##*-}) +%global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-}) +%global rpmrelease 1 +# Define milestone (EA for pre-releases, GA ("fcs") for releases) +# Release will be (where N is usually a number starting at 1): +# - 0.N%%{?extraver}%%{?dist} for EA releases, +# - N%%{?extraver}{?dist} for GA releases +%global is_ga 1 +%if %{is_ga} +%global milestone fcs +%global milestone_version %{nil} +%global extraver %{nil} +%global eaprefix %{nil} +%else +%global milestone ea +%global milestone_version "-ea" +%global extraver .%{milestone} +%global eaprefix 0. +%endif # priority must be 7 digits in total. The expression is workarounding tip %global priority %(TIP=1800%{updatever}; echo ${TIP/tip/999})
@@ -738,6 +749,7 @@ exit 0 %{_jvmdir}/%{jredir -- %{?1}}/lib/jvm.hprof.txt %{_jvmdir}/%{jredir -- %{?1}}/lib/meta-index %{_jvmdir}/%{jredir -- %{?1}}/lib/net.properties +%config(noreplace) %{etcjavadir -- %{?1}}/lib/net.properties %{_jvmdir}/%{jredir -- %{?1}}/lib/psfont.properties.ja %{_jvmdir}/%{jredir -- %{?1}}/lib/psfontj2d.properties %{_jvmdir}/%{jredir -- %{?1}}/lib/resources.jar @@ -911,7 +923,9 @@ Requires: libXcomposite%{?_isa} Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release} OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release} # for java-X-openjdk package's desktop binding +%if 0%{?fedora} || 0%{?rhel} >= 8 Recommends: gtk2%{?_isa} +%endif
#Provides: java-%{javaver}-%{origin} = %{epoch}:%{version}-%{release}
@@ -934,9 +948,6 @@ Requires: javapackages-filesystem Requires: tzdata-java >= 2015d # libsctp.so.1 is being `dlopen`ed on demand Requires: lksctp-tools%{?_isa} -# there is a need to depend on the exact version of NSS -Requires: nss%{?_isa} %{NSS_BUILDTIME_VERSION} -Requires: nss-softokn%{?_isa} %{NSSSOFTOKN_BUILDTIME_VERSION} # tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it, # not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be # considered as regression @@ -949,7 +960,9 @@ Requires(post): %{_sbindir}/alternatives # Postun requires alternatives to uninstall tool alternatives Requires(postun): %{_sbindir}/alternatives # for optional support of kernel stream control, card reader and printing bindings +%if 0%{?fedora} || 0%{?rhel} >= 8 Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa} +%endif
# Standard JPackage base provides #Provides: jre-headless%{?1} = %{epoch}:%{javaver} @@ -1036,7 +1049,7 @@ OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release
Name: java-%{javaver}-%{origin}-aarch32 Version: %{javaver}.%{updatever}.%{buildver} -Release: 2%{?dist} +Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist} # 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 @@ -1048,7 +1061,7 @@ Release: 2%{?dist} # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
Epoch: 1 -Summary: OpenJDK Runtime Environment in a preview of the OpenJDK AArch32 project +Summary: %{origin_nice} Runtime Environment %{majorver} in a preview of the OpenJDK AArch32 project
# HotSpot code is licensed under GPLv2 # JDK library code is licensed under GPLv2 with the Classpath exception @@ -1071,7 +1084,7 @@ URL: http://openjdk.java.net/ # FILE_NAME_ROOT=%%{shenandoah_project}-%%{shenandoah_repo}-${VERSION} # REPO_ROOT=<path to checked-out repository> generate_source_tarball.sh # where the source is obtained from http://hg.openjdk.java.net/%%%7Bproject%7D/%%%7Brepo%7D -Source0: %{project}-%{repo}-%{revision}.tar.xz +Source0: %{project}-%{repo}-jdk8u222-ga-aarch32-190717.tar.xz
# Custom README for -src subpackage Source2: README.md @@ -1146,27 +1159,13 @@ Patch523: pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_ # PR3083, RH1346460: Regression in SSL debug output without an ECC provider Patch528: pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch # RH1566890: CVE-2018-3639 -Patch529: rh1566890_speculative_store_bypass_so_added_more_per_task_speculation_control_CVE_2018_3639.patch +Patch529: rh1566890-CVE_2018_3639-speculative_store_bypass.patch +Patch531: rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch # PR3601: Fix additional -Wreturn-type issues introduced by 8061651 Patch530: pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch -# Support for building the SunEC provider with the system NSS installation -# PR1983: Support using the system installation of NSS with the SunEC provider -# PR2127: SunEC provider crashes when built using system NSS -# PR2815: Race condition in SunEC provider with system NSS -# PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed -# PR2934: SunEC provider throwing KeyException with current NSS -# PR3479, RH1486025: ECC and NSS JVM crash -Patch513: pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk8.patch -Patch514: pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_root8.patch -Patch515: pr2127-sunec_provider_crashes_when_built_using_system_nss_thus_use_of_nss_memory_management_functions.patch -Patch516: pr2815-race_condition_in_sunec_provider_with_system_nss_fix.patch -Patch517: pr2899-dont_use_withseed_versions_of_nss_functions_as_they_dont_fully_process_the_seed.patch -Patch518: pr2934-sunec_provider_throwing_keyexception_withine.separator_current_nss_thus_initialise_the_random_number_generator_and_feed_the_seed_to_it.patch -Patch519: pr3479-rh1486025-sunec_provider_can_have_multiple_instances_leading_to_premature_nss_shutdown.patch # PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts) -Patch539: pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch # PR3575, RH1567204: System cacerts database handling should not affect jssecacerts -Patch540: pr3575-rh1567204-system_cacerts_database_handling_no_longer_affect_jssecacerts.patch +Patch539: pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch # PR3183, RH1340845: Support Fedora/RHEL8 system crypto policy Patch300: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch # PR3655: Allow use of system crypto policy to be disabled by the user @@ -1208,10 +1207,6 @@ Patch107: s390-8214206_fix.patch Patch502: pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch # S8154313: Generated javadoc scattered all over the place Patch400: jdk8154313-generated_javadoc_scattered_all_over_the_place.patch -# 8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode -Patch563: jdk8171000-pr3542-rh1402819-robot_createScreenCapture_crashes_in_wayland_mode.patch -# 8197546, PR3542, RH1402819: Fix for 8171000 breaks Solaris + Linux builds -Patch564: jdk8197546-pr3542-rh1402819-fix_for_8171000_breaks_solaris_linux_builds.patch # PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code Patch571: jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch # 8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers @@ -1220,8 +1215,6 @@ Patch573: jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_h Patch574: jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch # 8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8 Patch575: jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch -# 8064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning -Patch576: jdk8064786-pr3599-fix_debug_build_after_8062808_Turn_on_the_wreturn_type_warning.patch # 8062808, PR3548: Turn on the -Wreturn-type warning Patch577: jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch # s390: JDK-8203030, Type fixing for s390 @@ -1232,17 +1225,10 @@ Patch202: jdk8035341-allow_using_system_installed_libpng.patch Patch203: jdk8042159-allow_using_system_installed_lcms2.patch # 8210761: libjsig is being compiled without optimization Patch620: jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch -# 8210416: [linux] Poor StrictMath performance due to non-optimized compilation -Patch622: jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch -# 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization -# Upstream 8u part. -Patch623: jdk8210425-rh1632174-01-compile_with_o2_and_ffp_contract_off_as_for_fdlibm.patch -# 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization -# Aarch64-port 8u local part -Patch624: jdk8210425-rh1632174-02-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_aarch64.patch -# 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization -# Zero part of the fix for (arm/s390 arches) -Patch625: jdk8210425-rh1632174-03-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_zero.patch +# JDK-8223219: Backport of JDK-8199552 to OpenJDK 8 leads to duplicate -fstack-protector flags, +# overriding --with-extra-cflags +Patch626: jdk8223219-fstack-protector-root.patch +Patch627: jdk8223219-fstack-protector-hotspot.patch
############################################# # @@ -1273,8 +1259,6 @@ Patch201: jdk8043805-allow_using_system_installed_libjpeg.patch # and should be upstreamed to the appropriate # trees. ############################################# -# PR3634: Shenandoah still broken on s390 with aarch64-shenandoah-jdk8u181-b16 -Patch582: pr3634-fix_shenandoah_for_size_t_on_s390.patch
############################################# # @@ -1298,19 +1282,20 @@ BuildRequires: cups-devel BuildRequires: desktop-file-utils # elfutils only are OK for build without AOT BuildRequires: elfutils-devel -BuildRequires: fontconfig +BuildRequires: fontconfig-devel BuildRequires: freetype-devel BuildRequires: giflib-devel BuildRequires: gcc-c++ BuildRequires: gdb -BuildRequires: gtk2-devel BuildRequires: lcms2-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libxslt BuildRequires: libX11-devel +BuildRequires: libXext-devel BuildRequires: libXi-devel BuildRequires: libXinerama-devel +BuildRequires: libXrender-devel BuildRequires: libXt-devel BuildRequires: libXtst-devel # Requirements for setting up the nss.cfg @@ -1334,8 +1319,6 @@ BuildRequires: libffi-devel BuildRequires: tzdata-java >= 2015d # Earlier versions have a bug in tree vectorization on PPC BuildRequires: gcc >= 4.8.3-8 -# Build requirements for SunEC system NSS support -BuildRequires: nss-softokn-freebl-devel >= 3.16.1
%if %{with_systemtap} BuildRequires: systemtap-sdt-devel @@ -1450,6 +1433,7 @@ The java-%{origin}-src-slowdebug sub-package contains the complete %{origin_nice %package javadoc Summary: %{origin_nice} %{majorver} API documentation Requires: javapackages-filesystem +Obsoletes: javadoc-slowdebug < 1:1.8.0.222.b10-1 BuildArch: noarch
%{java_javadoc_rpo %{nil}} @@ -1460,41 +1444,17 @@ The %{origin_nice} %{majorver} API documentation.
%if %{include_normal_build} %package javadoc-zip -Summary: %{origin_nice} %{majorver} API documentation compressed in single archive +Summary: %{origin_nice} %{majorver} API documentation compressed in a single archive Requires: javapackages-filesystem +Obsoletes: javadoc-zip-slowdebug < 1:1.8.0.222.b10-1 BuildArch: noarch
%{java_javadoc_rpo %{nil}}
%description javadoc-zip -The %{origin_nice} %{majorver} API documentation compressed in single archive. +The %{origin_nice} %{majorver} API documentation compressed in a single archive. %endif
-%if %{include_debug_build} -%package javadoc-slowdebug -Summary: %{origin_nice} %{majorver} API documentation %{for_debug} -Requires: javapackages-filesystem -BuildArch: noarch - -%{java_javadoc_rpo -- %{debug_suffix_unquoted}} - -%description javadoc-slowdebug -The %{origin_nice} %{majorver} API documentation %{for_debug}. -%endif - -%if %{include_debug_build} -%package javadoc-zip-slowdebug -Summary: %{origin_nice} %{majorver} API documentation compressed in single archive %{for_debug} -Requires: javapackages-filesystem -BuildArch: noarch - -%{java_javadoc_rpo -- %{debug_suffix_unquoted}} - -%description javadoc-zip-slowdebug -The %{origin_nice} %{majorver} API documentation compressed in single archive %{for_debug}. -%endif - - %if %{include_normal_build} %package accessibility Summary: %{origin_nice} %{majorver} accessibility connector @@ -1576,6 +1536,10 @@ if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then echo "You have disabled both include_debug_build and include_normal_build. That is a no go." exit 13 fi + +echo "Update version: %{updatever}" +echo "Build number: %{buildver}" +echo "Milestone: %{milestone}" %setup -q -c -n %{uniquesuffix ""} -T -a 0 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084 prioritylength=`expr length %{priority}` @@ -1628,37 +1592,26 @@ sh %{SOURCE12} %patch502 %patch504 %patch512 -%patch513 -%patch514 -%patch515 -%patch516 -%patch517 -%patch518 -%patch519 %patch400 %patch523 %patch528 %patch529 +%patch531 %patch530 -%patch563 -%patch564 %patch571 %patch573 %patch574 %patch575 -%patch576 %patch577 %patch620 -#%patch622 -%patch623 -#%patch624 -%patch625 +%patch626 +#%patch627 %patch110
# RPM-only fixes %patch525 %patch539 -%patch540 +%patch1000
# RHEL-only patches %if ! 0%{?fedora} && 0%{?rhel} <= 7 @@ -1666,9 +1619,6 @@ sh %{SOURCE12} %endif
# Shenandoah patches -#%patch582 - -%patch1000
# Extract systemtap tapsets %if %{with_systemtap} @@ -1736,9 +1686,8 @@ export CFLAGS="$CFLAGS -mieee"
# We use ourcppflags because the OpenJDK build seems to # pass EXTRA_CFLAGS to the HotSpot C++ compiler... -# Explicitly set the C++ standard as the default has changed on GCC >= 6 -EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse" -EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse" +EXTRA_CFLAGS="%ourcppflags -Wno-error" +EXTRA_CPP_FLAGS="%ourcppflags" # Fixes annocheck warnings in assembler files due to missing build notes EXTRA_CPP_FLAGS="$EXTRA_CPP_FLAGS -Wa,--generate-missing-build-notes=yes" EXTRA_CFLAGS="$EXTRA_CFLAGS -Wa,--generate-missing-build-notes=yes" @@ -1767,44 +1716,40 @@ top_dir_abs_path=$(pwd)/%{top_level_dir_name} mkdir -p %{buildoutputdir -- $suffix} pushd %{buildoutputdir -- $suffix}
-NSS_LIBS="%{NSS_LIBS} -lfreebl" \ -NSS_CFLAGS="%{NSS_CFLAGS}" \ bash ../../configure \ --with-jvm-variants=client \ --with-native-debug-symbols=internal \ - --with-milestone="fcs" \ + --with-milestone=%{milestone} \ --with-update-version=%{updatever} \ --with-build-number=%{buildver} \ --with-boot-jdk=$(echo /usr/lib/jvm/java-1.8.0-openjdk-aarch32-*) \ --with-debug-level=$debugbuild \ --enable-unlimited-crypto \ - --enable-system-nss \ --with-zlib=system \ --with-libjpeg=system \ --with-giflib=system \ --with-libpng=system \ --with-lcms=system \ --with-stdc++lib=dynamic \ -%ifarch %{ix86} - --with-extra-cxxflags="-mstackrealign $EXTRA_CPP_FLAGS" \ - --with-extra-cflags="-mstackrealign $EXTRA_CFLAGS" \ -%else --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \ --with-extra-cflags="$EXTRA_CFLAGS" \ -%endif --with-extra-ldflags="%{ourldflags}" \ --with-num-cores="$NUM_PROC"
cat spec.gmk cat hotspot-spec.gmk
+# Debug builds don't need same targets as release for +# build speed-up +maketargets="%{release_targets}" +if echo $debugbuild | grep -q "debug" ; then + maketargets="%{debug_targets}" +fi make \ JAVAC_FLAGS=-g \ LOG=trace \ SCTP_WERROR= \ - %{targets} || ( pwd; find $top_dir_abs_path -name "hs_err_pid*.log" | xargs cat && false ) - -make zip-docs + $maketargets || ( pwd; find $top_dir_abs_path -name "hs_err_pid*.log" | xargs cat && false )
# the build (erroneously) removes read permissions from some jars # this is a regression in OpenJDK 7 (our compiler): @@ -2004,12 +1949,13 @@ mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/clien
popd
- +if ! echo $suffix | grep -q "debug" ; then # Install Javadoc documentation install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir} cp -a %{buildoutputdir -- $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix} -built_doc_archive=`echo "jdk-%{javaver}_%{updatever}$suffix-%{buildver}-docs.zip" | sed s/slowdebug/debug/` + built_doc_archive=`echo "jdk-%{javaver}_%{updatever}%{milestone_version}$suffix-%{buildver}-docs.zip" | sed s/slowdebug/debug/` cp -a %{buildoutputdir -- $suffix}/bundles/$built_doc_archive $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip +fi
# Install icons and menu entries for s in 16 24 32 48 ; do @@ -2169,7 +2115,7 @@ touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/securi # moving config files to /etc mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib/security/policy/unlimited/ mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib/security/policy/limited/ -for file in lib/security/cacerts lib/security/policy/unlimited/US_export_policy.jar lib/security/policy/unlimited/local_policy.jar lib/security/policy/limited/US_export_policy.jar lib/security/policy/limited/local_policy.jar lib/security/java.policy lib/security/java.security lib/security/blacklisted.certs lib/logging.properties lib/calendars.properties lib/security/nss.cfg ; do +for file in lib/security/cacerts lib/security/policy/unlimited/US_export_policy.jar lib/security/policy/unlimited/local_policy.jar lib/security/policy/limited/US_export_policy.jar lib/security/policy/limited/local_policy.jar lib/security/java.policy lib/security/java.security lib/security/blacklisted.certs lib/logging.properties lib/calendars.properties lib/security/nss.cfg lib/net.properties ; do mv $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/$file $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/$file ln -sf %{etcjavadir -- $suffix}/$file $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/$file done @@ -2289,17 +2235,6 @@ require "copy_jdk_configs.lua" %posttrans devel-slowdebug %{posttrans_devel -- %{debug_suffix_unquoted}}
-%post javadoc-slowdebug -%{post_javadoc -- %{debug_suffix_unquoted}} - -%postun javadoc-slowdebug -%{postun_javadoc -- %{debug_suffix_unquoted}} - -%post javadoc-zip-slowdebug -%{post_javadoc_zip -- %{debug_suffix_unquoted}} - -%postun javadoc-zip-slowdebug -%{postun_javadoc_zip -- %{debug_suffix_unquoted}} %endif
%if %{include_normal_build} @@ -2363,12 +2298,6 @@ require "copy_jdk_configs.lua" %files src-slowdebug %{files_src -- %{debug_suffix_unquoted}}
-%files javadoc-slowdebug -%{files_javadoc -- %{debug_suffix_unquoted}} - -%files javadoc-zip-slowdebug -%{files_javadoc_zip -- %{debug_suffix_unquoted}} - %files accessibility-slowdebug %{files_accessibility -- %{debug_suffix_unquoted}}
@@ -2380,6 +2309,10 @@ require "copy_jdk_configs.lua" %endif
%changelog +* Wed Sep 11 2019 Alex Kashchenko akashche@redhat.com - 1:1.8.0.222.b10-1 +- update sources to 8u221 +- sync with mainline package + * Thu Jul 25 2019 Fedora Release Engineering releng@fedoraproject.org - 1:1.8.0.212.190430-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
diff --git a/java-1.8.0-openjdk-remove-intree-libraries.sh b/java-1.8.0-openjdk-remove-intree-libraries.sh index b52d016..201a220 100644 --- a/java-1.8.0-openjdk-remove-intree-libraries.sh +++ b/java-1.8.0-openjdk-remove-intree-libraries.sh @@ -129,10 +129,3 @@ rm -vf ${LCMS_SRC}/lcms2.h rm -vf ${LCMS_SRC}/lcms2_internal.h rm -vf ${LCMS_SRC}/lcms2_plugin.h fi - -# Get rid of in-tree SunEC until RH1656676 is implemented -echo "Removing SunEC native code" -mv -v openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h . -rm -vrf openjdk/jdk/src/share/native/sun/security/ec/impl -mkdir openjdk/jdk/src/share/native/sun/security/ec/impl -mv -v ecc_impl.h openjdk/jdk/src/share/native/sun/security/ec/impl diff --git a/jconsole.desktop.in b/jconsole.desktop.in index a8917c1..b88bd7c 100644 --- a/jconsole.desktop.in +++ b/jconsole.desktop.in @@ -1,8 +1,8 @@ [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@ +Name=OpenJDK @OPENJDK_VER@ for @target_cpu@ Monitoring & Management Console +Comment=Monitor and manage OpenJDK applications +Exec=_BINDIR_/jconsole +Icon=java-@JAVA_VER@-@JAVA_VENDOR@ Terminal=false Type=Application StartupWMClass=sun-tools-jconsole-JConsole diff --git a/jdk8064786-pr3599-fix_debug_build_after_8062808_Turn_on_the_wreturn_type_warning.patch b/jdk8064786-pr3599-fix_debug_build_after_8062808_Turn_on_the_wreturn_type_warning.patch deleted file mode 100644 index 790ee0d..0000000 --- a/jdk8064786-pr3599-fix_debug_build_after_8062808_Turn_on_the_wreturn_type_warning.patch +++ /dev/null @@ -1,28 +0,0 @@ -# HG changeset patch -# User goetz -# Date 1415873641 -3600 -# Thu Nov 13 11:14:01 2014 +0100 -# Node ID 1878c4c1d04e1f3c6f67a19d36c35863d6b5f906 -# Parent 533473c67de6ff767710594639033c8e83523fe5 -8064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning -Reviewed-by: stefank, tschatzl - -diff --git openjdk.orig/hotspot/src/share/vm/prims/jni.cpp openjdk/hotspot/src/share/vm/prims/jni.cpp ---- openjdk.orig/hotspot/src/share/vm/prims/jni.cpp -+++ openjdk/hotspot/src/share/vm/prims/jni.cpp -@@ -708,6 +708,7 @@ - - THROW_OOP_(JNIHandles::resolve(obj), JNI_OK); - ShouldNotReachHere(); -+ return 0; // Mute compiler. - JNI_END - - #ifndef USDT2 -@@ -734,6 +735,7 @@ - Handle protection_domain (THREAD, k->protection_domain()); - THROW_MSG_LOADER_(name, (char *)message, class_loader, protection_domain, JNI_OK); - ShouldNotReachHere(); -+ return 0; // Mute compiler. - JNI_END - - diff --git a/jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_headers.patch b/jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_headers.patch index f1e3215..c9ef36b 100644 --- a/jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_headers.patch +++ b/jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_headers.patch @@ -34,9 +34,9 @@ diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hots + -Wno-format-nonliteral -Wno-format-security \ + -Wno-maybe-uninitialized
- # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized - OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -@@ -42,5 +49,3 @@ + # If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to + # the compiler so as to be able to produce optimized objects +@@ -48,5 +55,3 @@ ifeq ($(ARCH_DATA_MODEL), 64) CFLAGS += -D_LP64=1 endif diff --git a/jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch b/jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch index b0a88ea..792b04a 100644 --- a/jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch +++ b/jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch @@ -8,6 +8,7 @@ Reviewed-by: dholmes, coleenp
diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make +diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make --- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make +++ openjdk/hotspot/make/linux/makefiles/zeroshark.make @@ -1,5 +1,5 @@ @@ -27,8 +28,8 @@ diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hots - -Wno-format-nonliteral -Wno-format-security \ - -Wno-maybe-uninitialized
- # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized - OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) + # If FDLIBM_CFLAGS is non-empty it holds CFLAGS needed to be passed to + # the compiler so as to be able to produce optimized objects diff --git openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp --- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -60,7 +61,7 @@ diff --git openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp openjdk/h switch (type) { case T_VOID: ftype = &ffi_type_void; -diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp +diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp --- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp +++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp @@ -1,6 +1,6 @@ diff --git a/jdk8171000-pr3542-rh1402819-robot_createScreenCapture_crashes_in_wayland_mode.patch b/jdk8171000-pr3542-rh1402819-robot_createScreenCapture_crashes_in_wayland_mode.patch deleted file mode 100644 index d831aa9..0000000 --- a/jdk8171000-pr3542-rh1402819-robot_createScreenCapture_crashes_in_wayland_mode.patch +++ /dev/null @@ -1,121 +0,0 @@ -# HG changeset patch -# User kaddepalli -# Date 1517818481 -19800 -# Mon Feb 05 13:44:41 2018 +0530 -# Node ID b77308735540644d4710244e3c88865067f2905a -# Parent 39bfc94b1f4265b645c2970a58389acc779dafe9 -8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode -Reviewed-by: serb, mhalder - -diff --git openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c openjdk/jdk/src/solaris/native/sun/awt/multiVis.c ---- openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c -+++ openjdk/jdk/src/solaris/native/sun/awt/multiVis.c -@@ -394,77 +394,48 @@ - XRectangle bbox; /* bounding box of grabbed area */ - list_ptr regions;/* list of regions to read from */ - { -- image_region_type *reg; -- int32_t dst_x, dst_y; /* where in pixmap to write (UL) */ -- int32_t diff; -- -- XImage *reg_image,*ximage ; -- int32_t srcRect_x,srcRect_y,srcRect_width,srcRect_height ; -- int32_t rem ; -- int32_t bytes_per_line; -- int32_t bitmap_unit; -- -- bitmap_unit = sizeof (long); -- if (format == ZPixmap) -- bytes_per_line = width*depth/8; -- else -- bytes_per_line = width/8; -- -- -- /* Find out how many more bytes are required for padding so that -- ** bytes per scan line will be multiples of bitmap_unit bits */ -- if (format == ZPixmap) { -- rem = (bytes_per_line*8)%bitmap_unit; -- if (rem) -- bytes_per_line += (rem/8 + 1); -- } -+ XImage *ximage ; - - ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL, - (uint32_t)width,(uint32_t)height,8,0); - -- bytes_per_line = ximage->bytes_per_line; -- -- if (format == ZPixmap) -- ximage->data = malloc(height*bytes_per_line); -- else -- ximage->data = malloc(height*bytes_per_line*depth); -- -+ ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char)); - ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/ - -- for (reg = (image_region_type *) first_in_list( regions); reg; -+ for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg; - reg = (image_region_type *) next_in_list( regions)) - { -- int32_t rect; -- struct my_XRegion *vis_reg; -- vis_reg = (struct my_XRegion *)(reg->visible_region); -- for (rect = 0; -- rect < vis_reg->numRects; -- rect++) -+ struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region); -+ for (int32_t rect = 0; rect < vis_reg->numRects; rect++) - { -- /** ------------------------------------------------------------------------ -- Intersect bbox with visible part of region giving src rect & output -- location. Width is the min right side minus the max left side. -- Similar for height. Offset src rect so x,y are relative to -- origin of win, not the root-relative visible rect of win. -- ------------------------------------------------------------------------ **/ -- srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x) -- - MAX( vis_reg->rects[rect].x1, bbox.x); -+ /** ------------------------------------------------------------------------ -+ Intersect bbox with visible part of region giving src rect & output -+ location. Width is the min right side minus the max left side. -+ Similar for height. Offset src rect so x,y are relative to -+ origin of win, not the root-relative visible rect of win. -+ ------------------------------------------------------------------------ **/ -+ int32_t srcRect_width = MIN( vis_reg->rects[rect].x2, bbox.width + bbox.x) -+ - MAX( vis_reg->rects[rect].x1, bbox.x); -+ -+ int32_t srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y) -+ - MAX( vis_reg->rects[rect].y1, bbox.y); - -- srcRect_height = MIN( vis_reg->rects[rect].y2, bbox.height + bbox.y) -- - MAX( vis_reg->rects[rect].y1, bbox.y); -+ int32_t diff = bbox.x - vis_reg->rects[rect].x1; -+ int32_t srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border); -+ int32_t dst_x = MAX( 0, -diff) ; - -- diff = bbox.x - vis_reg->rects[rect].x1; -- srcRect_x = MAX( 0, diff) + (vis_reg->rects[rect].x1 - reg->x_rootrel - reg->border); -- dst_x = MAX( 0, -diff) ; -- diff = bbox.y - vis_reg->rects[rect].y1; -- srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border); -- dst_y = MAX( 0, -diff) ; -- reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y, -- (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ; -- TransferImage(disp,reg_image,srcRect_width, -- srcRect_height,reg,ximage,dst_x,dst_y) ; -- XDestroyImage(reg_image); -- } -+ diff = bbox.y - vis_reg->rects[rect].y1; -+ int32_t srcRect_y = MAX( 0, diff) + (vis_reg->rects[rect].y1 - reg->y_rootrel - reg->border); -+ int32_t dst_y = MAX( 0, -diff) ; -+ XImage* reg_image = XGetImage(disp,reg->win,srcRect_x,srcRect_y, -+ (uint32_t) srcRect_width, (uint32_t) srcRect_height,AllPlanes,format) ; -+ -+ if (reg_image) { -+ TransferImage(disp,reg_image,srcRect_width, -+ srcRect_height,reg,ximage,dst_x,dst_y) ; -+ XDestroyImage(reg_image); -+ } -+ } - } - return ximage ; - } diff --git a/jdk8197546-pr3542-rh1402819-fix_for_8171000_breaks_solaris_linux_builds.patch b/jdk8197546-pr3542-rh1402819-fix_for_8171000_breaks_solaris_linux_builds.patch deleted file mode 100644 index ba712ad..0000000 --- a/jdk8197546-pr3542-rh1402819-fix_for_8171000_breaks_solaris_linux_builds.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User prr -# Date 1518454604 28800 -# Mon Feb 12 08:56:44 2018 -0800 -# Node ID 556adf3a76aa81bf3918d7d46554dae7cc1d5c5c -# Parent b77308735540644d4710244e3c88865067f2905a -8197546: Fix for 8171000 breaks Solaris + Linux builds -Reviewed-by: serb, jdv - -diff --git openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c openjdk/jdk/src/solaris/native/sun/awt/multiVis.c ---- openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c -+++ openjdk/jdk/src/solaris/native/sun/awt/multiVis.c -@@ -395,6 +395,8 @@ - list_ptr regions;/* list of regions to read from */ - { - XImage *ximage ; -+ image_region_type* reg; -+ int32_t rect; - - ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL, - (uint32_t)width,(uint32_t)height,8,0); -@@ -402,11 +404,11 @@ - ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char)); - ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/ - -- for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg; -+ for (reg = (image_region_type *) first_in_list( regions); reg; - reg = (image_region_type *) next_in_list( regions)) - { - struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region); -- for (int32_t rect = 0; rect < vis_reg->numRects; rect++) -+ for (rect = 0; rect < vis_reg->numRects; rect++) - { - /** ------------------------------------------------------------------------ - Intersect bbox with visible part of region giving src rect & output diff --git a/jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch b/jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch index 6e0d762..843158e 100644 --- a/jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch +++ b/jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch @@ -1,5 +1,5 @@ -diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @@ -2659,7 +2659,7 @@ if (ResizeOldPLAB && CMSOldPLABResizeQuicker) { @@ -10,8 +10,8 @@ diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeL } assert(n_blks > 0, "Error"); _cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl); -diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -957,7 +957,7 @@ if (free_percentage < desired_free_percentage) { @@ -40,10 +40,10 @@ diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSw // Do not give up existing stack until we have managed to // get the double capacity that we desired. ReservedSpace rs(ReservedSpace::allocation_align_size_up( -diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm/gc_implementation/g1/concurrentMark.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp -@@ -3903,7 +3903,7 @@ +@@ -3902,7 +3902,7 @@ // of things to do) or totally (at the very end). size_t target_size; if (partially) { @@ -52,7 +52,7 @@ diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm } else { target_size = 0; } -@@ -4707,7 +4707,7 @@ +@@ -4706,7 +4706,7 @@ // The > 0 check is to deal with the prev and next live bytes which // could be 0. if (*hum_bytes > 0) { @@ -61,10 +61,10 @@ diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm *hum_bytes -= bytes; } return bytes; -diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp -@@ -1726,7 +1726,7 @@ +@@ -1729,7 +1729,7 @@
verify_region_sets_optional();
@@ -73,8 +73,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/v ergo_verbose1(ErgoHeapSizing, "attempt heap expansion", ergo_format_reason("allocation request failed") -diff --git a/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp b/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp @@ -117,7 +117,7 @@ return reserved_size() - committed_size(); @@ -85,8 +85,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp b/src return (addr - _low_boundary) / _page_size; }
-diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp b/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp @@ -38,7 +38,7 @@ _cancel(false), @@ -97,8 +97,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp b/src/shar _queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC); for (size_t i = 0; i < _nqueues; i++) { new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size); -diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp b/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp @@ -120,7 +120,7 @@ }; @@ -109,8 +109,8 @@ diff --git a/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp b/src/shar _max_list_length(0), _cached(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)), _overflowed(PaddedArray<G1StringDedupEntryList, mtGC>::create_unfreeable((uint)_nlists)) { -diff --git a/src/share/vm/gc_implementation/g1/heapRegion.cpp b/src/share/vm/gc_implementation/g1/heapRegion.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -109,7 +109,7 @@ if (FLAG_IS_DEFAULT(G1HeapRegionSize)) { @@ -121,8 +121,8 @@ diff --git a/src/share/vm/gc_implementation/g1/heapRegion.cpp b/src/share/vm/gc_ }
int region_size_log = log2_long((jlong) region_size); -diff --git a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @@ -194,7 +194,7 @@ const size_t num_overflow_elems = of_stack->size(); @@ -133,8 +133,8 @@ diff --git a/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/src/sh num_overflow_elems); // Transfer the most recent num_take_elems from the overflow // stack to our work queue. -diff --git a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp @@ -910,8 +910,8 @@ void PSParallelCompact::initialize_dead_wood_limiter() @@ -147,8 +147,8 @@ diff --git a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.c _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); DEBUG_ONLY(_dwl_initialized = true;) _dwl_adjustment = normal_distribution(1.0); -diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp ---- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +diff --git openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp +++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp @@ -385,7 +385,7 @@ uintx calculated_size = NewSize + OldSize; @@ -207,10 +207,10 @@ diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/colle _initial_gen1_size = OldSize;
// If the user has explicitly set an OldSize that is inconsistent -diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.cpp ---- openjdk/hotspot/src/share/vm/memory/metaspace.cpp +diff --git openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp openjdk/hotspot/src/share/vm/memory/metaspace.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/metaspace.cpp +++ openjdk/hotspot/src/share/vm/memory/metaspace.cpp -@@ -1455,7 +1455,7 @@ +@@ -1482,7 +1482,7 @@
void MetaspaceGC::post_initialize() { // Reset the high-water mark once the VM initialization is done. @@ -219,8 +219,8 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c }
bool MetaspaceGC::can_expand(size_t word_size, bool is_class) { -@@ -1515,7 +1515,7 @@ - (size_t)MIN2(min_tmp, double(max_uintx)); +@@ -1542,7 +1542,7 @@ + (size_t)MIN2(min_tmp, double(MaxMetaspaceSize)); // Don't shrink less than the initial generation size minimum_desired_capacity = MAX2(minimum_desired_capacity, - MetaspaceSize); @@ -228,16 +228,16 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c
if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: "); -@@ -1573,7 +1573,7 @@ +@@ -1600,7 +1600,7 @@ const double max_tmp = used_after_gc / minimum_used_percentage; - size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx)); + size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(MaxMetaspaceSize)); maximum_desired_capacity = MAX2(maximum_desired_capacity, - MetaspaceSize); + (size_t)MetaspaceSize); if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr(" " " maximum_free_percentage: %6.2f" -@@ -3285,7 +3285,7 @@ +@@ -3361,7 +3361,7 @@ // on the medium chunk list. The next chunk will be small and progress // from there. This size calculated by -version. _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6, @@ -246,10 +246,10 @@ diff --git a/src/share/vm/memory/metaspace.cpp b/src/share/vm/memory/metaspace.c _first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size); // Arbitrarily set the initial virtual space to a multiple // of the boot class loader size. -diff --git a/src/share/vm/memory/threadLocalAllocBuffer.cpp b/src/share/vm/memory/threadLocalAllocBuffer.cpp ---- openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp +diff --git openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp +++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp -@@ -238,13 +238,13 @@ +@@ -250,13 +250,13 @@ size_t init_sz = 0;
if (TLABSize > 0) { @@ -266,8 +266,8 @@ diff --git a/src/share/vm/memory/threadLocalAllocBuffer.cpp b/src/share/vm/memor init_sz = align_object_size(init_sz); } init_sz = MIN2(MAX2(init_sz, min_size()), max_size()); -diff --git a/src/share/vm/oops/objArrayKlass.inline.hpp b/src/share/vm/oops/objArrayKlass.inline.hpp ---- openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp +diff --git openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp +--- openjdk.orig/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp +++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp @@ -48,7 +48,7 @@ const size_t beg_index = size_t(index); @@ -287,10 +287,10 @@ diff --git a/src/share/vm/oops/objArrayKlass.inline.hpp b/src/share/vm/oops/objA const size_t end_index = beg_index + stride; T* const base = (T*)a->base(); T* const beg = base + beg_index; -diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp ---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp +diff --git openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp +++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp -@@ -1283,7 +1283,7 @@ +@@ -1289,7 +1289,7 @@ // NewSize was set on the command line and it is larger than // preferred_max_new_size. if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line @@ -299,7 +299,7 @@ diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments } else { FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size); } -@@ -1308,8 +1308,8 @@ +@@ -1314,8 +1314,8 @@ // Unless explicitly requested otherwise, make young gen // at least min_new, and at most preferred_max_new_size. if (FLAG_IS_DEFAULT(NewSize)) { @@ -310,7 +310,7 @@ diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments if (PrintGCDetails && Verbose) { // Too early to use gclog_or_tty tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize); -@@ -1319,7 +1319,7 @@ +@@ -1325,7 +1325,7 @@ // so it's NewRatio x of NewSize. if (FLAG_IS_DEFAULT(OldSize)) { if (max_heap > NewSize) { diff --git a/jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch b/jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch deleted file mode 100644 index 98bbad0..0000000 --- a/jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git openjdk.orig/jdk/make/lib/CoreLibraries.gmk openjdk/jdk/make/lib/CoreLibraries.gmk ---- openjdk.orig/jdk/make/lib/CoreLibraries.gmk -+++ openjdk/jdk/make/lib/CoreLibraries.gmk -@@ -37,21 +37,32 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) - endif - - ifeq ($(OPENJDK_TARGET_OS), linux) -- ifeq ($(OPENJDK_TARGET_CPU), ppc64) -- BUILD_LIBFDLIBM_OPTIMIZATION := HIGH -- else ifeq ($(OPENJDK_TARGET_CPU), ppc64le) -- BUILD_LIBFDLIBM_OPTIMIZATION := HIGH -- else ifeq ($(OPENJDK_TARGET_CPU), aarch64) -- BUILD_LIBFDLIBM_OPTIMIZATION := HIGH -- endif --endif -- --ifneq ($(OPENJDK_TARGET_OS), macosx) -+ BUILD_LIBFDLIBM_OPTIMIZATION := HIGH -+ LIBFDLIBM_CFLAGS_LINUX := -ffp-contract=off - # Unfortunately, '-ffp-contract' is only available since gcc 4.6. For ppc64le - # that's no problem since ppc64le support only appeared in gcc 4.8.3. But on - # ppc64 (big endian) we traditionally compiled with gcc 4.3 which only knows - # '-mno-fused-madd'. However, that's still not enough to get the float - # computations right - we additionally have to supply '-fno-strict-aliasing'. -+ # -+ # -+ ifeq ($(TOOLCHAIN_TYPE), gcc) -+ CC_VER_MAJOR := $(shell $(CC) -dumpversion | cut -d'.' -f1) -+ CC_VER_MINOR := $(shell $(CC) -dumpversion | cut -d'.' -f2) -+ endif -+ # Only GCC 4.6 and better have machine independent -ffp-contract=off. -+ # For other versions we need to explicitly set arch specific machine -+ # flags or keep optimization off. -+ ifeq "$(shell expr ( $(CC_VER_MAJOR) > 4 ) | ( ( $(CC_VER_MAJOR) = 4 ) & ( $(CC_VER_MINOR) >= 6 ) ))" "0" -+ ifeq ($(OPENJDK_TARGET_CPU), ppc64) -+ LIBFDLIBM_CFLAGS_LINUX := -mno-fused-madd -fno-strict-aliasing -+ else -+ BUILD_LIBFDLIBM_OPTIMIZATION := NONE -+ endif -+ endif -+endif -+ -+ifneq ($(OPENJDK_TARGET_OS), macosx) - $(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \ - STATIC_LIBRARY := fdlibm, \ - OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \ -@@ -62,9 +73,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx) - -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \ - CFLAGS_windows_debug := -DLOGGING, \ - CFLAGS_aix := -qfloat=nomaf, \ -- CFLAGS_linux_ppc64 := -mno-fused-madd -fno-strict-aliasing, \ -- CFLAGS_linux_ppc64le := -ffp-contract=off, \ -- CFLAGS_linux_aarch64 := -ffp-contract=off, \ -+ CFLAGS_linux := $(LIBFDLIBM_CFLAGS_LINUX), \ - ARFLAGS := $(ARFLAGS), \ - OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \ - DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) diff --git a/jdk8210425-rh1632174-01-compile_with_o2_and_ffp_contract_off_as_for_fdlibm.patch b/jdk8210425-rh1632174-01-compile_with_o2_and_ffp_contract_off_as_for_fdlibm.patch deleted file mode 100644 index 0b05ba6..0000000 --- a/jdk8210425-rh1632174-01-compile_with_o2_and_ffp_contract_off_as_for_fdlibm.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff --git openjdk.orig/hotspot/make/linux/makefiles/amd64.make openjdk/hotspot/make/linux/makefiles/amd64.make ---- openjdk.orig/hotspot/make/linux/makefiles/amd64.make -+++ openjdk/hotspot/make/linux/makefiles/amd64.make -@@ -22,10 +22,13 @@ - # - # - --# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized --OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) --# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized --OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+ifeq ($(OPT_CFLAGS_NO_FMA),) -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+else -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+endif - # Must also specify if CPU is little endian - CFLAGS += -DVM_LITTLE_ENDIAN - -diff --git openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make ---- openjdk.orig/hotspot/make/linux/makefiles/gcc.make -+++ openjdk/hotspot/make/linux/makefiles/gcc.make -@@ -225,6 +225,16 @@ - OPT_CFLAGS/SIZE=-Os - OPT_CFLAGS/SPEED=-O3 - -+ifeq ($(USE_CLANG),) -+ # Only GCC 4.6 and better have machine independent -ffp-contract=off. -+ # For other versions we need to explicitly set arch specific machine -+ # flags or keep optimization off for them. -+ ifeq "$(shell expr ( $(CC_VER_MAJOR) > 4 ) | ( ( $(CC_VER_MAJOR) = 4 ) & ( $(CC_VER_MINOR) >= 6 ) ))" "1" -+ OPT_CFLAGS_NO_FMA = -ffp-contract=off -+ endif -+endif -+ -+ - # Hotspot uses very unstrict aliasing turn this optimization off - # This option is added to CFLAGS rather than OPT_CFLAGS - # so that OPT_CFLAGS overrides get this option too. -diff --git openjdk.orig/hotspot/make/linux/makefiles/i486.make openjdk/hotspot/make/linux/makefiles/i486.make ---- openjdk.orig/hotspot/make/linux/makefiles/i486.make -+++ openjdk/hotspot/make/linux/makefiles/i486.make -@@ -24,10 +24,13 @@ - - # TLS helper, assembled from .s file - --# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized --OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) --# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized --OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+ifeq ($(OPT_CFLAGS_NO_FMA),) -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+else -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+endif - # Must also specify if CPU is little endian - CFLAGS += -DVM_LITTLE_ENDIAN - -diff --git openjdk.orig/hotspot/make/linux/makefiles/ppc64.make openjdk/hotspot/make/linux/makefiles/ppc64.make ---- openjdk.orig/hotspot/make/linux/makefiles/ppc64.make -+++ openjdk/hotspot/make/linux/makefiles/ppc64.make -@@ -49,3 +49,17 @@ - # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI. - CFLAGS += -mcpu=power7 -mtune=power8 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string - endif -+ -+ifeq ($(OPT_CFLAGS_NO_FMA),) -+ ifeq ($(OPENJDK_TARGET_CPU_ENDIAN),big) -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) -mno-fused-madd -fno-strict-aliasing -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) -mno-fused-madd -fno-strict-aliasing -+ else -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+ endif -+else -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+endif -+ diff --git a/jdk8210425-rh1632174-02-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_aarch64.patch b/jdk8210425-rh1632174-02-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_aarch64.patch deleted file mode 100644 index cf1b40b..0000000 --- a/jdk8210425-rh1632174-02-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_aarch64.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git openjdk.orig/hotspot/make/linux/makefiles/aarch64.make openjdk/hotspot/make/linux/makefiles/aarch64.make -index 3d17326..7cdb498 100644 ---- openjdk.orig/hotspot/make/linux/makefiles/aarch64.make -+++ openjdk/hotspot/make/linux/makefiles/aarch64.make -@@ -22,10 +22,13 @@ - # - # - --# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized --OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) --# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized --OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+ifeq ($(OPT_CFLAGS_NO_FMA),) -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+else -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+endif - # Must also specify if CPU is little endian - CFLAGS += -DVM_LITTLE_ENDIAN - diff --git a/jdk8210425-rh1632174-03-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_zero.patch b/jdk8210425-rh1632174-03-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_zero.patch deleted file mode 100644 index 6c1ebad..0000000 --- a/jdk8210425-rh1632174-03-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_zero.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- openjdk/hotspot/make/linux/makefiles/zeroshark.make -+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make -@@ -30,10 +30,13 @@ ifeq ($(USE_CLANG), true) - WARNING_FLAGS += -Wno-undef - endif - --# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized --OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) --# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized --OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+ifeq ($(OPT_CFLAGS_NO_FMA),) -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) -+else -+ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+ OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA) -+endif - - # Specify that the CPU is little endian, if necessary - ifeq ($(ZERO_ENDIANNESS), little) diff --git a/jdk8223219-fstack-protector-hotspot.patch b/jdk8223219-fstack-protector-hotspot.patch new file mode 100644 index 0000000..ec69944 --- /dev/null +++ b/jdk8223219-fstack-protector-hotspot.patch @@ -0,0 +1,35 @@ +diff --git openjdk.orig/hotspot/make/bsd/makefiles/gcc.make openjdk/hotspot/make/bsd/makefiles/gcc.make +--- openjdk.orig/hotspot/make/bsd/makefiles/gcc.make ++++ openjdk/hotspot/make/bsd/makefiles/gcc.make +@@ -190,7 +190,7 @@ + CFLAGS += -fno-exceptions + ifeq ($(USE_CLANG),) + CFLAGS += -pthread +- CFLAGS += -fcheck-new -fstack-protector ++ CFLAGS += -fcheck-new + # version 4 and above support fvisibility=hidden (matches jni_x86.h file) + # except 4.1.2 gives pointless warnings that can't be disabled (afaik) + ifneq "$(shell expr ( $(CC_VER_MAJOR) > 4 ) | ( ( $(CC_VER_MAJOR) = 4 ) & ( $(CC_VER_MINOR) >= 3 ) ))" "0" +diff --git openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make ++++ openjdk/hotspot/make/linux/makefiles/gcc.make +@@ -150,7 +150,7 @@ + CFLAGS += -fno-exceptions + CFLAGS += -D_REENTRANT + ifeq ($(USE_CLANG),) +- CFLAGS += -fcheck-new -fstack-protector ++ CFLAGS += -fcheck-new + # version 4 and above support fvisibility=hidden (matches jni_x86.h file) + # except 4.1.2 gives pointless warnings that can't be disabled (afaik) + ifneq "$(shell expr ( $(CC_VER_MAJOR) > 4 ) | ( ( $(CC_VER_MAJOR) = 4 ) & ( $(CC_VER_MINOR) >= 3 ) ))" "0" +diff --git openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make +--- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make ++++ openjdk/hotspot/make/solaris/makefiles/gcc.make +@@ -75,7 +75,6 @@ + CFLAGS += -fno-exceptions + CFLAGS += -D_REENTRANT + CFLAGS += -fcheck-new +-CFLAGS += -fstack-protector + + ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) + diff --git a/jdk8223219-fstack-protector-root.patch b/jdk8223219-fstack-protector-root.patch new file mode 100644 index 0000000..a73761c --- /dev/null +++ b/jdk8223219-fstack-protector-root.patch @@ -0,0 +1,33 @@ +diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4 +--- openjdk.orig/common/autoconf/flags.m4 ++++ openjdk/common/autoconf/flags.m4 +@@ -388,16 +388,8 @@ + CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt" + CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt" + elif test "x$TOOLCHAIN_TYPE" = xgcc; then +- case $OPENJDK_TARGET_CPU_ARCH in +- x86 ) +- LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector" +- LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector" +- ;; +- x86_64 ) +- LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector" +- LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector" +- ;; +- esac ++ LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector" ++ LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector" + if test "x$OPENJDK_TARGET_OS" != xmacosx; then + LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,relro" + LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS -Wl,-z,relro" +@@ -464,10 +456,6 @@ + ppc ) + # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing + ;; +- x86 ) +- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer -fstack-protector" +- CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing -fstack-protector" +- ;; + * ) + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" + CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" diff --git a/policytool.desktop.in b/policytool.desktop.in index e38c0ec..112a24f 100644 --- a/policytool.desktop.in +++ b/policytool.desktop.in @@ -1,8 +1,8 @@ [Desktop Entry] -Name=OpenJDK @JAVA_MAJOR_VERSION@ Policy Tool @ARCH@ -Comment=Manage OpenJDK @JAVA_MAJOR_VERSION@ policy files @ARCH@ -Exec=@JRE_HOME@/policytool -Icon=java-@JAVA_MAJOR_VERSION@-@JAVA_VENDOR@ +Name=OpenJDK @OPENJDK_VER@ for @target_cpu@ Policy Tool +Comment=Manage OpenJDK policy files +Exec=_JREBINDIR_/policytool +Icon=java-@JAVA_VER@-@JAVA_VENDOR@ Terminal=false Type=Application StartupWMClass=sun-security-tools-PolicyTool diff --git a/pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk8.patch b/pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk8.patch deleted file mode 100644 index 31c285b..0000000 --- a/pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk8.patch +++ /dev/null @@ -1,699 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1453863246 0 -# Wed Jan 27 02:54:06 2016 +0000 -# Node ID 48c15869ecd568263249af4b9a4e98d4e57f9a8f -# Parent afd392dfaed501ac674a7cc3e37353ce300969c7 -PR1983: Support using the system installation of NSS with the SunEC provider -Summary: Apply code changes from PR1699 & PR1742 & forward-port Makefile changes to the new build. -Updated 2017/07/04 to accomodate 8175110 - -diff -r 984a4af2ed4e make/lib/SecurityLibraries.gmk ---- openjdk/jdk/make/lib/SecurityLibraries.gmk -+++ openjdk/jdk/make/lib/SecurityLibraries.gmk -@@ -218,8 +218,17 @@ - - ifeq ($(ENABLE_INTREE_EC), yes) - -- BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \ -+ BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec -+ -+ ifeq ($(USE_EXTERNAL_NSS), true) -+ BUILD_LIBSUNEC_IMPL_DIR := -+ BUILD_LIBSUNEC_FLAGS += $(NSS_CFLAGS) -DSYSTEM_NSS -DNSS_ENABLE_ECC -+ else -+ BUILD_LIBSUNEC_IMPL_DIR := \ -+ $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl -+ BUILD_LIBSUNEC_FLAGS += \ - -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl -+ endif - - # - # On sol-sparc...all libraries are compiled with -xregs=no%appl -@@ -235,8 +244,8 @@ - $(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \ - LIBRARY := sunec, \ - OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ -- SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec \ -- $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \ -+ SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec/ECC_JNI.cpp \ -+ $(BUILD_LIBSUNEC_IMPL_DIR), \ - LANG := C++, \ - OPTIMIZATION := LOW, \ - CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \ -@@ -245,11 +254,12 @@ - CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \ - $(BUILD_LIBSUNEC_FLAGS), \ - MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \ -- LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ -+ LDFLAGS := $(subst -Xlinker --as-needed,, \ -+ $(subst -Wl$(COMMA)--as-needed,, $(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK), \ - LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_SUFFIX := $(LIBCXX), \ -- LDFLAGS_SUFFIX_linux := -lc, \ -- LDFLAGS_SUFFIX_solaris := -lc, \ -+ LDFLAGS_SUFFIX_linux := -lc $(NSS_LIBS), \ -+ LDFLAGS_SUFFIX_solaris := -lc $(NSS_LIBS), \ - VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ - RC_FLAGS := $(RC_FLAGS) \ - -D "JDK_FNAME=sunec.dll" \ -diff -r 984a4af2ed4e src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp -@@ -24,7 +24,7 @@ - */ - - #include <jni.h> --#include "impl/ecc_impl.h" -+#include "ecc_impl.h" - - #define ILLEGAL_STATE_EXCEPTION "java/lang/IllegalStateException" - #define INVALID_ALGORITHM_PARAMETER_EXCEPTION \ -@@ -89,7 +89,7 @@ - */ - JNIEXPORT jobjectArray - JNICALL Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair -- (JNIEnv *env, jclass clazz, jint keySize, jbyteArray encodedParams, jbyteArray seed) -+ (JNIEnv *env, jclass UNUSED(clazz), jint UNUSED(keySize), jbyteArray encodedParams, jbyteArray seed) - { - ECPrivateKey *privKey = NULL; // contains both public and private values - ECParams *ecparams = NULL; -@@ -190,7 +190,7 @@ - */ - JNIEXPORT jbyteArray - JNICALL Java_sun_security_ec_ECDSASignature_signDigest -- (JNIEnv *env, jclass clazz, jbyteArray digest, jbyteArray privateKey, jbyteArray encodedParams, jbyteArray seed, jint timing) -+ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray digest, jbyteArray privateKey, jbyteArray encodedParams, jbyteArray seed, jint timing) - { - jbyte* pDigestBuffer = NULL; - jint jDigestLength = env->GetArrayLength(digest); -@@ -299,7 +299,7 @@ - */ - JNIEXPORT jboolean - JNICALL Java_sun_security_ec_ECDSASignature_verifySignedDigest -- (JNIEnv *env, jclass clazz, jbyteArray signedDigest, jbyteArray digest, jbyteArray publicKey, jbyteArray encodedParams) -+ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray signedDigest, jbyteArray digest, jbyteArray publicKey, jbyteArray encodedParams) - { - jboolean isValid = false; - -@@ -384,7 +384,7 @@ - */ - JNIEXPORT jbyteArray - JNICALL Java_sun_security_ec_ECDHKeyAgreement_deriveKey -- (JNIEnv *env, jclass clazz, jbyteArray privateKey, jbyteArray publicKey, jbyteArray encodedParams) -+ (JNIEnv *env, jclass UNUSED(clazz), jbyteArray privateKey, jbyteArray publicKey, jbyteArray encodedParams) - { - jbyteArray jSecret = NULL; - ECParams *ecparams = NULL; -diff -r 984a4af2ed4e src/share/native/sun/security/ec/ecc_impl.h ---- /dev/null -+++ openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h -@@ -0,0 +1,298 @@ -+/* -+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -+ * Use is subject to license terms. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library 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 -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public License -+ * along with this library; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin Street, 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. -+ */ -+ -+/* ********************************************************************* -+ * -+ * The Original Code is the Netscape security libraries. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1994-2000 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Dr Vipul Gupta vipul.gupta@sun.com and -+ * Douglas Stebila douglas@stebila.ca, Sun Microsystems Laboratories -+ * -+ * Last Modified Date from the Original Code: May 2017 -+ *********************************************************************** */ -+ -+#ifndef _ECC_IMPL_H -+#define _ECC_IMPL_H -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+#include <sys/types.h> -+ -+#ifdef SYSTEM_NSS -+#include <secitem.h> -+#include <secerr.h> -+#include <keythi.h> -+#ifdef LEGACY_NSS -+#include <softoken.h> -+#else -+#include <blapi.h> -+#endif -+#else -+#include "ecl-exp.h" -+#endif -+ -+/* -+ * Multi-platform definitions -+ */ -+#ifdef __linux__ -+#define B_FALSE FALSE -+#define B_TRUE TRUE -+typedef unsigned char uint8_t; -+typedef unsigned long ulong_t; -+typedef enum { B_FALSE, B_TRUE } boolean_t; -+#endif /* __linux__ */ -+ -+#ifdef _ALLBSD_SOURCE -+#include <stdint.h> -+#define B_FALSE FALSE -+#define B_TRUE TRUE -+typedef unsigned long ulong_t; -+typedef enum boolean { B_FALSE, B_TRUE } boolean_t; -+#endif /* _ALLBSD_SOURCE */ -+ -+#ifdef AIX -+#define B_FALSE FALSE -+#define B_TRUE TRUE -+typedef unsigned char uint8_t; -+typedef unsigned long ulong_t; -+#endif /* AIX */ -+ -+#ifdef _WIN32 -+typedef unsigned char uint8_t; -+typedef unsigned long ulong_t; -+typedef enum boolean { B_FALSE, B_TRUE } boolean_t; -+#define strdup _strdup /* Replace POSIX name with ISO C++ name */ -+#endif /* _WIN32 */ -+ -+#ifndef _KERNEL -+#include <stdlib.h> -+#endif /* _KERNEL */ -+ -+#define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */ -+#define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */ -+#define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */ -+#define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */ -+#define EC_MIN_KEY_LEN 112 /* min key length in bits */ -+#define EC_MAX_KEY_LEN 571 /* max key length in bits */ -+#define EC_MAX_OID_LEN 10 /* max length of OID buffer */ -+ -+/* -+ * Various structures and definitions from NSS are here. -+ */ -+ -+#ifndef SYSTEM_NSS -+#ifdef _KERNEL -+#define PORT_ArenaAlloc(a, n, f) kmem_alloc((n), (f)) -+#define PORT_ArenaZAlloc(a, n, f) kmem_zalloc((n), (f)) -+#define PORT_ArenaGrow(a, b, c, d) NULL -+#define PORT_ZAlloc(n, f) kmem_zalloc((n), (f)) -+#define PORT_Alloc(n, f) kmem_alloc((n), (f)) -+#else -+#define PORT_ArenaAlloc(a, n, f) malloc((n)) -+#define PORT_ArenaZAlloc(a, n, f) calloc(1, (n)) -+#define PORT_ArenaGrow(a, b, c, d) NULL -+#define PORT_ZAlloc(n, f) calloc(1, (n)) -+#define PORT_Alloc(n, f) malloc((n)) -+#endif -+ -+#define PORT_NewArena(b) (char *)12345 -+#define PORT_ArenaMark(a) NULL -+#define PORT_ArenaUnmark(a, b) -+#define PORT_ArenaRelease(a, m) -+#define PORT_FreeArena(a, b) -+#define PORT_Strlen(s) strlen((s)) -+#define PORT_SetError(e) -+ -+#define PRBool boolean_t -+#define PR_TRUE B_TRUE -+#define PR_FALSE B_FALSE -+ -+#ifdef _KERNEL -+#define PORT_Assert ASSERT -+#define PORT_Memcpy(t, f, l) bcopy((f), (t), (l)) -+#else -+#define PORT_Assert assert -+#define PORT_Memcpy(t, f, l) memcpy((t), (f), (l)) -+#endif -+ -+#endif -+ -+#define CHECK_OK(func) if (func == NULL) goto cleanup -+#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup -+ -+#ifndef SYSTEM_NSS -+typedef enum { -+ siBuffer = 0, -+ siClearDataBuffer = 1, -+ siCipherDataBuffer = 2, -+ siDERCertBuffer = 3, -+ siEncodedCertBuffer = 4, -+ siDERNameBuffer = 5, -+ siEncodedNameBuffer = 6, -+ siAsciiNameString = 7, -+ siAsciiString = 8, -+ siDEROID = 9, -+ siUnsignedInteger = 10, -+ siUTCTime = 11, -+ siGeneralizedTime = 12 -+} SECItemType; -+ -+typedef struct SECItemStr SECItem; -+ -+struct SECItemStr { -+ SECItemType type; -+ unsigned char *data; -+ unsigned int len; -+}; -+ -+typedef SECItem SECKEYECParams; -+ -+typedef enum { ec_params_explicit, -+ ec_params_named -+} ECParamsType; -+ -+typedef enum { ec_field_GFp = 1, -+ ec_field_GF2m -+} ECFieldType; -+ -+struct ECFieldIDStr { -+ int size; /* field size in bits */ -+ ECFieldType type; -+ union { -+ SECItem prime; /* prime p for (GFp) */ -+ SECItem poly; /* irreducible binary polynomial for (GF2m) */ -+ } u; -+ int k1; /* first coefficient of pentanomial or -+ * the only coefficient of trinomial -+ */ -+ int k2; /* two remaining coefficients of pentanomial */ -+ int k3; -+}; -+typedef struct ECFieldIDStr ECFieldID; -+ -+struct ECCurveStr { -+ SECItem a; /* contains octet stream encoding of -+ * field element (X9.62 section 4.3.3) -+ */ -+ SECItem b; -+ SECItem seed; -+}; -+typedef struct ECCurveStr ECCurve; -+ -+typedef void PRArenaPool; -+ -+struct ECParamsStr { -+ PRArenaPool * arena; -+ ECParamsType type; -+ ECFieldID fieldID; -+ ECCurve curve; -+ SECItem base; -+ SECItem order; -+ int cofactor; -+ SECItem DEREncoding; -+ ECCurveName name; -+ SECItem curveOID; -+}; -+typedef struct ECParamsStr ECParams; -+ -+struct ECPublicKeyStr { -+ ECParams ecParams; -+ SECItem publicValue; /* elliptic curve point encoded as -+ * octet stream. -+ */ -+}; -+typedef struct ECPublicKeyStr ECPublicKey; -+ -+struct ECPrivateKeyStr { -+ ECParams ecParams; -+ SECItem publicValue; /* encoded ec point */ -+ SECItem privateValue; /* private big integer */ -+ SECItem version; /* As per SEC 1, Appendix C, Section C.4 */ -+}; -+typedef struct ECPrivateKeyStr ECPrivateKey; -+ -+typedef enum _SECStatus { -+ SECBufferTooSmall = -3, -+ SECWouldBlock = -2, -+ SECFailure = -1, -+ SECSuccess = 0 -+} SECStatus; -+#endif -+ -+#ifdef _KERNEL -+#define RNG_GenerateGlobalRandomBytes(p,l) ecc_knzero_random_generator((p), (l)) -+#else -+/* -+ This function is no longer required because the random bytes are now -+ supplied by the caller. Force a failure. -+*/ -+#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure -+#endif -+#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup -+#define MP_TO_SEC_ERROR(err) -+ -+#define SECITEM_TO_MPINT(it, mp) \ -+ CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len)) -+ -+extern int ecc_knzero_random_generator(uint8_t *, size_t); -+extern ulong_t soft_nzero_random_generator(uint8_t *, ulong_t); -+ -+#ifdef SYSTEM_NSS -+#define EC_DecodeParams(a,b,c) EC_DecodeParams(a,b) -+#define EC_NewKey(a,b,c,d,e) EC_NewKeyFromSeed(a,b,c,d) -+#define ECDSA_SignDigest(a,b,c,d,e,f,g) ECDSA_SignDigestWithSeed(a,b,c,d,e) -+#define ECDSA_VerifyDigest(a,b,c,d) ECDSA_VerifyDigest(a,b,c) -+#define ECDH_Derive(a,b,c,d,e,f) ECDH_Derive(a,b,c,d,e) -+#else -+extern SECStatus EC_DecodeParams(const SECItem *, ECParams **, int); -+ -+extern SECItem * SECITEM_AllocItem(PRArenaPool *, SECItem *, unsigned int, int); -+extern SECStatus SECITEM_CopyItem(PRArenaPool *, SECItem *, const SECItem *, -+ int); -+extern void SECITEM_FreeItem(SECItem *, boolean_t); -+ -+/* This function has been modified to accept an array of random bytes */ -+extern SECStatus EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey, -+ const unsigned char* random, int randomlen, int); -+/* This function has been modified to accept an array of random bytes */ -+extern SECStatus ECDSA_SignDigest(ECPrivateKey *, SECItem *, const SECItem *, -+ const unsigned char* random, int randomlen, int, int timing); -+extern SECStatus ECDSA_VerifyDigest(ECPublicKey *, const SECItem *, -+ const SECItem *, int); -+extern SECStatus ECDH_Derive(SECItem *, ECParams *, SECItem *, boolean_t, -+ SECItem *, int); -+#endif -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* _ECC_IMPL_H */ -diff -r 984a4af2ed4e src/share/native/sun/security/ec/impl/ecc_impl.h ---- openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h -+++ /dev/null -@@ -1,271 +0,0 @@ --/* -- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. -- * Use is subject to license terms. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 2.1 of the License, or (at your option) any later version. -- * -- * This library 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 -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU Lesser General Public License -- * along with this library; if not, write to the Free Software Foundation, -- * Inc., 51 Franklin Street, 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. -- */ -- --/* ********************************************************************* -- * -- * The Original Code is the Netscape security libraries. -- * -- * The Initial Developer of the Original Code is -- * Netscape Communications Corporation. -- * Portions created by the Initial Developer are Copyright (C) 1994-2000 -- * the Initial Developer. All Rights Reserved. -- * -- * Contributor(s): -- * Dr Vipul Gupta vipul.gupta@sun.com and -- * Douglas Stebila douglas@stebila.ca, Sun Microsystems Laboratories -- * -- * Last Modified Date from the Original Code: May 2017 -- *********************************************************************** */ -- --#ifndef _ECC_IMPL_H --#define _ECC_IMPL_H -- --#ifdef __cplusplus --extern "C" { --#endif -- --#include <sys/types.h> --#include "ecl-exp.h" -- --/* -- * Multi-platform definitions -- */ --#ifdef __linux__ --#define B_FALSE FALSE --#define B_TRUE TRUE --typedef unsigned char uint8_t; --typedef unsigned long ulong_t; --typedef enum { B_FALSE, B_TRUE } boolean_t; --#endif /* __linux__ */ -- --#ifdef _ALLBSD_SOURCE --#include <stdint.h> --#define B_FALSE FALSE --#define B_TRUE TRUE --typedef unsigned long ulong_t; --typedef enum boolean { B_FALSE, B_TRUE } boolean_t; --#endif /* _ALLBSD_SOURCE */ -- --#ifdef AIX --#define B_FALSE FALSE --#define B_TRUE TRUE --typedef unsigned char uint8_t; --typedef unsigned long ulong_t; --#endif /* AIX */ -- --#ifdef _WIN32 --typedef unsigned char uint8_t; --typedef unsigned long ulong_t; --typedef enum boolean { B_FALSE, B_TRUE } boolean_t; --#define strdup _strdup /* Replace POSIX name with ISO C++ name */ --#endif /* _WIN32 */ -- --#ifndef _KERNEL --#include <stdlib.h> --#endif /* _KERNEL */ -- --#define EC_MAX_DIGEST_LEN 1024 /* max digest that can be signed */ --#define EC_MAX_POINT_LEN 145 /* max len of DER encoded Q */ --#define EC_MAX_VALUE_LEN 72 /* max len of ANSI X9.62 private value d */ --#define EC_MAX_SIG_LEN 144 /* max signature len for supported curves */ --#define EC_MIN_KEY_LEN 112 /* min key length in bits */ --#define EC_MAX_KEY_LEN 571 /* max key length in bits */ --#define EC_MAX_OID_LEN 10 /* max length of OID buffer */ -- --/* -- * Various structures and definitions from NSS are here. -- */ -- --#ifdef _KERNEL --#define PORT_ArenaAlloc(a, n, f) kmem_alloc((n), (f)) --#define PORT_ArenaZAlloc(a, n, f) kmem_zalloc((n), (f)) --#define PORT_ArenaGrow(a, b, c, d) NULL --#define PORT_ZAlloc(n, f) kmem_zalloc((n), (f)) --#define PORT_Alloc(n, f) kmem_alloc((n), (f)) --#else --#define PORT_ArenaAlloc(a, n, f) malloc((n)) --#define PORT_ArenaZAlloc(a, n, f) calloc(1, (n)) --#define PORT_ArenaGrow(a, b, c, d) NULL --#define PORT_ZAlloc(n, f) calloc(1, (n)) --#define PORT_Alloc(n, f) malloc((n)) --#endif -- --#define PORT_NewArena(b) (char *)12345 --#define PORT_ArenaMark(a) NULL --#define PORT_ArenaUnmark(a, b) --#define PORT_ArenaRelease(a, m) --#define PORT_FreeArena(a, b) --#define PORT_Strlen(s) strlen((s)) --#define PORT_SetError(e) -- --#define PRBool boolean_t --#define PR_TRUE B_TRUE --#define PR_FALSE B_FALSE -- --#ifdef _KERNEL --#define PORT_Assert ASSERT --#define PORT_Memcpy(t, f, l) bcopy((f), (t), (l)) --#else --#define PORT_Assert assert --#define PORT_Memcpy(t, f, l) memcpy((t), (f), (l)) --#endif -- --#define CHECK_OK(func) if (func == NULL) goto cleanup --#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup -- --typedef enum { -- siBuffer = 0, -- siClearDataBuffer = 1, -- siCipherDataBuffer = 2, -- siDERCertBuffer = 3, -- siEncodedCertBuffer = 4, -- siDERNameBuffer = 5, -- siEncodedNameBuffer = 6, -- siAsciiNameString = 7, -- siAsciiString = 8, -- siDEROID = 9, -- siUnsignedInteger = 10, -- siUTCTime = 11, -- siGeneralizedTime = 12 --} SECItemType; -- --typedef struct SECItemStr SECItem; -- --struct SECItemStr { -- SECItemType type; -- unsigned char *data; -- unsigned int len; --}; -- --typedef SECItem SECKEYECParams; -- --typedef enum { ec_params_explicit, -- ec_params_named --} ECParamsType; -- --typedef enum { ec_field_GFp = 1, -- ec_field_GF2m --} ECFieldType; -- --struct ECFieldIDStr { -- int size; /* field size in bits */ -- ECFieldType type; -- union { -- SECItem prime; /* prime p for (GFp) */ -- SECItem poly; /* irreducible binary polynomial for (GF2m) */ -- } u; -- int k1; /* first coefficient of pentanomial or -- * the only coefficient of trinomial -- */ -- int k2; /* two remaining coefficients of pentanomial */ -- int k3; --}; --typedef struct ECFieldIDStr ECFieldID; -- --struct ECCurveStr { -- SECItem a; /* contains octet stream encoding of -- * field element (X9.62 section 4.3.3) -- */ -- SECItem b; -- SECItem seed; --}; --typedef struct ECCurveStr ECCurve; -- --typedef void PRArenaPool; -- --struct ECParamsStr { -- PRArenaPool * arena; -- ECParamsType type; -- ECFieldID fieldID; -- ECCurve curve; -- SECItem base; -- SECItem order; -- int cofactor; -- SECItem DEREncoding; -- ECCurveName name; -- SECItem curveOID; --}; --typedef struct ECParamsStr ECParams; -- --struct ECPublicKeyStr { -- ECParams ecParams; -- SECItem publicValue; /* elliptic curve point encoded as -- * octet stream. -- */ --}; --typedef struct ECPublicKeyStr ECPublicKey; -- --struct ECPrivateKeyStr { -- ECParams ecParams; -- SECItem publicValue; /* encoded ec point */ -- SECItem privateValue; /* private big integer */ -- SECItem version; /* As per SEC 1, Appendix C, Section C.4 */ --}; --typedef struct ECPrivateKeyStr ECPrivateKey; -- --typedef enum _SECStatus { -- SECBufferTooSmall = -3, -- SECWouldBlock = -2, -- SECFailure = -1, -- SECSuccess = 0 --} SECStatus; -- --#ifdef _KERNEL --#define RNG_GenerateGlobalRandomBytes(p,l) ecc_knzero_random_generator((p), (l)) --#else --/* -- This function is no longer required because the random bytes are now -- supplied by the caller. Force a failure. --*/ --#define RNG_GenerateGlobalRandomBytes(p,l) SECFailure --#endif --#define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup --#define MP_TO_SEC_ERROR(err) -- --#define SECITEM_TO_MPINT(it, mp) \ -- CHECK_MPI_OK(mp_read_unsigned_octets((mp), (it).data, (it).len)) -- --extern int ecc_knzero_random_generator(uint8_t *, size_t); --extern ulong_t soft_nzero_random_generator(uint8_t *, ulong_t); -- --extern SECStatus EC_DecodeParams(const SECItem *, ECParams **, int); --extern SECItem * SECITEM_AllocItem(PRArenaPool *, SECItem *, unsigned int, int); --extern SECStatus SECITEM_CopyItem(PRArenaPool *, SECItem *, const SECItem *, -- int); --extern void SECITEM_FreeItem(SECItem *, boolean_t); --/* This function has been modified to accept an array of random bytes */ --extern SECStatus EC_NewKey(ECParams *ecParams, ECPrivateKey **privKey, -- const unsigned char* random, int randomlen, int); --/* This function has been modified to accept an array of random bytes */ --extern SECStatus ECDSA_SignDigest(ECPrivateKey *, SECItem *, const SECItem *, -- const unsigned char* random, int randomlen, int, int timing); --extern SECStatus ECDSA_VerifyDigest(ECPublicKey *, const SECItem *, -- const SECItem *, int); --extern SECStatus ECDH_Derive(SECItem *, ECParams *, SECItem *, boolean_t, -- SECItem *, int); -- --#ifdef __cplusplus --} --#endif -- --#endif /* _ECC_IMPL_H */ -diff -r 984a4af2ed4e src/solaris/javavm/export/jni_md.h ---- openjdk/jdk/src/solaris/javavm/export/jni_md.h -+++ openjdk/jdk/src/solaris/javavm/export/jni_md.h -@@ -36,6 +36,11 @@ - #define JNIEXPORT - #define JNIIMPORT - #endif -+#if (defined(__GNUC__)) || __has_attribute(unused) -+ #define UNUSED(x) UNUSED_ ## x __attribute__((__unused__)) -+#else -+ #define UNUSED(x) UNUSED_ ## x -+#endif - - #define JNICALL - diff --git a/pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_root8.patch b/pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_root8.patch deleted file mode 100644 index 100472b..0000000 --- a/pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_root8.patch +++ /dev/null @@ -1,89 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1453863007 0 -# Wed Jan 27 02:50:07 2016 +0000 -# Node ID f0635543beb309c4da1bb88c906a76ee4b75e16d -# Parent 4a5a0d4e1ae0feec2f47d17be380d6fcd5eff126 -PR1983: Support using the system installation of NSS with the SunEC provider -Summary: Add new configure option --enable-system-nss - -diff -r 92af9369869f common/autoconf/jdk-options.m4 ---- openjdk/common/autoconf/jdk-options.m4 Thu Jan 21 22:17:02 2016 +0000 -+++ openjdk/common/autoconf/jdk-options.m4 Wed Jan 27 05:32:12 2016 +0000 -@@ -414,9 +414,10 @@ - # - AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], - [ -- AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) -+ AC_REQUIRE([LIB_SETUP_MISC_LIBS]) -+ AC_MSG_CHECKING([if the elliptic curve crypto implementation is present]) - -- if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then -+ if test "x${system_nss}" = "xyes" -o -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then - ENABLE_INTREE_EC=yes - AC_MSG_RESULT([yes]) - else -diff -r 92af9369869f common/autoconf/libraries.m4 ---- openjdk/common/autoconf/libraries.m4 Thu Jan 21 22:17:02 2016 +0000 -+++ openjdk/common/autoconf/libraries.m4 Wed Jan 27 05:32:12 2016 +0000 -@@ -731,6 +731,47 @@ - LIBDL="$LIBS" - AC_SUBST(LIBDL) - LIBS="$save_LIBS" -+ -+ ############################################################################### -+ # -+ # Check for the NSS libraries -+ # -+ -+ AC_MSG_CHECKING([whether to build the Sun EC provider against the system NSS libraries]) -+ -+ # default is bundled -+ DEFAULT_SYSTEM_NSS=no -+ -+ AC_ARG_ENABLE([system-nss], [AS_HELP_STRING([--enable-system-nss], -+ [build the SunEC provider using the system NSS libraries @<:@disabled@:>@])], -+ [ -+ case "${enableval}" in -+ yes) -+ system_nss=yes -+ ;; -+ *) -+ system_nss=no -+ ;; -+ esac -+ ], -+ [ -+ system_nss=${DEFAULT_SYSTEM_NSS} -+ ]) -+ AC_MSG_RESULT([$system_nss]) -+ -+ if test "x${system_nss}" = "xyes"; then -+ PKG_CHECK_MODULES(NSS, nss-softokn >= 3.16.1, [NSS_SOFTOKN_FOUND=yes], [NSS_SOFTOKN_FOUND=no]) -+ if test "x${NSS_SOFTOKN_FOUND}" = "xyes"; then -+ NSS_LIBS="$NSS_LIBS -lfreebl"; -+ USE_EXTERNAL_NSS=true -+ else -+ AC_MSG_ERROR([--enable-system-nss specified, but NSS not found.]) -+ fi -+ else -+ USE_EXTERNAL_NSS=false -+ fi -+ AC_SUBST(USE_EXTERNAL_NSS) -+ - ]) - - AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP], -diff -r 92af9369869f common/autoconf/spec.gmk.in ---- openjdk/common/autoconf/spec.gmk.in Thu Jan 21 22:17:02 2016 +0000 -+++ openjdk/common/autoconf/spec.gmk.in Wed Jan 27 05:32:12 2016 +0000 -@@ -647,6 +647,9 @@ - # Read-only single-machine data - INSTALL_SYSCONFDIR=@sysconfdir@ - -+USE_EXTERNAL_NSS:=@USE_EXTERNAL_NSS@ -+NSS_LIBS:=@NSS_LIBS@ -+NSS_CFLAGS:=@NSS_CFLAGS@ - - #################################################### - # diff --git a/pr2127-sunec_provider_crashes_when_built_using_system_nss_thus_use_of_nss_memory_management_functions.patch b/pr2127-sunec_provider_crashes_when_built_using_system_nss_thus_use_of_nss_memory_management_functions.patch deleted file mode 100644 index b08822a..0000000 --- a/pr2127-sunec_provider_crashes_when_built_using_system_nss_thus_use_of_nss_memory_management_functions.patch +++ /dev/null @@ -1,178 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1453866306 0 -# Wed Jan 27 03:45:06 2016 +0000 -# Node ID 0ff7720931e8dbf7de25720bdc93b18527ab89e8 -# Parent 48c15869ecd568263249af4b9a4e98d4e57f9a8f -PR2127: SunEC provider crashes when built using system NSS -Summary: Use NSS memory management functions - -diff -r 48c15869ecd5 -r 0ff7720931e8 src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 02:54:06 2016 +0000 -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 03:45:06 2016 +0000 -@@ -32,6 +32,13 @@ - #define INVALID_PARAMETER_EXCEPTION \ - "java/security/InvalidParameterException" - #define KEY_EXCEPTION "java/security/KeyException" -+#define INTERNAL_ERROR "java/lang/InternalError" -+ -+#ifdef SYSTEM_NSS -+#define SYSTEM_UNUSED(x) UNUSED(x) -+#else -+#define SYSTEM_UNUSED(x) x -+#endif - - extern "C" { - -@@ -49,8 +56,13 @@ - /* - * Deep free of the ECParams struct - */ --void FreeECParams(ECParams *ecparams, jboolean freeStruct) -+void FreeECParams(ECParams *ecparams, jboolean SYSTEM_UNUSED(freeStruct)) - { -+#ifdef SYSTEM_NSS -+ // Needs to be freed using the matching method to the one -+ // that allocated it. PR_TRUE means the memory is zeroed. -+ PORT_FreeArena(ecparams->arena, PR_TRUE); -+#else - // Use B_FALSE to free the SECItem->data element, but not the SECItem itself - // Use B_TRUE to free both - -@@ -64,6 +76,7 @@ - SECITEM_FreeItem(&ecparams->curveOID, B_FALSE); - if (freeStruct) - free(ecparams); -+#endif - } - - jbyteArray getEncodedBytes(JNIEnv *env, SECItem *hSECItem) -@@ -108,6 +121,13 @@ - goto cleanup; - } - -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ goto cleanup; -+ } -+#endif -+ - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -163,16 +183,26 @@ - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif - } - if (ecparams) { - FreeECParams(ecparams, true); - } - if (privKey) { - FreeECParams(&privKey->ecParams, false); -+#ifndef SYSTEM_NSS -+ // The entire ECPrivateKey is allocated in the arena -+ // when using system NSS, so only the in-tree version -+ // needs to clear these manually. - SECITEM_FreeItem(&privKey->version, B_FALSE); - SECITEM_FreeItem(&privKey->privateValue, B_FALSE); - SECITEM_FreeItem(&privKey->publicValue, B_FALSE); - free(privKey); -+#endif - } - - if (pSeedBuffer) { -@@ -223,6 +253,13 @@ - goto cleanup; - } - -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ goto cleanup; -+ } -+#endif -+ - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -270,6 +307,11 @@ - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif - } - if (privKey.privateValue.data) { - env->ReleaseByteArrayElements(privateKey, -@@ -336,6 +378,13 @@ - goto cleanup; - } - -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ goto cleanup; -+ } -+#endif -+ - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -356,9 +405,15 @@ - - cleanup: - { -- if (params_item.data) -+ if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif -+ } - - if (pubKey.publicValue.data) - env->ReleaseByteArrayElements(publicKey, -@@ -419,6 +474,13 @@ - goto cleanup; - } - -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ goto cleanup; -+ } -+#endif -+ - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -460,9 +522,15 @@ - env->ReleaseByteArrayElements(publicKey, - (jbyte *) publicValue_item.data, JNI_ABORT); - -- if (params_item.data) -+ if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif -+ } - - if (ecparams) - FreeECParams(ecparams, true); diff --git a/pr2815-race_condition_in_sunec_provider_with_system_nss_fix.patch b/pr2815-race_condition_in_sunec_provider_with_system_nss_fix.patch deleted file mode 100644 index db14f10..0000000 --- a/pr2815-race_condition_in_sunec_provider_with_system_nss_fix.patch +++ /dev/null @@ -1,189 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1453867347 0 -# Wed Jan 27 04:02:27 2016 +0000 -# Node ID 26e2e029ee256e9815fdc324831a03d8582255e1 -# Parent 0ff7720931e8dbf7de25720bdc93b18527ab89e8 -PR2815: Race condition in SunEC provider with system NSS -Summary: Perform initialisation and shutdown only when library is loaded or SunEC is finalized respectively - -diff -r 0ff7720931e8 -r 26e2e029ee25 make/mapfiles/libsunec/mapfile-vers ---- openjdk/jdk/make/mapfiles/libsunec/mapfile-vers Wed Jan 27 03:45:06 2016 +0000 -+++ openjdk/jdk/make/mapfiles/libsunec/mapfile-vers Wed Jan 27 04:02:27 2016 +0000 -@@ -31,6 +31,8 @@ - Java_sun_security_ec_ECDSASignature_signDigest; - Java_sun_security_ec_ECDSASignature_verifySignedDigest; - Java_sun_security_ec_ECDHKeyAgreement_deriveKey; -+ Java_sun_security_ec_SunEC_initialize; -+ Java_sun_security_ec_SunEC_cleanup; - local: - *; - }; -diff -r 0ff7720931e8 -r 26e2e029ee25 src/share/classes/sun/security/ec/SunEC.java ---- openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java Wed Jan 27 03:45:06 2016 +0000 -+++ openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java Wed Jan 27 04:02:27 2016 +0000 -@@ -58,6 +58,7 @@ - AccessController.doPrivileged(new PrivilegedAction<Void>() { - public Void run() { - System.loadLibrary("sunec"); // check for native library -+ initialize(); - return null; - } - }); -@@ -81,4 +82,22 @@ - } - } - -+ /** -+ * Cleanup native resources during finalisation. -+ */ -+ @Override -+ protected void finalize() { -+ cleanup(); -+ } -+ -+ /** -+ * Initialize the native code. -+ */ -+ private static native void initialize(); -+ -+ /** -+ * Cleanup in the native layer. -+ */ -+ private static native void cleanup(); -+ - } -diff -r 0ff7720931e8 -r 26e2e029ee25 src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 03:45:06 2016 +0000 -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp Wed Jan 27 04:02:27 2016 +0000 -@@ -121,13 +121,6 @@ - goto cleanup; - } - --#ifdef SYSTEM_NSS -- if (SECOID_Init() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- goto cleanup; -- } --#endif -- - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -183,11 +176,6 @@ - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); --#ifdef SYSTEM_NSS -- if (SECOID_Shutdown() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- } --#endif - } - if (ecparams) { - FreeECParams(ecparams, true); -@@ -253,13 +241,6 @@ - goto cleanup; - } - --#ifdef SYSTEM_NSS -- if (SECOID_Init() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- goto cleanup; -- } --#endif -- - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -307,11 +288,6 @@ - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); --#ifdef SYSTEM_NSS -- if (SECOID_Shutdown() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- } --#endif - } - if (privKey.privateValue.data) { - env->ReleaseByteArrayElements(privateKey, -@@ -378,13 +354,6 @@ - goto cleanup; - } - --#ifdef SYSTEM_NSS -- if (SECOID_Init() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- goto cleanup; -- } --#endif -- - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -408,11 +377,6 @@ - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); --#ifdef SYSTEM_NSS -- if (SECOID_Shutdown() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- } --#endif - } - - if (pubKey.publicValue.data) -@@ -474,13 +438,6 @@ - goto cleanup; - } - --#ifdef SYSTEM_NSS -- if (SECOID_Init() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- goto cleanup; -- } --#endif -- - // Fill a new ECParams using the supplied OID - if (EC_DecodeParams(¶ms_item, &ecparams, 0) != SECSuccess) { - /* bad curve OID */ -@@ -525,11 +482,6 @@ - if (params_item.data) { - env->ReleaseByteArrayElements(encodedParams, - (jbyte *) params_item.data, JNI_ABORT); --#ifdef SYSTEM_NSS -- if (SECOID_Shutdown() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- } --#endif - } - - if (ecparams) -@@ -539,4 +491,26 @@ - return jSecret; - } - -+JNIEXPORT void -+JNICALL Java_sun_security_ec_SunEC_initialize -+ (JNIEnv *env, jclass UNUSED(clazz)) -+{ -+#ifdef SYSTEM_NSS -+ if (SECOID_Init() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif -+} -+ -+JNIEXPORT void -+JNICALL Java_sun_security_ec_SunEC_cleanup -+ (JNIEnv *env, jclass UNUSED(clazz)) -+{ -+#ifdef SYSTEM_NSS -+ if (SECOID_Shutdown() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } -+#endif -+} -+ - } /* extern "C" */ diff --git a/pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch b/pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch index fc8f981..a42688d 100644 --- a/pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch +++ b/pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch @@ -5,42 +5,45 @@ # Node ID 3334efeacd8327a14b7d2f392f4546e3c29c594b # Parent 6b81fd2227d14226f2121f2d51b464536925686e PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts) +PR3575: System cacerts database handling should not affect jssecacerts
-diff --git a/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java b/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java ---- openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -@@ -174,15 +174,20 @@ - storeFile = new File(storeFileName); - fis = getFileInputStream(storeFile); - } else { -- String javaHome = props.get("javaHome"); -- storeFile = new File(javaHome + sep + "lib" + sep -- + "security" + sep + -- "jssecacerts"); -+ /* Check system cacerts DB first; /etc/pki/java/cacerts */ -+ storeFile = new File(sep + "etc" + sep + "pki" + sep -+ + "java" + sep + "cacerts"); - if ((fis = getFileInputStream(storeFile)) == null) { -+ String javaHome = props.get("javaHome"); - storeFile = new File(javaHome + sep + "lib" + sep -- + "security" + sep + -- "cacerts"); -- fis = getFileInputStream(storeFile); -+ + "security" + sep + -+ "jssecacerts"); -+ if ((fis = getFileInputStream(storeFile)) == null) { -+ storeFile = new File(javaHome + sep + "lib" + sep -+ + "security" + sep + -+ "cacerts"); -+ fis = getFileInputStream(storeFile); -+ } - } - } +diff --git openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java openjdk/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java +--- openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java ++++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java +@@ -72,7 +72,7 @@ + * The preference of the default trusted KeyStore is: + * javax.net.ssl.trustStore + * jssecacerts +- * cacerts ++ * cacerts (system and local) + */ + private static final class TrustStoreDescriptor { + private static final String fileSep = File.separator; +@@ -83,6 +83,10 @@ + defaultStorePath + fileSep + "cacerts"; + private static final String jsseDefaultStore = + defaultStorePath + fileSep + "jssecacerts"; ++ /* Check system cacerts DB: /etc/pki/java/cacerts */ ++ private static final String systemStore = ++ fileSep + "etc" + fileSep + "pki" + ++ fileSep + "java" + fileSep + "cacerts";
-diff --git a/src/share/classes/sun/security/tools/KeyStoreUtil.java b/src/share/classes/sun/security/tools/KeyStoreUtil.java ---- openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java + // the trust store name + private final String storeName; +@@ -146,7 +150,8 @@ + long temporaryTime = 0L; + if (!"NONE".equals(storePropName)) { + String[] fileNames = +- new String[] {storePropName, defaultStore}; ++ new String[] {storePropName, ++ systemStore, defaultStore}; + for (String fileName : fileNames) { + File f = new File(fileName); + if (f.isFile() && f.canRead()) { +diff --git openjdk.orig/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java +--- openjdk.orig/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java +++ openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java -@@ -87,9 +87,14 @@ +@@ -108,9 +108,14 @@ throws Exception { String sep = File.separator; diff --git a/pr2899-dont_use_withseed_versions_of_nss_functions_as_they_dont_fully_process_the_seed.patch b/pr2899-dont_use_withseed_versions_of_nss_functions_as_they_dont_fully_process_the_seed.patch deleted file mode 100644 index ffdefb0..0000000 --- a/pr2899-dont_use_withseed_versions_of_nss_functions_as_they_dont_fully_process_the_seed.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1459313680 -3600 -# Wed Mar 30 05:54:40 2016 +0100 -# Node ID 9dc0eca5fa8926e6a952fa4f1931e78aa1f52443 -# Parent 8957aff589013e671f02d38023d5ff245ef27e87 -PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed -Contributed-by: Alex Kashchenko akashche@redhat.com -Updated 2017/07/04 to accomodate 8175110 by Andrew Hughes gnu.andrew@redhat.com - -diff -r e5fdbb82bd49 src/share/native/sun/security/ec/ecc_impl.h ---- openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h -+++ openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h -@@ -267,8 +267,8 @@ - - #ifdef SYSTEM_NSS - #define EC_DecodeParams(a,b,c) EC_DecodeParams(a,b) --#define EC_NewKey(a,b,c,d,e) EC_NewKeyFromSeed(a,b,c,d) --#define ECDSA_SignDigest(a,b,c,d,e,f,g) ECDSA_SignDigestWithSeed(a,b,c,d,e) -+#define EC_NewKey(a,b,c,d,e) EC_NewKey(a,b) -+#define ECDSA_SignDigest(a,b,c,d,e,f,g) ECDSA_SignDigest(a,b,c) - #define ECDSA_VerifyDigest(a,b,c,d) ECDSA_VerifyDigest(a,b,c) - #define ECDH_Derive(a,b,c,d,e,f) ECDH_Derive(a,b,c,d,e) - #else diff --git a/pr2934-sunec_provider_throwing_keyexception_withine.separator_current_nss_thus_initialise_the_random_number_generator_and_feed_the_seed_to_it.patch b/pr2934-sunec_provider_throwing_keyexception_withine.separator_current_nss_thus_initialise_the_random_number_generator_and_feed_the_seed_to_it.patch deleted file mode 100644 index 83385da..0000000 --- a/pr2934-sunec_provider_throwing_keyexception_withine.separator_current_nss_thus_initialise_the_random_number_generator_and_feed_the_seed_to_it.patch +++ /dev/null @@ -1,91 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1461349033 -3600 -# Fri Apr 22 19:17:13 2016 +0100 -# Node ID dab76de2f91cf1791c03560a3f45aaa69f8351fd -# Parent 3fa42705acab6d69b6141f47ebba4f85739a338c -PR2934: SunEC provider throwing KeyException with current NSS -Summary: Initialise the random number generator and feed the seed to it. -Updated 2017/07/04 to accomodate 8175110 - -diff -r 8aed1e903a4c src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp -@@ -134,8 +134,17 @@ - env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer); - - // Generate the new keypair (using the supplied seed) -+#ifdef SYSTEM_NSS -+ if (RNG_RandomUpdate((unsigned char *) pSeedBuffer, jSeedLength) -+ != SECSuccess) { -+ ThrowException(env, KEY_EXCEPTION); -+ goto cleanup; -+ } -+ if (EC_NewKey(ecparams, &privKey) != SECSuccess) { -+#else - if (EC_NewKey(ecparams, &privKey, (unsigned char *) pSeedBuffer, - jSeedLength, 0) != SECSuccess) { -+#endif - ThrowException(env, KEY_EXCEPTION); - goto cleanup; - } -@@ -267,8 +276,18 @@ - env->GetByteArrayRegion(seed, 0, jSeedLength, pSeedBuffer); - - // Sign the digest (using the supplied seed) -+#ifdef SYSTEM_NSS -+ if (RNG_RandomUpdate((unsigned char *) pSeedBuffer, jSeedLength) -+ != SECSuccess) { -+ ThrowException(env, KEY_EXCEPTION); -+ goto cleanup; -+ } -+ if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item) -+ != SECSuccess) { -+#else - if (ECDSA_SignDigest(&privKey, &signature_item, &digest_item, - (unsigned char *) pSeedBuffer, jSeedLength, 0, timing) != SECSuccess) { -+#endif - ThrowException(env, KEY_EXCEPTION); - goto cleanup; - } -@@ -499,6 +518,9 @@ - if (SECOID_Init() != SECSuccess) { - ThrowException(env, INTERNAL_ERROR); - } -+ if (RNG_RNGInit() != SECSuccess) { -+ ThrowException(env, INTERNAL_ERROR); -+ } - #endif - } - -@@ -507,6 +529,7 @@ - (JNIEnv *env, jclass UNUSED(clazz)) - { - #ifdef SYSTEM_NSS -+ RNG_RNGShutdown(); - if (SECOID_Shutdown() != SECSuccess) { - ThrowException(env, INTERNAL_ERROR); - } -diff -r 8aed1e903a4c src/share/native/sun/security/ec/ecc_impl.h ---- openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h -+++ openjdk/jdk/src/share/native/sun/security/ec/ecc_impl.h -@@ -254,8 +254,10 @@ - This function is no longer required because the random bytes are now - supplied by the caller. Force a failure. - */ -+#ifndef SYSTEM_NSS - #define RNG_GenerateGlobalRandomBytes(p,l) SECFailure - #endif -+#endif - #define CHECK_MPI_OK(func) if (MP_OKAY > (err = func)) goto cleanup - #define MP_TO_SEC_ERROR(err) - -@@ -267,8 +269,6 @@ - - #ifdef SYSTEM_NSS - #define EC_DecodeParams(a,b,c) EC_DecodeParams(a,b) --#define EC_NewKey(a,b,c,d,e) EC_NewKey(a,b) --#define ECDSA_SignDigest(a,b,c,d,e,f,g) ECDSA_SignDigest(a,b,c) - #define ECDSA_VerifyDigest(a,b,c,d) ECDSA_VerifyDigest(a,b,c) - #define ECDH_Derive(a,b,c,d,e,f) ECDH_Derive(a,b,c,d,e) - #else diff --git a/pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch b/pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch index d44ed1d..b52c087 100644 --- a/pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch +++ b/pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch @@ -7,9 +7,21 @@ PR3083, RH1346460: Regression in SSL debug output without an ECC provider Summary: Return null rather than throwing an exception when there's no ECC provider.
-diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/Debug.java ---- openjdk/jdk/src/share/classes/sun/security/util/Debug.java Mon Jul 04 17:08:12 2016 +0100 -+++ openjdk/jdk/src/share/classes/sun/security/util/Debug.java Mon Jul 04 18:21:29 2016 +0100 +diff --git openjdk.orig/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java openjdk/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java +--- openjdk.orig/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java ++++ openjdk/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java +@@ -121,7 +121,7 @@ + private static void ensureCurveIsSupported(ECParameterSpec ecSpec) + throws InvalidAlgorithmParameterException { + +- AlgorithmParameters ecParams = ECUtil.getECParameters(null); ++ AlgorithmParameters ecParams = ECUtil.getECParameters(null, true); + byte[] encodedParams; + try { + ecParams.init(ecSpec); +diff --git openjdk.orig/jdk/src/share/classes/sun/security/util/Debug.java openjdk/jdk/src/share/classes/sun/security/util/Debug.java +--- openjdk.orig/jdk/src/share/classes/sun/security/util/Debug.java ++++ openjdk/jdk/src/share/classes/sun/security/util/Debug.java @@ -73,6 +73,7 @@ System.err.println("certpath PKIX CertPathBuilder and"); System.err.println(" CertPathValidator debugging"); @@ -18,9 +30,9 @@ diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/Debug.j System.err.println("gssloginconfig"); System.err.println(" GSS LoginConfigImpl debugging"); System.err.println("configfile JAAS ConfigFile loading"); -diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/ECUtil.java ---- openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java Mon Jul 04 17:08:12 2016 +0100 -+++ openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java Mon Jul 04 18:21:29 2016 +0100 +diff --git openjdk.orig/jdk/src/share/classes/sun/security/util/ECUtil.java openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java +--- openjdk.orig/jdk/src/share/classes/sun/security/util/ECUtil.java ++++ openjdk/jdk/src/share/classes/sun/security/util/ECUtil.java @@ -41,6 +41,9 @@
public class ECUtil { @@ -34,11 +46,11 @@ diff -r bc6eab2038c6 -r a4541d1d8609 src/share/classes/sun/security/util/ECUtil. @@ -90,6 +93,10 @@ }
- private static AlgorithmParameters getECParameters(Provider p) { + public static AlgorithmParameters getECParameters(Provider p) { + return getECParameters(p, false); + } + -+ private static AlgorithmParameters getECParameters(Provider p, boolean throwException) { ++ public static AlgorithmParameters getECParameters(Provider p, boolean throwException) { try { if (p != null) { return AlgorithmParameters.getInstance("EC", p); diff --git a/pr3479-rh1486025-sunec_provider_can_have_multiple_instances_leading_to_premature_nss_shutdown.patch b/pr3479-rh1486025-sunec_provider_can_have_multiple_instances_leading_to_premature_nss_shutdown.patch deleted file mode 100644 index 14c693b..0000000 --- a/pr3479-rh1486025-sunec_provider_can_have_multiple_instances_leading_to_premature_nss_shutdown.patch +++ /dev/null @@ -1,67 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1508194072 -3600 -# Mon Oct 16 23:47:52 2017 +0100 -# Node ID 5dcb55da00c1531264934559c9f10c2e0ae46420 -# Parent bf62c56e3604fee0018b19f65fd56c76dc156630 -PR3479, RH1486025: ECC and NSS JVM crash -Summary: SunEC provider can have multiple instances, leading to premature NSS shutdown -Contributed-by: Martin Balao mbalao@redhat.com - -diff --git a/make/mapfiles/libsunec/mapfile-vers b/make/mapfiles/libsunec/mapfile-vers ---- openjdk/jdk/make/mapfiles/libsunec/mapfile-vers -+++ openjdk/jdk/make/mapfiles/libsunec/mapfile-vers -@@ -32,7 +32,6 @@ - Java_sun_security_ec_ECDSASignature_verifySignedDigest; - Java_sun_security_ec_ECDHKeyAgreement_deriveKey; - Java_sun_security_ec_SunEC_initialize; -- Java_sun_security_ec_SunEC_cleanup; - local: - *; - }; -diff --git a/src/share/classes/sun/security/ec/SunEC.java b/src/share/classes/sun/security/ec/SunEC.java ---- openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java -+++ openjdk/jdk/src/share/classes/sun/security/ec/SunEC.java -@@ -83,21 +83,8 @@ - } - - /** -- * Cleanup native resources during finalisation. -- */ -- @Override -- protected void finalize() { -- cleanup(); -- } -- -- /** - * Initialize the native code. - */ - private static native void initialize(); - -- /** -- * Cleanup in the native layer. -- */ -- private static native void cleanup(); -- - } -diff --git a/src/share/native/sun/security/ec/ECC_JNI.cpp b/src/share/native/sun/security/ec/ECC_JNI.cpp ---- openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp -+++ openjdk/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp -@@ -525,14 +525,12 @@ - } - - JNIEXPORT void --JNICALL Java_sun_security_ec_SunEC_cleanup -- (JNIEnv *env, jclass UNUSED(clazz)) -+JNICALL JNI_OnUnload -+ (JavaVM *vm, void *reserved) - { - #ifdef SYSTEM_NSS - RNG_RNGShutdown(); -- if (SECOID_Shutdown() != SECSuccess) { -- ThrowException(env, INTERNAL_ERROR); -- } -+ SECOID_Shutdown(); - #endif - } - diff --git a/pr3575-rh1567204-system_cacerts_database_handling_no_longer_affect_jssecacerts.patch b/pr3575-rh1567204-system_cacerts_database_handling_no_longer_affect_jssecacerts.patch deleted file mode 100644 index ce24c59..0000000 --- a/pr3575-rh1567204-system_cacerts_database_handling_no_longer_affect_jssecacerts.patch +++ /dev/null @@ -1,42 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1525111445 -3600 -# Mon Apr 30 19:04:05 2018 +0100 -# Node ID 388fc8da23044317c160678ffa8ff541c216a255 -# Parent 556adf3a76aa81bf3918d7d46554dae7cc1d5c5c -PR3575: System cacerts database handling should not affect jssecacerts - -diff --git openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java -@@ -162,7 +162,7 @@ - * Try: - * javax.net.ssl.trustStore (if this variable exists, stop) - * jssecacerts -- * cacerts -+ * cacerts (system and local) - * - * If none exists, we use an empty keystore. - */ -@@ -174,14 +174,14 @@ - storeFile = new File(storeFileName); - fis = getFileInputStream(storeFile); - } else { -- /* Check system cacerts DB first; /etc/pki/java/cacerts */ -- storeFile = new File(sep + "etc" + sep + "pki" + sep -- + "java" + sep + "cacerts"); -+ String javaHome = props.get("javaHome"); -+ storeFile = new File(javaHome + sep + "lib" + sep -+ + "security" + sep + -+ "jssecacerts"); - if ((fis = getFileInputStream(storeFile)) == null) { -- String javaHome = props.get("javaHome"); -- storeFile = new File(javaHome + sep + "lib" + sep -- + "security" + sep + -- "jssecacerts"); -+ /* Check system cacerts DB first; /etc/pki/java/cacerts */ -+ storeFile = new File(sep + "etc" + sep + "pki" + sep -+ + "java" + sep + "cacerts"); - if ((fis = getFileInputStream(storeFile)) == null) { - storeFile = new File(javaHome + sep + "lib" + sep - + "security" + sep + diff --git a/pr3634-fix_shenandoah_for_size_t_on_s390.patch b/pr3634-fix_shenandoah_for_size_t_on_s390.patch deleted file mode 100644 index 20a4625..0000000 --- a/pr3634-fix_shenandoah_for_size_t_on_s390.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.cpp openjdk/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.cpp ---- openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.cpp -+++ openjdk/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.cpp -@@ -524,8 +524,8 @@ - region_size = max_heap_size / ShenandoahTargetNumRegions; - - // Now make sure that we don't go over or under our limits. -- region_size = MAX2(ShenandoahMinRegionSize, region_size); -- region_size = MIN2(ShenandoahMaxRegionSize, region_size); -+ region_size = MAX2<size_t>(ShenandoahMinRegionSize, region_size); -+ region_size = MIN2<size_t>(ShenandoahMaxRegionSize, region_size); - - } else { - if (ShenandoahHeapRegionSize > initial_heap_size / MIN_NUM_REGIONS) { diff --git a/rh1566890-CVE_2018_3639-speculative_store_bypass.patch b/rh1566890-CVE_2018_3639-speculative_store_bypass.patch new file mode 100644 index 0000000..d8f3a5a --- /dev/null +++ b/rh1566890-CVE_2018_3639-speculative_store_bypass.patch @@ -0,0 +1,44 @@ +diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -103,6 +103,8 @@ + # include <inttypes.h> + # include <sys/ioctl.h> + ++#include <sys/prctl.h> ++ + PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC + + #ifndef _GNU_SOURCE +@@ -4997,6 +4999,31 @@ + } + } + ++/* Per task speculation control */ ++#ifndef PR_GET_SPECULATION_CTRL ++#define PR_GET_SPECULATION_CTRL 52 ++#endif ++#ifndef PR_SET_SPECULATION_CTRL ++#define PR_SET_SPECULATION_CTRL 53 ++#endif ++/* Speculation control variants */ ++# undef PR_SPEC_STORE_BYPASS ++# define PR_SPEC_STORE_BYPASS 0 ++/* Return and control values for PR_SET/GET_SPECULATION_CTRL */ ++# undef PR_SPEC_NOT_AFFECTED ++# undef PR_SPEC_PRCTL ++# undef PR_SPEC_ENABLE ++# undef PR_SPEC_DISABLE ++# define PR_SPEC_NOT_AFFECTED 0 ++# define PR_SPEC_PRCTL (1UL << 0) ++# define PR_SPEC_ENABLE (1UL << 1) ++# define PR_SPEC_DISABLE (1UL << 2) ++ ++static void set_speculation() __attribute__((constructor)); ++static void set_speculation() { ++ prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); ++} ++ + // this is called _before_ most of the global arguments have been parsed + void os::init(void) { + char dummy; /* used to get a guess on initial stack address */ diff --git a/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch b/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch new file mode 100644 index 0000000..94ef9d4 --- /dev/null +++ b/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch @@ -0,0 +1,54 @@ +diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -5001,26 +5001,43 @@ + + /* Per task speculation control */ + #ifndef PR_GET_SPECULATION_CTRL +-#define PR_GET_SPECULATION_CTRL 52 ++# define PR_GET_SPECULATION_CTRL 52 + #endif + #ifndef PR_SET_SPECULATION_CTRL +-#define PR_SET_SPECULATION_CTRL 53 ++# define PR_SET_SPECULATION_CTRL 53 + #endif + /* Speculation control variants */ +-# undef PR_SPEC_STORE_BYPASS ++#ifndef PR_SPEC_STORE_BYPASS + # define PR_SPEC_STORE_BYPASS 0 ++#endif + /* Return and control values for PR_SET/GET_SPECULATION_CTRL */ +-# undef PR_SPEC_NOT_AFFECTED +-# undef PR_SPEC_PRCTL +-# undef PR_SPEC_ENABLE +-# undef PR_SPEC_DISABLE ++ ++#ifndef PR_SPEC_NOT_AFFECTED + # define PR_SPEC_NOT_AFFECTED 0 ++#endif ++#ifndef PR_SPEC_PRCTL + # define PR_SPEC_PRCTL (1UL << 0) ++#endif ++#ifndef PR_SPEC_ENABLE + # define PR_SPEC_ENABLE (1UL << 1) ++#endif ++#ifndef PR_SPEC_DISABLE + # define PR_SPEC_DISABLE (1UL << 2) ++#endif ++#ifndef PR_SPEC_FORCE_DISABLE ++# define PR_SPEC_FORCE_DISABLE (1UL << 3) ++#endif ++#ifndef PR_SPEC_DISABLE_NOEXEC ++# define PR_SPEC_DISABLE_NOEXEC (1UL << 4) ++#endif + + static void set_speculation() __attribute__((constructor)); + static void set_speculation() { ++ if ( prctl(PR_SET_SPECULATION_CTRL, ++ PR_SPEC_STORE_BYPASS, ++ PR_SPEC_DISABLE_NOEXEC, 0, 0) == 0 ) { ++ return; ++ } + prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); + } + diff --git a/rh1566890_speculative_store_bypass_so_added_more_per_task_speculation_control_CVE_2018_3639.patch b/rh1566890_speculative_store_bypass_so_added_more_per_task_speculation_control_CVE_2018_3639.patch deleted file mode 100644 index d8f3a5a..0000000 --- a/rh1566890_speculative_store_bypass_so_added_more_per_task_speculation_control_CVE_2018_3639.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp -@@ -103,6 +103,8 @@ - # include <inttypes.h> - # include <sys/ioctl.h> - -+#include <sys/prctl.h> -+ - PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC - - #ifndef _GNU_SOURCE -@@ -4997,6 +4999,31 @@ - } - } - -+/* Per task speculation control */ -+#ifndef PR_GET_SPECULATION_CTRL -+#define PR_GET_SPECULATION_CTRL 52 -+#endif -+#ifndef PR_SET_SPECULATION_CTRL -+#define PR_SET_SPECULATION_CTRL 53 -+#endif -+/* Speculation control variants */ -+# undef PR_SPEC_STORE_BYPASS -+# define PR_SPEC_STORE_BYPASS 0 -+/* Return and control values for PR_SET/GET_SPECULATION_CTRL */ -+# undef PR_SPEC_NOT_AFFECTED -+# undef PR_SPEC_PRCTL -+# undef PR_SPEC_ENABLE -+# undef PR_SPEC_DISABLE -+# define PR_SPEC_NOT_AFFECTED 0 -+# define PR_SPEC_PRCTL (1UL << 0) -+# define PR_SPEC_ENABLE (1UL << 1) -+# define PR_SPEC_DISABLE (1UL << 2) -+ -+static void set_speculation() __attribute__((constructor)); -+static void set_speculation() { -+ prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); -+} -+ - // this is called _before_ most of the global arguments have been parsed - void os::init(void) { - char dummy; /* used to get a guess on initial stack address */ diff --git a/s390-8214206_fix.patch b/s390-8214206_fix.patch index 93f12de..42902cf 100644 --- a/s390-8214206_fix.patch +++ b/s390-8214206_fix.patch @@ -7,10 +7,22 @@ diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray. address base = create_new_base_array(num_target_elems, target_elem_size_in_bytes); - initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, log2_intptr(mapping_granularity_in_bytes)); + initialize_base(base, num_target_elems, bias, target_elem_size_in_bytes, -+ log2_intptr((uintptr_t) mapping_granularity_in_bytes)); ++ log2_long(mapping_granularity_in_bytes)); }
size_t bias() const { return _bias; } +diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp openjdk/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp ++++ openjdk/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahNumberSeq.cpp +@@ -135,7 +135,7 @@ + void BinaryMagnitudeSeq::add(size_t val) { + Atomic::add(val, &_sum); + +- int mag = log2_intptr(val) + 1; ++ int mag = log2_long(val) + 1; + + // Defensively saturate for product bits: + if (mag < 0) { diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.cpp openjdk/hotspot/src/share/vm/runtime/os.cpp --- openjdk.orig/hotspot/src/share/vm/runtime/os.cpp +++ openjdk/hotspot/src/share/vm/runtime/os.cpp @@ -19,19 +31,7 @@ diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.cpp openjdk/hotspot/src/
void os::set_memory_serialize_page(address page) { - int count = log2_intptr(sizeof(class JavaThread)) - log2_int(64); -+ int count = log2_intptr((uintptr_t) sizeof(class JavaThread)) - log2_int(64); ++ int count = log2_long(sizeof(class JavaThread)) - log2_int(64); _mem_serialize_page = (volatile int32_t *)page; // We initialize the serialization page shift count here // We assume a cache line size of 64 bytes -diff --git openjdk.orig/hotspot/src/share/vm/utilities/numberSeq.cpp openjdk/hotspot/src/share/vm/utilities/numberSeq.cpp ---- openjdk.orig/hotspot/src/share/vm/utilities/numberSeq.cpp -+++ openjdk/hotspot/src/share/vm/utilities/numberSeq.cpp -@@ -369,7 +369,7 @@ - void BinaryMagnitudeSeq::add(size_t val) { - Atomic::add(val, &_sum); - -- int mag = log2_intptr(val) + 1; -+ int mag = log2_intptr((uintptr_t) val) + 1; - - // Defensively saturate for product bits: - if (mag < 0) { diff --git a/sources b/sources index 17616ae..1815351 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (tapsets-icedtea-3.11.0.tar.xz) = f98420b2f9d7a0fc0af3a7e6a817c4330169db9378d9c38db56b0dd8281a3f1ff7747b4da0c66194695ca85a470b7963902d863d301e5e290dbfe11f6b6f2b5e -SHA512 (aarch32-port-jdk8u-jdk8u212-b04-aarch32-190430.tar.xz) = cea4c6f1a1efcebaacbcf5360d24e7868768d4dd75c75745a834556199f5da1cea790c0e63dcb6166f5f2b5ba559a9151178b5a3cd95c29f70807fedf162884c +SHA512 (aarch32-port-jdk8u-jdk8u222-ga-aarch32-190717.tar.xz) = 6dd31730129101f21627b01b8e15d47b21e076d969ce6f9ce6b930f633ef1ba6ee3b60ad454ec389123ed40b4f0994f6e86fe2ea7cafa096042d49fda7796c52 diff --git a/update_systemtap.sh b/update_systemtap.sh deleted file mode 100644 index 1a3e3c8..0000000 --- a/update_systemtap.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -x -# this file contains defaults for currently generated source tarball of systemtap - -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_singlerepo_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