Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

Can running OpenCL sources be risky?

Is there a possibility for a malicious programmer to insert a trojan or a virus inside opencl source code?

1 Reply

It would be extremely difficult as OpenCL code isn't generic code. It has access to a limited set of functions and a new set of functions which are not useful for viruses. OpenCL code is executed from an host program which will pull out results from the CL. This possible virus would have to go through those very same channels. Very hard.

GPU cannot execute CPU functions. Some GPUs might ask the CPU to execute kernels...

... CPU kernels might be able to do that but I'd be very surprised if you could call an OS function or something as they're not defined in the language. I cannot see how somebody could workaround those limitations. There's a possible loophole about "native kernels" I haven't completely understood yet but I don't think they could allow this to happen without host program intervention.