by logicallee · 11y ago · 0 comments
Read that again. CPU's should be able to be given a binary blob, and nothing bad can happen. It should be native speed because it's running on the actual metal. Like a hardware CPU, for the web.
A multigigaherz processor cannot render an 8-bit (that is 0-255 here) processor running at 1.79 MHz with a whopping 2 kB of RAM that is orders of magnitude slower: https://news.ycombinator.com/item?id=9624483
This is insanity. It's time for new hardware, that you can say "go wild" to by typing in an http address. 90% of the reason for enduring this slowness is security. (It's okay to interpret javascript - what's the worst that will happen. It's not okay to agree to run any binary regardless of what will be in it.)
It's time for Intel to make chips that you can hand to a website and say, "go wild". I think reinventing C in Javascript at 10% of performance (generously), is what is silly. Running Mario at a bit too slow to be called "perfect" is what is silly. It's 2015. Light travels 10 centimeters between clock cycles, with cores at 3 GHz. Do we really have to spend three billion cycles every second, on interpreting javascript?
† "Dedicated hardware would be silly – the current hardware can do secure sandboxing just fine. Cross platform compatibility is an issue with a lot of possible solutions; dedicated hardware would be a far worse case."
It is those points, where it interacts with other sub-systems to display things to the user or receive input from the user that things get dangerous. Even with IPC there is the possibility that there may be a security issue processing the content.
NaCL and others try to solve part of the problem by making it easier to sandbox the application by limiting what it can do, but there is still an interface into the real world.
That's great, but what happens when it wants do to I/O? You need a route out of the sandbox, ie an attack surface.
I don't think it even needs new hardware. Normal OS-level memory protection is good enough. What it does need is new software, to allow you to run a subwindow as another user, with a permissions-granting system for those occasions when you want to allow it access to the crown jewels like the microphone, accelerometer and GPS.
Native Client is a sandbox for running compiled C and C++ code in the browser efficiently and securely, independent of the user’s operating system.