Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4459697ybb; Tue, 7 Apr 2020 07:56:46 -0700 (PDT) X-Google-Smtp-Source: APiQypL3zC+m9KJ2tGX7eEUcIBce9oDlPJ+SQAD/Zmujr0l9F35xH56iqMDMo9JaAHp9DhLXidcJ X-Received: by 2002:aca:c390:: with SMTP id t138mr1953948oif.117.1586271406143; Tue, 07 Apr 2020 07:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586271406; cv=none; d=google.com; s=arc-20160816; b=Olbq4hGi6Siq8DHqsoEiXjL2ADQceDKhuK/PML/kGvlXlw1/cv7qg9sgZEybCyviPP IBKbPwRMqLeoUtXn8pDzI4OQOfr2YB9KbMfOvm95pqALs66QdxMQbmeHQ3l5hgGoQ7hA fOnY1wY8HSLf1n9qEZ2XcxyDfRH08OcBqJ5qyzRrfx1xab7o0T8vNnqNq1L0TMgBp7S+ 5cj2xmgGVwsrd4qNXRAizUR2GlgVhCBzqhcR9UEVfRFaVEEYpz8Z2lrVkj6Qy/NLjELG u3nRJLvckQmn+ls3pv5rR77e4Avaa2FcE2WXwju6T/qJtN6v0ureLrTUChYGmwPo8eCt L6Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jvUO5hr+P2lsND8t0k2jAItxaRkIHsNH6jo9orI24QQ=; b=Oi4zyrTnDafdFDwfensHVuCY3MP8E5FWRq9Pvoomtd21GGYWll0CVTmrWNsnXGpok8 CBVm9pHer55HYQN9q6OS0Ncsv/e/DrJgEFoloEkqBaXEebKenZQuO3OpaFTBbmJM1iBb 3JIDC5XMY7IRFpqfMmZmmn1kQk0jI0J229NHBalCvhXVk1/wR9931ASXDINesBo/z6Sj k+veE3NFKIOvpO3kaBW3uE8d/tYDpmh+eShI2zDNvk158yAhVaaE5BEFN4avzdCsNgXU GULIfnJDH5OVY5KBPursXaMle5KGQBjeLglWqtyPh8RjJ/+hjA0nwtkXxCkvgwQHNDmx gZCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zfx7S+ko; 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 g188si729647oia.203.2020.04.07.07.56.33; Tue, 07 Apr 2020 07:56:46 -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=pass header.i=@kernel.org header.s=default header.b=zfx7S+ko; 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 S1729275AbgDGO4D (ORCPT + 99 others); Tue, 7 Apr 2020 10:56:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:60292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729177AbgDGO4D (ORCPT ); Tue, 7 Apr 2020 10:56:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CDB7D20A8B; Tue, 7 Apr 2020 14:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586271362; bh=dmf2sCt8OdjywGVBqBDJTrQdLEpDVN1TaWBbslFDsRg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zfx7S+kokJvXRkoGEyjzLmK2uimhuiC+A0Y3zzYF/4x8dFA0kjGkbtJZ/scRZkIkd 285K3KzLYKWkGUdloYF1oXtfqs5pC7jRnTiMHLxKOZ7J+6tF2LdmbF7/EgTdV8SDx5 CSyVRwG8kVG2ZnuJKLh4bWExJ0XfDLDxfGn4PpYg= Date: Tue, 7 Apr 2020 16:55:56 +0200 From: Greg KH To: Paolo Bonzini Cc: Peter Zijlstra , tglx@linutronix.de, linux-kernel@vger.kernel.org, hch@infradead.org, sean.j.christopherson@intel.com, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, kenny@panix.com, jeyu@kernel.org, rasmus.villemoes@prevas.dk, fenghua.yu@intel.com, xiaoyao.li@intel.com, nadav.amit@gmail.com, thellstrom@vmware.com, tony.luck@intel.com, rostedt@goodmis.org, jannh@google.com, keescook@chromium.org, David.Laight@aculab.com, dcovelli@vmware.com, mhiramat@kernel.org Subject: Re: [PATCH 3/4] x86,module: Detect VMX vs SLD conflicts Message-ID: <20200407145556.GA895937@kroah.com> References: <20200407110236.930134290@infradead.org> <20200407111007.352324393@infradead.org> <20200407143543.GB876345@kroah.com> <527b5c72-96cb-a6cc-5301-449d86015ec9@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <527b5c72-96cb-a6cc-5301-449d86015ec9@redhat.com> 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 04:44:57PM +0200, Paolo Bonzini wrote: > On 07/04/20 16:35, Greg KH wrote: > > On Tue, Apr 07, 2020 at 01:02:39PM +0200, Peter Zijlstra wrote: > >> It turns out that with Split-Lock-Detect enabled (default) any VMX > >> hypervisor needs at least a little modification in order to not blindly > >> inject the #AC into the guest without the guest being ready for it. > >> > >> Since there is no telling which module implements a hypervisor, scan > >> all out-of-tree modules' text and look for VMX instructions and refuse > >> to load it when SLD is enabled (default) and the module isn't marked > >> 'sld_safe'. > >> > >> Hypervisors, which have been modified and are known to work correctly, > >> can add: > >> > >> MODULE_INFO(sld_safe, "Y"); > >> > >> to explicitly tell the module loader they're good. > > > > What's to keep any out-of-tree module from adding this same module info > > "flag" and just lie about it? Isn't that what you are trying to catch > > here, or is it a case of, "if you lie, your code will break" as well? > > It's the latter. Basically it's doing _the users_ of out-of-tree > modules a favor by avoiding crashes of their virtual machines; > developers need to fix them anyway. Ok, seems kind of a heavy hammer, but oh well... thanks for the explanation. greg k-h