Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp491776ybt; Fri, 19 Jun 2020 06:47:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8AksRhzyCdrizlVfA/Wpmidl6/vm7BdKRV0NKsboDr1RdMHhkEm1Rn64o8i2xDLUa4UKB X-Received: by 2002:a17:906:f53:: with SMTP id h19mr3343292ejj.491.1592574430396; Fri, 19 Jun 2020 06:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592574430; cv=none; d=google.com; s=arc-20160816; b=os+NKfsB2sIlg4UdLSKCJNMz9xejs3hw4WqIIuhIHCupuZk9H8EFXefLQdIk2k3vSg 5AU0A7mmMCoO8f5EZQU1/lN7EtiKjSOLw5Ez9fq3UerOFn3aqXp/JSIJapfFDiOZE7ll yY2bXfZ3/Elt5O0KNyRma9NPPFAcoxnMnBUbcZ0rER5m4HtOq9RZ/T47u3NCPq//bjV9 CMeS9ctfdwDZMEFBXqmwHqVEhJVUy7Nz6nxDVLMt2R9w/REzdm5+hPFd2WfQ5ZgtSpdq n4L+qBSpP0rNAQ3nn3fdCIDbbAGtrmPV+mjgVsf6qLr1VJz9AFd3EHTTL6DMDgd9dHXM acjA== 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=Jw9EeswGVAhRId5Z/cmoaOU/4YK2HM29pcIB4hBn/pg=; b=aTVJDrQOhWMvtHC77KD784/6XhYg9CoI2ZuNGi+alGtgJ7y+WNDEiFBO3hDcihk1Tg j1JBnNBtDEk0XFWb492DxUoTcbTzr4diFeKDkmSKDr1FdC6Kx/hnNl+GaFeSOkeDinBt 6M3t5q4QDhgMSdbi5Oul49GaBpXLMsTqbD29mKvqzaJFLhrhNCN9PmjFLMW6L7gui3Mi e+rhgjHtC4b+eC9LaLZFfYBqc7Vi68JJTlVAHMTHjaF70F5EzjlQlreRdO/GdfM+h9SJ 35SLTIF4c71a1X6DcwZkC3klT3fhKG0aMaCdPYvsubOebJh8QF8XVrzSZC2sPkEL7/pH uDGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=rYRKZmmp; 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 z14si3832654ejb.309.2020.06.19.06.46.47; Fri, 19 Jun 2020 06:47:10 -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=rYRKZmmp; 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 S1732756AbgFSNog (ORCPT + 99 others); Fri, 19 Jun 2020 09:44:36 -0400 Received: from mail.skyhub.de ([5.9.137.197]:54236 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731806AbgFSNog (ORCPT ); Fri, 19 Jun 2020 09:44:36 -0400 Received: from zn.tnic (p200300ec2f0bac004d57d24caa4a0e33.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:ac00:4d57:d24c:aa4a:e33]) (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 C47BB1EC03D0; Fri, 19 Jun 2020 15:44:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1592574274; 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=Jw9EeswGVAhRId5Z/cmoaOU/4YK2HM29pcIB4hBn/pg=; b=rYRKZmmpr9nuGcCzk+JgYOV0qgBhlUx5hgV+Cd3zH36cFiUm2unC+WhzcRnIpUJYkdJDvI 7rieju2IeWv5m3RIBAndZQvzy9eNwYM4sn4VlHQkd5fISffZAqOIRKuQFfVQnv8u3lIhPa fLhN0aHPID/6C/9VlrgjBJhn8Apz2Zc= Date: Fri, 19 Jun 2020 15:44:32 +0200 From: Borislav Petkov To: Richard Hughes Cc: Daniel Gutson , Dave Hansen , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , Arnd Bergmann , Greg Kroah-Hartman , Peter Zijlstra , "David S. Miller" , Rob Herring , Tony Luck , Rahul Tanwar , Xiaoyao Li , Sean Christopherson , Dave Hansen , linux-kernel Subject: Re: [PATCH] Ability to read the MKTME status from userspace Message-ID: <20200619134432.GE32683@zn.tnic> References: <20200618210215.23602-1-daniel.gutson@eclypsium.com> <589c89ae-620e-36f8-2be5-4afc727c2911@intel.com> <20200618220139.GH27951@zn.tnic> <20200619074053.GA32683@zn.tnic> <20200619132243.GC32683@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 19, 2020 at 02:31:11PM +0100, Richard Hughes wrote: > 1. that the CPU supports TME (->cpuid, already done) > 2. that the platform has not disabled TME in some way Yes, this is what I'm proposing with clearing the flag in /proc/cpuinfo. The needed information is there: 1. TME in CPUID 2. TME *not* in /proc/cpuinfo which means the platform doesn't support it. If we are going to export a list of features which the OS kernel/platform has enabled - and this means a contract between kernel and userspace - then this should not be a misc driver which gets loaded as a module but builtin, maybe a proper sysfs layout similar to /sys/devices/system/cpu/vulnerabilities which userspace can use. Along with proper ABI definition, design, documentation and all that belongs to a proper interface with userspace. Because once userspace uses it, it is practically cast in stone. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette