4 ms·
Right, it totally wouldn't help current Intel processors. This is totally a future microarchtectural change. Also, there's not really a way to use Rings 1 and
by monocasa 9y ago
Right, it totally wouldn't help current Intel processors. This is totally a future microarchtectural change. Also, there's not really a way to use Rings 1 and 2 in long mode since long mode requires paging to be enabled and the PTEs only have the one bit for ring selection.
But (given the idea that we're talking about future chips) it could help describe protection boundaries in a finer grain way to protect against Spectre in the same way that AMD is protected against Meltdown.
The main issue with spectre (in a long term sense) is that the CPU really has no way of understanding that you're running lower privileged code in a higher context, whether that be BPF in the kernel, or JS in the browser. IMO, we're going to be fighting the same battle over and over again as the all of the mitigations so far are heavily microarchitecure specific.
- rayiner 9y agoAh okay I get it.
- pdpi 9y agoBPF in the kernel was just for the sake of expediency. The point is that the BPF code shows a somewhat common pattern that real kernel code also uses. The “real” exploit is finding a syscall that falls into that pattern somewhere
- monocasa 9y agoAbsolutely. There's memory unsafety bugs that'll allow you to ROP, and probably otherwise valid code that doesn't need unsafety that'll speculatively hit user memory in current kernels. But in the context of trends, we're moving towards User^Kernel memory mapping with features SMAP. That idea combined with kernel changes to holistically enforce separation boundaries more effectively along with cache partitioning AFAICT leads to potential end game win on this front. Edit: And to be totally up front my major side project is adding a BPF/seccomp esque virtual machine into a formally verified kernel, so my head is in that space.