User: Password:
Subscribe / Log in / New account

WebGL vulnerabilities

WebGL vulnerabilities

Posted May 26, 2011 13:20 UTC (Thu) by bjacob (subscriber, #58566)
In reply to: WebGL vulnerabilities by Cyberax
Parent article: WebGL vulnerabilities

Come on, the kernel mode driver is considerably less complex than the user mode part, and doesn't care about the details of what shaders do. And I've never seen a driver where the shader compiler was in kernel mode. Certainly not on Windows since the shader compiler is a DLL, D3DCompiler_43.dll; not on Mac either since I've seen lots of Firefox crash reports in the shader compiler showing that the compiler runs in the application process; and I *think* I've also seen such reports for the NVIDIA binary driver on linux too (plus, the NVIDIA linux kernel-mode driver is tiny and open-source and clearly doesn't have a shader compiler). So I really don't know any example of a kernel-mode shader compiler.

(Log in to post comments)

WebGL vulnerabilities

Posted May 26, 2011 14:08 UTC (Thu) by mjg59 (subscriber, #23239) [Link]

The open source part of the nvidia kernel driver is tiny. The driver itself is 13MB, which is sufficiently larger than my actual kernel that I think "tiny" really isn't the word.

WebGL vulnerabilities

Posted May 26, 2011 14:23 UTC (Thu) by bjacob (subscriber, #58566) [Link]

I stand corrected:

$ ls -l `find /lib/modules/ -name nvidia.ko`
-rw-r--r-- 1 root root 14827598 Apr 1 23:33 /lib/modules/2.6.32-5-amd64/nvidia/nvidia.ko

So do you think that NVIDIA's linux driver has a shader compiler in the kernel mode part?

Is there any reason why they would want to do that, as opposed to running the compiler in user mode?

WebGL vulnerabilities

Posted May 26, 2011 14:29 UTC (Thu) by bjacob (subscriber, #58566) [Link]

`nm nvidia.ko` doesn't show anything about 'compile' or 'shader', but there are definitely lots of cryptic symbol names like _nv025298rm, no idea what they do.

WebGL vulnerabilities

Posted May 26, 2011 16:53 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

Up to DX10 Windows graphics drivers worked totally in the kernel mode, without any usermode helpers (you can check it). So NVidia did have kernelmode compiler.

I guess that they just ported Windows code to Linux without rearchitecting it. They might have moved parts of the compiler to usermode, but there's still a huge amount of code in the kernel.

WebGL vulnerabilities

Posted Jun 10, 2011 1:36 UTC (Fri) by johntb86 (subscriber, #53897) [Link]

D3D Shader bytecode->gpu code compilation happens in kernel mode (session space) for XP and below. For Vista and above all shader compilation, even for D3D9, happens in usermode inside the process that created the shader. OpenGL shader compilation happens in usermode on every platform.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds