From a42b25ebd8d2b22a1c2396d05ff4eb9f43bf11b9 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 20 2017 10:16:55 +0000 Subject: import java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4 --- diff --git a/.gitignore b/.gitignore index 9fccd5b..1615965 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/aarch64-port-jdk8u-aarch64-jdk8u144-b01.tar.xz -SOURCES/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u144-b01.tar.xz -SOURCES/systemtap-tapset-3.4.0pre01.tar.xz +SOURCES/aarch64-port-jdk8u-aarch64-jdk8u151-b12.tar.xz +SOURCES/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u151-b12.tar.xz +SOURCES/systemtap-tapset-3.6.0pre02.tar.xz diff --git a/.java-1.8.0-openjdk.metadata b/.java-1.8.0-openjdk.metadata index bfe4f08..7170882 100644 --- a/.java-1.8.0-openjdk.metadata +++ b/.java-1.8.0-openjdk.metadata @@ -1,3 +1,3 @@ -e984f390e38824a7790b084b5b7034b4926ad427 SOURCES/aarch64-port-jdk8u-aarch64-jdk8u144-b01.tar.xz -272124edf4c68361df74ce6d15602339d3ad8d42 SOURCES/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u144-b01.tar.xz -efa1d5ce7cc2a4cf2c657d883bfb487432a588c0 SOURCES/systemtap-tapset-3.4.0pre01.tar.xz +aea065a91e37b1f33f957034247993741eb5303d SOURCES/aarch64-port-jdk8u-aarch64-jdk8u151-b12.tar.xz +138a8e09553d1135685f996df3a4d1e7a51d995e SOURCES/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u151-b12.tar.xz +93bca27ce5eeeb2bc1f6f3cd4ffe34c3567a3c73 SOURCES/systemtap-tapset-3.6.0pre02.tar.xz diff --git a/SOURCES/8075484-pr3473-rh1490713.patch b/SOURCES/8075484-pr3473-rh1490713.patch new file mode 100644 index 0000000..f124e1a --- /dev/null +++ b/SOURCES/8075484-pr3473-rh1490713.patch @@ -0,0 +1,278 @@ +# HG changeset patch +# User vtewari +# Date 1508189111 -3600 +# Mon Oct 16 22:25:11 2017 +0100 +# Node ID bcaa659478ccac2b2ad1a817e03cab777949775a +# Parent 161fbe4c53ff12328565487e69a608e15f39bd49 +8075484, PR3473, RH1490713: SocketInputStream.socketRead0 can hang even with soTimeout set +Reviewed-by: chegar, dsamersoff, msheppar, clanger + +diff --git a/src/aix/native/java/net/aix_close.c b/src/aix/native/java/net/aix_close.c +--- openjdk/jdk/src/aix/native/java/net/aix_close.c ++++ openjdk/jdk/src/aix/native/java/net/aix_close.c +@@ -1,5 +1,6 @@ + /* +- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2016, SAP SE and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -328,6 +329,10 @@ + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); + } + ++int NET_NonBlockingRead(int s, void* buf, size_t len) { ++ BLOCKING_IO_RETURN_INT(s, recv(s, buf, len, MSG_NONBLOCK)); ++} ++ + int NET_ReadV(int s, const struct iovec * vector, int count) { + BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); + } +@@ -429,8 +434,8 @@ + * Auto restarts with adjusted timeout if interrupted by + * signal other than our wakeup signal. + */ +-int NET_Timeout(int s, long timeout) { +- long prevtime = 0, newtime; ++int NET_Timeout0(int s, long timeout, long currentTime) { ++ long prevtime = currentTime, newtime; + struct timeval t; + fdEntry_t *fdEntry = getFdEntry(s); + +@@ -442,14 +447,6 @@ + return -1; + } + +- /* +- * Pick up current time as may need to adjust timeout +- */ +- if (timeout > 0) { +- gettimeofday(&t, NULL); +- prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; +- } +- + for(;;) { + struct pollfd pfd; + int rv; +diff --git a/src/solaris/native/java/net/SocketInputStream.c b/src/solaris/native/java/net/SocketInputStream.c +--- openjdk/jdk/src/solaris/native/java/net/SocketInputStream.c ++++ openjdk/jdk/src/solaris/native/java/net/SocketInputStream.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -52,6 +52,42 @@ + IO_fd_fdID = NET_GetFileDescriptorID(env); + } + ++#if !defined(__solaris__) ++static int NET_ReadWithTimeout(JNIEnv *env, int fd, char *bufP, int len, long timeout) { ++ int result = 0; ++ long prevtime = NET_GetCurrentTime(), newtime; ++ while (timeout > 0) { ++ result = NET_TimeoutWithCurrentTime(fd, timeout, prevtime); ++ if (result <= 0) { ++ if (result == 0) { ++ JNU_ThrowByName(env, "java/net/SocketTimeoutException", "Read timed out"); ++ } else if (result == -1) { ++ if (errno == EBADF) { ++ JNU_ThrowByName(env, "java/net/SocketException", "Socket closed"); ++ } else if (errno == ENOMEM) { ++ JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); ++ } else { ++ JNU_ThrowByNameWithMessageAndLastError ++ (env, "java/net/SocketException", "select/poll failed"); ++ } ++ } ++ return -1; ++ } ++ result = NET_NonBlockingRead(fd, bufP, len); ++ if (result == -1 && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) { ++ newtime = NET_GetCurrentTime(); ++ timeout -= newtime - prevtime; ++ if (timeout > 0) { ++ prevtime = newtime; ++ } ++ } else { ++ break; ++ } ++ } ++ return result; ++} ++#endif ++ + /* + * Class: java_net_SocketInputStream + * Method: socketRead0 +@@ -99,6 +135,7 @@ + bufP = BUF; + } + ++#if defined(__solaris__) + if (timeout) { + nread = NET_Timeout(fd, timeout); + if (nread <= 0) { +@@ -126,7 +163,19 @@ + } + + nread = NET_Read(fd, bufP, len); +- ++#else ++ if (timeout) { ++ nread = NET_ReadWithTimeout(env, fd, bufP, len, timeout); ++ if ((*env)->ExceptionCheck(env)) { ++ if (bufP != BUF) { ++ free(bufP); ++ } ++ return nread; ++ } ++ } else { ++ nread = NET_Read(fd, bufP, len); ++ } ++#endif + if (nread <= 0) { + if (nread < 0) { + +diff --git a/src/solaris/native/java/net/bsd_close.c b/src/solaris/native/java/net/bsd_close.c +--- openjdk/jdk/src/solaris/native/java/net/bsd_close.c ++++ openjdk/jdk/src/solaris/native/java/net/bsd_close.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -292,6 +292,10 @@ + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); + } + ++int NET_NonBlockingRead(int s, void* buf, size_t len) { ++ BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT)); ++} ++ + int NET_ReadV(int s, const struct iovec * vector, int count) { + BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); + } +@@ -344,8 +348,8 @@ + * Auto restarts with adjusted timeout if interrupted by + * signal other than our wakeup signal. + */ +-int NET_Timeout(int s, long timeout) { +- long prevtime = 0, newtime; ++int NET_Timeout0(int s, long timeout, long currentTime) { ++ long prevtime = currentTime, newtime; + struct timeval t, *tp = &t; + fd_set fds; + fd_set* fdsp = NULL; +@@ -366,9 +370,6 @@ + */ + if (timeout > 0) { + /* Timed */ +- struct timeval now; +- gettimeofday(&now, NULL); +- prevtime = now.tv_sec * 1000 + now.tv_usec / 1000; + t.tv_sec = timeout / 1000; + t.tv_usec = (timeout % 1000) * 1000; + } else if (timeout < 0) { +diff --git a/src/solaris/native/java/net/linux_close.c b/src/solaris/native/java/net/linux_close.c +--- openjdk/jdk/src/solaris/native/java/net/linux_close.c ++++ openjdk/jdk/src/solaris/native/java/net/linux_close.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -273,6 +273,10 @@ + BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); + } + ++int NET_NonBlockingRead(int s, void* buf, size_t len) { ++ BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT) ); ++} ++ + int NET_ReadV(int s, const struct iovec * vector, int count) { + BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) ); + } +@@ -324,8 +328,8 @@ + * Auto restarts with adjusted timeout if interrupted by + * signal other than our wakeup signal. + */ +-int NET_Timeout(int s, long timeout) { +- long prevtime = 0, newtime; ++int NET_Timeout0(int s, long timeout, long currentTime) { ++ long prevtime = currentTime, newtime; + struct timeval t; + fdEntry_t *fdEntry = getFdEntry(s); + +@@ -337,14 +341,6 @@ + return -1; + } + +- /* +- * Pick up current time as may need to adjust timeout +- */ +- if (timeout > 0) { +- gettimeofday(&t, NULL); +- prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; +- } +- + for(;;) { + struct pollfd pfd; + int rv; +diff --git a/src/solaris/native/java/net/net_util_md.c b/src/solaris/native/java/net/net_util_md.c +--- openjdk/jdk/src/solaris/native/java/net/net_util_md.c ++++ openjdk/jdk/src/solaris/native/java/net/net_util_md.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #ifndef _ALLBSD_SOURCE + #include +@@ -1661,3 +1662,20 @@ + + return timeout; + } ++ ++#if !defined(__solaris__) ++long NET_GetCurrentTime() { ++ struct timeval time; ++ gettimeofday(&time, NULL); ++ return (time.tv_sec * 1000 + time.tv_usec / 1000); ++} ++ ++int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime) { ++ return NET_Timeout0(s, timeout, currentTime); ++} ++ ++int NET_Timeout(int s, long timeout) { ++ long currentTime = (timeout > 0) ? NET_GetCurrentTime() : 0; ++ return NET_Timeout0(s, timeout, currentTime); ++} ++#endif +diff --git a/src/solaris/native/java/net/net_util_md.h b/src/solaris/native/java/net/net_util_md.h +--- openjdk/jdk/src/solaris/native/java/net/net_util_md.h ++++ openjdk/jdk/src/solaris/native/java/net/net_util_md.h +@@ -47,9 +47,13 @@ + close subroutine does not return until the select call returns. + ... + */ +-#if defined(__linux__) || defined(MACOSX) || defined (_AIX) ++#if !defined(__solaris__) + extern int NET_Timeout(int s, long timeout); ++extern int NET_Timeout0(int s, long timeout, long currentTime); + extern int NET_Read(int s, void* buf, size_t len); ++extern int NET_NonBlockingRead(int s, void* buf, size_t len); ++extern int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime); ++extern long NET_GetCurrentTime(); + extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, + struct sockaddr *from, int *fromlen); + extern int NET_ReadV(int s, const struct iovec * vector, int count); diff --git a/SOURCES/8145913-pr3466-rh1498309.patch b/SOURCES/8145913-pr3466-rh1498309.patch new file mode 100644 index 0000000..38b6771 --- /dev/null +++ b/SOURCES/8145913-pr3466-rh1498309.patch @@ -0,0 +1,471 @@ +# HG changeset patch +# User mdoerr +# Date 1507750779 -3600 +# Wed Oct 11 20:39:39 2017 +0100 +# Node ID 92f0dbe76a13992cc27188e0f68e4b1771c7004a +# Parent 542c122b1d7d30c29189565248074aa28f21ae58 +8145913, PR3466, RH1498309: PPC64: add Montgomery multiply intrinsic +Reviewed-by: aph, goetz + +diff --git a/src/cpu/ppc/vm/assembler_ppc.hpp b/src/cpu/ppc/vm/assembler_ppc.hpp +--- openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp ++++ openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp +@@ -1179,6 +1179,8 @@ + inline void mullw_( Register d, Register a, Register b); + inline void mulhw( Register d, Register a, Register b); + inline void mulhw_( Register d, Register a, Register b); ++ inline void mulhwu( Register d, Register a, Register b); ++ inline void mulhwu_(Register d, Register a, Register b); + inline void mulhd( Register d, Register a, Register b); + inline void mulhd_( Register d, Register a, Register b); + inline void mulhdu( Register d, Register a, Register b); +diff --git a/src/cpu/ppc/vm/assembler_ppc.inline.hpp b/src/cpu/ppc/vm/assembler_ppc.inline.hpp +--- openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp ++++ openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp +@@ -109,6 +109,8 @@ + inline void Assembler::mullw_( Register d, Register a, Register b) { emit_int32(MULLW_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); } + inline void Assembler::mulhw( Register d, Register a, Register b) { emit_int32(MULHW_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); } + inline void Assembler::mulhw_( Register d, Register a, Register b) { emit_int32(MULHW_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); } ++inline void Assembler::mulhwu( Register d, Register a, Register b) { emit_int32(MULHWU_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); } ++inline void Assembler::mulhwu_(Register d, Register a, Register b) { emit_int32(MULHWU_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); } + inline void Assembler::mulhd( Register d, Register a, Register b) { emit_int32(MULHD_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); } + inline void Assembler::mulhd_( Register d, Register a, Register b) { emit_int32(MULHD_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); } + inline void Assembler::mulhdu( Register d, Register a, Register b) { emit_int32(MULHDU_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); } +diff --git a/src/cpu/ppc/vm/c2_init_ppc.cpp b/src/cpu/ppc/vm/c2_init_ppc.cpp +--- openjdk/hotspot/src/cpu/ppc/vm/c2_init_ppc.cpp ++++ openjdk/hotspot/src/cpu/ppc/vm/c2_init_ppc.cpp +@@ -45,4 +45,10 @@ + FLAG_SET_ERGO(bool, InsertEndGroupPPC64, true); + } + } ++ ++ if (OptimizeFill) { ++ warning("OptimizeFill is not supported on this CPU."); ++ FLAG_SET_DEFAULT(OptimizeFill, false); ++ } ++ + } +diff --git a/src/cpu/ppc/vm/sharedRuntime_ppc.cpp b/src/cpu/ppc/vm/sharedRuntime_ppc.cpp +--- openjdk/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp ++++ openjdk/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp +@@ -42,6 +42,8 @@ + #include "opto/runtime.hpp" + #endif + ++#include ++ + #define __ masm-> + + #ifdef PRODUCT +@@ -3269,3 +3271,245 @@ + return RuntimeStub::new_runtime_stub(name, &buffer, frame_complete, frame_size_in_bytes/wordSize, + oop_maps, true); + } ++ ++ ++//------------------------------Montgomery multiplication------------------------ ++// ++ ++// Subtract 0:b from carry:a. Return carry. ++static unsigned long ++sub(unsigned long a[], unsigned long b[], unsigned long carry, long len) { ++ long i = 0; ++ unsigned long tmp, tmp2; ++ __asm__ __volatile__ ( ++ "subfc %[tmp], %[tmp], %[tmp] \n" // pre-set CA ++ "mtctr %[len] \n" ++ "0: \n" ++ "ldx %[tmp], %[i], %[a] \n" ++ "ldx %[tmp2], %[i], %[b] \n" ++ "subfe %[tmp], %[tmp2], %[tmp] \n" // subtract extended ++ "stdx %[tmp], %[i], %[a] \n" ++ "addi %[i], %[i], 8 \n" ++ "bdnz 0b \n" ++ "addme %[tmp], %[carry] \n" // carry + CA - 1 ++ : [i]"+b"(i), [tmp]"=&r"(tmp), [tmp2]"=&r"(tmp2) ++ : [a]"r"(a), [b]"r"(b), [carry]"r"(carry), [len]"r"(len) ++ : "ctr", "xer", "memory" ++ ); ++ return tmp; ++} ++ ++// Multiply (unsigned) Long A by Long B, accumulating the double- ++// length result into the accumulator formed of T0, T1, and T2. ++inline void MACC(unsigned long A, unsigned long B, unsigned long &T0, unsigned long &T1, unsigned long &T2) { ++ unsigned long hi, lo; ++ __asm__ __volatile__ ( ++ "mulld %[lo], %[A], %[B] \n" ++ "mulhdu %[hi], %[A], %[B] \n" ++ "addc %[T0], %[T0], %[lo] \n" ++ "adde %[T1], %[T1], %[hi] \n" ++ "addze %[T2], %[T2] \n" ++ : [hi]"=&r"(hi), [lo]"=&r"(lo), [T0]"+r"(T0), [T1]"+r"(T1), [T2]"+r"(T2) ++ : [A]"r"(A), [B]"r"(B) ++ : "xer" ++ ); ++} ++ ++// As above, but add twice the double-length result into the ++// accumulator. ++inline void MACC2(unsigned long A, unsigned long B, unsigned long &T0, unsigned long &T1, unsigned long &T2) { ++ unsigned long hi, lo; ++ __asm__ __volatile__ ( ++ "mulld %[lo], %[A], %[B] \n" ++ "mulhdu %[hi], %[A], %[B] \n" ++ "addc %[T0], %[T0], %[lo] \n" ++ "adde %[T1], %[T1], %[hi] \n" ++ "addze %[T2], %[T2] \n" ++ "addc %[T0], %[T0], %[lo] \n" ++ "adde %[T1], %[T1], %[hi] \n" ++ "addze %[T2], %[T2] \n" ++ : [hi]"=&r"(hi), [lo]"=&r"(lo), [T0]"+r"(T0), [T1]"+r"(T1), [T2]"+r"(T2) ++ : [A]"r"(A), [B]"r"(B) ++ : "xer" ++ ); ++} ++ ++// Fast Montgomery multiplication. The derivation of the algorithm is ++// in "A Cryptographic Library for the Motorola DSP56000, ++// Dusse and Kaliski, Proc. EUROCRYPT 90, pp. 230-237". ++static void ++montgomery_multiply(unsigned long a[], unsigned long b[], unsigned long n[], ++ unsigned long m[], unsigned long inv, int len) { ++ unsigned long t0 = 0, t1 = 0, t2 = 0; // Triple-precision accumulator ++ int i; ++ ++ assert(inv * n[0] == -1UL, "broken inverse in Montgomery multiply"); ++ ++ for (i = 0; i < len; i++) { ++ int j; ++ for (j = 0; j < i; j++) { ++ MACC(a[j], b[i-j], t0, t1, t2); ++ MACC(m[j], n[i-j], t0, t1, t2); ++ } ++ MACC(a[i], b[0], t0, t1, t2); ++ m[i] = t0 * inv; ++ MACC(m[i], n[0], t0, t1, t2); ++ ++ assert(t0 == 0, "broken Montgomery multiply"); ++ ++ t0 = t1; t1 = t2; t2 = 0; ++ } ++ ++ for (i = len; i < 2*len; i++) { ++ int j; ++ for (j = i-len+1; j < len; j++) { ++ MACC(a[j], b[i-j], t0, t1, t2); ++ MACC(m[j], n[i-j], t0, t1, t2); ++ } ++ m[i-len] = t0; ++ t0 = t1; t1 = t2; t2 = 0; ++ } ++ ++ while (t0) { ++ t0 = sub(m, n, t0, len); ++ } ++} ++ ++// Fast Montgomery squaring. This uses asymptotically 25% fewer ++// multiplies so it should be up to 25% faster than Montgomery ++// multiplication. However, its loop control is more complex and it ++// may actually run slower on some machines. ++static void ++montgomery_square(unsigned long a[], unsigned long n[], ++ unsigned long m[], unsigned long inv, int len) { ++ unsigned long t0 = 0, t1 = 0, t2 = 0; // Triple-precision accumulator ++ int i; ++ ++ assert(inv * n[0] == -1UL, "broken inverse in Montgomery multiply"); ++ ++ for (i = 0; i < len; i++) { ++ int j; ++ int end = (i+1)/2; ++ for (j = 0; j < end; j++) { ++ MACC2(a[j], a[i-j], t0, t1, t2); ++ MACC(m[j], n[i-j], t0, t1, t2); ++ } ++ if ((i & 1) == 0) { ++ MACC(a[j], a[j], t0, t1, t2); ++ } ++ for (; j < i; j++) { ++ MACC(m[j], n[i-j], t0, t1, t2); ++ } ++ m[i] = t0 * inv; ++ MACC(m[i], n[0], t0, t1, t2); ++ ++ assert(t0 == 0, "broken Montgomery square"); ++ ++ t0 = t1; t1 = t2; t2 = 0; ++ } ++ ++ for (i = len; i < 2*len; i++) { ++ int start = i-len+1; ++ int end = start + (len - start)/2; ++ int j; ++ for (j = start; j < end; j++) { ++ MACC2(a[j], a[i-j], t0, t1, t2); ++ MACC(m[j], n[i-j], t0, t1, t2); ++ } ++ if ((i & 1) == 0) { ++ MACC(a[j], a[j], t0, t1, t2); ++ } ++ for (; j < len; j++) { ++ MACC(m[j], n[i-j], t0, t1, t2); ++ } ++ m[i-len] = t0; ++ t0 = t1; t1 = t2; t2 = 0; ++ } ++ ++ while (t0) { ++ t0 = sub(m, n, t0, len); ++ } ++} ++ ++// The threshold at which squaring is advantageous was determined ++// experimentally on an i7-3930K (Ivy Bridge) CPU @ 3.5GHz. ++// Doesn't seem to be relevant for Power8 so we use the same value. ++#define MONTGOMERY_SQUARING_THRESHOLD 64 ++ ++// Copy len longwords from s to d, word-swapping as we go. The ++// destination array is reversed. ++static void reverse_words(unsigned long *s, unsigned long *d, int len) { ++ d += len; ++ while(len-- > 0) { ++ d--; ++ unsigned long s_val = *s; ++ // Swap words in a longword on little endian machines. ++#ifdef VM_LITTLE_ENDIAN ++ s_val = (s_val << 32) | (s_val >> 32); ++#endif ++ *d = s_val; ++ s++; ++ } ++} ++ ++void SharedRuntime::montgomery_multiply(jint *a_ints, jint *b_ints, jint *n_ints, ++ jint len, jlong inv, ++ jint *m_ints) { ++ assert(len % 2 == 0, "array length in montgomery_multiply must be even"); ++ int longwords = len/2; ++ assert(longwords > 0, "unsupported"); ++ ++ // Make very sure we don't use so much space that the stack might ++ // overflow. 512 jints corresponds to an 16384-bit integer and ++ // will use here a total of 8k bytes of stack space. ++ int total_allocation = longwords * sizeof (unsigned long) * 4; ++ guarantee(total_allocation <= 8192, "must be"); ++ unsigned long *scratch = (unsigned long *)alloca(total_allocation); ++ ++ // Local scratch arrays ++ unsigned long ++ *a = scratch + 0 * longwords, ++ *b = scratch + 1 * longwords, ++ *n = scratch + 2 * longwords, ++ *m = scratch + 3 * longwords; ++ ++ reverse_words((unsigned long *)a_ints, a, longwords); ++ reverse_words((unsigned long *)b_ints, b, longwords); ++ reverse_words((unsigned long *)n_ints, n, longwords); ++ ++ ::montgomery_multiply(a, b, n, m, (unsigned long)inv, longwords); ++ ++ reverse_words(m, (unsigned long *)m_ints, longwords); ++} ++ ++void SharedRuntime::montgomery_square(jint *a_ints, jint *n_ints, ++ jint len, jlong inv, ++ jint *m_ints) { ++ assert(len % 2 == 0, "array length in montgomery_square must be even"); ++ int longwords = len/2; ++ assert(longwords > 0, "unsupported"); ++ ++ // Make very sure we don't use so much space that the stack might ++ // overflow. 512 jints corresponds to an 16384-bit integer and ++ // will use here a total of 6k bytes of stack space. ++ int total_allocation = longwords * sizeof (unsigned long) * 3; ++ guarantee(total_allocation <= 8192, "must be"); ++ unsigned long *scratch = (unsigned long *)alloca(total_allocation); ++ ++ // Local scratch arrays ++ unsigned long ++ *a = scratch + 0 * longwords, ++ *n = scratch + 1 * longwords, ++ *m = scratch + 2 * longwords; ++ ++ reverse_words((unsigned long *)a_ints, a, longwords); ++ reverse_words((unsigned long *)n_ints, n, longwords); ++ ++ if (len >= MONTGOMERY_SQUARING_THRESHOLD) { ++ ::montgomery_square(a, n, m, (unsigned long)inv, longwords); ++ } else { ++ ::montgomery_multiply(a, a, n, m, (unsigned long)inv, longwords); ++ } ++ ++ reverse_words(m, (unsigned long *)m_ints, longwords); ++} +diff --git a/src/cpu/ppc/vm/stubGenerator_ppc.cpp b/src/cpu/ppc/vm/stubGenerator_ppc.cpp +--- openjdk/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp ++++ openjdk/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp +@@ -2094,6 +2094,14 @@ + generate_safefetch("SafeFetchN", sizeof(intptr_t), &StubRoutines::_safefetchN_entry, + &StubRoutines::_safefetchN_fault_pc, + &StubRoutines::_safefetchN_continuation_pc); ++ if (UseMontgomeryMultiplyIntrinsic) { ++ StubRoutines::_montgomeryMultiply ++ = CAST_FROM_FN_PTR(address, SharedRuntime::montgomery_multiply); ++ } ++ if (UseMontgomerySquareIntrinsic) { ++ StubRoutines::_montgomerySquare ++ = CAST_FROM_FN_PTR(address, SharedRuntime::montgomery_square); ++ } + } + + public: +diff --git a/src/cpu/ppc/vm/templateInterpreter_ppc.cpp b/src/cpu/ppc/vm/templateInterpreter_ppc.cpp +--- openjdk/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp ++++ openjdk/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp +@@ -265,7 +265,7 @@ + __ cmpdi(CCR0, Rmdo, 0); + __ beq(CCR0, no_mdo); + +- // Increment backedge counter in the MDO. ++ // Increment invocation counter in the MDO. + const int mdo_bc_offs = in_bytes(MethodData::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset()); + __ lwz(Rscratch2, mdo_bc_offs, Rmdo); + __ addi(Rscratch2, Rscratch2, increment); +@@ -277,12 +277,12 @@ + } + + // Increment counter in MethodCounters*. +- const int mo_bc_offs = in_bytes(MethodCounters::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset()); ++ const int mo_ic_offs = in_bytes(MethodCounters::invocation_counter_offset()) + in_bytes(InvocationCounter::counter_offset()); + __ bind(no_mdo); + __ get_method_counters(R19_method, R3_counters, done); +- __ lwz(Rscratch2, mo_bc_offs, R3_counters); ++ __ lwz(Rscratch2, mo_ic_offs, R3_counters); + __ addi(Rscratch2, Rscratch2, increment); +- __ stw(Rscratch2, mo_bc_offs, R3_counters); ++ __ stw(Rscratch2, mo_ic_offs, R3_counters); + __ load_const_optimized(Rscratch1, mask, R0); + __ and_(Rscratch1, Rscratch2, Rscratch1); + __ beq(CCR0, *overflow); +diff --git a/src/cpu/ppc/vm/vm_version_ppc.cpp b/src/cpu/ppc/vm/vm_version_ppc.cpp +--- openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp ++++ openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp +@@ -177,6 +177,12 @@ + FLAG_SET_DEFAULT(UseSHA512Intrinsics, false); + } + ++ if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) { ++ UseMontgomeryMultiplyIntrinsic = true; ++ } ++ if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) { ++ UseMontgomerySquareIntrinsic = true; ++ } + } + + void VM_Version::print_features() { +diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call.cpp +--- openjdk/hotspot/src/share/vm/opto/library_call.cpp ++++ openjdk/hotspot/src/share/vm/opto/library_call.cpp +@@ -6031,11 +6031,21 @@ + Node* n_start = array_element_address(n, intcon(0), n_elem); + Node* m_start = array_element_address(m, intcon(0), m_elem); + +- Node* call = make_runtime_call(RC_LEAF, +- OptoRuntime::montgomeryMultiply_Type(), +- stubAddr, stubName, TypePtr::BOTTOM, +- a_start, b_start, n_start, len, inv, top(), +- m_start); ++ Node* call = NULL; ++ if (CCallingConventionRequiresIntsAsLongs) { ++ Node* len_I2L = ConvI2L(len); ++ call = make_runtime_call(RC_LEAF, ++ OptoRuntime::montgomeryMultiply_Type(), ++ stubAddr, stubName, TypePtr::BOTTOM, ++ a_start, b_start, n_start, len_I2L XTOP, inv, ++ top(), m_start); ++ } else { ++ call = make_runtime_call(RC_LEAF, ++ OptoRuntime::montgomeryMultiply_Type(), ++ stubAddr, stubName, TypePtr::BOTTOM, ++ a_start, b_start, n_start, len, inv, top(), ++ m_start); ++ } + set_result(m); + } + +@@ -6085,11 +6095,22 @@ + Node* n_start = array_element_address(n, intcon(0), n_elem); + Node* m_start = array_element_address(m, intcon(0), m_elem); + +- Node* call = make_runtime_call(RC_LEAF, +- OptoRuntime::montgomerySquare_Type(), +- stubAddr, stubName, TypePtr::BOTTOM, +- a_start, n_start, len, inv, top(), +- m_start); ++ Node* call = NULL; ++ if (CCallingConventionRequiresIntsAsLongs) { ++ Node* len_I2L = ConvI2L(len); ++ call = make_runtime_call(RC_LEAF, ++ OptoRuntime::montgomerySquare_Type(), ++ stubAddr, stubName, TypePtr::BOTTOM, ++ a_start, n_start, len_I2L XTOP, inv, top(), ++ m_start); ++ } else { ++ call = make_runtime_call(RC_LEAF, ++ OptoRuntime::montgomerySquare_Type(), ++ stubAddr, stubName, TypePtr::BOTTOM, ++ a_start, n_start, len, inv, top(), ++ m_start); ++ } ++ + set_result(m); + } + +diff --git a/src/share/vm/opto/runtime.cpp b/src/share/vm/opto/runtime.cpp +--- openjdk/hotspot/src/share/vm/opto/runtime.cpp ++++ openjdk/hotspot/src/share/vm/opto/runtime.cpp +@@ -1005,12 +1005,20 @@ + // create input type (domain) + int num_args = 7; + int argcnt = num_args; ++ if (CCallingConventionRequiresIntsAsLongs) { ++ argcnt++; // additional placeholder ++ } + const Type** fields = TypeTuple::fields(argcnt); + int argp = TypeFunc::Parms; + fields[argp++] = TypePtr::NOTNULL; // a + fields[argp++] = TypePtr::NOTNULL; // b + fields[argp++] = TypePtr::NOTNULL; // n +- fields[argp++] = TypeInt::INT; // len ++ if (CCallingConventionRequiresIntsAsLongs) { ++ fields[argp++] = TypeLong::LONG; // len ++ fields[argp++] = TypeLong::HALF; // placeholder ++ } else { ++ fields[argp++] = TypeInt::INT; // len ++ } + fields[argp++] = TypeLong::LONG; // inv + fields[argp++] = Type::HALF; + fields[argp++] = TypePtr::NOTNULL; // result +@@ -1029,11 +1037,19 @@ + // create input type (domain) + int num_args = 6; + int argcnt = num_args; ++ if (CCallingConventionRequiresIntsAsLongs) { ++ argcnt++; // additional placeholder ++ } + const Type** fields = TypeTuple::fields(argcnt); + int argp = TypeFunc::Parms; + fields[argp++] = TypePtr::NOTNULL; // a + fields[argp++] = TypePtr::NOTNULL; // n +- fields[argp++] = TypeInt::INT; // len ++ if (CCallingConventionRequiresIntsAsLongs) { ++ fields[argp++] = TypeLong::LONG; // len ++ fields[argp++] = TypeLong::HALF; // placeholder ++ } else { ++ fields[argp++] = TypeInt::INT; // len ++ } + fields[argp++] = TypeLong::LONG; // inv + fields[argp++] = Type::HALF; + fields[argp++] = TypePtr::NOTNULL; // result diff --git a/SOURCES/8168318-pr3466-rh1498320.patch b/SOURCES/8168318-pr3466-rh1498320.patch new file mode 100644 index 0000000..6ed9afb --- /dev/null +++ b/SOURCES/8168318-pr3466-rh1498320.patch @@ -0,0 +1,31 @@ +# HG changeset patch +# User goetz +# Date 1477563748 -7200 +# Thu Oct 27 12:22:28 2016 +0200 +# Node ID 9b9d9e11c04d5e5f64829d34752e5c94b1c7d911 +# Parent 92f0dbe76a13992cc27188e0f68e4b1771c7004a +8168318, PR3466, RH1498320: PPC64: Use cmpldi instead of li/cmpld +Reviewed-by: goetz +Contributed-by: igor.nunes@eldorado.org.br + +diff --git a/src/cpu/ppc/vm/ppc.ad b/src/cpu/ppc/vm/ppc.ad +--- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad ++++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad +@@ -10571,6 +10571,17 @@ + ins_pipe(pipe_class_compare); + %} + ++instruct cmpP_reg_null(flagsReg crx, iRegP_N2P src1, immP_0or1 src2) %{ ++ match(Set crx (CmpP src1 src2)); ++ format %{ "CMPLDI $crx, $src1, $src2 \t// ptr" %} ++ size(4); ++ ins_encode %{ ++ // TODO: PPC port $archOpcode(ppc64Opcode_cmpl); ++ __ cmpldi($crx$$CondRegister, $src1$$Register, (int)((short)($src2$$constant & 0xFFFF))); ++ %} ++ ins_pipe(pipe_class_compare); ++%} ++ + // Used in postalloc expand. + instruct cmpP_reg_imm16(flagsReg crx, iRegPsrc src1, immL16 src2) %{ + // This match rule prevents reordering of node before a safepoint. diff --git a/SOURCES/8170328-pr3466-rh1498321.patch b/SOURCES/8170328-pr3466-rh1498321.patch new file mode 100644 index 0000000..d8751ee --- /dev/null +++ b/SOURCES/8170328-pr3466-rh1498321.patch @@ -0,0 +1,33 @@ +# HG changeset patch +# User mdoerr +# Date 1480079712 7200 +# Fri Nov 25 11:15:12 2016 -0200 +# Node ID 3c499a0ba92b1affb3f473c6502e374f4785aba9 +# Parent 9b9d9e11c04d5e5f64829d34752e5c94b1c7d911 +8170328, PR3466, RH1498321: PPC64: Use andis instead of lis/and +Reviewed-by: goetz, mdoerr +Contributed-by: Igor Nunes + +diff --git a/src/cpu/ppc/vm/ppc.ad b/src/cpu/ppc/vm/ppc.ad +--- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad ++++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad +@@ -8889,6 +8889,19 @@ + ins_pipe(pipe_class_default); + %} + ++// Left shifted Immediate And ++instruct andI_reg_immIhi16(iRegIdst dst, iRegIsrc src1, immIhi16 src2, flagsRegCR0 cr0) %{ ++ match(Set dst (AndI src1 src2)); ++ effect(KILL cr0); ++ format %{ "ANDIS $dst, $src1, $src2.hi" %} ++ size(4); ++ ins_encode %{ ++ // TODO: PPC port $archOpcode(ppc64Opcode_andis_); ++ __ andis_($dst$$Register, $src1$$Register, (int)((unsigned short)(($src2$$constant & 0xFFFF0000) >> 16))); ++ %} ++ ins_pipe(pipe_class_default); ++%} ++ + // Immediate And + instruct andI_reg_uimm16(iRegIdst dst, iRegIsrc src1, uimmI16 src2, flagsRegCR0 cr0) %{ + match(Set dst (AndI src1 src2)); diff --git a/SOURCES/8179084-pr3409-rh1455694.patch b/SOURCES/8179084-pr3409-rh1455694.patch deleted file mode 100644 index dbc2120..0000000 --- a/SOURCES/8179084-pr3409-rh1455694.patch +++ /dev/null @@ -1,135 +0,0 @@ -# HG changeset patch -# User dholmes -# Date 1493428477 14400 -# Fri Apr 28 21:14:37 2017 -0400 -# Node ID 2fee74c5547889d9698a2636e0a5170f9e66fb9c -# Parent 13a04e8df5a3af73794146b930b32556c7cbc5b0 -8179084, PR3409, RH1455694: HotSpot VM fails to start when AggressiveHeap is set -Reviewed-by: kbarrett, stefank - -diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp ---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp -@@ -3193,8 +3193,6 @@ - - // Enable parallel GC and adaptive generation sizing - FLAG_SET_CMDLINE(bool, UseParallelGC, true); -- FLAG_SET_DEFAULT(ParallelGCThreads, -- Abstract_VM_Version::parallel_worker_threads()); - - // Encourage steady state memory management - FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100); -diff --git a/test/TEST.groups b/test/TEST.groups ---- openjdk/hotspot/test/TEST.groups -+++ openjdk/hotspot/test/TEST.groups -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. - # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - # - # This code is free software; you can redistribute it and/or modify it -@@ -164,6 +164,7 @@ - gc/TestGCLogRotationViaJcmd.java \ - gc/g1/TestHumongousAllocInitialMark.java \ - gc/g1/TestHumongousShrinkHeap.java \ -+ gc/arguments/TestAggressiveHeap.java \ - gc/arguments/TestG1HeapRegionSize.java \ - gc/metaspace/TestMetaspaceMemoryPool.java \ - gc/arguments/TestDynMinHeapFreeRatio.java \ -diff --git a/test/gc/arguments/TestAggressiveHeap.java b/test/gc/arguments/TestAggressiveHeap.java -new file mode 100644 ---- /dev/null -+++ openjdk/hotspot/test/gc/arguments/TestAggressiveHeap.java -@@ -0,0 +1,91 @@ -+/* -+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 only, as -+ * published by the Free Software Foundation. -+ * -+ * This code is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+ * version 2 for more details (a copy is included in the LICENSE file that -+ * accompanied this code). -+ * -+ * You should have received a copy of the GNU General Public License version -+ * 2 along with this work; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+ * or visit www.oracle.com if you need additional information or have any -+ * questions. -+ */ -+ -+/* -+ * @test TestAggressiveHeap -+ * @key gc -+ * @bug 8179084 -+ * @summary Test argument processing for -XX:+AggressiveHeap. -+ * @library /testlibrary -+ * @run driver TestAggressiveHeap -+ */ -+ -+import java.lang.management.ManagementFactory; -+import javax.management.MBeanServer; -+import javax.management.ObjectName; -+ -+import com.oracle.java.testlibrary.OutputAnalyzer; -+import com.oracle.java.testlibrary.ProcessTools; -+ -+public class TestAggressiveHeap { -+ -+ public static void main(String args[]) throws Exception { -+ if (canUseAggressiveHeapOption()) { -+ testFlag(); -+ } -+ } -+ -+ // Note: Not a normal boolean flag; -XX:-AggressiveHeap is invalid. -+ private static final String option = "-XX:+AggressiveHeap"; -+ -+ // Option requires at least 256M, else error during option processing. -+ private static final long minMemory = 256 * 1024 * 1024; -+ -+ // bool UseParallelGC := true {product} -+ private static final String parallelGCPattern = -+ " *bool +UseParallelGC *:= *true +\\{product\\}"; -+ -+ private static void testFlag() throws Exception { -+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( -+ option, "-XX:+PrintFlagsFinal", "-version"); -+ -+ OutputAnalyzer output = new OutputAnalyzer(pb.start()); -+ -+ output.shouldHaveExitValue(0); -+ -+ String value = output.firstMatch(parallelGCPattern); -+ if (value == null) { -+ throw new RuntimeException( -+ option + " didn't set UseParallelGC"); -+ } -+ } -+ -+ private static boolean haveRequiredMemory() throws Exception { -+ MBeanServer server = ManagementFactory.getPlatformMBeanServer(); -+ ObjectName os = new ObjectName("java.lang", "type", "OperatingSystem"); -+ Object attr = server.getAttribute(os, "TotalPhysicalMemorySize"); -+ String value = attr.toString(); -+ long memory = Long.parseLong(value); -+ return memory >= minMemory; -+ } -+ -+ private static boolean canUseAggressiveHeapOption() throws Exception { -+ if (!haveRequiredMemory()) { -+ System.out.println( -+ "Skipping test of " + option + " : insufficient memory"); -+ return false; -+ } -+ return true; -+ } -+} -+ diff --git a/SOURCES/8181810-pr3466-rh1498319.patch b/SOURCES/8181810-pr3466-rh1498319.patch new file mode 100644 index 0000000..4dba432 --- /dev/null +++ b/SOURCES/8181810-pr3466-rh1498319.patch @@ -0,0 +1,66 @@ +# HG changeset patch +# User mdoerr +# Date 1507752266 -3600 +# Wed Oct 11 21:04:26 2017 +0100 +# Node ID 5c00d5cd7677aec3549afe02e4f9de8dc7b20bef +# Parent 3c499a0ba92b1affb3f473c6502e374f4785aba9 +8181810, PR3466, RH1498319: PPC64: Leverage extrdi for bitfield extract +Reviewed-by: mdoerr, simonis +Contributed-by: Matthew Brandyberry + +diff --git a/src/cpu/ppc/vm/ppc.ad b/src/cpu/ppc/vm/ppc.ad +--- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad ++++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad +@@ -1,6 +1,6 @@ + // + // Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +-// Copyright 2012, 2014 SAP AG. All rights reserved. ++// Copyright (c) 2012, 2017 SAP SE. All rights reserved. + // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + // + // This code is free software; you can redistribute it and/or modify it +@@ -8610,6 +8610,44 @@ + ins_pipe(pipe_class_default); + %} + ++// Bitfield Extract: URShiftI + AndI ++instruct andI_urShiftI_regI_immI_immIpow2minus1(iRegIdst dst, iRegIsrc src1, immI src2, immIpow2minus1 src3) %{ ++ match(Set dst (AndI (URShiftI src1 src2) src3)); ++ ++ format %{ "EXTRDI $dst, $src1, shift=$src2, mask=$src3 \t// int bitfield extract" %} ++ size(4); ++ ins_encode %{ ++ // TODO: PPC port $archOpcode(ppc64Opcode_rldicl); ++ int rshift = ($src2$$constant) & 0x1f; ++ int length = log2_long(((jlong) $src3$$constant) + 1); ++ if (rshift + length > 32) { ++ // if necessary, adjust mask to omit rotated bits. ++ length = 32 - rshift; ++ } ++ __ extrdi($dst$$Register, $src1$$Register, length, 64 - (rshift + length)); ++ %} ++ ins_pipe(pipe_class_default); ++%} ++ ++// Bitfield Extract: URShiftL + AndL ++instruct andL_urShiftL_regL_immI_immLpow2minus1(iRegLdst dst, iRegLsrc src1, immI src2, immLpow2minus1 src3) %{ ++ match(Set dst (AndL (URShiftL src1 src2) src3)); ++ ++ format %{ "EXTRDI $dst, $src1, shift=$src2, mask=$src3 \t// long bitfield extract" %} ++ size(4); ++ ins_encode %{ ++ // TODO: PPC port $archOpcode(ppc64Opcode_rldicl); ++ int rshift = ($src2$$constant) & 0x3f; ++ int length = log2_long(((jlong) $src3$$constant) + 1); ++ if (rshift + length > 64) { ++ // if necessary, adjust mask to omit rotated bits. ++ length = 64 - rshift; ++ } ++ __ extrdi($dst$$Register, $src1$$Register, length, 64 - (rshift + length)); ++ %} ++ ins_pipe(pipe_class_default); ++%} ++ + instruct sxtI_reg(iRegIdst dst, iRegIsrc src) %{ + match(Set dst (ConvL2I (ConvI2L src))); + diff --git a/SOURCES/8188030-pr3459-rh1484079.patch b/SOURCES/8188030-pr3459-rh1484079.patch new file mode 100644 index 0000000..8564c81 --- /dev/null +++ b/SOURCES/8188030-pr3459-rh1484079.patch @@ -0,0 +1,21 @@ +# HG changeset patch +# User neugens +# Date 1507735508 -3600 +# Wed Oct 11 16:25:08 2017 +0100 +# Node ID 5b91bf11d0f41a6124ffb0fcd8870507b50bd734 +# Parent 7b1a2f967cd8e950fe7dc47d716af13d36239a38 +8188030, PR3459, RH1484079: AWT java apps fail to start when some minimal fonts are present +Summary: Handle CFF fonts +Reviewed-by: andrew, prr + +diff --git a/src/solaris/native/sun/awt/fontpath.c b/src/solaris/native/sun/awt/fontpath.c +--- openjdk/jdk/src/solaris/native/sun/awt/fontpath.c ++++ openjdk/jdk/src/solaris/native/sun/awt/fontpath.c +@@ -1233,6 +1233,7 @@ + && (strcmp((char*)fontformat, "TrueType") != 0) + #if defined(__linux__) || defined(_AIX) + && (strcmp((char*)fontformat, "Type 1") != 0) ++ && (strcmp((char*)fontformat, "CFF") != 0) + #endif + ) { + continue; diff --git a/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh b/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh index d9578e9..879d462 100644 --- a/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh +++ b/SOURCES/java-1.8.0-openjdk-remove-intree-libraries.sh @@ -1,6 +1,6 @@ #!/bin/sh -ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib-* +ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib JPEG_SRC=openjdk/jdk/src/share/native/sun/awt/image/jpeg GIF_SRC=openjdk/jdk/src/share/native/sun/awt/giflib PNG_SRC=openjdk/jdk/src/share/native/sun/awt/libpng diff --git a/SOURCES/java-1.8.0-openjdk-rh1191652-root.patch b/SOURCES/java-1.8.0-openjdk-rh1191652-root.patch index aa0ce35..46a9c6f 100644 --- a/SOURCES/java-1.8.0-openjdk-rh1191652-root.patch +++ b/SOURCES/java-1.8.0-openjdk-rh1191652-root.patch @@ -1,6 +1,6 @@ -diff -r 59d5dc6a0d95 common/autoconf/hotspot-spec.gmk.in ---- openjdk///common/autoconf/hotspot-spec.gmk.in Wed May 25 13:42:38 2016 +0100 -+++ openjdk///common/autoconf/hotspot-spec.gmk.in Thu May 26 04:43:57 2016 +0100 +diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in +--- openjdk///common/autoconf/hotspot-spec.gmk.in ++++ openjdk///common/autoconf/hotspot-spec.gmk.in @@ -71,6 +71,10 @@ LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) # Set the cpu architecture @@ -12,9 +12,9 @@ diff -r 59d5dc6a0d95 common/autoconf/hotspot-spec.gmk.in # Legacy setting for building for a 64 bit machine. # If yes then this expands to _LP64:=1 @LP64@ -diff -r 59d5dc6a0d95 common/autoconf/jdk-options.m4 ---- openjdk///common/autoconf/jdk-options.m4 Wed May 25 13:42:38 2016 +0100 -+++ openjdk///common/autoconf/jdk-options.m4 Thu May 26 04:43:57 2016 +0100 +diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 +--- openjdk///common/autoconf/jdk-options.m4 ++++ openjdk///common/autoconf/jdk-options.m4 @@ -158,7 +158,7 @@ if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then INCLUDE_SA=false @@ -24,9 +24,9 @@ diff -r 59d5dc6a0d95 common/autoconf/jdk-options.m4 INCLUDE_SA=false fi if test "x$OPENJDK_TARGET_CPU" = xaarch64; then -diff -r 59d5dc6a0d95 common/autoconf/platform.m4 ---- openjdk///common/autoconf/platform.m4 Wed May 25 13:42:38 2016 +0100 -+++ openjdk///common/autoconf/platform.m4 Thu May 26 04:43:57 2016 +0100 +diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 +--- openjdk///common/autoconf/platform.m4 ++++ openjdk///common/autoconf/platform.m4 @@ -67,7 +67,7 @@ VAR_CPU_ENDIAN=big ;; @@ -36,16 +36,16 @@ diff -r 59d5dc6a0d95 common/autoconf/platform.m4 VAR_CPU_ARCH=ppc VAR_CPU_BITS=64 VAR_CPU_ENDIAN=little -diff -r 59d5dc6a0d95 common/autoconf/toolchain.m4 ---- openjdk///common/autoconf/toolchain.m4 Wed May 25 13:42:38 2016 +0100 -+++ openjdk///common/autoconf/toolchain.m4 Thu May 26 04:43:57 2016 +0100 -@@ -1056,6 +1056,9 @@ +diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 +--- openjdk///common/autoconf/toolchain.m4 ++++ openjdk///common/autoconf/toolchain.m4 +@@ -1123,6 +1123,9 @@ else - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" + COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN" fi + if test "x$OPENJDK_TARGET_CPU" = xppc64le; then -+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2" ++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DABI_ELFv2" + fi if test "x$OPENJDK_TARGET_OS" = xlinux; then - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" + COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX" fi diff --git a/SOURCES/pr2842-01.patch b/SOURCES/pr2842-01.patch index 4ee4c55..faaa309 100644 --- a/SOURCES/pr2842-01.patch +++ b/SOURCES/pr2842-01.patch @@ -7,16 +7,16 @@ 8031668, PR2842: TOOLCHAIN_FIND_COMPILER unexpectedly resolves symbolic links Reviewed-by: erikj, ihse -diff -r f0635543beb3 -r 842cc183c9f6 common/autoconf/toolchain.m4 ---- openjdk/./common/autoconf/toolchain.m4 Wed Jan 27 02:50:07 2016 +0000 -+++ openjdk/./common/autoconf/toolchain.m4 Tue Jan 14 10:25:22 2014 -0800 -@@ -188,8 +188,8 @@ +diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 +--- openjdk///common/autoconf/toolchain.m4 ++++ openjdk///common/autoconf/toolchain.m4 +@@ -230,8 +230,8 @@ $1="$PROPER_COMPILER_$1" else AC_MSG_RESULT([no, keeping $1]) - $1="$TEST_COMPILER" fi + - TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) + TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) ]) diff --git a/SOURCES/pr2842-02.patch b/SOURCES/pr2842-02.patch index f5268fc..1812e19 100644 --- a/SOURCES/pr2842-02.patch +++ b/SOURCES/pr2842-02.patch @@ -7,10 +7,10 @@ 8148351, PR2842: Only display resolved symlink for compiler, do not change path Reviewed-by: erikj -diff -r 5096b6468914 common/autoconf/toolchain.m4 ---- openjdk/./common/autoconf/toolchain.m4 Tue Jan 14 10:25:22 2014 -0800 -+++ openjdk/./common/autoconf/toolchain.m4 Fri Feb 05 20:02:15 2016 +0000 -@@ -147,38 +147,22 @@ +diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 +--- openjdk///common/autoconf/toolchain.m4 ++++ openjdk///common/autoconf/toolchain.m4 +@@ -198,38 +198,22 @@ fi BASIC_FIXUP_EXECUTABLE($1) TEST_COMPILER="[$]$1" @@ -62,4 +62,4 @@ diff -r 5096b6468914 common/autoconf/toolchain.m4 + fi fi - TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) + TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) diff --git a/SOURCES/pr2974-rh1337583.patch b/SOURCES/pr2974-rh1337583.patch index 5c00050..4859ca6 100644 --- a/SOURCES/pr2974-rh1337583.patch +++ b/SOURCES/pr2974-rh1337583.patch @@ -7,9 +7,9 @@ PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings Summary: Add -systemlineendings option to keytool to allow system line endings to be used again. -diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/pkcs10/PKCS10.java ---- openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java Tue Dec 29 10:40:43 2015 -0500 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java Fri May 27 03:28:35 2016 +0100 +diff --git a/src/share/classes/sun/security/pkcs10/PKCS10.java b/src/share/classes/sun/security/pkcs10/PKCS10.java +--- openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java ++++ openjdk/jdk/src/share/classes/sun/security/pkcs10/PKCS10.java @@ -30,6 +30,7 @@ import java.io.IOException; import java.math.BigInteger; @@ -41,7 +41,7 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/pkcs10/PKCS1 /** * Constructs an unsigned PKCS #10 certificate request. Before this * request may be used, it must be encoded and signed. Then it -@@ -286,13 +296,39 @@ +@@ -293,13 +303,39 @@ */ public void print(PrintStream out) throws IOException, SignatureException { @@ -83,10 +83,10 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/pkcs10/PKCS1 out.println("-----END NEW CERTIFICATE REQUEST-----"); } -diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytool/Main.java ---- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java Tue Dec 29 10:40:43 2015 -0500 -+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java Fri May 27 03:28:35 2016 +0100 -@@ -117,6 +117,7 @@ +diff --git a/src/share/classes/sun/security/tools/keytool/Main.java b/src/share/classes/sun/security/tools/keytool/Main.java +--- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java ++++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Main.java +@@ -124,6 +124,7 @@ private String infilename = null; private String outfilename = null; private String srcksfname = null; @@ -94,7 +94,7 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytoo // User-specified providers are added before any command is called. // However, they are not removed before the end of the main() method. -@@ -163,7 +164,7 @@ +@@ -186,7 +187,7 @@ CERTREQ("Generates.a.certificate.request", ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME, STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS, @@ -103,7 +103,7 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytoo CHANGEALIAS("Changes.an.entry.s.alias", ALIAS, DESTALIAS, KEYPASS, KEYSTORE, STOREPASS, STORETYPE, PROVIDERNAME, PROVIDERCLASS, PROVIDERARG, -@@ -296,6 +297,7 @@ +@@ -319,6 +320,7 @@ STARTDATE("startdate", "", "certificate.validity.start.date.time"), STOREPASS("storepass", "", "keystore.password"), STORETYPE("storetype", "", "keystore.type"), @@ -111,7 +111,7 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytoo TRUSTCACERTS("trustcacerts", null, "trust.certificates.from.cacerts"), V("v", null, "verbose.output"), VALIDITY("validity", "", "validity.number.of.days"); -@@ -537,6 +539,8 @@ +@@ -559,6 +561,8 @@ protectedPath = true; } else if (collator.compare(flags, "-srcprotected") == 0) { srcprotectedPath = true; @@ -120,23 +120,23 @@ diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytoo } else { System.err.println(rb.getString("Illegal.option.") + flags); tinyHelp(); -@@ -1335,7 +1339,7 @@ +@@ -1463,7 +1467,7 @@ // Sign the request and base-64 encode it request.encodeAndSign(subject, signature); - request.print(out); + request.print(out, systemLineEndings); - } - /** -@@ -4191,4 +4195,3 @@ + checkWeak(rb.getString("the.generated.certificate.request"), request); + } +@@ -4540,4 +4544,3 @@ return new Pair<>(a,b); } } - -diff -r 0be28a33e12d -r 794541fbbdc3 src/share/classes/sun/security/tools/keytool/Resources.java ---- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java Tue Dec 29 10:40:43 2015 -0500 -+++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java Fri May 27 03:28:35 2016 +0100 +diff --git a/src/share/classes/sun/security/tools/keytool/Resources.java b/src/share/classes/sun/security/tools/keytool/Resources.java +--- openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java ++++ openjdk/jdk/src/share/classes/sun/security/tools/keytool/Resources.java @@ -168,6 +168,8 @@ "keystore password"}, //-storepass {"keystore.type", diff --git a/SOURCES/pr3479-rh1486025.patch b/SOURCES/pr3479-rh1486025.patch new file mode 100644 index 0000000..14c693b --- /dev/null +++ b/SOURCES/pr3479-rh1486025.patch @@ -0,0 +1,67 @@ +# 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 + +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/SOURCES/repackReproduciblePolycies.sh b/SOURCES/repackReproduciblePolycies.sh index 271cb74..f356bd3 100644 --- a/SOURCES/repackReproduciblePolycies.sh +++ b/SOURCES/repackReproduciblePolycies.sh @@ -1,13 +1,17 @@ #!/bin/sh +set -e # https://bugzilla.redhat.com/show_bug.cgi?id=1142153 M=META-INF/MANIFEST.MF -#P=/usr/lib/jvm/java/jre/lib/security -P=$1/lib/security +#P=/usr/lib/jvm/java/jre/lib/security/policy +P=$1/lib/security/policy +ERRORS=0 + for type in unlimited limited ; do for f in local_policy.jar US_export_policy.jar ; do -ORIG=$P/$f +ORIG=$P/$type/$f echo "processing $f ($ORIG)" if [ ! -f $ORIG ]; then echo "File not found! $ORIG" + let ERRORS=$ERRORS+1 continue fi d=`mktemp -d` @@ -35,3 +39,6 @@ NW=$d/$f touch -t 201401010000 $ORIG rm -rfv $d done + done + +exit $ERRORS diff --git a/SOURCES/rh1163501.patch b/SOURCES/rh1163501.patch index 851529f..99ff950 100644 --- a/SOURCES/rh1163501.patch +++ b/SOURCES/rh1163501.patch @@ -3,7 +3,7 @@ diff --git a/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java b +++ openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014 Red Hat Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -26,12 +26,12 @@ diff --git a/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java +++ openjdk/jdk/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java @@ -1,5 +1,6 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014 Red Hat Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -60,11 +61,11 @@ +@@ -61,11 +62,11 @@ private static void checkKeySize(int keysize) throws InvalidParameterException { @@ -48,7 +48,7 @@ diff --git a/src/share/classes/com/sun/crypto/provider/DHParameterGenerator.java diff --git a/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java b/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java --- openjdk/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java +++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java -@@ -285,11 +285,11 @@ +@@ -292,11 +292,11 @@ // this restriction is in the spec for DSA // since we currently use DSA parameters for DH as well, // it also applies to DH if no parameters are specified diff --git a/SOURCES/rh1367357.patch b/SOURCES/rh1367357.patch deleted file mode 100644 index 254be99..0000000 --- a/SOURCES/rh1367357.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/src/share/native/sun/java2d/cmm/lcms/cmstypes.c b/src/share/native/sun/java2d/cmm/lcms/cmstypes.c ---- openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c -+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c -@@ -1484,6 +1484,7 @@ - - // Check for overflow - if (Offset < (SizeOfHeader + 8)) goto Error; -+ if ((Offset + Len) > SizeOfTag + 8) goto Error; - - // True begin of the string - BeginOfThisString = Offset - SizeOfHeader - 8; diff --git a/SPECS/java-1.8.0-openjdk.spec b/SPECS/java-1.8.0-openjdk.spec index 66a76e7..206a5f6 100644 --- a/SPECS/java-1.8.0-openjdk.spec +++ b/SPECS/java-1.8.0-openjdk.spec @@ -178,10 +178,10 @@ # note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there. %global project aarch64-port %global repo jdk8u -%global revision aarch64-jdk8u144-b01 +%global revision aarch64-jdk8u151-b12 %global shenandoah_project aarch64-port %global shenandoah_repo jdk8u-shenandoah -%global shenandoah_revision aarch64-shenandoah-jdk8u144-b01 +%global shenandoah_revision aarch64-shenandoah-jdk8u151-b12 # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) %global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*}) @@ -527,8 +527,10 @@ exit 0 %{jvmjardir %%1} %dir %{_jvmdir}/%{jredir %%1}/lib/security %{_jvmdir}/%{jredir %%1}/lib/security/cacerts -%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/US_export_policy.jar -%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/local_policy.jar +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/policy/unlimited/US_export_policy.jar +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/policy/unlimited/local_policy.jar +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/policy/limited/US_export_policy.jar +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/policy/limited/local_policy.jar %config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/java.policy %config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/java.security %config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/blacklisted.certs @@ -792,7 +794,7 @@ Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{releas Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 0.%{buildver}%{?dist} +Release: 1.%{buildver}%{?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 @@ -831,10 +833,10 @@ Source1: %{shenandoah_project}-%{shenandoah_repo}-%{shenandoah_revision}.tar.xz Source2: README.src # Use 'generate_tarballs.sh' to generate the following tarballs -# They are based on code contained in the IcedTea7 project. +# They are based on code contained in the IcedTea project (3.x). # Systemtap tapsets. Zipped up to keep it small. -Source8: systemtap-tapset-3.4.0pre01.tar.xz +Source8: systemtap-tapset-3.6.0pre02.tar.xz # Desktop files. Adapated from IcedTea. Source9: jconsole.desktop.in @@ -881,12 +883,14 @@ Patch512: no_strict_overflow.patch # 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-jdk.patch Patch514: pr1983-root.patch Patch515: pr2127.patch Patch516: pr2815.patch Patch517: pr2899.patch Patch518: pr2934.patch +Patch519: pr3479-rh1486025.patch # S8150954, RH1176206, PR2866: Taking screenshots on x11 composite desktop produces wrong result # In progress: http://mail.openjdk.java.net/pipermail/awt-dev/2016-March/010742.html Patch508: rh1176206-jdk.patch @@ -900,6 +904,8 @@ Patch204: hotspot-remove-debuglink.patch Patch205: dont-add-unnecessary-debug-links.patch # Enable debug information for assembly code files Patch206: hotspot-assembler-debuginfo.patch +# 8188030, PR3459, RH1484079: AWT java apps fail to start when some minimal fonts are present +Patch560: 8188030-pr3459-rh1484079.patch # Arch-specific upstreamable patches # PR2415: JVM -Xmx requirement is too high on s390 @@ -932,10 +938,10 @@ Patch400: 8154313.patch Patch526: 6260348-pr3066.patch # 8061305, PR3335, RH1423421: Javadoc crashes when method name ends with "Property" Patch538: 8061305-pr3335-rh1423421.patch -# 8181055, PR3394, RH1448880: PPC64: "mbind: Invalid argument" still seen after 8175813 -Patch551: 8181055-pr3394-rh1448880.patch -# 8181419, PR3413, RH1463144: Race in jdwp invoker handling may lead to crashes or invalid results -Patch553: 8181419-pr3413-rh1463144.patch + +# Patches upstream and appearing in 8u151 +# 8075484, PR3473, RH1490713: SocketInputStream.socketRead0 can hang even with soTimeout set +Patch561: 8075484-pr3473-rh1490713.patch # Patches upstream and appearing in 8u152 # 8153711, PR3313, RH1284948: [REDO] JDWP: Memory Leak: GlobalRefs never deleted when processing invokeMethod command @@ -946,11 +952,23 @@ Patch532: 8162384-pr3122-rh1358661.patch Patch547: 8173941-pr3326.patch # 8175813, PR3394, RH1448880: PPC64: "mbind: Invalid argument" when -XX:+UseNUMA is used Patch550: 8175813-pr3394-rh1448880.patch -# 8179084, PR3409, RH1455694: HotSpot VM fails to start when AggressiveHeap is set -Patch552: 8179084-pr3409-rh1455694.patch # 8175887, PR3415: C1 value numbering handling of Unsafe.get*Volatile is incorrect Patch554: 8175887-pr3415.patch +# Patches upstream and appearing in 8u162 +# 8181055, PR3394, RH1448880: PPC64: "mbind: Invalid argument" still seen after 8175813 +Patch551: 8181055-pr3394-rh1448880.patch +# 8181419, PR3413, RH1463144: Race in jdwp invoker handling may lead to crashes or invalid results +Patch553: 8181419-pr3413-rh1463144.patch +# 8145913, PR3466, RH1498309: PPC64: add Montgomery multiply intrinsic +Patch556: 8145913-pr3466-rh1498309.patch +# 8168318, PR3466, RH1498320: PPC64: Use cmpldi instead of li/cmpld +Patch557: 8168318-pr3466-rh1498320.patch +# 8170328, PR3466, RH1498321: PPC64: Use andis instead of lis/and +Patch558: 8170328-pr3466-rh1498321.patch +# 8181810, PR3466, RH1498319: PPC64: Leverage extrdi for bitfield extract +Patch559: 8181810-pr3466-rh1498319.patch + # Patches ineligible for 8u # 8043805: Allow using a system-installed libjpeg Patch201: system-libjpeg.patch @@ -958,8 +976,6 @@ Patch201: system-libjpeg.patch # Local fixes # PR1834, RH1022017: Reduce curves reported by SSL to those in NSS Patch525: pr1834-rh1022017.patch -# RH1367357: lcms2: Out-of-bounds read in Type_MLU_Read() -Patch533: rh1367357.patch # Turn on AssumeMP by default on RHEL systems Patch534: always_assumemp.patch # PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts) @@ -1298,6 +1314,7 @@ sh %{SOURCE12} %patch516 %patch517 %patch518 +%patch519 %patch400 %patch523 %patch526 @@ -1308,12 +1325,18 @@ sh %{SOURCE12} %patch547 %patch550 %patch551 -%patch552 %patch553 +%patch560 +%patch561 + +# PPC64 updates +%patch556 +%patch557 +%patch558 +%patch559 # RPM-only fixes %patch525 -%patch533 %patch539 # RHEL-only patches @@ -1962,6 +1985,68 @@ require "copy_jdk_configs.lua" %endif %changelog +* Wed Oct 18 2017 Andrew Hughes - 1:1.8.0.151-1.b12 +- Reverting to java-1.7.0-openjdk on AArch64 as rhel-7.4-z-java-unsafe-candidate using wrong suffix. +- Resolves: rhbz#1499207 + +* Wed Oct 18 2017 Jiri Vanek - 1:1.8.0.151-1.b12 +- repack policies adapted to new counts and paths +- note that also c-j-c is needed to make this apply in next update +- Resolves: rhbz#1499207 + +* Wed Oct 18 2017 Andrew Hughes - 1:1.8.0.151-0.b12 +- Update location of policy JAR files following 8157561. + +* Wed Oct 18 2017 Andrew Hughes - 1:1.8.0.151-0.b12 +- 8188030 is not yet upstream, so it should be listed under upstreamable fixes. +- 8181055, 8181419, 8145913, 8168318, 8170328 & 8181810 all now in 8u162. +- Resolves: rhbz#1499207 + +* Wed Oct 18 2017 Andrew Hughes - 1:1.8.0.151-0.b12 +- Correct fix to RH1191652 root patch so existing COMMON_CCXXFLAGS_JDK is not lost. +- Resolves: rhbz#1499207 + +* Tue Oct 17 2017 Jiri Vanek - 1:1.8.0.151-0.b01 +- Moving patch 560 out of ppc fixes +- Resolves: rhbz#1499207 + +* Tue Oct 17 2017 Andrew Hughes - 1:1.8.0.151-0.b12 +- Update SystemTap tapsets to version in IcedTea 3.6.0pre02 to fix RH1492139. +- Resolves: rhbz#1499207 + +* Tue Oct 17 2017 Andrew Hughes - 1:1.8.0.151-0.b12 +- Fix premature shutdown of NSS in SunEC provider. +- Resolves: rhbz#1499207 + +* Tue Oct 17 2017 Andrew Hughes - 1:1.8.0.151-0.b12 +- Add 8075484/PR3473/RH1490713 which is listed as being in 8u151 but not supplied by Oracle. +- Resolves: rhbz#1499207 + +* Tue Oct 17 2017 Andrew Hughes - 1:1.8.0.151-0.b12 +- Switch AArch64 to using java-1.8.0-openjdk to bootstrap until RH1482244 is fixed in bootstrap +- Resolves: rhbz#1499207 + +* Tue Oct 17 2017 Andrew Hughes - 1:1.8.0.151-0.b12 +- Update to aarch64-jdk8u151-b12 and aarch64-shenandoah-jdk8u151-b12. +- Update location of OpenJDK zlib system library source code in remove-intree-libraries.sh +- Drop upstreamed patches for 8179084 and RH1367357 (part of 8183028). +- Update RH1191652 (root) and PR2842 to accomodate 8151841 (GCC 6 support). +- Update PR2964/RH1337583 to accomodate 8171319 (keytool warning output) +- Update RH1163501 to accomodate 8181048 (crypto refactoring) +- Resolves: rhbz#1499207 + +* Mon Oct 16 2017 Andrew Hughes - 1:1.8.0.144-1.b01 +- Add IBM-supplied Montgomery backport, backport other ppc64 fixes & add CFF fix +- Resolves: rhbz#1499207 + +* Mon Oct 16 2017 Andrew Hughes - 1:1.8.0.144-0.b01 +- Reverted completely unnecessary patch addition which broke the RPM build. +- Resolves: rhbz#1499207 + +* Wed Oct 11 2017 Jiri Vanek - 1:1.8.0.144-0.b01 + - smuggled patch540, bug1484079.patch +- Resolves: rhbz#1499216 + * Tue Aug 15 2017 Andrew Hughes - 1:1.8.0.144-0.b01 - Update to aarch64-jdk8u144-b01 and aarch64-shenandoah-jdk8u144-b01. - Exclude 8175887 from Shenandoah builds as it has been included in that repo.