[PATCH 07/31] x86/entry/32: Restore segments before int registers

2018-02-09 Thread Joerg Roedel
From: Joerg Roedel Restoring the segments can cause exceptions that need to be handled. With PTI enabled, we still need to be on kernel cr3 when the exception happens. For the cr3-switch we need at least one integer scratch register, so we can't switch with the user integer

[PATCH 07/31] x86/entry/32: Restore segments before int registers

2018-02-09 Thread Joerg Roedel
From: Joerg Roedel Restoring the segments can cause exceptions that need to be handled. With PTI enabled, we still need to be on kernel cr3 when the exception happens. For the cr3-switch we need at least one integer scratch register, so we can't switch with the user integer registers already