GPU Sniffing...
It seems that there are 3 scenarios:
1. Application-based:
One-off solutiion. Custom code.
2. Application-framework-based:
Use a framework to support development for the GPU. This solution could include introducing compiler tricks to introduce shader code. This is
3. GPU Sniffing:
Modify the kernel-level code that touches the hardware. This could be very tricky since there won't be any OpenGL libraries in the kernel to call to setup. Changes to the Xserver/DRI code (drivers) would be required.
Interestingly, this might be a new kind of security issue. In some ways it reminds me of my graphics-virus idea!!!! I assume that the vertex/pixel shaders need to run with a continuous execution context. But if not, then perhaps it's possible to make them memory (GPU memory) resident
Aside: GPU Virus
By modifying the video driver, code could be introduced that would bind shaders to the GPU. These shaders would act on the video stream to accomplish some task. Since the code is running on the GPU the host-system would not see or experience a performance degradation and as such could remain hidden (however, since the video driver would have been changed, an IDS such as Tripwire could be used to detect the GPU-virus). Such a GPU-virus could be used to sureptitiously gather data on the framebuffer.