News for hackers. Stuff that matters.
Re:Intel and AMD Contemplate Different Replacements for x86 ... by vlovich123 on Friday June 04, 2021 @02:46PM (#27397447)
Is that actually true? Wouldn’t this imply you could launch a DOS attack against cloud providers just generating divisions by zero?
Re:Intel and AMD Contemplate Different Replacements for x86 ... by bonzini on Friday June 04, 2021 @03:09PM (#27397763)
You would only attack yourself. The CPU time you're paying for would be spent processing division by zero exceptions.
Re:Intel and AMD Contemplate Different Replacements for x86 ... by vlovich123 on Friday June 04, 2021 @04:30PM (#27398734)
Then the CPU isn’t stopping and is moving on doing other work. Meaning the divide by zero could be processed by a background CPU and doesn’t require immediate handling. Same for page faults.
Re:Intel and AMD Contemplate Different Replacements for x86 ... by bananabreakfast on Friday June 04, 2021 @05:55PM (#27399524)
Incorrect. The "CPU" is stopping and handling the fault. There is no background CPU from your perspective. In a cloud provider you are always in a virtual environment and using a vCPU which is constantly being preempted by the hypervisor.

You cannot DOS a hypervisor just by bogging down your virtualized kernel.

Re:Intel and AMD Contemplate Different Replacements for x86 ... by bonzini on Saturday June 05, 2021 @05:03AM (#27403423)
There are a couple x86 corner cases where you can do so, by causing an endless stream of exceptions. But they are not going to happen in a hot path, so the hypervisors force a vmexit on those exceptions and avoid that the processor freezes forever.
Re:Intel and AMD Contemplate Different Replacements for x86 ... by bonzini on Friday June 04, 2021 @04:33PM (#27398769)
Your instance can still be preempted by the hypervisor.
Re:Intel and AMD Contemplate Different Replacements for x86 ... by fulafel on Saturday June 05, 2021 @03:34AM (#27403036)
The hypervisor is just some software that runs on the same CPU. It wouldn't help if the assertion that the CPU can't continue was true.
Re:Intel and AMD Contemplate Different Replacements for x86 ... by bonzini on Saturday June 05, 2021 @05:02AM (#27403417)
The CPU can't continue running user code because it jumps to the exception handler. But it can get to the hypervisor at any instruction boundary.

(I write a hypervisor for a living :)).

Re:Intel and AMD Contemplate Different Replacements for x86 ... by zaptheimpaler on Saturday June 05, 2021 @01:21AM (#27402446)
The divide by zero in this case is handled by a virtual CPU implemented in the hypervisor, not the actual physical CPU on the server.
Re:Intel and AMD Contemplate Different Replacements for x86 ... by fulafel on Saturday June 05, 2021 @01:53AM (#27402583)
There are mechanisms that can intercede, and there are often more than one cpu thread per core.
Re:Intel and AMD Contemplate Different Replacements for x86 ... by imtringued on Friday June 04, 2021 @03:11PM (#27397789)
A site that renders HTML is more computationally expensive than handling a site that does nothing but division by zero.