LWN: Comments on "Kernel page-table isolation merged" https://lwn.net/Articles/742404/ This is a special feed containing comments posted to the individual LWN article titled "Kernel page-table isolation merged". en-us Mon, 22 Sep 2025 00:03:57 +0000 Mon, 22 Sep 2025 00:03:57 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Kernel page-table isolation merged https://lwn.net/Articles/743783/ https://lwn.net/Articles/743783/ Cyberax <div class="FormattedComment"> This should be a quote of the week.<br> </div> Wed, 10 Jan 2018 01:50:53 +0000 Kernel page-table isolation merged https://lwn.net/Articles/743774/ https://lwn.net/Articles/743774/ immibis <div class="FormattedComment"> <font class="QuotedText">&gt; Speculation is fun :-)</font><br> <p> Foreshadowing!<br> </div> Wed, 10 Jan 2018 00:31:24 +0000 Kernel page-table isolation merged https://lwn.net/Articles/743704/ https://lwn.net/Articles/743704/ microchp <div class="FormattedComment"> Sorry, I was multitasking in the Spectre/Meltdown discussions and meant RHEL7 on the 3.10.x kernel.<br> </div> Tue, 09 Jan 2018 16:47:04 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742793/ https://lwn.net/Articles/742793/ mjg59 <div class="FormattedComment"> The embargo was lifted 2 hours before your post :)<br> </div> Thu, 04 Jan 2018 02:11:05 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742777/ https://lwn.net/Articles/742777/ rahvin <div class="FormattedComment"> I don't know if it's been added, but the patch was posted by Ken with AMD and he says pretty explicitly that AMD isn't vulnerable. Maybe it was premature and they actually are I don't know but I wish they'd lift the embargo and tell us. Particularly given the reports of Intel executives making large share sales. <br> <p> <a href="https://lkml.org/lkml/2017/12/27/2">https://lkml.org/lkml/2017/12/27/2</a><br> <p> </div> Thu, 04 Jan 2018 00:33:59 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742739/ https://lwn.net/Articles/742739/ MarcB <div class="FormattedComment"> I think, I get that now ;-)<br> </div> Wed, 03 Jan 2018 22:02:55 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742715/ https://lwn.net/Articles/742715/ rahulsundaram <div class="FormattedComment"> RHEL 3, 4 and 5 is EOL. Extended support is available for 5 IIRC<br> </div> Wed, 03 Jan 2018 20:36:36 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742711/ https://lwn.net/Articles/742711/ cesarb <div class="FormattedComment"> <font class="QuotedText">&gt; When this is back-ported to older kernels, such as in RHEL 3.x</font><br> <p> Aren't RHEL 3.x and 4.x completely out of support already?<br> </div> Wed, 03 Jan 2018 20:10:10 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742707/ https://lwn.net/Articles/742707/ Lionel_Debroux <div class="FormattedComment"> PaX and therefore grsecurity have been taking advantage of PCID for years, to get either a stronger (default) or a faster version of the MEMORY_UDEREF protection. But indeed, the mainline Linux kernel only started using PCID very recently.<br> </div> Wed, 03 Jan 2018 19:14:52 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742705/ https://lwn.net/Articles/742705/ deater <div class="FormattedComment"> <font class="QuotedText">&gt; Are there more such silicon features ignored by Linux?</font><br> <br> Definitely. See the sad story that was AMD's Light-Weight Profiling instructions. Though it looks like they gave up on Linux support ever being added and have dropped support for the feature.<br> </div> Wed, 03 Jan 2018 18:40:18 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742704/ https://lwn.net/Articles/742704/ Wol <div class="FormattedComment"> Normal development timetable ...<br> <p> One layer adds a nifty feature. Next layer takes maybe a year to realise the feature exists and work out how to take advantage of it. Allow a year for debugging. Next layer up realises ... rinse lather and repeat.<br> <p> Innovations typically take TWENTY TO THIRTY YEARS to filter through. How long did it take before the internet (in the form of the WWW) became ubiquitous? Around in the 70s, pushed and *financed* by Gore in the 80s, the web invented in the 90s (as a minor improvement on Gopher!), and ubiquitous by the 2000s. How long is that?<br> <p> Cheers,<br> Wol<br> </div> Wed, 03 Jan 2018 18:37:06 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742701/ https://lwn.net/Articles/742701/ excors <div class="FormattedComment"> There can be - for example any code that tries to exploit this vulnerability will 'work' on Intel hardware and not AMD. But if you exclude code that has been specifically designed to exploit it, it seems unlikely.<br> <p> CPUs are usually allowed to fetch whatever memory they fancy whenever they fancy (which gives them freedom to continually improve caches, prefetchers, speculative execution, etc), which is safe because it has no effect on application behaviour except in terms of instruction timing (and performance counters etc). Intel and AMD fetch memory quite differently, and different generations and models of CPUs by a single vendor fetch memory quite differently, so nobody writes applications that depend precisely on instruction timing. Except for people intentionally using timing attacks to extract information that exists inside the CPU pipeline but that wasn't meant to be observable to applications, which is presumably the problem here. (And except for buggy code with race conditions that get triggered by these timing changes, but that's so broken anyway that it doesn't really matter.)<br> </div> Wed, 03 Jan 2018 18:20:29 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742699/ https://lwn.net/Articles/742699/ microchp <div class="FormattedComment"> Thankyou, I missed that.<br> </div> Wed, 03 Jan 2018 18:12:12 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742697/ https://lwn.net/Articles/742697/ zdzichu On a side note, PCID seem to be feature of Intel CPUs for 8 (eight!) years now, yet it seem it only get used with <a href="https://kernelnewbies.org/Linux_4.14#Longer-lived_TLB_Entries_with_PCID">kernel 4.14 and later</a>. It is strange to see so many years pass before it got used. Are there more such silicon features ignored by Linux? Wed, 03 Jan 2018 18:04:00 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742698/ https://lwn.net/Articles/742698/ MarcB <div class="FormattedComment"> This is unlikely to be a simple, direct read of forbidden memory. Most likely, it is a timing side-channel.<br> <p> So, no existing code will be affected (unless there is an existing exploit, of course).<br> </div> Wed, 03 Jan 2018 18:03:34 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742694/ https://lwn.net/Articles/742694/ Paf <div class="FormattedComment"> Do you know your exact CPU? Do you have PCID support? (I guess that means Westmere and newer)<br> </div> Wed, 03 Jan 2018 17:51:36 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742689/ https://lwn.net/Articles/742689/ jezuch <div class="FormattedComment"> ...I also wonder whether there's any (can there be any?) code out there that relies on Intel's behaviour and does not work on AMD hardware :) Or maybe this kind of problem only affects software API's...<br> </div> Wed, 03 Jan 2018 17:39:13 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742687/ https://lwn.net/Articles/742687/ jezuch <div class="FormattedComment"> Interesting. If that's not considered a violation of x86 architecture spec then Intel really screwed up.<br> </div> Wed, 03 Jan 2018 17:33:53 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742682/ https://lwn.net/Articles/742682/ vstinner <div class="FormattedComment"> I like the last sentence of the blog article: "Further we see that speculative execution does not consistently abide by isolation mechanism, thus it’s a haunting question what we can actually do with speculative execution." Anders Fogh, July 2017<br> </div> Wed, 03 Jan 2018 17:02:53 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742680/ https://lwn.net/Articles/742680/ vstinner <div class="FormattedComment"> "There will be a nopti command-line option to disable this mechanism at boot time."<br> <a href="https://lwn.net/Articles/741878/">https://lwn.net/Articles/741878/</a><br> </div> Wed, 03 Jan 2018 17:00:35 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742678/ https://lwn.net/Articles/742678/ microchp <div class="FormattedComment"> When this is back-ported to older kernels, such as in RHEL 3.x, will there be a toggle to preserve the old behavior?<br> <p> I am asking for the folks that will need time to mitigate the performance hit and may have servers with a lower risk profile.<br> </div> Wed, 03 Jan 2018 16:56:37 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742599/ https://lwn.net/Articles/742599/ sorokin The Register published an article about the issue: <a href="https://www.theregister.co.uk/2018/01/02/intel_cpu_design_flaw/">Intel processor design flaw forces Linux, Windows redesign</a>. The article refers to a blog post worth reading: <a href="https://cyber.wtf/2017/07/28/negative-result-reading-kernel-memory-from-user-mode/">Negative Result: Reading Kernel Memory From User Mode</a>. Wed, 03 Jan 2018 12:12:38 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742594/ https://lwn.net/Articles/742594/ cesarb <div class="FormattedComment"> <font class="QuotedText">&gt; they've also added a flag to exempt AMD hardware so I'd presume AMD hardware is not vulnerable.</font><br> <p> Has the commit adding that test been merged already? So far, I've only seen it on the mailing list, but not on the kernel repository, so as far as I can see, AMD hardware is not yet exempted.<br> </div> Wed, 03 Jan 2018 10:54:30 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742580/ https://lwn.net/Articles/742580/ deater <div class="FormattedComment"> The recent PAPI 5.6 performance library release apparently happened just in time.<br> <p> It added code using rdpmc while doing self-monitoring reads of the perf_event performance counters.<br> <p> On haswell a counter read:<br> Using rdpmc (avoids kernel): 142 cycles<br> 4.14 kernel using read() syscall: 913 cycles.<br> 4.15-rc6 kernel using read() syscall: 1360 cycles.<br> <p> That's a huge increase when you're trying to do low-latency measurements.<br> <p> <p> </div> Wed, 03 Jan 2018 04:58:48 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742577/ https://lwn.net/Articles/742577/ rahvin <div class="FormattedComment"> The benchmarks being reported could be catastrophic (5% to 50% performance degradation depending on workload), they've also added a flag to exempt AMD hardware so I'd presume AMD hardware is not vulnerable. <br> <p> By all reports this is worse than the Intel lights-out firmware bug and allows user space code to read protected kernel memory, conceivably allowing one VM to read the memory of another VM per one of the scenario's I've seen. This has the potential to be heart-bleed plus a remote exploitable memory read that can be executed by user space code including javascript running in a browser. And it's hard coded in Intel silicon requiring the need to use the OS to separate the kernel and user space cache system resulting in major performance hits. Talk about ugly and just like the firmware it's in every processor Intel has built for more than a decade.<br> <p> This is beyond brutal and I expect it's going to exacerbate the AMD processor shortage, good news for AMD at least. Bad news for anyone running an internet connected server.<br> </div> Wed, 03 Jan 2018 03:03:25 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742565/ https://lwn.net/Articles/742565/ andresfreund <div class="FormattedComment"> <font class="QuotedText">&gt; &gt; The change isn’t in Linus’s tree yet, so I guess we’ll have to wait and see, but if the performance impact is significant on Intel processors and Ryzen and EPYC aren’t affected it could spell a serious problem for Intel.</font><br> <p> <font class="QuotedText">&gt; I don't think it'll be that bad. The patchset has ASID / PCID support on capable hardware reducing the syscall overhead on capable hardware (apparently sandy bridge onwards).</font><br> <p> Some numbers for postgres workloads that more likely to suffer (i.e. very short statements with plenty syscalls, rather than analytics workloads):<br> <a href="https://www.postgresql.org/message-id/20180102222354.qikjmf7dvnjgbkxe@alap3.anarazel.de">https://www.postgresql.org/message-id/20180102222354.qikj...</a><br> <p> <p> readonly pgbench (tpch-like), 16 clients, i7-6820HQ CPU (skylake):<br> <p> pti=off:<br> tps = 236629.778328<br> <p> pti=on:<br> tps = 220791.228297 (~0.93x)<br> <p> pti=on, nopcid:<br> tps = 198959.801459 (~0.84x)<br> <p> <p> To get closer to the worst case, I've also measured:<br> <p> pgbench SELECT 1, 16 clients, i7-6820HQ CPU (skylake):<br> <p> pti=off:<br> tps = 420490.162391<br> <p> pti=on:<br> tps = 350746.065039 (~0.83x)<br> <p> pti=on, nopcid:<br> tps = 324269.903152 (~0.77x)<br> <p> <p> So yea, definitely not fun :(<br> </div> Tue, 02 Jan 2018 22:32:54 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742563/ https://lwn.net/Articles/742563/ riel <div class="FormattedComment"> Speculation is fun indeed.<br> </div> Tue, 02 Jan 2018 22:12:09 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742523/ https://lwn.net/Articles/742523/ Wol <div class="FormattedComment"> <font class="QuotedText">&gt; there's no conceivable upgrade path to skip from 6 to 8 over 15 years worth of development.</font><br> <p> As has been pointed out here before, I believe ... how many systems are installed and never upgraded? If you have no plans to upgrade the system ever, why start now?<br> <p> Although, in that case, it would probably make sense to start migrating whatever apps you have that matter, across to a new system.<br> <p> Cheers,<br> Wol<br> </div> Tue, 02 Jan 2018 13:46:05 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742522/ https://lwn.net/Articles/742522/ sync <div class="FormattedComment"> Fedora rawhide released a PTI enabled kernel (4.15.0-0.rc6.git0.1.fc28.x86_64). I did some test with it. Syscalls are much slower with PTI enabled.<br> <p> bench_03_getpid_vdso 2.7x slower<br> bench_11_read_vdso 2.0x slower<br> bench_21_write_vdso 2.3x slower<br> <p> I had used this benchmark <a href="https://github.com/arkanis/syscall-benchmark">https://github.com/arkanis/syscall-benchmark</a> on an Intel i5-4200U. Of course this is only a microbenchmark. The real world slowdown is much less.<br> <p> </div> Tue, 02 Jan 2018 13:27:26 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742517/ https://lwn.net/Articles/742517/ joib <div class="FormattedComment"> <a href="https://www.realworldtech.com/westmere/">https://www.realworldtech.com/westmere/</a> claims PCID was introduced already in the Westmere generation.<br> </div> Tue, 02 Jan 2018 08:51:08 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742516/ https://lwn.net/Articles/742516/ Lionel_Debroux <div class="FormattedComment"> Ivy Bridge and Skylake, which were spender's ( <a href="https://twitter.com/grsecurity">https://twitter.com/grsecurity</a> ) benchmark targets, saw 34% and 29% slowdowns on a simple `du -s` benchmark. These are newer than Sandy Bridge and feature PCID, so barring bugs, the patchset should have leveraged that feature, shouldn't it ?<br> </div> Tue, 02 Jan 2018 08:06:01 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742514/ https://lwn.net/Articles/742514/ andresfreund <div class="FormattedComment"> <font class="QuotedText">&gt; The change isn’t in Linus’s tree yet, so I guess we’ll have to wait and see, but if the performance impact is significant on Intel processors and Ryzen and EPYC aren’t affected it could spell a serious problem for Intel.</font><br> <p> I don't think it'll be that bad. The patchset has ASID / PCID support on capable hardware reducing the syscall overhead on capable hardware (apparently sandy bridge onwards).<br> </div> Tue, 02 Jan 2018 01:32:17 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742513/ https://lwn.net/Articles/742513/ Felix_the_Mac <div class="FormattedComment"> <p> I guess now would be a good time to buy AMD stock<br> </div> Tue, 02 Jan 2018 00:00:19 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742511/ https://lwn.net/Articles/742511/ GhePeU <div class="FormattedComment"> AMD CPUs could be unaffected by whatever vulnerability KPTI is meant to protect from: <a href="https://lkml.org/lkml/2017/12/27/2">https://lkml.org/lkml/2017/12/27/2</a><br> <p> The change isn’t in Linus’s tree yet, so I guess we’ll have to wait and see, but if the performance impact is significant on Intel processors and Ryzen and EPYC aren’t affected it could spell a serious problem for Intel.<br> </div> Mon, 01 Jan 2018 23:28:41 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742446/ https://lwn.net/Articles/742446/ arekm <div class="FormattedComment"> Nice summary<br> <a href="http://pythonsweetness.tumblr.com/post/169166980422/the-mysterious-case-of-the-linux-page-table">http://pythonsweetness.tumblr.com/post/169166980422/the-m...</a><br> </div> Mon, 01 Jan 2018 13:02:09 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742439/ https://lwn.net/Articles/742439/ amacater <div class="FormattedComment"> Only if you're paying for extended lifecycle support - 5 was extended to 30/11/2020 as was 6 but only for RHEL. CentOS stopped supporting 5 this year, CentOS 6 will be 30/11/2020<br> </div> Sun, 31 Dec 2017 19:41:01 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742437/ https://lwn.net/Articles/742437/ MarcB <div class="FormattedComment"> It seems, Microsoft is making the same change in Windows: <a href="https://twitter.com/aionescu/status/930412525111296000">https://twitter.com/aionescu/status/930412525111296000</a><br> <p> Perhaps they were inspired by the publication of KAISER (time frame fits, if they were really fast), perhaps they got the idea independently or perhaps there really is an upcoming publication. Speculation is fun :-)<br> </div> Sun, 31 Dec 2017 17:44:35 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742435/ https://lwn.net/Articles/742435/ pbonzini <div class="FormattedComment"> There are plenty of users still on RHEL 6. RHEL 6.9 was released last March, and I would be surprised if it's the last update.<br> <p> The last RHEL 5 release was 5.11, and in fact 2020 will be when the last security updates come for RHEL 5, not 6.<br> </div> Sun, 31 Dec 2017 16:04:49 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742432/ https://lwn.net/Articles/742432/ amacater <div class="FormattedComment"> RHEL == Red Hat Enterprise Linux throughout. [I know Red Hat folk don't like the abbreviation but I'm lazy :) ]<br> <p> If running RHEL/CentOS 6 - move your machines and code to version 7 quickly? There's no very good reason not to run 7 given that 6 is coming to the end of its supported life [November 2020 is less than two years away now] and 6.8 was likely the last major release. <br> <p> Oh, and if you're not running RHEL 6.8 move to it now for your RHEL machines because there is a relatively supported upgrade script to take 6 machines forward to 7 [This no longer works well for CentOS machines because of version skew between 6 and 7 and the CentOS folk are looking for a new maintainer - but RHEL will presumably pay someone to hand fix it]<br> <p> And 2.6.32 is well beyond support, realistically, for any but the very worst case: RHEL 7 has a 3.* kernel and I'd expect RHEL 8 betas any day now with a 4.* kernel (probably 4.4). I can't see anyone willingly supporting three supported versions of RHEL concurrently so 6 users are being encouraged to move to 7 now: there's no conceivable upgrade path to skip from 6 to 8 over 15 years worth of development.<br> </div> Sun, 31 Dec 2017 14:17:22 +0000 Kernel page-table isolation merged https://lwn.net/Articles/742431/ https://lwn.net/Articles/742431/ lkundrak <div class="FormattedComment"> Well, no need to guess -- X86_BUG_CPU_INSECURE says that pretty clearly.<br> </div> Sun, 31 Dec 2017 13:48:43 +0000