5 ms·
Because the OS has no say. A running program issues an assembly instruction to the CPU to read or write this register, and the CPU complies. For the OS to have
by anyfoo 5y ago
Because the OS has no say. A running program issues an assembly instruction to the CPU to read or write this register, and the CPU complies.
For the OS to have a say, the CPU would need to provide a way where the OS tells it (usually by setting certain values in other registers) that the CPU should not allow access, at least under certain circumstances.
The article actually does go into certain situations where the access is more restricted (search for "VHE"), but also in how that does not really apply here.
- slver 5y agoYou gotta access those bits though some instructions though. What if the command pipeline filters those instructions.
- deleted 5y ago[deleted]
- anyfoo 5y agoCan you elaborate what you mean? What is the "command pipeline" here?
- x0054 5y agoYou are working here with CPU registers. At this point the OS has no say, it’s a hardware bug. Not a particularly serious one though.
- slver 5y agoI didn't say the OS filters the pipeline. Modern CPUs have a lot of updateable microcode, including how it handles its command pipeline.
- throwaheyy 5y agoModern x86/x64 CPUs. The M1 might not have updatable microcode.
- dev_tty01 5y agoApple might consider microcode a vulnerability. Certainly a double-edged knife.
- marcan_42 5y agoThere is no indication that the M1 has updatable microcode, nor any other features that might allow such mitigation. (If it did, Apple would've fixed it; I did give them a 90 day disclosure warning and they're not lazy about fixing actual fixable bugs.)
- ncr100 5y agoAw - that was what I was worried about - without updatable microcode :nuke:.
- tomerdmann 5y agohttps://news.ycombinator.com/item?id=27286918 https://news.ycombinator.com/item?id=27286918
- Wowfunhappy 5y agoCould the OS intentionally clear or write dummy data to the register instead?
- josephcsible 5y agoNo. The author explained why not: > originally I thought the register was per-core. If it were, then you could just wipe it on context switches. But since it's per-cluster, sadly, we're kind of screwed, since you can do cross-core communication without going into the kernel.
- amelius 5y agoThe OS can scan the program for instructions that access these bits. If necessary on a per-basic-block basis.
- saagarjha 5y agoOf course, this only works if you can't introduce new code without the kernel noticing.
- amelius 5y agoYes, you can introduce new code but the kernel should also watch for that (JIT compilation etc.) and check the resulting code. It's quite involved, and the whole process looks more like a sandbox or emulator, but it's possible.