Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp621455ybg; Fri, 12 Jun 2020 10:06:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxjyLXMCjkCBf2ixmdP/l/mQLmplytx3JWpAlgKzXC6rGbwdkEYnr68I3cHENNfaCC5Y3T X-Received: by 2002:a05:6402:1b01:: with SMTP id by1mr12481262edb.20.1591981580284; Fri, 12 Jun 2020 10:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591981580; cv=none; d=google.com; s=arc-20160816; b=V2VXRmbXb0VftseYU/5b+bZyXy2IFAa83cuOcwX/oS1k0xYlG3X2p+WD92SbldJlA+ Gwx4d+wInXdyt7BJ3OJ7msBw1ZMhmO4pi5faXO2ZCJhCvRuJrNNTRa+sc1sSeLBMu3Sp q1M2txV7F4yGpKFuaSi9nuPUhcGNjNqvY/8FMYLOCvUnn/bdgWl9fmI/7bnU4+ImxLDU bwOg0RJ/Ix2uO2bW+sW1X24sC8qcLdJB/4HsUCCsw72BCM/V8dhIh8tIUgFAtN+11adC B06zY7NUpE5ocMrOGtHbxLPQS46TDIinO4Kd5159c2JarfhOrbEYMhs31eNRmdwRr8fb MliQ== 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=wKDkjgF19/IiDKySgt9F5cncsG16y1YBxi2M6a3xPN0=; b=e6S/wc9OgpyDpN02/nt1lYLKslPh69ZRmTSutXwpmP/K7a20L6/fEoryB6n7oq9ySM BU/8ojJ5RRRqYHkFLJvXcGiGz7iOQIj3bv6KAkOW4FZnUCVAGYeTdkMssDSTRpvXSLpL bf9jbKMLdBuqgLiTdHSYnVNPSeX4aqQtIToG1t/INmZ+rb3RpuRbaUA1edUNQCYj7bGm qgh7YarhpXzUek+Y80+IRDhonmrg7H8ktjhnIMtaAx2slcaxE3q0cMPm7pMfmKIEE7gv jYo8m0ROs5Nl+kFbfNxMgtw3fOU8WBUlpWfnJnybaBwg0lhmWG90Kli8CBH+juRea2m2 UNFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kUCOgcNL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id n10si4273972ejj.375.2020.06.12.10.05.57; Fri, 12 Jun 2020 10:06:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kUCOgcNL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726404AbgFLRDM (ORCPT + 99 others); Fri, 12 Jun 2020 13:03:12 -0400 Received: from mail.skyhub.de ([5.9.137.197]:57992 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgFLRDJ (ORCPT ); Fri, 12 Jun 2020 13:03:09 -0400 Received: from zn.tnic (p200300ec2f0af40048a70bbbe71adfd0.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:f400:48a7:bbb:e71a:dfd0]) (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 42D4E1EC0286; Fri, 12 Jun 2020 19:03:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1591981388; 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=wKDkjgF19/IiDKySgt9F5cncsG16y1YBxi2M6a3xPN0=; b=kUCOgcNLwxQG2N1XYoUn9cdLG8LbkKJPKu31XMOnWZ0oShF3qldTth6z7CdA++rWcW5+ev aEY0+Z42/gLRZ815rmrUQjJCpNS/0hxAJxlUScu9OO8EQugEj5jM0fkPPScnRgPOreTjzs 5HQ9DqSEEyjlYJWsZx7BG6Vz7/2dngY= Date: Fri, 12 Jun 2020 19:03:03 +0200 From: Borislav Petkov To: Sean Christopherson Cc: x86-ml , Linus Torvalds , lkml Subject: Re: [RFC PATCH] x86/msr: Filter MSR writes Message-ID: <20200612170303.GD22660@zn.tnic> References: <20200612105026.GA22660@zn.tnic> <20200612163406.GA1026@linux.intel.com> <20200612164602.GC22660@zn.tnic> <20200612165709.GB1026@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200612165709.GB1026@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 12, 2020 at 09:57:09AM -0700, Sean Christopherson wrote: > DS_AREA takes a virtual (linear) address, i.e. the address can be legal from > the CPUs perspective but still lead to a #PF due to the address not being > mapped in the page tables. It's not that - peterz and tglx - and I assume you meant that too - you all want to taint on the very *attempt* to WRMSR, regardless of whether the MSR exists or not. I don't necessarily agree with that because I don't think we should taint when the MSR doesn't exist but if you all want it, sure, whatever. I don't care that deeply. > So users don't have to unload and reload the module just to enable or > disable writes. I don't think it changes the protections in any way, a > priveleged user still needs to explicitly toggle the control. There's /sys/module/msr/parameters/. A privileged user can do whatever. A non-privileged should not disable that. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette