News for hackers. Stuff that matters.
Re:Spectre mitigations murder userspace performance by IshKebab on Saturday June 19, 2021 @09:21AM (#27560232)
Kind of feels like apps should opt in to (or out of) mitigations individually. Obviously a web browser needs it, but does Clang? VSCode? Zoom? Probably not.
Re:Spectre mitigations murder userspace performance by dijit on Saturday June 19, 2021 @09:36AM (#27560351)
Three main things here:

1) we can’t trust people to categorise their own apps because the incentive for performance over security is a trade off we’ve all made time and time again.

2) efforts to address mandatory access controls have a coloured history here: selinux and apparmor both have very low adoption rates no matter your personal anecdotes.

3) These mitigation’s are so thorough that it would be more expensive on performance to even _check_ per application than it would be just to enable it everywhere.

Re:Spectre mitigations murder userspace performance by staticassertion on Saturday June 19, 2021 @03:15PM (#27563494)
I don't think that (3) is true.
Re:Spectre mitigations murder userspace performance by dijit on Saturday June 19, 2021 @04:24PM (#27564125)
How would you implement such a change?

Considering that you have:

A) some list of allowed applications/programs

B) a run of this check on every syscall

C) to be faster than a TLB flush

Re:Spectre mitigations murder userspace performance by staticassertion on Saturday June 19, 2021 @05:58PM (#27564863)
I don't know but I can't imagine a highly predictable branch being slower than a TLB flush.
Re:Spectre mitigations murder userspace performance by dijit on Saturday June 19, 2021 @06:15PM (#27564986)
Well consider the fact that checking a table of “ok” programs is a branch and a lookup in of itself.
Re:Spectre mitigations murder userspace performance by carl_dr on Saturday June 19, 2021 @07:13PM (#27565410)
It would be a branch, but surely it would be a flag on the process struct set when the process started, rather than a lookup each time.
Re:Spectre mitigations murder userspace performance by staticassertion on Saturday June 19, 2021 @06:24PM (#27565054)
Yeah that should be really fast, still. Programs could also opt to just tell the OS "hey don't check this system call from me", on each system call, avoiding any lookup.

The impact of TLB flushing, not just the cost of the flush, is really significant - it's going to take a lot of work to be as expensive within the syscall path.

Re:Spectre mitigations murder userspace performance by saati on Sunday June 20, 2021 @05:12AM (#27568384)
What would stop malware telling the os to not check it?
Re:Spectre mitigations murder userspace performance by binarybanana on Sunday June 20, 2021 @11:30AM (#27570985)
Nothing, but that only makes reading the malware's memory possible with these exploits. That malware won't be able to access memory of some other process, if that other process is using those flags itself.

Edit: For that to work that flag would have to work on the context switch level. So every time you switch away from a sensitive process, flush all buffers and whatever else, then switch. This also requires the kernel itself to enable mitigations as necessary when it touches encryption keys before switching back to user space.

Re:Spectre mitigations murder userspace performance by staticassertion on Sunday June 20, 2021 @05:10PM (#27573939)
That assumes that the malware can already have arbitrary control over system calls, at which point spectre isn't the issue.
Re:Spectre mitigations murder userspace performance by ikiris on Saturday June 19, 2021 @06:19PM (#27565025)
Just require everyone evil to set the evil bit, and everything would be much easier.
Re:Spectre mitigations murder userspace performance by edflsafoiewq on Saturday June 19, 2021 @09:51AM (#27560450)
Didn't browsers implement their own mitigations? Or were those only for some vulns?
Re:Spectre mitigations murder userspace performance by kzrdude on Saturday June 19, 2021 @09:56AM (#27560482)
Vscode is a browser
Re:Spectre mitigations murder userspace performance by Nullabillity on Saturday June 19, 2021 @10:17AM (#27560624)
As in "it runs JavaScript and renders HTML", yes. As in "it runs stuff in a security sandbox", no.
Re:Spectre mitigations murder userspace performance by squiggleblaz on Saturday June 19, 2021 @04:58PM (#27564412)
How about extensions? I would have thought these amount to a comparable security concern as web pages. Do they have adequate isolation?
Re:Spectre mitigations murder userspace performance by IshKebab on Saturday June 19, 2021 @05:54PM (#27564822)
No, extensions are fully trusted. They can do anything.