Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4782325ybb; Tue, 7 Apr 2020 14:30:27 -0700 (PDT) X-Google-Smtp-Source: APiQypKmGOY9IpqAjWMHh4BADFqaSxerrEPbwckxOHZcaURjIuDKH+ecPGvVOBrIIedIpcOhW66n X-Received: by 2002:a05:6808:43:: with SMTP id v3mr151880oic.59.1586295027578; Tue, 07 Apr 2020 14:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586295027; cv=none; d=google.com; s=arc-20160816; b=ODcpyPPNhevVVj68BliHGoeOCeNEZCLWQxmWPvcGFJY645RxPNe80q2jDQhq+IBnCt 9wOi1vujLygm2GxFDNzjNoIQ+HqLF1rNv3EXCN7OFhG3anGZQXqY9tPlwiKKY3pc+z0B cBZPJtNT/zFJVft7YJFsfiJruG1KEIy4Vh5LDeWYvDlVEyZXn1LlW0cljWfj/bhf6cfF PF2C7y28BMOb+e84gEHWPnTbGAKeoYlfsq5sppXbUqN1BMZyMs5z6xEr28xoEMP3dKW1 93wajDeQROm47tNoP55n/AYovArTbtHcOvPCwFXukuIdhD+LlMH6IDeFR/Gr7omWiLbx rLMg== 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=dF5pQpdVBqNC0kSnylLZyPWPJXxXRLznWdsyFigAa+Y=; b=SfI+hi36bhIGWgCcI9mZgfWyUEMF8cz2c3nHuKaZ2fWc9aA0lpO8LEZcZ/4XuDDWOF Hh/gm1Qc7Yrgp+lCsDOM27cl8eINQer3H735TuZTrRuyDjnrkxVdm9wFat+EjDpop4ma OOJTBkOL18Z9+nDsnZWcLA+4GFvKAuVV5Z5c5bIkyf6u54FRlph7PpI5e1Kcj33pvS4U sfEAO91GIQIJOEQLe21g8SyteU3EOQcz4C08KtcGjQtVCwHyUKQpYlV2jhKDZBlmXUPC nbunM6VsJ6JCcpPEh5uscQap5SWAGs4mjq5pf3TG6gDoLkWJ1NNMDgwUa+gGqnjpSUGm xXqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EcH2LrXb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g203si1576346oif.38.2020.04.07.14.30.12; Tue, 07 Apr 2020 14:30:27 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EcH2LrXb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726416AbgDGV2S (ORCPT + 99 others); Tue, 7 Apr 2020 17:28:18 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50848 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbgDGV2S (ORCPT ); Tue, 7 Apr 2020 17:28:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=dF5pQpdVBqNC0kSnylLZyPWPJXxXRLznWdsyFigAa+Y=; b=EcH2LrXbGkY/A0oFSOCNRu8Kzn Jm1L3B8w2Z0EJIp1E6FXqTJGekUCp/ghbnSAyfVRBBjan/Awl8/21Lfwj/nIyORskbTf1sSOFcZud Viil12cmJ+sFXFpXtS22jYZXLfyNjo18kIQh0BOV2LpsI0NNohRe0UpZaQ9kVJO5EJ/fcROu58KjZ XOD9UXnK1HSXIqXhb7u7Lf9lwNhiyEAfyFSLG0wBF5L/yd2bY0nLJ0Ac9wAJbdktKkmjjS6dG8Rtg UTdM6fuAZpK8buCxz7vmKIRKqZOglWpvEJd5/g0W5TXtXmJtSisb2P4mDRXgwuNbVxFs9rL6W6SqR Mul4V5hg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLvlF-0002vH-0a; Tue, 07 Apr 2020 21:27:57 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id E13B89803E1; Tue, 7 Apr 2020 23:27:54 +0200 (CEST) Date: Tue, 7 Apr 2020 23:27:54 +0200 From: Peter Zijlstra To: Nadav Amit Cc: Thomas Gleixner , LKML , hch@infradead.org, Sean Christopherson , mingo , bp , hpa@zytor.com, x86 , "Kenneth R. Crudup" , Jessica Yu , Rasmus Villemoes , Paolo Bonzini , Fenghua Yu , Xiaoyao Li , Thomas Hellstrom , Tony Luck , Steven Rostedt , Greg Kroah-Hartman , jannh@google.com, keescook@chromium.org, David.Laight@aculab.com, Doug Covelli , mhiramat@kernel.org Subject: Re: [PATCH 4/4] x86,module: Detect CRn and DRn manipulation Message-ID: <20200407212754.GU2452@worktop.programming.kicks-ass.net> References: <20200407110236.930134290@infradead.org> <20200407111007.429362016@infradead.org> <10ABBCEE-A74D-4100-99D9-05B4C1758FF6@gmail.com> <20200407193853.GP2452@worktop.programming.kicks-ass.net> <90B32DAE-0BB5-4455-8F73-C43037695E7C@gmail.com> <20200407205042.GT2452@worktop.programming.kicks-ass.net> <96C2F23A-D6F4-4A04-82B6-284788C5D2CC@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96C2F23A-D6F4-4A04-82B6-284788C5D2CC@gmail.com> 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 Tue, Apr 07, 2020 at 02:22:11PM -0700, Nadav Amit wrote: > Anyhow, I do not think it is the only use-case which is not covered by your > patches (even considering CRs/DRs alone). For example, there is no kernel > function to turn on CR4.VMXE, which is required to run hypervisors on x86. That needs an exported function; there is no way we'll allow random writes to CR4, there's too much dodgy stuff in there.