[Devel] [PATCH hci-8.1] x86/traps: emulate CPUID faults for user tasks in exc_general_protection()
Vasileios Almpanis
vasileios.almpanis at virtuozzo.com
Tue Oct 6 12:30:43 MSK 2026
On Tue, 06 Oct 2026 10:30:19 +0200, Konstantin Khorenko <khorenko at virtuozzo.com> wrote:
> A non-empty /proc/vz/cpuid_override table makes ve_setup_task() set
> TIF_CPUID_OVERRIDE on every task entering a VE, so the CPU raises #GP
> on each CPUID the task executes and check_cpuid_fault() is supposed
> to emulate the instruction with the table values.
>
> The call sits after the user-mode branch of exc_general_protection(),
> which ends in gp_user_force_sig_segv() and goto exit, so it is reached
> only for a kernel-mode #GP, where CPUID never faults. Every Container
> task dies with SIGSEGV on the first CPUID of glibc init_cpu_features()
> instead of getting the override:
>
> [...]
Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
--
Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>
More information about the Devel
mailing list