[foreign-memaccess+abi] RFR: 8310659: The jar tool should support allowing access to restricted methods from executable jars [v4]
Jorn Vernee
jvernee at openjdk.org
Wed Jun 28 10:34:47 UTC 2023
On Wed, 28 Jun 2023 09:44:01 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Perhaps, setting an implicit system property in the launcher with the enable-native-access policy (e.g. either warn or deny) would be cleaner. This property will be set by the launcher and read by module bootstrap (like many other properties). This is, I believe, similar to the idea you mentioned above. IMHO that's cleaner in the sense that it's more in the spirit of how already launcher and module bootstrap talk to each other via properties side-channels.
>
> (That said, we still have a problem, in that, by the time we get to LauncherHelper, ModuleBootstrap has already ran. But perhaps we can delay initialization of `HAS_ENABLE_NATIVE_ACCESS_FLAG` on first use, and make the field stable).
> once a manifest specifies the Enable-Native-Access attribute, can the command line still add other modules in the trusted bubble? If yes, that's ok. If no, then we have a problem.
The answer is "yes", and I've added some extra tests that verify that as well.
I've pushed the new implementation that only allows `ALL-UNNAMED` as a value for `Enable-Native-Access`. I've kept this mutable flag for now, but added a comment as well. (until we figure out what we want to do here)
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/843#discussion_r1245016320
More information about the panama-dev
mailing list