Live data from Hacker News

The mysterious case of the Linux Page Table Isolation patches

pythonsweetness.tumblr.com

191–200 of 264 posts

Re: The mysterious case of the Linux Page Table Isolation patches

#191
post #40

Earlier quoted context omitted.

The current miniaturization of DRAM circuitry doesn't really allow for a hardware fix for the RowHammer attack. During DRAM manufacturing a test similar to the RowHammer attack exists. This test has certain bounds for passing. If the bounds were tightened up to the level of perfection to prevent the attack it would drop the yield a considerable amount.

If the bounds were tightened up to the level of perfection to prevent the attack it would drop the yield a considerable amount. The fact that DRAM older than a few years is effectively immune to RH suggests it is possible to manufacture such. Yes, it will cost more, but I think many would be willing to pay for it like they used to, for none other than the assurance of having more reliable memory.

I only buy DRAM that's aged at least 18 months

Re: The mysterious case of the Linux Page Table Isolation patches

#192
post #135
post #112

Earlier quoted context omitted.

If the problem is row-hammer style attacks on the TLB that let you map userspace writable pages into the kernel address space then any kernel entries remaining in the TLB when userspace is running are going to be a security hole. The problem won’t be a process writing to the kernel entry (that would be forbidden by existing code / hardware) but a process updating it’s own TLB entries in ways that corrupt adjacent ker…

I don't think rowhammer style attacks are possible on TLBs, since they are SRAMs (CAMs, to be precise), not DRAMs.

SRAMs can have pattern sensitivity too.

Re: The mysterious case of the Linux Page Table Isolation patches

#193
post #180

Earlier quoted context omitted.

Alpha particle emissions are common causes of single-bit errors, especially from ceramic enclosure materials in integrated circuits. Mitigating soft errors from circuit packaging is an active area of research in materials science. Parity bits and CRC error checking are needed precisely to reduce the impact of these errors down to manageable levels.

"Alpha particles can be stopped by a sheet of paper, beta particles by aluminum, and gamma radiation by a block of lead." This is what I read online. A typical hardware components is enclosed in a aluminum case so really gamma radiation is of concern right?

It comes from within.

Re: The mysterious case of the Linux Page Table Isolation patches

#194
post #158

Looks like it is speculative execution based, and does not affect AMD https://lkml.org/lkml/2017/12/27/2 AMD processors are not subject to the types of attacks that the kernel page table isolation feature protects against. The AMD microarchitecture does not allow memory references, including speculative references, that access higher privileged data when running in a lesser privileged mode when that access would resu…

Do you think this could be within the rather new Intel AVX 512 ISA or older intel CPUs like Sandy Bridge (first AVX chip) could also suffer? - edit - I checked Ryzen ISA, they support AVX2. So probably AVX512 is the issue.

Everything so far hints at a microarchitecture bug, not a ISA specific.

Re: The mysterious case of the Linux Page Table Isolation patches

#195

Earlier quoted context omitted.

Totally agree. Cloud makes tons of sense if your workload is really dynamic. Lots of small players are running static workloads though because actually setting up dynamic workloads is pretty complex. I use GCE for DNS, Storage, CDN (for fronting storage backed files), dynamic workloads that can run on preemptible instances, and scalable instances to serve published static content, but I use dedicated servers for data…

Yeah we’re medium size but still bare metal at IBM/SoftLayer. We keep looking at GCP waiting for the pricing to make sense and still trying to figure out how people run low latency Postgres on there. :)

Have you run u to latency issues with Postgres?

(I work on GCE)

Re: The mysterious case of the Linux Page Table Isolation patches

#196
post #120

Earlier quoted context omitted.

And the source of an older version of NT leaked a while back.

I think that was NT 4. I don’t think there’s much of that 20-year old code left in the kernel.

You would be very surprised.

Re: The mysterious case of the Linux Page Table Isolation patches

#197
post #134
post #79

Earlier quoted context omitted.

No, not AWS. Xen was called safe. All the other KVM providers and normal linux servers in Intel are called out. arm, sparc, s390 were called out as safe, as they provide two seperate translation table registers, only intel provides only one.

I don't think ARM64 works the way you think it does. On s390, there's a register for user-initiated access and a register for kernel-initiated access. On ARM64 (AIUI), there's a register for low (user) addresses and a register for high (kernel) addresses. So kASLR timing leaks on s390 shouldn't happen in the first place unless the TLB tagging itself is rather silly, but ARM64 has no inherent protection. What ARM64's…

Isn’t Amazon moving off of Xen? Perhaps their involvement is limited to those working on their new KVM-based hypervisor? They also recently dropped their dedicated host requirement for HIPAA customers (to catch up with GCP).

Re: The mysterious case of the Linux Page Table Isolation patches

#198
post #89

I'm confused about the TLB impact. The pythonsweetness link claims these patches now require TLB flushes when crossing the kernel/user boundary, but the description of KAISER @ lwn[1] suggests that these flushes are unnecessary with "more recent" processors supporting PCIDs. How recent is "more recent", and is the PCID support likely to be ported back to earlier kernels along with KPTI? TLB flushes for syscalls would…

PCID support is unlikely to be backported, but perhaps a simpler scheme with only two PCIDs (user and kernel) could be applied...

> PCID support is unlikely to be backported

I dunno, it sounds like it might be easiest to go ahead and backport PCID along with these patches. It touches a lot of the same code, so trying to split it out might just create more problems.

Re: The mysterious case of the Linux Page Table Isolation patches

#199
post #187
post #62

Earlier quoted context omitted.

And, for reasons that are entirely unknown, the issue got worse due to one of the PTI patches (written by, and hence tentatively blamed on, yours truly). Presumably it caused some minor change in code generation causing GCC to go nuts. FWIW, the compile flag that Gentoo enabled activates a seriously busted GCC feature, and I'm a bit surprised that Gentoo gets away with it in user code.

Is there anywhere to read up on the bustedness of the stack probing feature? (apart from the obvious incompatibility with trying to do that for kernel code).

Probing more than a page size below the current stack pointer is wrong. Probing more than a page size further when one's saved frame area, save area, locals area, and (maximum) calling parameters area do not amount to a page in total is also wrong.

For more on the considerations that underpin stack probing, see http://jdebp.eu./FGA/function-perilogues.html#StackProbes for starters.

Re: The mysterious case of the Linux Page Table Isolation patches

#200

Earlier quoted context omitted.

There's ECC inside the chips.

The internal caches have ECC but rowhammer targets the DIMMs. ECC DIMMs would solve the issue but Intel, for market segmentation reasons, fuses off the ability to handle ECC memory in consumer chips.

ECC doesn't protect against rowhammer though. It makes it more difficult but not impossible.
Post reply on HN