News for hackers. Stuff that matters.
Re:Chrome dev on WebGL security and Microsoft bullshit by daleharvey on Tuesday June 21, 2011 @08:39AM (#2678482)
> Silverlight has nothing to do with XNA linked by the author. But even if we assume that SL5 uses XNA

I am not amazingly familiar with windows development, but "The core of the XNA Games Studio 4.0 graphics libraries is now included in Silverlight 5 Beta and is used to create 3D graphics. ", doesnt seem like a large assumption

> "John Carmack (strong OGL supporter) agrees with MS on this one yet it is some random Google employee who gets his word spread"

I have a feeling the chrome developers have a better idea about how to sandbox a browser than John Carmack does, as awesome as he is, this is just arguing to authority when there is a long list of points that OP made that havent been refuted.

Re:Chrome dev on WebGL security and Microsoft bullshit by hubriz on Tuesday June 21, 2011 @11:48AM (#2679245)
> doesnt seem like a large assumption

It is for the reason I've mentioned before: XNA abstracts out pretty much everything. With XNA you're not programming to the metal anymore, which is unfortunately true with WebGL. The greatest concern seems to be with the way OGL handles various buffers. For example in WebGL it is possible to create bufferData stating that it's of size X and provide Y values with Y much smaller than X. What you get is a buffer full of stale data from the memory. Bad idea.

Also there's much less "stuff" you can break in XNA with lower profile levels (feature sets) which are suitable for the web. E.g. you can't write shaders for the mobile devices today for both security and perf reasons. You get a preset amount of them and that's it. Yes, it's limiting, but you can't choke GPU to death and you can't submit shader payload that's known to crash given driver.

It's all about false equivalence that author makes in his blog entry. Problems exist with pretty much every piece of advanced software. But you can add small attack vector, or a large one. They are not equal and making it seem otherwise is bogus.

JS is amazing and I love 2D canvas. But WebGL is trying to put low-level stuff in the high-level code. It's awesome in terms of performance, but is inherently fragile and may be abused easily. It seems that it's not sensible programmers MS is afraid of but malicious attackers. And it's very unlikely that WebGL won't be happily abused.

As for Carmack, he stated at various occasions that he's closely following web graphics. He's also more than knowledgeable about the issues with drivers, how they can be hit even accidentally and how (un)likely it is for hardware vendor to fix them timely.

Also aside from the security, drawing from my experience, it is extremely difficult to make semi-advanced graphics code perform well and look acceptably similar on different GPUs. This is something APIs exposed in the high-level languages (which JS I think undeniably is) should hide from the developer, not dump on him. The fact that there are two different 3D canvas contexts - webgl and experimental-webgl - doesn't really help.

Re:Chrome dev on WebGL security and Microsoft bullshit by magicalist on Tuesday June 21, 2011 @05:29PM (#2680503)
> The greatest concern seems to be with the way OGL handles various buffers. For example in WebGL it is possible to create bufferData stating that it's of size X and provide Y values with Y much smaller than X. What you get is a buffer full of stale data from the memory. Bad idea.

Please at least check these things before asserting them. Assuming good will, I can see how it might be easy to assume that some things that are true in desktop opengl will be true in webgl, but both the linked blog post and the webgl spec explicitly state that all buffers are initialized upon creation, and all access calls are bounds checked. Tests of this are also part of the webgl conformance suite.

If you want to see where it is specified, see here: http://www.khronos.org/registry/webgl/specs/latest/#4.1

Re:Chrome dev on WebGL security and Microsoft bullshit by hubriz on Wednesday June 22, 2011 @05:13AM (#2682368)
That is only partially correct. As mentioned before, there are two types of WebGL canvas contexts out there: webgl and experimental-webgl. Former does not put the GLX_ARB_create_context_robustness extension in place, which is basically what you're referring to.
Re:Chrome dev on WebGL security and Microsoft bullshit by magicalist on Tuesday June 21, 2011 @05:39PM (#2680545)
> It is for the reason I've mentioned before: XNA abstracts out pretty much everything. With XNA you're not programming to the metal anymore, which is unfortunately true with WebGL.

I have not followed silverlight development for some time, but looking at their documentation, they are using shaders written in HLSL under shader model 2.0. This is roughly equivalent to GLSL ES, which is what WebGL uses. As for the graphics functionality subset for mobile: that is exactly what OpenGL ES 2 was written for (with and by the mobile hardware vendors themselves). Hence the limitations on looping, dynamic indexing, etc.

Re:Chrome dev on WebGL security and Microsoft bullshit by hubriz on Wednesday June 22, 2011 @05:08AM (#2682352)
Up until now SL has supported pixel shaders, nothing more.
Re:Chrome dev on WebGL security and Microsoft bullshit by JonoW on Tuesday June 21, 2011 @09:08AM (#2678568)
> I have a feeling the chrome developers have a better idea about how to sandbox a browser than John Carmack does, as awesome as he is

In fairness, we have no idea of the extend of the authors expertise, I would bet John Carmack as an insanely intimate knowledge of drivers and their issues.

Re:Chrome dev on WebGL security and Microsoft bullshit by daleharvey on Tuesday June 21, 2011 @09:16AM (#2678599)
Yes to be honest I shouldnt have made that part of my point, none of us apart from the author and John Carmack know how they familiar they are with the issues involved in sandboxing browsers and driver reliability, and even then they could both be wrong.

We should just discuss the points made, not who is making them.

Re:Chrome dev on WebGL security and Microsoft bullshit by talmand on Tuesday June 21, 2011 @09:34AM (#2678653)
Who is making the comments you wish to discuss does have a great deal to do with it. I know nothing of OpenGL technologies so I would assume you wouldn't hold my opinion as high as Carmack's or Google employees.

Also, I've followed Carmack's exploits for something like twenty years. In my humble opinion, when he speaks of anything OpenGL I would suggest you listen to what he has to say.

Re:Chrome dev on WebGL security and Microsoft bullshit by daleharvey on Tuesday June 21, 2011 @10:29AM (#2678868)
I imagine there are thousands of people who are deeply familiar with openGL whose names you have never heard of.

If you dont understand a subject enough to be able to debate on the points that are being made rather than who is making them you should not be debating it

I just dont think its good practice to disregard someones opinion just because someone you have heard of disagrees with them

Re:Chrome dev on WebGL security and Microsoft bullshit by bonch on Tuesday June 21, 2011 @01:35PM (#2679628)
> I have a feeling the chrome developers have a better idea about how to sandbox a browser than John Carmack does, as awesome as he is, this is just arguing to authority when there is a long list of points that OP made that havent been refuted.

Carmack is probably more familiar with hardware drivers and 3D APIs than anyone working on Chrome. Plenty of the points made have been refuted in the discussion here.

Re:Chrome dev on WebGL security and Microsoft bullshit by nkassis on Tuesday June 21, 2011 @02:14PM (#2679785)
Well to be fair Gregg Tavares works directly on the issue since he is part of the team implementing WebGL in chrome. He might not have Carmack's insane amount of knowledge about the subject but I wouldn't discount Tavares' views completely here.