Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp163945ybf; Wed, 26 Feb 2020 10:43:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwtP8NdMAYg7B1BDXDWMLKB26gmjsennLpcHJqse4+FUQm26z/PUpd1sxlwIlHE89B8rYkQ X-Received: by 2002:aca:fd83:: with SMTP id b125mr318996oii.1.1582742585179; Wed, 26 Feb 2020 10:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582742585; cv=none; d=google.com; s=arc-20160816; b=gqU0PHb+8oAJLs5FZB8j2OHG71ju77JVAbYWghfovfXs/Fn6TVpjrvLyIdPKZ9/Hcq s11OgL6kslPixunj3T8A+3dUfSoBQtAJy4B7IT6Xk0K+6uGQnhpfwhYZOTnE0Lcj5Tmu DhjvzktzarBsm7qhu1PpOScIs17ti5/7g6QGmeo6urI+/ODMsTOQCVZBYhHA9NKNYgo8 /a2/Qlp5FgvdZFIX3nDld7G6unUjMFjuXmz9OBqNXnl5Fxk2QTDhINBm1bQwK/I0VDkN XTP6scZwy9lk8vf8Me8MWf/585Nf4p0zg+CiQImLmvpwv8ZjkVgErsS9YUaTzFR9lnKQ d7AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QOLbKvGIVeO+bnGDtjPE871jDv/Zu6peumehaSdxHyI=; b=wTmlxNgLW33qOAgxHRl8uTr0ebase/In4nE4DGX2PtRf94awchWRH93mOZYARBdNn0 D+N6kZj49VVcF97+rZetL0hz21H5RknQQDXSGvWSJMRTB30gVQwWmeIGKtjrILgwqD3G N2zwvnlzCTyyV3cO2IcoPUX7BHe0CUbAqE2xsLnr8MCym2RfmwuUpq/N1wlMCIEXUHUs SHOEu63a4ZRAPWWD3TEtMtdEP9rmeV/lY5QbGl5pE2hzoEOSj/wKa5jgOumPPA3WRzwh v1/wXrmRREgr9NusjwyXYkdKZoVKlwhUd7npY3v1Sn0BH+U7cpFych4cxaUIPTKlHaVR LOSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=PUNAfuZ9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17si191497otl.278.2020.02.26.10.42.53; Wed, 26 Feb 2020 10:43:05 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=PUNAfuZ9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbgBZSmn (ORCPT + 99 others); Wed, 26 Feb 2020 13:42:43 -0500 Received: from mail.skyhub.de ([5.9.137.197]:60252 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726878AbgBZSmn (ORCPT ); Wed, 26 Feb 2020 13:42:43 -0500 Received: from zn.tnic (p200300EC2F08E3000C0800EF15AE70EC.dip0.t-ipconnect.de [IPv6:2003:ec:2f08:e300:c08:ef:15ae:70ec]) (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 B5F311EC01D4; Wed, 26 Feb 2020 19:42:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1582742561; 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=QOLbKvGIVeO+bnGDtjPE871jDv/Zu6peumehaSdxHyI=; b=PUNAfuZ9Ok7gAisFgmN/CJ9//QKmrwEcmX8++apJPH9cVaoioOMquyHvIaq976PMUXAiCL LCZrN30lSazsb23bnTSY4o3xDbSPAdeYFLsUvIilpNbZPIyZG0kJ9D6RdKPlgiT3V1bfqH 05lpe1sc/+ybTGPsU6t4SVGmlENaOFQ= Date: Wed, 26 Feb 2020 19:42:37 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: Peter Zijlstra , Andy Lutomirski , Frederic Weisbecker , Thomas Gleixner , LKML , X86 ML , Steven Rostedt , Brian Gerst , Juergen Gross , Paolo Bonzini , Arnd Bergmann Subject: Re: [patch 02/10] x86/mce: Disable tracing and kprobes on do_machine_check() Message-ID: <20200226184237.GB16756@zn.tnic> References: <20200226160818.GY18400@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 26, 2020 at 09:28:51AM -0800, Andy Lutomirski wrote: > > It entirely depends on what the goal is :-/ On the one hand I see why > > people might want function tracing / kprobes enabled, OTOH it's all > > mighty frigging scary. Any tracing/probing/whatever on an MCE has the > > potential to make a bad situation worse -- not unlike the same on #DF. FWIW, I had this at the beginning of the #MC handler in a feeble attempt to poke at this: + hw_breakpoint_disable(); + static_key_disable(&__tracepoint_read_msr.key); + tracing_off(); But then Tony noted that some recoverable errors do get reported with an #MC exception so we would have to look at the error severity and then decide whether to allow tracing or not. But the error severity happens all the way down in __mc_scan_banks() - i.e., we've executed the half handler already. So, frankly, I wanna say, f*ck tracing etc - there are certain handlers which simply don't allow it. And we'll only consider changing that when a really good reason for it appears... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette