Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4928197ybv; Wed, 26 Feb 2020 05:29:42 -0800 (PST) X-Google-Smtp-Source: APXvYqz4IEzQCOFwMI/4PJlpJhL8RR00CJp58trcZgsbxQCQMPyCI4L4Ii2t78SURDE3h/pXq+E8 X-Received: by 2002:a9d:7f81:: with SMTP id t1mr2815861otp.95.1582723782058; Wed, 26 Feb 2020 05:29:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582723782; cv=none; d=google.com; s=arc-20160816; b=ApQv/Q4VqDKj9rc1ZjWNtNyJ86zXEieW0VwZF5k4rWeBqIoV5LVuIxxe53zQpcVQ2v e3HRwM8z3r+ICBCZQUFxQ9s0OO440mPIxf+p26rJ1+qUVKCbnDYAAsZ0l02Vwozwoh/3 Bnn7/lX5ZNK8YBn/eeFW6kIO5i7CuIsQFD/U5b+7klL4e2yccyTvh+d8LZsfGTFmNJ67 AG3cqnLj8iRNBwKa75nsUChNi4FLTSCCS/5U22XnoP/GO65zJAViZ85+e+O/lgQCD8xM YGQ4BHRe9mr8AL5b+KrLaUT3gLlYL474tQZVaX4Uf81T2CHGB8ftSEpFocCo31zNqlY7 g+bQ== 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=CtApP6y0Ei3Ml071F46rWbSRlVBr74tmKr211actlGM=; b=K7yYVXKpVMCpirBWF3S+SW22ZmCj1hHPrguuN4EJbKXOQgFHjt3+hImJ4G30aWL2xg C5g2tJRn3WbIsV0fje+cgbFnHaRBp0KZ6dRHqKMLVXfL1OiP9IyJ6QjOiWFknf/HZjU1 9EAoL0/9uipNGOD+QD86Yiyh5l6XP1apaAlqdMiA27Bm3hYAjWPu5e2rWo11KYEsIdmX jnJxtdn0VMPkKqQXHTvN8lYSQK+MCxr8qslP/KOzz6e0DZ4kYF0DGMCCxklGxdSYjhmn c3QRB+iNNEpmErUqslho1brjb1iYb2quXHQlfTYanHFm/Mninhw2aKLu0/JioCAocCpO kH5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=rv6swKUL; 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 c5si863319ots.233.2020.02.26.05.29.28; Wed, 26 Feb 2020 05:29:42 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=rv6swKUL; 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 S1726899AbgBZN3G (ORCPT + 99 others); Wed, 26 Feb 2020 08:29:06 -0500 Received: from merlin.infradead.org ([205.233.59.134]:40336 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726743AbgBZN3G (ORCPT ); Wed, 26 Feb 2020 08:29:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=CtApP6y0Ei3Ml071F46rWbSRlVBr74tmKr211actlGM=; b=rv6swKULWE7G0/JwG1ln0poiQN 2pe9Gq+62JZrwG/fFDiDi6k7fT7nG4FgajPxIYbNmpHaiWuSbfuziSd8p3M6Yjtnah0pWydxE4AtF esZOqKwdnA4XyjrLch+DGmpXiZS0jQUbaQl0xTNIDrmO7KrPMxAncHXw4kkijHYNDtuF0pGmdhs4n yjdqWHeNPMPj7LN0eP/3mAXPqr39aHXA2DV5wMKJrHxhh+aVyHpSqWpol4W0M5JdBBoHAV8mPur3A BJKp2tDTLYyOJtWJBTDDZr8l93X9Le0Wi9ehHvbWlPfjstPM/C5QqPtxiJ8NhmozS9bOfZu9HeOfw MXiHcDMA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6wk8-0005dd-Ue; Wed, 26 Feb 2020 13:28:53 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 5AD8A300478; Wed, 26 Feb 2020 14:26:55 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CB1052B26491E; Wed, 26 Feb 2020 14:28:50 +0100 (CET) Date: Wed, 26 Feb 2020 14:28:50 +0100 From: Peter Zijlstra To: Andy Lutomirski Cc: Frederic Weisbecker , Thomas Gleixner , LKML , x86@kernel.org, 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: <20200226132850.GX18400@hirez.programming.kicks-ass.net> References: <20200225213636.689276920@linutronix.de> <20200225220216.315548935@linutronix.de> <20200226011349.GH9599@lenoir> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Tue, Feb 25, 2020 at 09:29:00PM -0800, Andy Lutomirski wrote: > >> +void notrace do_machine_check(struct pt_regs *regs, long error_code) > >> { > >> DECLARE_BITMAP(valid_banks, MAX_NR_BANKS); > >> DECLARE_BITMAP(toclear, MAX_NR_BANKS); > >> @@ -1360,6 +1366,7 @@ void do_machine_check(struct pt_regs *re > >> ist_exit(regs); > >> } > >> EXPORT_SYMBOL_GPL(do_machine_check); > >> +NOKPROBE_SYMBOL(do_machine_check); > > > > That won't protect all the function called by do_machine_check(), right? > > There are lots of them. > > > > It at least means we can survive to run actual C code in > do_machine_check(), which lets us try to mitigate this issue further. > PeterZ has patches for that, and maybe this series fixes it later on. > (I'm reading in order!) Yeah, I don't cover that either. Making the kernel completely kprobe safe is _lots_ more work I think. We really need some form of automation for this :/ The current situation is completely nonsatisfactory.