x86: insn-eval.c's use of native_store_gdt()
Hello,
I think it is b968e84b509d ("x86/iopl: Fake iopl(3) CLI/STI usage") which uncovered an issue with get_desc() trying to access the GDT, as introduced by 670f928ba09b ("x86/insn-eval: Add utility function to get segment descriptor"). When running in a PV domain under Xen, the (hypervisor's) GDT isn't accessible; with UMIP enabled by Xen even SGDT wouldn't work, as the kernel runs in ring 3.
There's currently no hypercall to retrieve a descriptor from the GDT. It is instead assumed that kernels know where their present GDT lives. Can the native_store_gdt() be replaced there, please?
For context (I don't think it should matter much here) I'm observing this with the kernel put underneath a rather old distro, where hwclock triggers this path.
Thanks, Jan
Quoted 7 lines · Jan Beulich
I think it is
b968e84b509d("x86/iopl: Fake iopl(3) CLI/STI usage") which uncovered an issue withget_desc()trying to access the GDT, as introduced by670f928ba09b("x86/insn-eval: Add utility function to get segment descriptor"). When running in a PV domain under Xen, the (hypervisor's) GDT isn't accessible; with UMIP enabled by Xen even SGDT wouldn't work, as the kernel runs in ring 3.
Quoted 7 lines
There's currently no hypercall to retrieve a descriptor from the GDT. It is instead assumed that kernels know where their present GDT lives. Can the
native_store_gdt()be replaced there, please?For context (I don't think it should matter much here) I'm observing this with the kernel put underneath a rather old distro, where hwclock triggers this path.
I'd like to note that the issue still exists in 5.16.
Jan
Quoted 12 lines · Jan Beulich
Quoted 11 lines · Jan Beulich
I think it is
b968e84b509d("x86/iopl: Fake iopl(3) CLI/STI usage") which uncovered an issue withget_desc()trying to access the GDT, as introduced by670f928ba09b("x86/insn-eval: Add utility function to get segment descriptor"). When running in a PV domain under Xen, the (hypervisor's) GDT isn't accessible; with UMIP enabled by Xen even SGDT wouldn't work, as the kernel runs in ring 3.There's currently no hypercall to retrieve a descriptor from the GDT. It is instead assumed that kernels know where their present GDT lives. Can the
native_store_gdt()be replaced there, please?
Quoted 5 lines
Quoted 3 lines
For context (I don't think it should matter much here) I'm observing this with the kernel put underneath a rather old distro, where hwclock triggers this path.
I'd like to note that the issue still exists in 5.16.
I'd like to note, that I've seen no patches to that effect.
Thanks,
tglx
Quoted 13 lines · Thomas Gleixner
Quoted 12 lines · Jan Beulich
Quoted 11 lines · Jan Beulich
I think it is
b968e84b509d("x86/iopl: Fake iopl(3) CLI/STI usage") which uncovered an issue withget_desc()trying to access the GDT, as introduced by670f928ba09b("x86/insn-eval: Add utility function to get segment descriptor"). When running in a PV domain under Xen, the (hypervisor's) GDT isn't accessible; with UMIP enabled by Xen even SGDT wouldn't work, as the kernel runs in ring 3.There's currently no hypercall to retrieve a descriptor from the GDT. It is instead assumed that kernels know where their present GDT lives. Can the
native_store_gdt()be replaced there, please?
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
For context (I don't think it should matter much here) I'm observing this with the kernel put underneath a rather old distro, where hwclock triggers this path.
I'd like to note that the issue still exists in 5.16.
I'd like to note, that I've seen no patches to that effect.
I could have worded it that way as well, yes.
Jan
Quoted 18 lines · Jan Beulich
Quoted 17 lines · Thomas Gleixner
Quoted 16 lines · Jan Beulich
Quoted 14 lines · Jan Beulich
I think it is
b968e84b509d("x86/iopl: Fake iopl(3) CLI/STI usage") which uncovered an issue withget_desc()trying to access the GDT, as introduced by670f928ba09b("x86/insn-eval: Add utility function to get segment descriptor"). When running in a PV domain under Xen, the (hypervisor's) GDT isn't accessible; with UMIP enabled by Xen even SGDT wouldn't work, as the kernel runs in ring 3.There's currently no hypercall to retrieve a descriptor from the GDT. It is instead assumed that kernels know where their present GDT lives. Can the
native_store_gdt()be replaced there, please?For context (I don't think it should matter much here) I'm observing this with the kernel put underneath a rather old distro, where hwclock triggers this path.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
I'd like to note that the issue still exists in 5.16.
I'd like to note, that I've seen no patches to that effect.
I could have worded it that way as well, yes.
Hi Jan, I am sorry I missed your email. I'll look at the issue you describe and get back to you.
Thanks and BR,
Ricardo