Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6355293ybv; Tue, 18 Feb 2020 15:18:51 -0800 (PST) X-Google-Smtp-Source: APXvYqyj/VQiHGWisO3TNo013oA46O+8PRPVdJN6PZMqwrMSsgMuS+962GauaOgVBrON445fBFWE X-Received: by 2002:aca:ed94:: with SMTP id l142mr2925410oih.58.1582067930926; Tue, 18 Feb 2020 15:18:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582067930; cv=none; d=google.com; s=arc-20160816; b=x11i4t+xWEzs7C20/GsJayUBAIlirXcJVoS0xwwmOXrD/vhtYM+txR7QEzLR9UbbSj rqZB+hkTALiU16VgHt7IVV2ZNv+wLnJDuheK6lH2kZNnCKJd4CdkjJdPuZH7dtO0UOAx ee5qnBbUkjoEP34uI0ezr57R2yn8nkYqRLNeRSArFPhp2hf6cyV0UTcEKwdYD74PoZFP AnfyKjLU9vi/tc/Ydu9N/lfcDnp3A/Pf5CC2b8JraeinjH23Br3rg4FAcg6S5OFX0WAw VMjMAyIDYzK3EGbLyWXW/BTp+epyhmQbeg1NIvUE/z25e6Frv5KEyWgnAbcCvQtF8J97 6YVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=LcLjTkV83vEGvt0ldBk2x/x8ahLWTQ7rlRav9fyvzq8=; b=fccsVbTVjy2cjBdtgNjneuACFnjHLgxzPMAzozXrgpVlrAyoKnCxDUl4p7BgY3iNuw F4E7tqZXTnro+NdTnstckXnmu+xAhqbaweoYL0KhYUg2ktqGRjr9tW7lZM0Q0sBBRIyP 0bii/6vADI2E3BVjq1Z+chEJ9I9IowLUemzNiDpfanTKkJggQ4jOJkadN+GuSCm+a+4J oon30O0/qXbaFDBUu98uSCFzCEOlXcUsrYIywxEmfjeeF/TiREf8bAbruwPmbrnoQFBa O4maUEj3DXHdHA8EIwuKPAYo3gAoVpizY8lYxQJ0FZiU3W+/lkx+/763vWD2wyBuwbmD XVdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si8278769oie.240.2020.02.18.15.18.38; Tue, 18 Feb 2020 15:18:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727921AbgBRXRh convert rfc822-to-8bit (ORCPT + 99 others); Tue, 18 Feb 2020 18:17:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:39324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727635AbgBRXRg (ORCPT ); Tue, 18 Feb 2020 18:17:36 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B4A1C206F4; Tue, 18 Feb 2020 23:17:35 +0000 (UTC) Date: Tue, 18 Feb 2020 18:17:34 -0500 From: Steven Rostedt To: Andy Lutomirski Cc: "Luck, Tony" , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , x86-ml , lkml Subject: Re: [RFC] #MC mess Message-ID: <20200218181734.703038e1@gandalf.local.home> In-Reply-To: <3CF4895A-5BCF-4E5C-B8D9-F9019DD02A12@amacapital.net> References: <3908561D78D1C84285E8C5FCA982C28F7F57B937@ORSMSX115.amr.corp.intel.com> <3CF4895A-5BCF-4E5C-B8D9-F9019DD02A12@amacapital.net> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Feb 2020 15:10:17 -0800 Andy Lutomirski wrote: > > On Feb 18, 2020, at 10:20 AM, Luck, Tony wrote: > > > >  > >> > >> Anything else I'm missing? It is likely... > > > > + hw_breakpoint_disable(); > > + static_key_disable(&__tracepoint_read_msr.key); > > + tracing_off(); > > + > > ist_enter(regs); > > > > How about some code to turn all those back on for a recoverable (where we actually recovered) #MC? > > > > > > > At the very least, in the user_mode(regs) case, tracing is fine. Also, I don't think "tracing_off()" is what is wanted here. That just disables writing to the ring buffer, which can be called in pretty much any context (if it's before in_nmi() get's set, the worse thing that happens is that events will get dropped due to the recursion protection that checks to make sure there's no re-entrant events at the same level of context). The only issue with having function tracing enabled, is that it may add a breakpoint when it gets turned on or off. And that tracing_off() doesn't prevent that. tracepoints still use RCU of some kind, and the protection there has nothing to do with whether a trace point does recording or not. -- Steve