[foreign-memaccess+abi] RFR: 8307461: Linker::nativeLinker should not be restricted [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri May 5 12:25:55 UTC 2023
> Since `Linker` is a sealed interface, we can now move restricted-ness from the static linker factory, down to the methods which are really problematic, namely `Linker::downcallHandle` and `Linker::upcallStub`.
>
> With this change, the list of restricted method looks as follows:
>
> * Linker::downcallHandle
> * Linker::upcallStub
> * MemorySegment::reinterpret
> * SymbolLookup::libraryLookup
>
> That is, crucially, restricted methods are methods that have a true risk of compromising the integrity of the Java platform. Making Linker::nativeLinker restricted casts too broad of a net, as obtaining the linker is not, per se, a dangerous or unsafe operation.
Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
- Merge branch 'foreign-memaccess+abi' into restricted_linker
- Initial push
-------------
Changes: https://git.openjdk.org/panama-foreign/pull/831/files
Webrev: https://webrevs.openjdk.org/?repo=panama-foreign&pr=831&range=01
Stats: 123 lines in 11 files changed: 60 ins; 17 del; 46 mod
Patch: https://git.openjdk.org/panama-foreign/pull/831.diff
Fetch: git fetch https://git.openjdk.org/panama-foreign.git pull/831/head:pull/831
PR: https://git.openjdk.org/panama-foreign/pull/831
More information about the panama-dev
mailing list