[foreign-memaccess+abi] Integrated: 8307461: Linker::nativeLinker should not be restricted
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri May 5 12:31:51 UTC 2023
On Thu, 4 May 2023 14:36:11 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 518b4244
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.org/panama-foreign/commit/518b4244bc0412ddc78e34d5731925b6fb9bdf06
Stats: 123 lines in 11 files changed: 60 ins; 17 del; 46 mod
8307461: Linker::nativeLinker should not be restricted
Reviewed-by: jvernee
-------------
PR: https://git.openjdk.org/panama-foreign/pull/831
More information about the panama-dev
mailing list