Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 08 Jul 2018 15:21:45 -0000 Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fcBVP-0003lL-Sx for speck@linutronix.de; Sun, 08 Jul 2018 17:21:44 +0200 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 61DE9401EF05 for ; Sun, 8 Jul 2018 15:21:36 +0000 (UTC) Received: from treble (ovpn-120-114.rdu2.redhat.com [10.10.120.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 389F17C28 for ; Sun, 8 Jul 2018 15:21:36 +0000 (UTC) Date: Sun, 8 Jul 2018 10:21:34 -0500 From: Josh Poimboeuf Subject: [MODERATED] Re: [patch 1/2] Command line and documentation 1 Message-ID: <20180708152134.ff7aamuapitvat22@treble> References: <20180708125216.197406530@linutronix.de> <20180708125654.729119463@linutronix.de> <20180708140007.gbuyp7qdpgxpzotx@treble> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Sun, Jul 08, 2018 at 04:13:02PM +0200, speck for Thomas Gleixner wrote: > > However, I think it *does* make sense for the force case. And I think > > it should be similarly enforced in vmentry_l1d_flush_set(). > > > > In fact, this logic should probably all be moved to > > vmentry_l1d_flush_set() anyway. I'm pretty sure that code gets called > > before this during module load. > > Why? If vmentry_l1d_flush is set correctly during init then > vmentry_l1d_flush_set() will do the right thing. No need to make the same > decision over and over. The result won't change because neither > vmentry_l1d_fliush nor l1tf_mitigation can change. Aside of that we really > need to do this in the init function because that also controls the static > key. Yeah, I guess I had been assuming that the sysfs entry for 'vmentry_l1d_flush' was read/write. Jiri was talking about making the 'l1tf' option runtime changeable, which I think is important. In that case it might make sense to do the same with 'vmentry_l1d_flush' by making the sysfs read/write. Then these checks (and the static key change) would belong in vmentry_l1d_flush_set(). But this looks good for now. -- Josh