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

Re: [PATCH RFC 8/8] x86/boot: Check that permission restrictions have taken effect


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 2 Dec 2021 14:33:21 +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=2G0UFx7dbUrZfUZc/ptz5HPJR/23wF74hdc9vJm6BKk=; b=nj7VUanQjKBBfUhwic5TwoqDMCDh9vnh5DSSI0gRVX34t8W0ny8CwoSNZbU2zrydQcn9V8k4ANPzEGEkla/gd4980FAz5+x9iERWPiV8ETOrQLRiEhbNrcqApk02l2pdZ8d9X26/gIREZkA2pe8RuGY7gydJH5+rp2sP7hxd4QlTY2MtMt3Ywj1O6ELSy/q+hKWE6YkL3IkErhsQo6VRdRpHnU0ARBrL/FVT7ENdoYT7yAgcADds/otnciMT4pwlDwyeigSYeBwHk1nhiESxFtOnUOhpmBxGUMJOiQP11Lm58/ZyZb8iqsfno9MvX/oeysAq+Qj7zy9imRxqtPO9xw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CfTt3yElQ5ybwh9f6PVzr4rr32S9u4ruWs04RRXldliNrfbRwa3HDh6WiHmoV3bpfiFV+gaJ8AIcWYGfP9DbPjhdic/RwLXUkK7doHKO4nn7Bbdr5y9zUm06Sko5t2GAd0pOx+OZBOuOE77kqeq3PONVRNCDqfQaIMIirdc1Q3AQ3CB2PDRm5BcLrznvbzQY1F9EDZa2XBT2jdLAGyiwfdXcjKqzWn0qlc+6vrmjVcum6BcPTcdHujmIWQGYgysJ1n/Wb7DTHk3Q/lEIkodPuMsKW3ue69OXg7XvoP2UQaq0ARB6KXK60FWEhb7a0mNHyyU79WTRxX8PlPthhgj3xg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 02 Dec 2021 13:33:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.11.2021 11:04, Andrew Cooper wrote:
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> 
> RFC.  I don't know if this is something we'd want to keep or not.
> 
> Getting extable handling working for test_nx_data is proving tricky, and while
> I can't spot anything that should stop the extable from working with NX
> faults, from a security hardening perspective, there really ought to
> be.
> 
> (Spurious faults aside), there are no circumstances where an NX fault is
> legitimate, and restricting extable's ability to interfere with the fatality
> of an NX fault provides a better security posture.

Gating the extable_fixup() invocation accordingly should be possible.
A respective check could live even earlier, but the window between
the !guest_mode() check and the function's invocation isn't very large
anyway.

Since we can't have both testability and such faults being uniformly
fatal, but since otoh we use pre_extable quite sparingly, how about
forcing the fixup to take that path by disabling interrupts around
the test?

In any event this touches the insufficient selectiveness of the fixup
machinery again: Any kind of fault will be recovered from whenever a
fixup record is attached to an insn.

Jan




 


Rackspace

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