annotate src/os_cpu/linux_x86/vm/os_linux_x86.hpp @ 5001:9790755de9a6

8023956: Provide a work-around to broken Linux 32 bit "Exec Shield" using CS for NX emulation (crashing with SI_KERNEL) Summary: Execute some code at a high virtual address value, and keep mapped Reviewed-by: coleenp, zgu
author dsimms
date Wed, 25 Sep 2013 13:58:13 +0200
parents 7ab5f6318694
children
rev   line source
duke@0 1 /*
phh@3029 2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
duke@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 *
duke@0 5 * This code is free software; you can redistribute it and/or modify it
duke@0 6 * under the terms of the GNU General Public License version 2 only, as
duke@0 7 * published by the Free Software Foundation.
duke@0 8 *
duke@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 * accompanied this code).
duke@0 14 *
duke@0 15 * You should have received a copy of the GNU General Public License version
duke@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 *
trims@1472 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1472 20 * or visit www.oracle.com if you need additional information or have any
trims@1472 21 * questions.
duke@0 22 *
duke@0 23 */
duke@0 24
stefank@1879 25 #ifndef OS_CPU_LINUX_X86_VM_OS_LINUX_X86_HPP
stefank@1879 26 #define OS_CPU_LINUX_X86_VM_OS_LINUX_X86_HPP
stefank@1879 27
duke@0 28 static void setup_fpu();
duke@0 29 static bool supports_sse();
duke@0 30
phh@3029 31 static jlong rdtsc();
phh@3029 32
duke@0 33 static bool is_allocatable(size_t bytes);
duke@0 34
duke@0 35 // Used to register dynamic code cache area with the OS
duke@0 36 // Note: Currently only used in 64 bit Windows implementations
duke@0 37 static bool register_code_area(char *low, char *high) { return true; }
stefank@1879 38
dsimms@4956 39 /*
dsimms@4956 40 * Work-around for broken NX emulation using CS limit, Red Hat patch "Exec-Shield"
dsimms@4956 41 * (IA32 only).
dsimms@4956 42 *
dsimms@4956 43 * Map and execute at a high VA to prevent CS lazy updates race with SMP MM
dsimms@4956 44 * invalidation.Further code generation by the JVM will no longer cause CS limit
dsimms@4956 45 * updates.
dsimms@4956 46 *
dsimms@4956 47 * Affects IA32: RHEL 5 & 6, Ubuntu 10.04 (LTS), 10.10, 11.04, 11.10, 12.04.
dsimms@4956 48 * @see JDK-8023956
dsimms@4956 49 */
dsimms@4956 50 static void workaround_expand_exec_shield_cs_limit();
dsimms@4956 51
stefank@1879 52 #endif // OS_CPU_LINUX_X86_VM_OS_LINUX_X86_HPP