[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: x86: insn-eval.c's use of native_store_gdt()


  • To: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 4 Feb 2022 10:23:54 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XNPUMy76s9V5P1WX5LpPDEh9bgK8dMDSXDK15/We5mA=; b=lWsMR09NAk8TxkmRpuwFOn30WaGPJtFAf1Mw3fmymDQ9EnAAt0hpO9EwJ6YY1He+YgBwLMrfpFxttjn+4kEeGM8PfUkHLwSMkNNHfu2WOzDpcaEuJlRrl9ZQDEgOI6dnY1TPkGcqNbX7OP/p5opzirmjdHK4Jxndh7S+ROiU3vvUCmrkPcga4yNDIPVpbOy1kiuV7adYIv/DSt9dyXno6URM8f1PoeXpx1h/BfzsK9t2sZo70pcVItgMwePGv1YNN5FZZahfUeoPkoLTN7blw0/6U3hkMybhcghU6yKzrh0YZXBXttKawjUpXHphGa55WMACLlRTrlaKkQkKglKqqA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FPZjm/y3QXrpihTaa7fApheUpBiyID4p0ZkBn0c0lhhDCG1hbbHTTEnFR7srH2VbPk/+AEX1TYSsL11cGux38r3F6Xr4bX9y3Op5ZZi8EFJ8qQFkyS+S39hkTVx1ASbT6ncTCkLx60KJoNqGOU9pq+6VCxjnEDWil5M2yGqkFhv1lCn6JOoDF81nugJ6+Kj+sgV2frKyl5UWrtNrgekNg4QU6b4+frYpBi5lOKMwQypAksR3k8wc+gLU2MqSNnXe+p4/Oi+xGWA6/UPgvkiA5EeaQ4I/ZXI0WYfEpjpAfTGINPmsfAw5VFMwhM9N6XUifigA898WWDMMWsztboW74Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>
  • Delivery-date: Fri, 04 Feb 2022 09:24:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.11.2021 12:09, Jan Beulich wrote:
> 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.

I'd like to note that the issue still exists in 5.16.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.