From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (193.142.43.55:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 22 Oct 2019 18:39:33 -0000 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iMz48-0004jQ-Oi for speck@linutronix.de; Tue, 22 Oct 2019 20:39:33 +0200 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D36265E9 for ; Tue, 22 Oct 2019 18:39:23 +0000 (UTC) Received: from treble (ovpn-124-213.rdu2.redhat.com [10.10.124.213]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 854A61001B07 for ; Tue, 22 Oct 2019 18:39:22 +0000 (UTC) Date: Tue, 22 Oct 2019 13:39:20 -0500 From: Josh Poimboeuf Subject: [MODERATED] Re: [PATCH v7 10/10] TAAv7 10 Message-ID: <20191022183920.6ecpldfejup3hekf@treble> References: =?utf-8?q?=3Ceacee918153637948cbf21f44b46e83d60e891b4=2E1571688957=2Egi?= =?utf-8?q?t=2Epawan=2Ekumar=2Egupta=40linux=2Eintel=2Ecom=3E?= MIME-Version: 1.0 In-Reply-To: =?utf-8?q?=3Ceacee918153637948cbf21f44b46e83d60e891b4=2E15716?= =?utf-8?q?88957=2Egit=2Epawan=2Ekumar=2Egupta=40linux=2Eintel=2Ecom=3E?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Mon, Oct 21, 2019 at 01:32:03PM -0700, speck for Pawan Gupta wrote: > From: Pawan Gupta > Subject: [PATCH v7 10/10] x86/tsx: Add sysfs interface to control TSX > > Transactional Synchronization Extensions (TSX) is an extension to the > x86 instruction set architecture (ISA) that adds Hardware Transactional > Memory (HTM) support. Changing TSX state currently requires a reboot. > This may not be desirable when rebooting imposes a huge penalty. Add > support to control TSX feature via a new sysfs file: > /sys/devices/system/cpu/hw_tx_mem > > - Writing 0|off|N|n to this file disables TSX feature on all the CPUs. > This is equivalent to boot parameter tsx=off. > - Writing 1|on|Y|y to this file enables TSX feature on all the CPUs. > This is equivalent to boot parameter tsx=on. > - Reading from this returns the status of TSX feature. > - When TSX control is not supported this interface is not visible in > sysfs. > > Changing the TSX state from this interface also updates CPUID.RTM > feature bit. From the kernel side, this feature bit doesn't result in > any ALTERNATIVE code patching. No memory allocations are done to > save/restore user state. No code paths in outside of the tests for > vulnerability to TAA are dependent on the value of the feature bit. In > general the kernel doesn't care whether RTM is present or not. Shouldn't the patch change X86_FEATURE_RTM? I don't see where that happens, though changing such bits at runtime is dangerous anyway... Regardless, this patch adds complexity and still seems very fragile. It will add maintenance issues and probably introduce bugs. And, most importantly there's *still* not a real world justification for it. Please drop it from the series. Nacked-by: Josh Poimboeuf -- Josh