25 ms·
Linux page table isolation is not needed on AMD processors
- anonacct37 9y agoThis feels like a big FU to Intel. I've heard this patch can slow down programs like du by 50%. Does that mean AMD is going to find itself running twice as fast as competitors?
- thinkMOAR 9y agoHmm i was wondering about the performance hit, and i kind of miss performance details in the report as i consider it to be significant to report.
- blattimwind 9y ago"The overhead was measured to be 0.28% according to KAISER's original authors,[2] but roughly 5% for most workloads by a Linux developer.[1]" [1] = https://lwn.net/Articles/738975/ https://lwn.net/Articles/738975/ Though the patches evolved since then. So I guess we'll see.
- tscs37 9y agoI believe the 0.28% are only for CPUs that support PCID. Earlier CPUs (which is a lot still) will get a much harder hit since you'll have to flush the entire TLB.
- my123 9y agoEven with PCID, the hit is 29% in a tight syscall loop, but is a complete disaster above 50% with PCID off...
- BeeOnRope 9y agoIn fact, the tight syscall loop isn't even necessarily the worst case: the primary cost of this change isn't the a direct cost in the syscall, but the CR3 switch which invalidates the TLB and incurs an ongoing cost for some time following the syscall. The worse case would be something like a frequent syscall followed by code that touches a number of distinct cache lines, which all now require a TLB reload and page-walk (even here the cost is tricky to evaluate since there are various levels where the paging structures can be cached beyond the TLB, so the cost of a page-walk various a lot depending on locality of the paging structures used).
- bonzini 9y agoPCIDs avoid the TLB invalidation.
- BeeOnRope 9y agoYup, I think so. In that case (PCID hardware on a PCID-enabled kernel), the performance effect should be more limited to the syscall itself. That said, why is the hit still so big with PCID? Surely just the CR3-swap by itself shouldn't be so slow?
- bonzini 9y agoMOV-to-CR3 is pretty slow, yes. In the ballpark of a hundred clock cycles, and you have to do 2 of them. The cost of a system call was about 1000 cycles, maybe less on newer processors---both OSes and processors optimize the hell out of SYSCALL/SYSRET.
- walterbell 9y agoWhich Intel CPUs support PCID? Based on this Linus message, it was introduced in 2015, so Broadwell and later? http://lkml.iu.edu/hypermail/linux/kernel/1504.3/02961.html http://lkml.iu.edu/hypermail/linux/kernel/1504.3/02961.html
- Freaky 9y agoPCID's been around for a long time - even my old Westmere Xeons have it. INVPCID is more recent.
- kzrdude 9y agoThe 50% figure is from a benchmark that didn't run on an Intel CPU!
- kpcyrd 9y ago- /* Assume for now that ALL x86 CPUs are insecure */ Before this patch the mitigation was active for all vendors.
- jandrese 9y agoI think the du case was an outlier. Normal workloads shouldn't be so heavily affected. I am expecting a few percent loss on most programs though. It's basically a larger penalty for making a syscall, which was already a fairly slow operation so performance minded people avoid them in tight loops. It will be bad for people who need to do lots of fast I/O I suspect.
- mtanski 9y agoIt sounds like databases on very fast storage will be updated. Tons of syscalls made for disk io and network io.
- lmm 9y agoDatabases are already written to minimise syscalls, like any other heavily performance-tuned system.
- amadvance 9y agoApplications that already put an effort to minimize syscalls are the ones that most likely depend on syscalls performance.
- lmm 9y agoUnlikely. It's relatively easy to get to the point where syscalls aren't the bottleneck by a long margin, so the only apps where syscalls are the bottleneck will be those that haven't put in any optimisation effort.
- tankenmate 9y agoSome portable / embedded databases come to mind. Also "normal" databases doing replication initiation, and replication re-sync. And lastly backup, restore, tar, etc with small files. For files under a handful of pages long mmap() isn't a big gain. Another syscall I think that might cause issues is gettimeofday(), that particular call has been optimised to the nth degree, and lots of user programs spam the crap out of it (mostly necessarily), especially networking and streaming programs. It would be interesting to see how much of an overhead percentagewise page table isolation will cost, and its effects on low end media devices, et al.
- tankenmate 9y agoThe text as written only seeks to defend AMD's product. Whether the sub text goes further is open to non objective speculation. Having said that I'm sure AMD are feeling pretty happy with their statement. Schadenfreude may be too long a bow...
- rurban 9y agoWhat are you talking about? Every other single CPU vendor with an MMD, arm, s390, Sparc, ... either has a separate page translation table register for kernel and user space, or like AMD memory page capabilities, just Intel not. It's very clear who is at fault here.
- amluto 9y agoNot ARM. You're confusing kernel mode with kernel addresses.
- rurban 9y agoNope, read the paper, read the patches. Only Intel is affected. Arm has two such registers, TTB0 and TTB1. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0333h/I1029222.html http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....
- amluto 9y agoI think you're still misunderstanding. The CPU picks TTBR0 or TTBR1 based on the top significant bit of the VA, irrespective of whether the access was initiated by user or kernel code. This is in contrast to s390, which has separate page tables for user mode and kernel mode. I personally much prefer s390's model. And yes, I've read quite a few papers, and I wrote a good fraction of the patches.
- rurban 9y agoOh, thanks. My fault then. I haven't read the arm patches, only the summary.
- SolarNet 9y agoYes. AMD didn't take shortcuts, and implemented the spec correctly. Intel took shortcuts, introduced bugs, and now to compensate for that the OS has to work around it in software, it's going to be slow. For years Intel has reaped the benefits of shortcuts for performance, while AMD has been implementing things correctly; now there is a correction. That's how the market works.
- amluto 9y agoAMD doesn't exactly do an amazing job of avoiding gotchas in their CPUs. They have a bizarre idea of what writing zero to a segment register should do (resulting in info leaks that were only recently fixed on Linux), their demented leaky IRET is even more demented than Intel's, and their SYSRET's handling of SS is downright nutty. OTOH, Intel's SYSRET is actively dangerous and has resulted in severe security holes, and Intel doesn't appear to acknowledge that their design is a mistake or that it should be fixed.
- tfcata 9y agoCan you post a few links maybe to the SYSRET issue mentioned? Just curious.
- amluto 9y agoSYSRET on Intel will fault with #GP if the kernel tries to go to a noncanonical user RIP. The #GP comes from kernel mode but with the user RSP. Before SMAP, this was an easy root if it happened. With SMAP, it's still pretty bad. AMD CPUs instead allow SYSRET to succeed and send #PF afterwards, which is very safe. AMD CPUs are differently dumb. If SYSRET is issued while SS=0, then the SS register ends up in a bogus state in which it appears to contain the correct value but 32-bit stack access fails. Search the Linux kernel for "SYSRET_SS_ATTRS" for the workaround.
- cesarb 9y agoI believe it's this one: https://blog.xenproject.org/2012/06/13/the-intel-sysret-privilege-escalation/ https://blog.xenproject.org/2012/06/13/the-intel-sysret-priv...
- bitwind 9y agoAll Intel CPU's are affected, mitigation syscall overhead increased by 50%, and none of AMD CPU's affected? I would say this could be an indicator to short INTC and long AMD...
- rdtsc 9y ago> I would say this could be an indicator to short INTC and long AMD... I would say that too if I'd be waiting for everyone to sell so then I could buy INTC :-)
- cloakandswagger 9y agoOptions are much better for playing these short-term, news related swings. This has the potential of being a good one, as INTC is at the peak of a bull run and this news doesn't seem to have hit mainstream sources yet.
- IgorPartola 9y agoShort INTC maybe but I am not sure this means that AMD will increase in value over the long run as a result of this one incident.
- SteveNuts 9y agoWhat about this combined with the Intel ME stuff? I could see large cloud providers starting to at least think about switching to AMD
- IgorPartola 9y agoLarge cloud providers don't make decisions emotionally. They'll take a "let's mitigate the ME stuff and buy best support + performance per dollar hardware possible" approach. They don't care much about the opinion of the outraged hackers.
- fulafel 9y ago
- mindcrash 9y agoSo first they bring a DLC concept ("unlock features by spending money") to their enthousiast platform, and now this? Having a hunch Threadripper will sell extremely well amongst PC enthousiasts this year...
- rrdharan 9y agoI'm curious what you are referring to re: the DLC concept? Did you mean this thing? https://en.wikipedia.org/wiki/Intel_Upgrade_Service https://en.wikipedia.org/wiki/Intel_Upgrade_Service Seems like that was discontinued a long time ago (2011) so was wondering if there was something more recent that happened?
- floatboth 9y agoProbably the paid hardware RAID unlock key.
- amluto 9y agoHas Intel ever had hardware RAID? They have firmware RAID, but that's quite different.
- keltor 9y agoThey actually DID have hardware RAID controllers, but not like you're talking about.
- blattimwind 9y agoThough that's not news to anyone who ever laid their hand on an Intel server board.
- brians 9y agoIIRC, this fall’s i9 chips and the motherboards supporting them have software-unlockable features. You can literally buy more PCI lanes. Which is another way of saying you had those lanes, and Intel wanted more money before letting you use what you’d already bought.
- userbinator 9y agoAll that I've read about this so far seems to indicate that it's only a way to bypass KASLR... which is itself not really a problem, but there must be something more to it. Given that it doesn't affect AMD, perhaps it's related to Intel ME?
- bitwind 9y agoThe growing consensus is that someone managed to make this work: https://cyber.wtf/2017/07/28/negative-result-reading-kernel-memory-from-user-mode/ https://cyber.wtf/2017/07/28/negative-result-reading-kernel-... Reading kernel memory from user mode = reading cached disk blocks, cached credentials and anything else, by simply running javascript on a web browser. KASLR bypass is just a small bonus.
- my123 9y agoIt is that. The author of that blogpost is mentioned in Acknowledgments on the Kaiser whitepaper. :)
- userbinator 9y agoInteresting. I can see it being a concern in shared environments (hence all the cloud providers are quite scared), but unless there's another part about being able to modify kernel memory, IMHO it's not such a big deal for the typical single-user personal computer. I wonder if there are other (non-x86) CPUs that do similar speculative execution affected... the general ideas behind it don't seem to be specific to x86.
- IgorPartola 9y agoHow so? Letting any old web page read your kernel’s memory seems like kind of a big deal to me. On the other hand I guess remote debugging will be a lot easier in 2018 :)
- Unklejoe 9y ago> IMHO it's not such a big deal for the typical single-user personal computer IDK. If this means that some JavaScript from a website can read my kernel's memory, then it seems like a big deal.
- rdudek 9y agoHow does all this affect everyday regular users?
- kevin_thibedeau 9y agoSoon, malicious JavaScript will be able to own your computer.
- rdudek 9y agoDon't most of them do that already?
- deleted 9y ago[deleted]
- dingo_bat 9y agoRight now, they just own you and your data. With this, they will own your machine.
- amckinlay 9y agoPretty extraordinary that a user's most important files (their documents and whatever else is in their home folder) are accessible to any app at any time. Why are we still using this outdated security model? On Windows, I could download an .exe and it could upload the entire contents of my Dropbox without even prompting for elevation or anything. Kinda scary when you think about it.
- cesarb 9y ago> Why are we still using this outdated security model? Because it's convenient. The alternative would be something like flatpak's portals, which funnel everything through a few standardized dialogs; but how would you for instance use them to implement a media player application which scans for mp3 files, reads their tags, and presents them on a list? A "select a directory" portal dialog either would not allow for a recursive scan, or risk a non-technical user selecting their home directory, and either way would be a strange interruption in the workflow. (I understand, however, that Android has done precisely that for removable SD cards...)
- api 9y agoAt the meta level this is just a special case of "complexity is evil" in security. CPUs have been getting more and more complex, and the relationship between complexity and bugs (of all types) is exponential. Each new CPU feature exponentially increases the likelihood of errata. A major underlying cause is that we're doing things in hardware that ought to be done in software. We really need to stop shipping software as native blobs and start shipping it as pseudocode, allowing the OS to manage native execution. This would allow the kernel and OS to do tons and tons of stuff the CPU currently does: process isolation, virtualization, much or perhaps even all address remapping, handling virtual memory, etc. CPUs could just present a flat 64-bit address space and run code in it. These chips would be faster, simpler, cheaper, and more power efficient. It would also make CPU architectures easier to change. Going from x64 to ARM or RISC-V would be a matter of porting the kernel and core OS only. Unfortunately nobody's ever really gone there. The major problem with Java and .NET is that they try to do way too much at once and solve too many problems in one layer. They're also too far abstracted from the hardware, imposing an "impedance mismatch" performance penalty. (Though this penalty is minimal for most apps.) What we need is a binary format with a thin (not overly abstracted) pseudocode that closely models the processor. OSes could lazily compile these binaries and cache them, eliminating JIT program launch overhead except on first launch or code change. If the pseudocode contained rich vectorization instructions, etc., then there would not be much if any performance cost. In fact performance might be better since the lazy AOT compiler could apply CPU model specific optimizations and always use the latest CPU features for all programs. Instead we've bloated the processor to keep supporting 1970s operating systems and program delivery paradigms. It's such an obvious thing I'm really surprised nobody's done it. Maybe there's a perverse hardware platform lock-in incentive at work.
- matzipan 9y agoWhile what you're saying sounds nice, your theory has nothing to do with practice. In reality, the ultimate source of this problem is the mismatch in speed between silicon logic and silicon memory. This is why your CPU ends up doing all sorts of tricks like caching, branch prediction, speculative execution to compensate for slow memory.
- kps 9y ago
- airesQ 9y agoGiven Intel's dominance of the server market does this mean that datacenter computational capacity will see an overnight ~5% drop? Is there enough spare capacity to cope with this? Will spot-instance prices go up? Will I need more instances of a given type to run the same workload?
- spiznnx 9y agoNothing will happen since this patch will speed up AMD hardware, but leave Intel the same as before.
- kuschku 9y agoThis patch is part of a patchset that isn’t merged yet. The patchset adds 29% (with PCID) or > 50% (without PCID) overhead to syscalls on Intel processors. Overall, this has between 0.28% (best case application with barely any syscalls) and > 50% (du, which does lots of syscalls) impact on performance on Intel processors.
- amluto 9y agoPTI has been merged.
- kuschku 9y agoBut it’s not been released yet, right?
- DSMan195276 9y agoIt's in the current release candidate, so on track to be in the next release in a few weeks.
- daenney 9y ago> Nothing will happen since this patch will speed up AMD hardware, but leave Intel the same as before. It doesn't speed up AMD hardware. Intel incurs a performance penalty (so it doesn't leave Intel the same as before), but that penalty doesn't make your AMD CPU magically go faster.
- twotwotwo 9y agoWas the connection with speculative execution already being discussed openly? I know about https://cyber.wtf/2017/07/28/negative-result-reading-kernel-memory-from-user-mode/ https://cyber.wtf/2017/07/28/negative-result-reading-kernel-..., but not about anything between that and 28 Dec suggesting someone made it work and that's the reason for KPTI. If it wasn't in the open, seems...not ideal embargo-wise for AMD to leak it there. Though no one's in that thread complaining about the disclosure, so maybe they either think that part is already known to anyone looking closely, or just don't think it's a very big piece of the exploit puzzle (like, finding the way to get info out a side channel was the hard part).
- my123 9y agoThe author of https://cyber.wtf/2017/07/28/negative-result-reading-kernel-memory-from-user-mode/ https://cyber.wtf/2017/07/28/negative-result-reading-kernel-... is listed in the Acknowledgements part as the first name in the Kaiser whitepaper.
- twotwotwo 9y agoAh, yes, that does look like an earlier public clue. Thanks.
- daenney 9y agoIt wasn't publicly acknowledged but people figured it out already. Take a look at https://news.ycombinator.com/item?id=16046636 https://news.ycombinator.com/item?id=16046636 (both the article and the comments) for example. This wasn't going to stay secret much longer.
- twotwotwo 9y agoThat post is a couple days after the 28 Dec AMD commit, though. Curious if it was _already_ discussed since that would mean no way what AMD said is how people figured it out. my123 does point out that the author of the speculative execution blog post is first in the KAISER paper's acknowledgments, and looks like the paper was presented at a July conference, so that's an earlier clue out in public, for what it's worth.
- b1gtuna 9y agoI thought it was clear that this patch only applies to AMD. However, reading the comments here confuses me. How's does the performance on Intel drops with this?
- caio1982 9y agoBecause of the rest of the patch set. This one simply says "AMD CPUs should not be penalized [by such patch set changes]".
- Macha 9y agoThere's code going in to perform some extra work to workaround some CPU bugs. This disables that work on AMD, because the bugs are not present there. Intel will have to do the extra work still as the bugs are present in Intel CPUs. The full details are as yet undisclosed, implying there are security issues arising from these bugs (also the name of the flag)
- dralley 9y agoNo, other way around. The patch which decreases Intel performance has already occurred. This patch AMD saying "we don't need this, so we're disabling it for AMD CPUs."
- zer00eyz 9y agoI have to wonder: Can intel release a drop in CPU that will avoid or mitigate this issue? The infrastructure investment in intel cores is huge, if a drop in replacement lets me minimize downtime, re-gain performance and is "cost effective" compared to a cost prohibitive replacement does this result in intel having a sales INCREASE where it replaces bad silicon? I don't know enough about this issue to speak to the issue either way, but I would love to hear if this fix is possible/viable.
- nine_k 9y agoI wonder if this can be fixed at firmware level. (I frankly have no idea how deeply configurable Intel cores are.)
- djsumdog 9y agoFor years, Intel and AMD processors have supported patching using microcode updates. Until we know the embargo is lifted and we know the full extent of this vulnerability, we won't know if that would be possible.
- nine_k 9y agoThe fact that the firmware interface is strictly non-public also does not help predicting things.
- daenney 9y agoBased on the fact that kernel patches are going in it's reasonable to assume this means it can't be fixed with a microcode update. Otherwise, Intel would issue a microcode update and the Linux kernel wouldn't be accepting this patch set as a mitigation for this issue (which is all this patch set is, it has no other benefit to the end user than fixing this bug).
- zimmerfrei 9y agoIt depends on how long it takes for Intel to go through all regression tests for all affected platforms. If it takes several months to complete, a countermeasure in the kernel update may still be the better stopgap. Or maybe it could be that Intel privately disclosed already that no backport will be done to firmware of older CPUs, in which case the kernel update is the stopgap for newer generation and the solution for older generations.
- pkaye 9y agoIs this issue only of concern for Intel with Linux? What about OSX, BSD or Windows?
- rst 9y agoReports are that Windows is also getting an update for this; see refs to recent NT kernels here: http://pythonsweetness.tumblr.com/post/169166980422/the-mysterious-case-of-the-linux-page-table http://pythonsweetness.tumblr.com/post/169166980422/the-myst... and the original source for that report: https://twitter.com/aionescu/status/930412525111296000 https://twitter.com/aionescu/status/930412525111296000 OSX and BSD variants are an interesting question...
- deleted 9y ago[deleted]
- rpns 9y agoSlightly better link: https://patchwork.kernel.org/patch/10133447/ https://patchwork.kernel.org/patch/10133447/
- caio1982 9y agoDid he know it would blow up in a few weeks? https://www.fool.com/investing/2017/12/19/intels-ceo-just-sold-a-lot-of-stock.aspx https://www.fool.com/investing/2017/12/19/intels-ceo-just-so...
- calt 9y agoWhat's the connection?
- amckenna 9y agoHere is some more context - http://pythonsweetness.tumblr.com/post/169166980422/the-mysterious-case-of-the-linux-page-table http://pythonsweetness.tumblr.com/post/169166980422/the-myst... The connection between the linked article in this comment and the linked page for this post is that there is a potentially huge bug that will be made public soon and it just affects Intel processors, not AMD - hence the large sale of stock by the Intel CEO.
- deleted 9y ago[deleted]
- lvs 9y agoIf your allegation is true, that would seem to be very illegal.
- sandworm101 9y agoLol. Was already very happy with my ryzen 1800 bought a couple months ago. Even more happy today.
- electic 9y agoThis is going to have dramatic effect on the cloud computing market. It might make sense to make sure any VMs you run are on AMD processors or it can really hurt your performance and basically cost you more to do the same workload. It also seems, from early benchmarks, this can slaughter performance with databases.
- caf 9y agoHere's a Postgres benchmark on Skylake (supports PCID) showing a ~6% reduction in TPS. http://lkml.iu.edu/hypermail/linux/kernel/1801.0/01274.html http://lkml.iu.edu/hypermail/linux/kernel/1801.0/01274.html
- bhouston 9y agoI wonder if cloud providers will ask Intel for partial refunds when their CPUs get 5% to 30% slower than promised?
- dx034 9y agoWhy? They pass it on to customers. More interesting if Google or Facebook will react. They could need up to a data centre each to compensate for that (I assume both have very syscall heavy applications). Maybe not suing Intel but pouring more money into the development of competing chips
- vasili111 9y agoDon't worry. I don't think that there will be two separate kernels for Intel and AMD. I think performance drop will be on both CPUs no matter has it the bug or not.
- jopsen 9y agoI sometimes wonder if verifying properties of the code we run wouldn't be smarter than relying on hardware isolation. Or at-least in addition to hardware isolation, so that there is two layers. By verify I'm thinking NativeClient-like or JVM isolation. Obviously, it would entail complete OS rewrite, or maybe partial...
- cjbprime 9y agoYou can't do secure computation on a CPU that is insecure in this way. The insecure CPU will ignore any abstractions you create in software.
- fluffysquirrels 9y agoThis is an exciting research area. See unikernels, HaLVM (Haskell on Xen), MirageOS (Ocaml), OSv, Microsoft Singularity / Midori.
- artellectual 9y agoEssentially looks like Intel compromised (whether intentional or not is a different point) the design to get the speed boost that gave them the lead over AMD for the past decade. Will be interesting to see how all this plays out.
- jchw 9y agoOther than leaking timing information though, is there any reason why this kind of speculative execution can't be secure? Apparently we're going to find out more in the coming weeks, but it feels strongly like Intel has made a number of mistakes leading up to this.
- bhouston 9y agoWhat chip exactly introduced this feature? Core 2 architecture? Nehalem?
- artellectual 9y ago> It is understood the bug is present in modern Intel processors produced in the past decade. Source: https://www.theregister.co.uk/2018/01/02/intel_cpu_design_flaw/ https://www.theregister.co.uk/2018/01/02/intel_cpu_design_fl...
- dx034 9y agoArstechnica says it could be any processor since 1995. https://arstechnica.com/gadgets/2018/01/whats-behind-the-intel-design-flaw-forcing-numerous-patches/ https://arstechnica.com/gadgets/2018/01/whats-behind-the-int...
- rootlocus 9y ago> Essentially looks like Intel compromised (whether intentional or not is a different point) If it wasn't intentional, then it wasn't a compromise. So it's not a different point.
- 9y ago
- czardoz 9y agoIs there anything that an end user can do to mitigate the performance impact?
- executesorder66 9y agoSwitching to AMD or not upgrading your kernel are the only options I can think of.
- kurtisc 9y agoIt can be turned off https://lwn.net/Articles/742404/ https://lwn.net/Articles/742404/
- czeidler 9y agoWould it be possible to slow down segfault notifications to mitigate the attack? For example, if the segfault was not on kernel space, halt the application for the time offset of a kernel read. In this way all segfaults would be reported at more or less the same time and the attack could be avoided. Are there any sane apps that depends on timely segfault handling and thus might be affected by such a workaround?
- caf 9y agoIt's not timing the segfault delivery itself, the idea is to time another read of your own address space after the fault to see if it's been prefetched or not. Maybe you could CLFLUSH on segfault delivery though.
- caf 9y agoTurns out "maybe" is "not" - if you put the faulting read at a mispredicted branch target, you don't take the fault.
- sslalltheway 9y agoold news. https://cyber.wtf/2017/07/28/negative-result-reading-kernel-memory-from-user-mode/ https://cyber.wtf/2017/07/28/negative-result-reading-kernel-...
- rootlocus 9y agoThis isn't about the original vulnerability. It's about the linux kernel disabling the fix patch (and the performance hit) for AMD processors.
- rbanffy 9y agoWouldn't this kind of issue validate the ideas of microkernel-based OSs, where kernel and user spaces are already completely separated? BTW, removing the kernel from the non-privileged address space seems like such a great idea (which is not a new one at all) the whole thing should probably should have some hardware support to be made fast.
- Unklejoe 9y ago> Wouldn't this kind of issue validate the ideas of microkernel-based OSs, where kernel and user spaces are already completely separated? I don't think so, but it depends what you mean. Kernel space and user space being separated isn't specific to a microkernel. The only reason the kernel is mapped in to each process is to avoid the TLB flush during syscalls. The pages themselves aren't actually accessible unless you're running in kernel mode (well, unless you're using hardware affected by this bug). So, in a non-broken system, kernel and user spaces are separated, even with a monolithic kernel (Linux). > BTW, removing the kernel from the non-privileged address space seems like such a great idea (which is not a new one at all) the whole thing should probably should have some hardware support to be made fast. For the most part, I agree. However, it really shouldn't be necessary if the virtual memory protection did what it was supposed to do. Mapping the kernel in to the process address space and using the page protection flags is an optimization that is perfectly legal from an architectural standpoint. If you can't rely on the page protection flags to work, then you really can't rely on any other hardware feature to work either.
- rbanffy 9y agoWould it make sense to switch core at the same time the context is switched between user and kernel? The hit with cache is already there and, if one could go back and forth to already primed caches on different cores, at least some of the performance issues would be mitigated.
- 534b44a 9y agoI can't even imagine how large the bug bounty can be for the researcher who created the PoC.
- deleted 9y ago[deleted]
- zippie 9y agoData structures stored in kernel space, such as llds [1], will not incur the overhead of the TLB flush/load. I suspect that storing data in the kernel space in order to avoid maintaining a large application PD will become the norm, whereas in the past it has been reserved for use cases like search engines with massive in-memory trees. [1] https://github.com/johnj/llds https://github.com/johnj/llds