Live data from Hacker News

What Spectre and Meltdown Mean for WebKit

webkit.org

11–20 of 294 posts

Re: What Spectre and Meltdown Mean for WebKit

#11
post #8

Isn't Intel and AMD shipping new fence instructions that prevent speculative execution from progressing beyond a certain point? Why doesn't Webkit use those?

These mitigations are way cheaper than fences.

For example, for WebAssembly, we measured that the fence instruction was a 5x regression. That’s nuts. Index masking is a rounding error by comparison.

Re: What Spectre and Meltdown Mean for WebKit

#12

I really hate to see this rush to "make sure our code doesn't use branch prediction". It may be the best fix we have available now, but it's going to create a legacy of bizarre inefficient machine code that will last forever.

Our mitigations do not prevent branch prediction.

Re: What Spectre and Meltdown Mean for WebKit

#13

I really hate to see this rush to "make sure our code doesn't use branch prediction". It may be the best fix we have available now, but it's going to create a legacy of bizarre inefficient machine code that will last forever.

Our mitigations do not prevent branch prediction.

You are removing branches, and adding slightly less clear code to do it. If this resulted in faster or cleaner code you would already be doing it. So the OP’s point holds: if these security holes are fixed at the CPU level, there will still be a generation of software compiled with these mitigation’s in and no way for a user on a newer CPU to disable them.

EDIT: I just wanted to clarify here that I did not mean “all branches” just some of them, hence the name of the technique which is “branchless security” (which is a really good piece of engineering). The frustration is basically we have to bake in CPU model specific mitigation’s into binaries. You can of course patch it out, but the affected CPUs will in theory be in the wild for a long time to come even once corrected ones are released.

Re: What Spectre and Meltdown Mean for WebKit

#14

Earlier quoted context omitted.

Our mitigations do not prevent branch prediction.

You are removing branches, and adding slightly less clear code to do it. If this resulted in faster or cleaner code you would already be doing it. So the OP’s point holds: if these security holes are fixed at the CPU level, there will still be a generation of software compiled with these mitigation’s in and no way for a user on a newer CPU to disable them. EDIT: I just wanted to clarify here that I did not mean “all…

The mitigations are largely in code produced by the JIT. It's not hard to patch the JIT's codgen to back this out (perhaps even based on current CPU) if it becomes unnecessary. It would be nice if CPU architectures never had this fundamental vulnerability, but they do. So this seems like the best response for the reality we actually live in.

Re: What Spectre and Meltdown Mean for WebKit

#16
A lot of game-related media has reported that a lot of games are largely unaffected by Spectre and Meltdown. My impression is that the most common result is "about 3%." (With some notable exceptions, however.)

Does this bode well for Apple code, which seems to tend to pull in innovations from games into the general UI?

Re: What Spectre and Meltdown Mean for WebKit

#17

Earlier quoted context omitted.

Our mitigations do not prevent branch prediction.

You are removing branches, and adding slightly less clear code to do it. If this resulted in faster or cleaner code you would already be doing it. So the OP’s point holds: if these security holes are fixed at the CPU level, there will still be a generation of software compiled with these mitigation’s in and no way for a user on a newer CPU to disable them. EDIT: I just wanted to clarify here that I did not mean “all…

We are not removing branches.

To fix this in hardware without software changes you would have to disable branch prediction. That would perform worse than what we are doing.

Re: What Spectre and Meltdown Mean for WebKit

#18
Good work WebKit team in putting this together, it's just as good as Raspberry Pi's note on why it isn't affected by Spectre & Meltdown - https://www.raspberrypi.org/blog/why-raspberry-pi-isnt-vulne...

Of-course here, the mitigation are being detailed as well.

Re: What Spectre and Meltdown Mean for WebKit

#19
Restricting performance.now()'s resolution to 1ms is really bad news :( Once the other mitigations are in place, will the webkit team consider increasing the resolution again? Can we get a Developer menu or Web Inspector option to temporarily enable the old resolution again?

Re: What Spectre and Meltdown Mean for WebKit

#20
post #7

What is the reasoning behind reusing version numbers?

Apple does this sometimes for macOS. It's probably because it's an application update, not an OS update (so OS patch version does not change), and doesn't require a reboot.

This doesn’t explain why they kept Safari at the same version number.
Post reply on HN