[foreign-abi] minimizing the surface of restricted native access

Ty Young youngty1997 at gmail.com
Fri Nov 29 02:15:10 UTC 2019


Hi Maurizio,


Appreciate the attempt to offer a solution to the lack of lower level 
"unsafe" memory access. Last email thread that this was discussed I 
never really explained why I want/needed it, so I guess I'll do that now.


To summarize, I'm using Project Panama to create a common, high level 
abstractions over Nvidia's various C APIs that is both 
cross-platform(providing the platform supports the API to begin with) 
and easy to use for Java. For NVML(cross-platform) and NVXCtrl(Linux), 
Nvidia provides the full headers for those APIs which is great since the 
java.foreign API can be used which is really nice. They do not, however, 
provide complete headers for the Windows specific "NVAPI"... that is 
under NDA and only organizations such as board partners(think ASUS, MSI, 
EVGA, etc) have access to them.


That, however, doesn't mean you can't get your hands a little dirty and 
still get access. Someone made a blog post[1] detailing how they did 
just that in C.


(Hopefully you get where I'm going with this and haven't been pressured 
by legal to not respond. I know talking about this sort of thing is 
unpleasant.)


My understanding is that, in order to replicate what the blog does using 
Project Panama exclusively, the lower level("unsafe") API must be used 
since you cannot otherwise create a Pointer to the functions out of an 
address. Looking through the high level java.foreign API doesn't show 
anything obvious, anyway. This can only, from my understanding, be done 
with a lower level API.


Is this accurate?


[1] 
https://web.archive.org/web/20180221193221/https://1vwjbxf1wko0yhnr.wordpress.com/2015/08/10/overclocking-tools-for-nvidia-gpus-suck-i-made-my-own/



More information about the panama-dev mailing list