[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/8] x86/boot: Sanitise PKRU on boot
- To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 13 Jan 2023 10:04:13 +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=ikpCPRyBnn2PQBXs6zphf8ZMYfTSU9wBgd0hKfIBIVE=; b=miLAhXV4kWJ/uqD6Z5WrDDBjm7u/AN+zogL5m4M+g2G1jpNo7at8v8LAe8Y+VqpAQskEPsz4p0MC3AeJGlj1HPDEXi4BEjcgtKpSmxhN60QMFHpHaQ9W8gr7stPgOKyeB4C6hpLYMxX5fDyI11HaaM19axeJZ7Iwefc3o8Y/QR1WNUHGPMiUvBEG9hmCXMCulwfZ2blPAOslWIdzx27irc12+E96U1vFXe2r1dt3C7ZT++qEyHvQKFw9ROuSIu8vOlBjBnNXq9h3W5SyRjJjP3tIA5Bh/sAR3zmJUA4ma/gJWNaRckzjyoVueSXYIOMyDoSzwuE8bgVWOuIPORWPuA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R3Z99oOIQvg+/iWYUa00yVVIpSEWpgjmm+TB0v8EqQKCUpVZSIjFu2dGBcitcJpPG9+lX+4OUh2I338OhFQfP0aooxGgOIVuEIN6q8z5yWCMsCQ08CE0HlA94PGp8+MBElJIEDi1OvCrH+3zS8hTnARAgcgFxv3bFX2z+bti2M/b8esTXO5uWoOLK7nb0hwEM/Bw76s7xTHeQYhGga8Gq81ryfVhq3HlPD7VlQCoutY54HbP5d4Wcms3FTph/elB5KxWa2nzf+0ZPT3OlpAtJw87jBNw2JC1QJdxT7Dan1ElCctXGhGs/sKHQdG5kvi+Idg0TYd9WlWU2n9qk5ymig==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 13 Jan 2023 09:04:26 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 12.01.2023 18:07, Andrew Cooper wrote:
> On 12/01/2023 12:47 pm, Jan Beulich wrote:
>> On 10.01.2023 18:18, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/cpu/common.c
>>> +++ b/xen/arch/x86/cpu/common.c
>>> @@ -936,6 +936,9 @@ void cpu_init(void)
>>> write_debugreg(6, X86_DR6_DEFAULT);
>>> write_debugreg(7, X86_DR7_DEFAULT);
>>>
>>> + if (cpu_has_pku)
>>> + wrpkru(0);
>> What about the BSP during S3 resume? Shouldn't we play safe there too, just
>> in case?
>
> Out of S3, I think it's reasonable to rely on proper reset values, and
> for pkru, and any issues of it being "wrong" should be fixed when we
> reload d0v0's XSAVE state.
Fair enough:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
|