Sign In
Manage this list Sign In

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

leyden-dev

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
leyden-dev@openjdk.org

November 2023

  • 1 participants
  • 36 discussions
git: openjdk/leyden: hermetic-java-runtime: 2 new changesets
by duke 27 Nov '23

27 Nov '23
Changeset: f605992d Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-09-27 16:48:06 +0000 URL: https://git.openjdk.org/leyden/commit/f605992d58fcab3416d561a622238250a78a3… Ignore -server|-client options in Arguments::parse_each_vm_init_arg when executing in hermetic Java mode. As part of the CreateExecutionEnvironment operations, CheckJvmType checks for VM types (known types specified in lib/jvm.cfg) for normal non-hermetic Java execution mode. A side effect of CheckJvmType is the removal of -server|-client options if they exist in the command-line options. Arguments::parse_each_vm_init_arg would report 'Unrecognized option' error when encounters these options. With hermetic Java/JDK static linking, CreateExecutionEnvironment operations are skipped as they are not necessary. As a result, Arguments::parse_each_vm_init_arg may see -server|-client if the options exist in the command line when running in hermetic Java mode. This fix changes Arguments::parse_each_vm_init to not report error for -server|-client options. ! src/hotspot/share/runtime/arguments.cpp Changeset: 4e8b2eb6 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-09-29 15:48:57 +0000 URL: https://git.openjdk.org/leyden/commit/4e8b2eb65bbaea8dacfc51133cacf24de94d6… Use JavaHome.EXECUTABLE field for storing the hermetic executable name/path. The hermetic executable is the hermetic JAR (as the JAVA_HOME) by default. Launcher may set jdk.internal.misc.hermetic.executable property value, which is retrieved and stored in JavaHome.EXECUTABLE. ! src/java.base/share/classes/jdk/internal/misc/JavaHome.java
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: 4 new changesets
by duke 27 Nov '23

27 Nov '23
Changeset: e9709e73 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-09-25 16:46:24 +0000 URL: https://git.openjdk.org/leyden/commit/e9709e73b49171d556bae396243a717517202… Comment out and revert JavaHome related change in JDKPlatformProvider.java as it requires JavaHome class in boot JDK. ! src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java Changeset: bd9f0d26 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-09-25 17:32:13 +0000 URL: https://git.openjdk.org/leyden/commit/bd9f0d26c458b3f7eee4a74a84a8c4367ee5e… Add logging for hermetic Java. Hermetic Java related logging can be enabled by -Xlog:hermetic (or -Xlog:hermetic=info). ! src/hotspot/share/logging/logTag.hpp ! src/hotspot/share/runtime/arguments.cpp Changeset: cf1724e7 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-09-26 10:48:10 +0000 URL: https://git.openjdk.org/leyden/commit/cf1724e7060f3a48fe8524ce17d0dd94b72a1… Add DisableHermetic flag for disabling hermetic Java runtime. If a hermetic JAR is used, setting DisableHermetic to true disables the hermetic Java runtime (the JDK modules image and JDK resources) packaged in JAR. The flag has no effect, if the JAR is non-hermetic. It does not affect the JDK static support either. This option should only be used for a few limited use cases, such as: - During testing/debugging for isolating JDK issues when necessary. ! src/hotspot/share/runtime/arguments.cpp ! src/hotspot/share/runtime/arguments.hpp ! src/hotspot/share/runtime/globals.hpp ! src/hotspot/share/runtime/threads.cpp Changeset: 931b71b0 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-09-27 16:09:50 +0000 URL: https://git.openjdk.org/leyden/commit/931b71b0845d24b1949a23333ef1cdb3d6622… Support POSIX_SPAWN launch mechanism for ProcessBuilder.start() on hermetic Java. Moved the code from jspawnhelper.c to childproc.c and renamed the original main() (in jspawnhelper.c) to JDK_spawn_process() in childproc.c. The jspawnhelper.c main() is now a simple wrapper of JDK_spawn_process(). JDK_spawn_process() can be shared by jspawnhelper and launcher for creating child process using POSIX_SPAWN launch mechanism. ! src/java.base/share/classes/jdk/internal/misc/JavaHome.java ! src/java.base/unix/classes/java/lang/ProcessImpl.java ! src/java.base/unix/native/jspawnhelper/jspawnhelper.c ! src/java.base/unix/native/libjava/ProcessImpl_md.c ! src/java.base/unix/native/libjava/childproc.c ! src/java.base/unix/native/libjava/childproc.h
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: Support hermetic JAR packaged lib/ct.sym file.
by duke 27 Nov '23

27 Nov '23
Changeset: d05373a8 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-09-01 14:50:25 +0000 URL: https://git.openjdk.org/leyden/commit/d05373a8b2cdfff61c25780cf2b8ea017680e… Support hermetic JAR packaged lib/ct.sym file. Removed the use of the static final 'symbolFileLocation' field, which defines the path subcomponents of the 'lib/ct.sym' file. Instead, the path elements are passed as the arguments of JavaHome.getJDKResource(). That provides more complete and precise logging information for verifying the runtime access of ct.sym file path. This change requires JavaHome class in the boot JDK. ! src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: 3 new changesets
by duke 27 Nov '23

27 Nov '23
Changeset: 0dfb6314 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-30 15:57:00 +0000 URL: https://git.openjdk.org/leyden/commit/0dfb6314221009881ebc35d0e5db75a7a3481… Initial support for accessing hermetic JAR packaged JDK resource files via java.home in JDK. A jdk.internal.misc.JavaHome class is introduced to encapsulate the hermetic JAR packaging details and provide a set of APIs for accessing the JDK resource files via java.home. The current change handles the access to the following files within the JDK code. Other JDK resource files will be handled by follow up CL(s). - <jdk>/conf/logging.properties - <jdk>/conf/net.properties - <jdk>/conf/security/java.security - <jdk>/conf/security/java.policy - <jdk>/lib/security/blacklisted.certs - <jdk>/lib/security/cacerts - <jdk>/lib/security/default.policy - <jdk>/lib/security/public_suffix_list.dat - <jdk>/lib/psfont.properties.ja - <jdk>/lib/psfontj2d.properties Handle the following entry with file:${java.home} URL pattern in java.security, e.g.: - file:${java.home}/conf/security/java.policy Change jdk.internal.jimage.ImageReaderFactory.getImageReader() to use the jar path if a jar file is the java home. Split the main logic of java.security.KeyStore.getInstance(File, char[], LoadStoreParameter, boolean) into a private helper method, which is used by the original getInstance() method and sun.security.tools.KeyStoreUtil.getCacertsKeyStore() via reflection: private static final KeyStore getInstance(InputStream in, char[] password, LoadStoreParameter param, boolean hasPassword) ! src/java.base/share/classes/java/security/KeyStore.java ! src/java.base/share/classes/java/security/Security.java ! src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java + src/java.base/share/classes/jdk/internal/misc/JavaHome.java ! src/java.base/share/classes/sun/net/NetProperties.java ! src/java.base/share/classes/sun/security/provider/PolicyFile.java ! src/java.base/share/classes/sun/security/tools/KeyStoreUtil.java ! src/java.base/share/classes/sun/security/util/DomainName.java ! src/java.base/share/classes/sun/security/util/UntrustedCertificates.java ! src/java.desktop/share/classes/sun/print/PSPrinterJob.java ! src/java.logging/share/classes/java/util/logging/LogManager.java Changeset: de2cfdda Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-31 12:21:19 +0000 URL: https://git.openjdk.org/leyden/commit/de2cfdda4b3e4850529d10009688df10a0106… Support hermetic JAR packaged conf/security/policy/{limited|unlimited} cryptography extension policy files. ! src/java.base/share/classes/javax/crypto/JceSecurity.java.template Changeset: f442ea65 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-31 18:39:26 +0000 URL: https://git.openjdk.org/leyden/commit/f442ea65a8fd3faf8c09991f92e5bc3cd99e2… Support runtime accessing for hermetic JAR packaged JDK-bundled fonts (<jdk>/lib/fonts/*.ttf) and <jdk>/lib/fontconfig.<os>.properties. In sun.awt.FontConfiguration, we use JavaHome.getJDKResource API to access hermetic JAR packaged fontconfig property file. With this, we can now support hermetic JDK-bundled fonts files specified by fontconfig property using $JRE_LIB_FONTS path. sun.font.SunFontManager.registerFontFile() implements the support for hermetic case using java.awt.Font.createFont(int, InputStream) API, which can handle font file as a JAR resource. Font file path using $JRE_LIB_FONTS in fontconfig properties is mapped to JAR URL for hermetic packaged JDK fonts, e.g.: $JRE_LIB_FONTS/Font file path using $JRE_LIB_FONTS in fontconfig properties is mapped to JAR URL for hermetic packaged JDK fonts, e.g.: $JRE_LIB_FONTS/<font>.ttf map to: jar:file:///<hermetic_jdk>/lib/fonts/<font>.ttf For non-hermetic case, the font file is still mapped to normal file path. ! src/java.desktop/share/classes/sun/awt/FontConfiguration.java ! src/java.desktop/share/classes/sun/font/SunFontManager.java ! src/java.desktop/unix/classes/sun/font/MFontConfiguration.java ! src/java.desktop/windows/classes/sun/awt/Win32FontManager.java
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: 2 new changesets
by duke 27 Nov '23

27 Nov '23
Changeset: ba479cbc Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-24 11:40:27 +0000 URL: https://git.openjdk.org/leyden/commit/ba479cbc8883ae3f3ab31be37bc41844fd7ab… Fix linux-x86 build failure caused by error 'cannot convert 'size_t*' {aka 'unsigned int*'} to 'julong*' {aka 'long long unsigned int*'}'. ! src/hotspot/share/runtime/arguments.cpp Changeset: 3435c0ea Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-28 12:23:38 +0000 URL: https://git.openjdk.org/leyden/commit/3435c0ead7e21c55ee7320a82135b95c37c46… Handle the case for hermetic JAR embedded modules in skip_first_path_entry(), when checking the shared classpath. In a hermetic JAR, the 'modules' image is part of the JAR and there is no separate modules file. In that case, we set up the JAR instead of the modules file as the first path entry. So skip_first_path_entry() needs to take that into consideration. The other place that checks for MODULES_IMAGE_NAME (modules) is in ClassLoader::setup_boot_search_path(), which is already fixed by https://github.com/openjdk/jdk/commit/8b5526c4ba8a852d67453d199634c80f5f3b2…. ! src/hotspot/share/cds/filemap.cpp
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: 2 new changesets
by duke 27 Nov '23

27 Nov '23
Changeset: 45fd9411 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-21 15:27:36 +0000 URL: https://git.openjdk.org/leyden/commit/45fd9411732479a9b02fd1bf860f30a0e3de5… Rename set_static_jdk to JVM_SetStaticJDK and is_static_jdk to JVM_IsStaticJDK. Resolve cherrypick merge conflict. ! src/hotspot/share/classfile/classLoader.cpp ! src/hotspot/share/runtime/java.cpp ! src/hotspot/share/runtime/java.hpp ! src/hotspot/share/runtime/os.cpp ! src/hotspot/share/utilities/zipLibrary.cpp ! src/java.base/share/native/libjli/java.c Changeset: 09837103 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-22 15:04:31 +0000 URL: https://git.openjdk.org/leyden/commit/09837103a40acfb1f58071ece19d03a218c70… Add JVM_SetStaticJDK in symbols-unix. ! make/data/hotspot-symbols/symbols-unix
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: 2 new changesets
by duke 27 Nov '23

27 Nov '23
Changeset: 47b3fbcc Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-18 17:50:36 +0000 URL: https://git.openjdk.org/leyden/commit/47b3fbcccc943a1a3e758776ff3cd35608897… JDK support for hermetic JAR packaged jimage (aka runtime image). This handles the JDK runtime image that's packaged within the hermetic JAR at a specific file offset (page aligned). In hermetic JAR, the <JDK>/lib/'modules' data is packed within the JVM data section, which is between the ELF section and the JAR section in a deploy JAR. The start offset of the 'modules' data is page aligned. Special launcher argument that can be passed to the VM: -XX:UseHermeticJDK=<deploy_jar_path>,<jimage_start_offset> The jimage start offset is used when opening/mapping and reading the jimage. ! src/hotspot/share/classfile/classLoader.cpp ! src/hotspot/share/runtime/arguments.cpp ! src/hotspot/share/runtime/arguments.hpp ! src/hotspot/share/runtime/globals.hpp ! src/hotspot/share/runtime/os.cpp ! src/hotspot/share/runtime/threads.cpp ! src/java.base/share/native/libjimage/imageFile.cpp ! src/java.base/share/native/libjimage/imageFile.hpp ! src/java.base/share/native/libjimage/jimage.cpp ! src/java.base/share/native/libjimage/jimage.hpp Changeset: 7bc0ac53 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-18 20:50:10 +0000 URL: https://git.openjdk.org/leyden/commit/7bc0ac530f3ac0e7008a5285c4e47f007eec9… Map hermetic packaged modules using the modules size correctly. With the hermetic Java support, we embed the JDK 'modules' image in the hermetic JAR at page aligned offset. The offset is recorded in the deploy JAR manifest 'JDK-Lib-Modules-Offset' attribute. At runtime, the recorded offset information is used by the VM to mmap the modules image. Also, record the 'modules' file size in deploy JAR manifest 'JDK-Lib-Modules-Size' attribute. The VM option, -XX:UseHermeticJDK is extended to include the image size: -XX:UseHermeticJDK:<executable_image_file_path>,<jdk_runtime_image_start_offset>,<jimage_size> At runtime, modules size from the manifest attribute may be retrieved and passed to the VM via -XX:UseHermeticJDK option. Both the hermetic 'modules' image offset and size are used when mmap'ing the 'modules' data. ! src/hotspot/share/classfile/classLoader.cpp ! src/hotspot/share/runtime/arguments.cpp ! src/hotspot/share/runtime/arguments.hpp ! src/java.base/share/native/libjimage/imageFile.cpp ! src/java.base/share/native/libjimage/imageFile.hpp ! src/java.base/share/native/libjimage/jimage.cpp ! src/java.base/share/native/libjimage/jimage.hpp
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: 2 new changesets
by duke 27 Nov '23

27 Nov '23
Changeset: 77ab593d Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-17 10:07:56 +0000 URL: https://git.openjdk.org/leyden/commit/77ab593d5f110a0b0502f5f180ded85eda6c2… Redefine 'BaseThread' to 'HotspotBaseThread' in hotspot. Change SA (serviceability agent) to use 'HotspotBaseThread' correspondingly. ! src/hotspot/share/runtime/threadLocalStorage.hpp ! src/hotspot/share/utilities/globalDefinitions.hpp ! src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/Thread.java Changeset: 4faa3a96 Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-17 16:32:18 +0000 URL: https://git.openjdk.org/leyden/commit/4faa3a964ec550e410c741048c7e0ed99ac64… Fix Thread symbols in _ZN10JavaThread25aarch64_get_thread_helperEv, for the HotspotBaseThread change. This fix was contributed by Chuck Rasbold (@rasbold). ! src/hotspot/os_cpu/linux_aarch64/threadLS_linux_aarch64.S
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: - Fix build failure caused by missing 'IsStaticJDK' declaration in awt_LoadLibrary.c.
by duke 27 Nov '23

27 Nov '23
Changeset: 93fd739c Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-14 14:46:51 +0000 URL: https://git.openjdk.org/leyden/commit/93fd739c639d6f3eaafbc08c039b481d33867… - Fix build failure caused by missing 'IsStaticJDK' declaration in awt_LoadLibrary.c. - Fix erroneous dlsym call in jdk.jdwp.agent/unix/native/libjdwp/linker_md.c. Tested the change by running: bin/javastatic -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=0 HelloWorld ! src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c ! src/jdk.jdwp.agent/unix/native/libjdwp/linker_md.c
1 0
0 0
git: openjdk/leyden: hermetic-java-runtime: - Add JNIEXPORT to JLI_IsStaticJDK.
by duke 27 Nov '23

27 Nov '23
Changeset: 135b202b Author: Jiangli Zhou <jianglizhou(a)google.com> Date: 2023-08-08 19:26:02 +0000 URL: https://git.openjdk.org/leyden/commit/135b202b8b7ef0de05904aee576e3ce1da40c… - Add JNIEXPORT to JLI_IsStaticJDK. - Fix errornous dlsym call for isStaticJDK check in AWT_OnLoad. ! src/java.base/share/native/libjli/java.h ! src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • Older →


Terms of Use • License: GPLv2 • Privacy • Trademarks