Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1389780ybf; Thu, 27 Feb 2020 10:02:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyf9r4lAEeA5CvdTFCm+lwPz796X0ZVpcCK1gBxB1uD02XW84LrCEIjMFEhmOI5m4s25LYD X-Received: by 2002:aca:1903:: with SMTP id l3mr236499oii.16.1582826574651; Thu, 27 Feb 2020 10:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582826574; cv=none; d=google.com; s=arc-20160816; b=fFBp4LdmUpaCU9+Sp/cGclSwW9jPh2Qp3c64DMIK8xBvMg99JXnQmba0kD+JJOdULg gMGb1uXmBGOH2y3ivFo15viSd92PFBzDxuwEhrYxQAF4KxP6InDXLej8dOb2S5piVBsU hVwMOxthJS+l/+r59If8B7ohYAgoxcioMj5Sn/HNqmEBiH57mhbqCf1C1GUNn95tfekV IZHo7PbbzN3xOrena4q6V1p3IgaCjOok/vnu/9888qxK5hexh0QR0/U/LMZZkDJz3uJO sVH8VVeLMh7Y4fa+ssMFV+mSfXCObIo3h+5R+NxoGDG7rNDXY7EHmg7kDmXiifpaEkdp 2LFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=C0ocNCl0BvV6Iv70Wd4elUhmzpKLGyoPGx9MZ3ic7rg=; b=xeoEMu+i3TyaL6e+FN516o44u8DttgH850YPzPL2hCMU17DAeucNVR7RR+MC26ve2u 0IXI8t6jkmCAkyIkRWiWh0WWk2NfIsFeOSZfHG7DhSdbCTWJFcLUaxOPKgg9dLM5FrHy RUh9oyTCs4M5HTTpT2GLI8GAS7uL9wcA/wUiQzRnPA+cKIeMrKDzY8r1JCf1X+K+SxLU 2+vPqBs90SmZCV9ODRoQbnqEX1n5W4QNQMP3sT28f9N+P360BkZoUs7N2aT6Q+7Ah8we EQmhAV6io/Hgu9DsF+VwXLtTqtfiE4MmHLj2QubplATPV9RDOGqtO1amwvxx2RCxrJm+ YwJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=pbwifbyn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o25si2400765otk.28.2020.02.27.10.02.40; Thu, 27 Feb 2020 10:02:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=pbwifbyn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730126AbgB0SBJ (ORCPT + 99 others); Thu, 27 Feb 2020 13:01:09 -0500 Received: from mail.skyhub.de ([5.9.137.197]:41542 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729162AbgB0SBJ (ORCPT ); Thu, 27 Feb 2020 13:01:09 -0500 Received: from zn.tnic (p200300EC2F0E0F005C616343C404DD6B.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:f00:5c61:6343:c404:dd6b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 1B7B81EC0CDD; Thu, 27 Feb 2020 19:01:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1582826468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=C0ocNCl0BvV6Iv70Wd4elUhmzpKLGyoPGx9MZ3ic7rg=; b=pbwifbynEjeq04eVHBEaQ4ua8gvBNpa63SFtiJ/8A3bnWuAHapUaa7ybToyYZpCyj/PfVV V922BdHVBoL7turZyP2MYEsidOwC6HsgsX/VHR7cjQgTMDGgbbIOYmiqRMV+4MX6ncj4Ge hsGCGATkLHBl76oj69SLwmpEgogzoTw= Date: Thu, 27 Feb 2020 19:01:00 +0100 From: Borislav Petkov To: Jacob Keller Cc: Sean Christopherson , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Dave Hansen Subject: Re: [PATCH] x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes Message-ID: <20200227180100.GB18629@zn.tnic> References: <20200226231615.13664-1-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 26, 2020 at 04:16:13PM -0800, Jacob Keller wrote: > I tested this and it resolves my report! Thanks for a timely fix. Adding your Tested-by. > I agree with the analysis. Perhaps it would make sense in the long term > to find a solution where get_cpu_cap can remember what was cleared for > each CPU and restore those? It already does this using the global > variables... get_cpu_cap() remembers if you use setup_force_cpu_cap() but I agree that that whole feature bit handling is a bit, hm, "strange". It had its raisins. FWIW, we had started cleaning those up but then the security nightmares happened so on the backburner it went... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette