RFR: 8155023: jdk.vm.ci needs to securely export services
Alan Bateman
Alan.Bateman at oracle.com
Mon May 9 12:30:39 UTC 2016
On 09/05/2016 12:50, Doug Simon wrote:
> :
> Should I be passing System.getSystemClassLoader() as the second argument to ServiceLoader.load()?
>
Probably as I assume you want to restrict deployments to the class path
or module path. That is, I assume compiler implementation aren't going
to be bundled with applications that are loaded into a running VM.
If you do then you'll need to call ClassLoader::getSystemClassLoaded in
a privileged block.
The updated permission checks, to check JVMCIPermission, looks fine.
Strictly speaking then the Services.loadXXX methods should need it but
this isn't a general purpose service loading class so what you have is fine.
-Alan
More information about the hotspot-compiler-dev
mailing list