Mercurial > hg > release > icedtea6-1.10
view patches/hotspot/hs20/arm.patch @ 2578:96394d394527
Add security patches for 2012/06/12.
2012-06-07 Andrew John Hughes <ahughes@redhat.com>
* Makefile.am:
(ICEDTEA_PATCHES): Add security patches. Make more
patches HotSpot-build specific.
* patches/ecj/override.patch:
Add additional cases from 7143872.
* patches/arm.patch: Moved to HotSpot-specific versions.
* patches/arch.patch,
* patches/freetypeversion.patch,
* patches/gcc-suffix.patch:
Fix to work with no fuzz.
* patches/hotspot/hs20/arm.patch,
* patches/hotspot/hs20/gcc-stack-markings.patch,
* patches/hotspot/hs20/numa_on_early_glibc.patch,
* patches/hotspot/hs20/sparc-trapsfix.patch,
* patches/hotspot/hs20/version-hotspot.patch:
Split to work with hs20 with no fuzz.
* patches/hotspot/original/arm.patch,
* patches/hotspot/original/gcc-stack-markings.patch,
* patches/hotspot/original/numa_on_early_glibc.patch,
* patches/hotspot/original/sparc-trapsfix.patch,
* patches/hotspot/original/version-hotspot.patch:
Likewise for hs19 (original).
* patches/jaxp-serial-version-uid.patch,
* patches/libraries.patch,
* patches/nio2.patch,
* patches/no-static-linking.patch,
* patches/openjdk/6693253-security_warning.patch,
* patches/openjdk/6766342-AA-simple-shape-performance.patch,
* patches/openjdk/6797139-jbutton_truncation.patch,
* patches/openjdk/6851973-kerberos.patch,
* patches/openjdk/7102369-7094468-rmiregistry.patch:
Fixed to work with no fuzz.
* patches/openjdk/hs20/7034464-hugepage.patch,
* patches/openjdk/hs20/7103224-glibc_name_collision.patch,
Fixed to work with hs20 and no fuzz.
* patches/openjdk/mutter.patch:
Fixed to work with no fuzz.
* patches/openjdk/original/7034464-hugepage.patch,
* patches/openjdk/original/7103224-glibc_name_collision.patch,
Fixed to work with hs19 (original) and no fuzz.
* patches/openjdk/remove-mimpure-option-to-gcc.patch:
Fixed to work with no fuzz.
* patches/security/20120612/7079902.patch,
* patches/security/20120612/7143606.patch,
* patches/security/20120612/7143614.patch,
* patches/security/20120612/7143617.patch,
* patches/security/20120612/7143851.patch,
* patches/security/20120612/7143872.patch,
* patches/security/20120612/7145239.patch,
* patches/security/20120612/7157609.patch,
* patches/security/20120612/7160677.patch,
* patches/security/20120612/7160757.patch,
* patches/security/20120612/hs20/7110720.patch,
* patches/security/20120612/hs20/7152811.patch,
* patches/security/20120612/original/7110720.patch,
* patches/security/20120612/original/7152811.patch,
Security patches for 2012/06/12.
* NEWS: Updated.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Fri, 08 Jun 2012 14:23:28 +0100 |
parents | cd6310f10fab |
children |
line wrap: on
line source
diff -Nru openjdk.orig/hotspot/src/cpu/zero/vm/bytecodes_zero.hpp openjdk/hotspot/src/cpu/zero/vm/bytecodes_zero.hpp --- openjdk.orig/hotspot/src/cpu/zero/vm/bytecodes_zero.hpp 2011-01-25 22:57:24.000000000 +0000 +++ openjdk/hotspot/src/cpu/zero/vm/bytecodes_zero.hpp 2011-01-28 01:46:18.769782690 +0000 @@ -1,6 +1,7 @@ /* * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2009 Red Hat, Inc. + * Copyright 2009 Edward Nevill * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +27,44 @@ #ifndef CPU_ZERO_VM_BYTECODES_ZERO_HPP #define CPU_ZERO_VM_BYTECODES_ZERO_HPP -// This file is intentionally empty +#ifdef HOTSPOT_ASM +#define _iaccess_0 ((Bytecodes::Code)0xdb) +#define _iaccess_1 ((Bytecodes::Code)0xdc) +#define _iaccess_2 ((Bytecodes::Code)0xdd) +#define _iaccess_3 ((Bytecodes::Code)0xde) + +#define _invokeresolved ((Bytecodes::Code)0xdf) +#define _invokespecialresolved ((Bytecodes::Code)0xe0) +#define _invokestaticresolved ((Bytecodes::Code)0xe1) + +#define _iload_iload ((Bytecodes::Code)0xe3) +#define _iload_iload_N ((Bytecodes::Code)0xe4) + +#define _dmac ((Bytecodes::Code)0xe6) + + _iload_0_iconst_N , // 231 + _iload_1_iconst_N , // 232 + _iload_2_iconst_N , // 233 + _iload_3_iconst_N , // 234 + _iload_iconst_N , // 235 + _iadd_istore_N , // 236 + _isub_istore_N , // 237 + _iand_istore_N , // 238 + _ior_istore_N , // 239 + _ixor_istore_N , // 240 + _iadd_u4store , // 241 + _isub_u4store , // 242 + _iand_u4store , // 243 + _ior_u4store , // 244 + _ixor_u4store , // 245 + _iload_0_iload , // 246 + _iload_1_iload , // 247 + _iload_2_iload , // 248 + _iload_3_iload , // 249 + _iload_0_iload_N , // 250 + _iload_1_iload_N , // 251 + _iload_2_iload_N , // 252 + _iload_3_iload_N , // 253 +#endif // HOTSPOT_ASM #endif // CPU_ZERO_VM_BYTECODES_ZERO_HPP diff -Nru openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make --- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make 2011-03-16 02:30:16.000000000 +0000 +++ openjdk/hotspot/make/linux/makefiles/zeroshark.make 2012-06-08 11:50:01.843317640 +0100 @@ -25,6 +25,43 @@ # Setup common to Zero (non-Shark) and Shark versions of VM +ifeq ($(ZERO_LIBARCH),arm) + +Obj_Files += asm_helper.o +Obj_Files += cppInterpreter_arm.o +Obj_Files += thumb2.o + +#XXX disabled until it has the updated frame anchor code (PR icedteopenjdk.orig/hotspot/323) +#XXX and the updated calling convention for deopt (PR icedteopenjdk.orig/hotspot/484) +#CFLAGS += -DHOTSPOT_ASM + +%.o: %.S + @echo Assembling $< + $(QUIETLY) $(REMOVE_TARGET) + $(COMPILE.CC) -o $@ $< $(COMPILE_DONE) + +cppInterpreter_arm.o: offsets_arm.s bytecodes_arm.s +thumb2.o: offsets_arm.s + +offsets_arm.s: mkoffsets + @echo Generating assembler offsets + ./mkoffsets > $@ + +bytecodes_arm.s: bytecodes_arm.def mkbc + @echo Generatine ARM assembler bytecode sequences + $(CC_COMPILE) -E -x c++ - < $< | ./mkbc - $@ $(COMPILE_DONE) + +mkbc: $(GAMMADIR)/tools/mkbc.c + @echo Compiling mkbc tool + $(CC_COMPILE) -o $@ $< $(COMPILE_DONE) + +mkoffsets: asm_helper.cpp + @echo Compiling offset generator + $(QUIETLY) $(REMOVE_TARGET) + $(CC_COMPILE) -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE) + +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 diff -Nru openjdk.orig/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp openjdk/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp --- openjdk.orig/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp 2011-03-16 02:30:16.000000000 +0000 +++ openjdk/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp 2012-06-08 11:50:01.851317769 +0100 @@ -1,6 +1,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2007 Red Hat, Inc. + * Copyright 2009 Edward Nevill * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,5 +28,54 @@ #include "interpreter/bytecodes.hpp" void Bytecodes::pd_initialize() { - // No zero specific initialization +#ifdef HOTSPOT_ASM + // Because iaccess_N can trap, we must say aload_N can trap, otherwise + // we get an assertion failure + def(_aload_1, "aload_1", "b", NULL, T_OBJECT , 1, true); + def(_aload_2, "aload_2", "b", NULL, T_OBJECT , 1, true); + def(_aload_3, "aload_3", "b", NULL, T_OBJECT , 1, true); + + def(_iaccess_0, "_iaccess_0", "b_jj", NULL, T_INT, 1, true, _aload_0); + def(_iaccess_1, "_iaccess_1", "b_jj", NULL, T_INT, 1, true, _aload_1); + def(_iaccess_2, "_iaccess_2", "b_jj", NULL, T_INT, 1, true, _aload_2); + def(_iaccess_3, "_iaccess_3", "b_jj", NULL, T_INT, 1, true, _aload_3); + + def(_invokeresolved, "invokeresolved", "bjj", NULL, T_ILLEGAL, -1, true, _invokevirtual); + def(_invokespecialresolved, "invokespecialresolved", "bjj", NULL, T_ILLEGAL, -1, true, _invokespecial); + def(_invokestaticresolved, "invokestaticresolved", "bjj", NULL, T_ILLEGAL, 0, true, _invokestatic); + + def(_dmac, "dmac", "b_", NULL, T_DOUBLE, -16, false, _dmul); + + def(_iload_iload, "iload_iload", "bi_i",NULL, T_INT, 2, false, _iload); + def(_iload_iload_N, "ilaod_iload_N", "bi_", NULL, T_INT, 2, false, _iload); + + def(_iload_0_iconst_N, "iload_0_iconst_N", "b_", NULL, T_INT, 2, false, _iload_0); + def(_iload_1_iconst_N, "iload_1_iconst_N", "b_", NULL, T_INT, 2, false, _iload_1); + def(_iload_2_iconst_N, "iload_2_iconst_N", "b_", NULL, T_INT, 2, false, _iload_2); + def(_iload_3_iconst_N, "iload_3_iconst_N", "b_", NULL, T_INT, 2, false, _iload_3); + def(_iload_iconst_N, "iload_iconst_N", "bi_", NULL, T_INT, 2, false, _iload); + + def(_iadd_istore_N, "iadd_istore_N", "b_", NULL, T_VOID, -2, false, _iadd); + def(_isub_istore_N, "isub_istore_N", "b_", NULL, T_VOID, -2, false, _isub); + def(_iand_istore_N, "iand_istore_N", "b_", NULL, T_VOID, -2, false, _iand); + def(_ior_istore_N, "ior_istore_N", "b_", NULL, T_VOID, -2, false, _ior); + def(_ixor_istore_N, "ixor_istore_N", "b_", NULL, T_VOID, -2, false, _ixor); + + def(_iadd_u4store, "iadd_u4store", "b_i", NULL, T_VOID, -2, false, _iadd); + def(_isub_u4store, "isub_u4store", "b_i", NULL, T_VOID, -2, false, _isub); + def(_iand_u4store, "iand_u4store", "b_i", NULL, T_VOID, -2, false, _iand); + def(_ior_u4store, "ior_u4store", "b_i", NULL, T_VOID, -2, false, _ior); + def(_ixor_u4store, "ixor_u4store", "b_i", NULL, T_VOID, -2, false, _ixor); + + def(_iload_0_iload, "iload_0_iload", "b_i", NULL, T_INT, 2, false, _iload_0); + def(_iload_1_iload, "iload_1_iload", "b_i", NULL, T_INT, 2, false, _iload_1); + def(_iload_2_iload, "iload_2_iload", "b_i", NULL, T_INT, 2, false, _iload_2); + def(_iload_3_iload, "iload_3_iload", "b_i", NULL, T_INT, 2, false, _iload_3); + + def(_iload_0_iload_N, "iload_0_iload_N", "b_", NULL, T_INT, 2, false, _iload_0); + def(_iload_1_iload_N, "iload_1_iload_N", "b_", NULL, T_INT, 2, false, _iload_1); + def(_iload_2_iload_N, "iload_2_iload_N", "b_", NULL, T_INT, 2, false, _iload_2); + def(_iload_3_iload_N, "iload_3_iload_N", "b_", NULL, T_INT, 2, false, _iload_3); + +#endif // HOTSPOT_ASM } diff -Nru 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 2011-03-16 02:30:16.000000000 +0000 +++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp 2012-06-08 11:50:01.851317769 +0100 @@ -749,10 +749,21 @@ return generate_entry((address) CppInterpreter::normal_entry); } +#ifdef HOTSPOT_ASM +extern "C" address asm_generate_method_entry( + AbstractInterpreter::MethodKind kind); +#endif // HOTSPOT_ASM + address AbstractInterpreterGenerator::generate_method_entry( AbstractInterpreter::MethodKind kind) { address entry_point = NULL; +#ifdef HOTSPOT_ASM + address asm_entry = asm_generate_method_entry(kind); + if (asm_entry) + return ((InterpreterGenerator*) this)->generate_entry(asm_entry); +#endif // HOTSPOT_ASM + switch (kind) { case Interpreter::zerolocals: case Interpreter::zerolocals_synchronized: diff -Nru 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 2011-03-16 02:30:16.000000000 +0000 +++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2012-06-08 11:50:01.851317769 +0100 @@ -116,6 +116,10 @@ ShouldNotCallThis(); } +#ifdef HOTSPOT_ASM +extern "C" int asm_check_null_ptr(ucontext_t *uc); +#endif // HOTSPOT_ASM + extern "C" int JVM_handle_linux_signal(int sig, siginfo_t* info, @@ -123,6 +127,12 @@ int abort_if_unrecognized) { ucontext_t* uc = (ucontext_t*) ucVoid; +#ifdef HOTSPOT_ASM + if (sig == SIGSEGV) { + if (asm_check_null_ptr(uc)) return 1; + } +#endif // HOTSPOT_ASM + Thread* t = ThreadLocalStorage::get_thread_slow(); SignalHandlerMark shm(t);