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

Re: [PATCH 1/2] x86/time: use fake read_tsc()


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 1 Mar 2022 15:43:51 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=qwJzIZS51ymivE2MOwq4WJF7j8kjoWz9UHofoBY9E/o=; b=EwawHODIh2SfRzZcEd7OtH5ZC+JlpNpg3UrLFuZAJk12Bc2/pmy2PvsfLiDhDzqfa7vLyawDffGBSmsGUZvDbrKhP/3s7YGsmOa8lnRETdD/ExqjQnd8YQk1Zq/XLcJd0vDtu6Hx5B5lYUUlftdChK+qmjKuy8E4nrn94uOnax4e6sf7i+L4VZgxbyahYrEBeVkZ7rJZAz1dEzxxiAF+pyhMJHTJmQ9KjntZc8pRm2xi/2EkAfKbPPlOZAojyo3au/WoYsUwOP1D9dStsc/TBQQebHJye4PbXI4eZ+5I9Pqo7EeBvqiL95qlMN60IVf+wenKQvznDMykA6XGXvncwg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oJEXnXKAuhhoTk7WEQmKvlNUNhbiVab7yDNUaRcRXm/dkIff/eCFuh6l3VdyAhpJfsuhGMVCbFAWBQBOKiE7Cw02kM4H8k8ig+6xMuCm2X4DPpYIOLZ2mYhj/iotQ35xQ851RuR2Sci6YZBsiFjbYK7FmAlVY8pygCfesCE11i5OPqJN15Iwce2KKPKLzC+3Qh2ZdruGFBjVUAPta+WRuRUeJl7LK6G4jI329tBkVMDFRgjBt2Er5TBQcTLhTkuHMRsIw48CWJiM1YHU3Lvgort/TWq5JfxMXFm1cn80vKJoxMIbx9RIRDq7KuAdqFAnVU6k/x/oBM+4QrsZjZA8GQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 01 Mar 2022 14:44:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.03.2022 15:39, Andrew Cooper wrote:
> On 01/03/2022 14:14, Jan Beulich wrote:
>> On 01.03.2022 14:07, Andrew Cooper wrote:
>>> On 01/03/2022 11:05, Jan Beulich wrote:
>>> That said... what's wrong a plain NULL?  I can't see any need for a
>>> magic constant here.
>> Are you fancying an XSA for a call through NULL in PV guest context?
> 
> Why do you think that a risk?  Only non-NULL function pointers are
> followed, and altcall resolves safely if the pointer is still NULL.
> 
> And on that subject, don't we not hit the altcall's BUG_ON() for
> exceeding disp32?

There's no altcall involved here. As said in earlier contexts, altcall
patching comes to early to cover plt_tsc use. Hence the only concern
is a non-altacll-ed use of the pointer.

Jan




 


Rackspace

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