Mercurial > hg > release > icedtea6-1.6
view patches/hotspot/original/systemtap.patch @ 1723:d48a4f542e7d
Add new security patches and fix srcdir!=builddir issues.
2009-03-30 Andrew John Hughes <ahughes@redhat.com>
* patches/icedtea-systemtap.patch:
Moved to HotSpot-specific patch tree.
* Makefile.am: Add new security patches
and add $(HSBUILD) to systemtap patch.
Put copied OpenJDK files in openjdk-copy
rather than a duplicate rt directory
in the build tree.
* NEWS: List new security patches.
* patches/hotspot/default/systemtap.patch:
From patches/icedtea-systemtap.patch.
* patches/hotspot/original/icedtea-format.patch,
* patches/hotspot/original/systemtap.patch:
Added for original HotSpot build.
* patches/security/20100330/6626217.patch,
* patches/security/20100330/6633872.patch,
* patches/security/20100330/6639665.patch,
* patches/security/20100330/6736390.patch,
* patches/security/20100330/6745393.patch,
* patches/security/20100330/6887703.patch,
* patches/security/20100330/6888149.patch,
* patches/security/20100330/6892265.patch,
* patches/security/20100330/6893947.patch,
* patches/security/20100330/6893954.patch,
* patches/security/20100330/6898622.patch,
* patches/security/20100330/6898739.patch,
* patches/security/20100330/6899653.patch,
* patches/security/20100330/6902299.patch,
* patches/security/20100330/6904691.patch,
* patches/security/20100330/6909597.patch,
* patches/security/20100330/6910590.patch,
* patches/security/20100330/6914823.patch,
* patches/security/20100330/6914866.patch,
* patches/security/20100330/6932480.patch,
* patches/security/20100330/hotspot/default/6894807.patch,
* patches/security/20100330/hotspot/original/6894807.patch:
New security and hardening patches
http://www.oracle.com/technology/deploy/security/critical-patch-updates/javacpumar2010.html
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Tue, 30 Mar 2010 23:04:54 +0100 |
parents | |
children | f9061e19dfb0 |
line wrap: on
line source
diff -Nru ../openjdk.orig/hotspot/build/linux/makefiles/dtrace.make ../openjdk/hotspot/build/linux/makefiles/dtrace.make --- ../openjdk.orig/hotspot/build/linux/makefiles/dtrace.make 2009-04-24 08:30:52.000000000 +0100 +++ ../openjdk/hotspot/build/linux/makefiles/dtrace.make 2010-03-30 20:43:06.000000000 +0100 @@ -25,3 +25,7 @@ # Linux does not build jvm_db LIBJVM_DB = +# But it does have a Systemtap dtrace compatible sys/sdt.h +CFLAGS += -DDTRACE_ENABLED + +# It doesn't support HAVE_DTRACE_H though. diff -Nru ../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 2010-03-30 20:41:19.000000000 +0100 +++ ../openjdk/hotspot/src/share/vm/prims/jni.cpp 2010-03-30 20:43:06.000000000 +0100 @@ -1744,10 +1744,7 @@ JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \ JNIWrapper("Set" XSTR(Result) "Field"); \ \ - HS_DTRACE_PROBE_CDECL_N(hotspot_jni, Set##Result##Field__entry, \ - ( JNIEnv*, jobject, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \ - HS_DTRACE_PROBE_N(hotspot_jni, Set##Result##Field__entry, \ - ( env, obj, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \ + FP_SELECT_##Result(DTRACE_PROBE4(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID, value),DTRACE_PROBE3(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID)); \ \ oop o = JNIHandles::resolve_non_null(obj); \ klassOop k = o->klass(); \ @@ -1921,10 +1918,7 @@ \ JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \ JNIWrapper("SetStatic" XSTR(Result) "Field"); \ - HS_DTRACE_PROBE_CDECL_N(hotspot_jni, SetStatic##Result##Field__entry,\ - ( JNIEnv*, jclass, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \ - HS_DTRACE_PROBE_N(hotspot_jni, SetStatic##Result##Field__entry, \ - ( env, clazz, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \ + FP_SELECT_##Result(DTRACE_PROBE4(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID, value),DTRACE_PROBE3(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID)); \ \ JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \ assert(id->is_static_field_id(), "invalid static field id"); \ @@ -2107,7 +2101,7 @@ DT_RETURN_MARK(GetObjectArrayElement, jobject, (const jobject&)ret); objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array)); if (a->is_within_bounds(index)) { - jobject ret = JNIHandles::make_local(env, a->obj_at(index)); + ret = JNIHandles::make_local(env, a->obj_at(index)); return ret; } else { char buf[jintAsStringSize]; @@ -2141,14 +2135,14 @@ #define DEFINE_NEWSCALARARRAY(Return,Allocator,Result) \ \ - DT_RETURN_MARK_DECL_FOR(Result, New##Result##Array, Return);\ + DT_RETURN_MARK_DECL(New##Result##Array, Return);\ \ JNI_ENTRY(Return, \ jni_New##Result##Array(JNIEnv *env, jsize len)) \ JNIWrapper("New" XSTR(Result) "Array"); \ DTRACE_PROBE2(hotspot_jni, New##Result##Array__entry, env, len);\ Return ret = NULL;\ - DT_RETURN_MARK_FOR(Result, New##Result##Array, Return, (const Return&)ret);\ + DT_RETURN_MARK(New##Result##Array, Return, (const Return&)ret);\ \ oop obj= oopFactory::Allocator(len, CHECK_0); \ ret = (Return) JNIHandles::make_local(env, obj); \ diff -Nru ../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 2010-03-30 20:41:21.000000000 +0100 +++ ../openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2010-03-30 20:43:54.000000000 +0100 @@ -2164,16 +2164,16 @@ FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false); FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true); } else if (match_option(option, "-XX:+ExtendedDTraceProbes", &tail)) { -#ifdef SOLARIS +#ifdef DTRACE_ENABLED FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true); FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true); FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true); FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true); -#else // ndef SOLARIS +#else // ndef DTRACE_ENABLED jio_fprintf(defaultStream::error_stream(), - "ExtendedDTraceProbes flag is only applicable on Solaris\n"); + "ExtendedDTraceProbes flag is only applicable on dtrace enabled builds\n"); return JNI_EINVAL; -#endif // ndef SOLARIS +#endif // ndef DTRACE_ENABLED } else #ifdef ASSERT if (match_option(option, "-XX:+FullGCALot", &tail)) { diff -Nru ../openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp ../openjdk/hotspot/src/share/vm/utilities/dtrace.hpp --- ../openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp 2009-04-24 08:30:57.000000000 +0100 +++ ../openjdk/hotspot/src/share/vm/utilities/dtrace.hpp 2010-03-30 20:43:06.000000000 +0100 @@ -3,6 +3,7 @@ #endif /* * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2009 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 @@ -25,14 +26,14 @@ * */ -#if defined(SOLARIS) && defined(DTRACE_ENABLED) +#if defined(DTRACE_ENABLED) #include <sys/sdt.h> #define DTRACE_ONLY(x) x #define NOT_DTRACE(x) -#else // ndef SOLARIS || ndef DTRACE_ENABLED +#else // ndef DTRACE_ENABLED #define DTRACE_ONLY(x) #define NOT_DTRACE(x) x @@ -43,9 +44,16 @@ #define DTRACE_PROBE3(a,b,c,d,e) {;} #define DTRACE_PROBE4(a,b,c,d,e,f) {;} #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} +#define DTRACE_PROBE6(a,b,c,d,e,f,g,h) {;} +#define DTRACE_PROBE7(a,b,c,d,e,f,g,h,i) {;} +#define DTRACE_PROBE8(a,b,c,d,e,f,g,h,i,j) {;} +#define DTRACE_PROBE9(a,b,c,d,e,f,g,h,i,j,k) {;} +#define DTRACE_PROBE10(a,b,c,d,e,f,g,h,i,j,k,l) {;} #endif +#if defined(SOLARIS) +// Solaris dtrace needs actual extern function decls. #define HS_DTRACE_PROBE_FN(provider,name)\ __dtrace_##provider##___##name @@ -53,6 +61,11 @@ DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args) #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \ DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args) +#else +// Systemtap dtrace compatible probes on GNU/Linux don't. +#define HS_DTRACE_PROBE_DECL_N(provider,name,args) +#define HS_DTRACE_PROBE_CDECL_N(provider,name,args) +#endif /* Dtrace probe declarations */ #define HS_DTRACE_PROBE_DECL(provider,name) \ @@ -91,6 +104,8 @@ uintptr_t,uintptr_t,uintptr_t)) /* Dtrace probe definitions */ +#if defined(SOLARIS) +// Solaris dtrace uses actual function calls. #define HS_DTRACE_PROBE_N(provider,name, args) \ DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args)