DescriptionAdd the web safe shader analyzer under the SH_WEB_SAFE compile flag.
Related files are under the new directory src/compiler/websafe.
Description of the algorithm:
http://code.google.com/p/mvujovic/wiki/ShaderControlFlowAnalysis
Background:
The web safe shader analyzer is one potential solution to timing attacks on textures containing cross-domain content or user agent data. This kind of analysis could be useful for both WebGL and CSS Shaders.
The web safe shader analyzer will reject a shader if it uses texture dependent data to affect control flow.
Other ways of affecting shader timing such as using NaNs in basic arithmetic operations or using built-in functions (e.g. atan) with different inputs are still under investigation. Checks for these cases are not yet implemented, but this code could be easily extended to cover those cases once we have more information.
BUG=http://code.google.com/p/angleproject/issues/detail?id=329
TEST=Run the translator with "-w" on a shader to use the SH_WEB_SAFE flag.
Additionally, use the "-d" flag to print out the dependency graph used to validate web safe fragment shaders.
Patch Set 1 #Patch Set 2 : Nit: Reorder includes to be in alphabetical order. #Patch Set 3 : Nit: Wrapped long lines. #
Total comments: 2
Patch Set 4 : SH_WEB_SAFE must now be used with SH_WEBGL_SPEC. Add documentation for SH_WEB_SAFE and SH_DEPENDENC… #
Total comments: 8
Patch Set 5 : SH_TIMING_RESTRICTIONS name change and other changes from Daniel's review. #
Total comments: 2
MessagesTotal messages: 24
|