by junon · 3y ago · 0 comments
I wonder how this will affect quirks such as A20, IRQ remapping, etc. All oversights and mistakes made by Intel over the years - none of which really hurt development or performance these days per se, but are definitely not fun to work with either.
Something like this is the only thing that would save the x86 architecture before ARM inevitably took over.
Engineering is not about achieving perfection. It's about organizing compromises to create a product that provides good utility at a fair price. These were not oversights or mistakes they were intentional design decisions.
Likewise.. you can see segmented memory as "nonsense" and a "waste of development time" but Intel clearly didn't fail at anything. They've been one of the largest and most successful chip manufacturers for decades, because their products provided real utility at affordable consumer prices and software developers gladly put up with the technological choices to be a part of that giant market.
Probably the 2 biggest reasons for this are that only 2 companies are allowed to "touch" x86, and that the second company was easily undermined by nefarious business practices. This resulted in a lot of things that were not "oversights or mistakes" but rather for the longest time lax approaches under a distinct lack of pressure.
It's hard to say how the x86 world would have looked like today if someone like Nvidia had a license.
There's some alternate universe out there where x86 died because Nvidia was charging $1200 for a mid tier CPU so arm was able to creep up even faster :/.
Do not forget all of the anti-competitive AMD nonsense over the years. Sabotaging AMD performance on benchmarking is my stand-out, but there were also the payouts to Dell and others to purchase exclusively Intel chips.
(I'm still shocked how they've begun losing to AMD. Having all of the money, dirty benchmarking tricks, and "let's just hire all of the people" haven't worked out, incredibly.)
Eh, this feels like a rounding error in ISA desirability compared to pointer authentication, or something like CHERI. Sure, it'd be _nice_ to have the legacy stuff cleaned up, but it's not costing much human effort to deal with compared to the effort spent securing native code.
I could imagine a more user-noticeable effect in VM cold-start times, perhaps, though I'd think physical hardware boot times would still be dominated by other things (e.g. actually loading the kernel into memory); the minimal implementation of transitioning from real mode to long mode is a few hundred instructions.
People tend to remember mostly how difficult it was to program with segmentation in 286's 16-bit mode and earlier. But in 32-bit mode, user-space code didn't need to bother if the OS didn't use it.
I've read several papers lately about schemes with compiler/OS co-design for securing the return pointer on the stack, function pointers and other sensitive variables from hacking attacks. This problem was already mostly solved on x86-32 where the stack can be in its own segment.
But to get achieve this in 64-bit mode (and on ARM and RISC-V), researchers have resorted to various tricks such as randomising addresses regularly [SafeHidden], switching access to the (safe) stack on and off with Intel MPK, using the Intel shadow-stack (in CET) for storing variables [CETIS], and even running user code in privileged mode [Seimi], [InversOS](ARM) ...
Some of these these schemes are tricks using the CPU in ways it wasn't intended, and therefore perhaps broken on future CPUs. Several are only available on newer Intel processors with certain extensions, and most have considerable run-time overhead. Therefore, you will never see any like it in a mainstream OS. But the x86-32's safe stack would have been, as "Safe Stack" schemes relying on randomisation already got widespread adoption.
[SafeHidden] https://www.semanticscholar.org/paper/SafeHidden%3A-An-Effic...
[CETIS] https://www.semanticscholar.org/paper/CETIS%3A-Retrofitting-...
[Seimi] https://www.semanticscholar.org/paper/SEIMI%3A-Efficient-and...
[InversOS] https://www.semanticscholar.org/paper/InversOS%3A-Efficient-...
Well, the A20 gate was actually IBM's creation, in order to make the PC-AT system compatible with running real-mode DOS programs.
Intel simply, later, incorporated it into the CPU because it was already part of the PC architecture (and had been for years) at that time.
Now, one could argue Intel had no business incorporating it into the x86 ISA, but it wasn't ever their oversight, they were just reacting to the reality of the systems in which the vast majority of their CPU's were used.
Burroughs B5000 had segments. Roger Schell said it was added to Intel by a Burroughs guy when they requested hardware-enforced security to protect memory. They wanted to use it in upcoming OS's like GEMSOS. Rings came from SCOMP which also had an IOMMU in the 1980's. Descripters evolved into capability-based computer systems. Intel tried with Intel i432 APX and i960MX (good one). They lost billions. CHERI with RISC-V is the best of that lineage right now.
https://www.cse.psu.edu/~trj1/cse443-s12/docs/ch6.pdf
https://web.archive.org/web/20220701015547/https://www.mrhec...
https://homes.cs.washington.edu/~levy/capabook/
(Note: Aesec might still sell GEMSOS today.)
More recently, schemes like Native Client and Code Pointer Integrity used segments. The reviewer who broke the software versions of Code Pointer Integrity couldn't bypass the segment-enforced version. There was probably a lot of unexplored territory in combining modern, memory protection with segments. I'd like the alternatives to have as much assurance as designs on segments gave us. They're getting hacked more often, though.
A20 was removed in Haswell (released pretty much exactly ten years ago).
See all the revolutionary ISAs from the 80s, 90s and 00s that did away with all that legacy crap. Where are they now? I think the only one still working is POWER.
- Foolhardy snatch 1: iAPX 432. - Degradation in first half of 1990s, concluded with FDIV bug, and marvellous savior "ASCI Red" which paid all OoO development (PPro and following). - Foolhardy snatch 2: RAMBUS + Itanium. Nearly collapse with P4 and miracle #2 with Israel team, Core, and stealing AMD64.
I can't imagine that a person adopted EPIC-based Itanium had had a real engineering competence. (Not sure for iAPX 432, this is a complicated issue.)
On a lower layes, as ISA details, every Intel move looks like using prediction less than for 1 move forward! Maybe 1/2 move sounds more veracious. Loads of examples. And, this also seems a guy that just remembered he was an "engineer" 30-40 years ago is now a decision maker.
On the contrary, it will make it worse. People choose x86 and the PC for the backwards compatibility, and Intel throwing that away is not going to make them any better than ARM.