Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 09 Jul 2018 21:46:03 -0000 Received: from mga18.intel.com ([134.134.136.126]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fcdyr-0002Tv-4h for speck@linutronix.de; Mon, 09 Jul 2018 23:46:02 +0200 Date: Mon, 9 Jul 2018 14:45:57 -0700 From: Andi Kleen Subject: [MODERATED] Re: [patch 1/2] Command line and documentation 1 Message-ID: <20180709214557.GM25550@tassilo.jf.intel.com> References: <20180708125216.197406530@linutronix.de> <20180708125654.729119463@linutronix.de> MIME-Version: 1.0 In-Reply-To: <20180708125654.729119463@linutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: > + full,force > + Same as 'full', but disables SMT > + control. Implies the 'nosmt=force' command > + line option. I'm still unclear what the use case for this force thing is. Can you please clarify? If someone controls the host kernel they can do all kinds of insecure things, so why go to all this effort just to prevent them from opening a side channel. It seems like unnecessary complexity. I would remove all the force options. > + > + novirt > + Leaves SMT enabled and does not enable the > + hypervisor mitigation. Hypervisors will > + issue a warning when the first VM is being > + started in a potentially insecure > + configuration, i.e. SMT enabled or L1D > + flush disabled. > + > + novirt,nowarn > + Same as 'novirt', but hypervisors will not > + warn when a VM is started in a potentially > + insecure configuration. So why is there no option to only enable the L1D flush? It would seem to me that would be better default than no mitigation at all. > > +enum l1tf_mitigations l1tf_mitigation __ro_after_init = L1TF_MITIGATION_NOVIRT; Can you remind me why there is no sysfs interface for this? Jiri originally wanted boot options because apparently they have an no ability to install a new boot up script in an update. So the need for an boot up option is more an hack to work around this deficiency. But I suspect long term for most users it's far better to handle this dynamically at run time, and not do unnecessary reboots, and I can't see any reason why that wouldn't be possible. So should have a sysfs interface. > + [VMENTER_L1D_FLUSH_ALWAYS] = "fully protected" > +}; > + > +static ssize_t l1tf_show_state(char *buf) > +{ > + if (l1tf_vmx_mitigation == L1TF_VMX_UNKNOWN) > + return sprintf(buf, "%s\n", l1tf_states[l1tf_mitigation]); > + > + return sprintf(buf, "%s, VMX: SMT %s L1D %s\n", I would call it Single-Thread instead of L1D That's much more intuitive for someone who is not deep into micro architecture. > > -#define L1TF_MSG "SMT enabled with L1TF CPU bug present. Refer to CVE-2018-3620 for details.\n" > +#define L1TF_MSG_NOVIRT "L1TF CPU bug present and virtualization mitigation disabled, data leak possible. Refer to CVE-2018-3646 for details.\n" > +#define L1TF_MSG_SMT "L1TF CPU bug present and SMT enabled, data leak possible. Refer to CVE-2018-3646 for details.\n" This should refer to the Documentation file, not the CVE. CVEs are not really useful to describe mitigations. -Andi