Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp806169ybv; Wed, 19 Feb 2020 09:34:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzPb4hodl5q6z3EFGOAkJsp+zzDuQklJnUSksp1C4qLujcYupr7mp4AoTKyKqCyLDDebWdF X-Received: by 2002:aca:5303:: with SMTP id h3mr5100988oib.109.1582133690581; Wed, 19 Feb 2020 09:34:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582133690; cv=none; d=google.com; s=arc-20160816; b=zwoJJstai0+LYZfRMaLA7VcXtRPD10hOoIJlaOvWuqKIAegPpZVHPhFAy9IFOFs+Q8 1mysyjW2JduYVw9qUkPIktnnARANkgUs77XJ/GO1zmfxs/JdDsB25Q5RyIkxvUYI8kDW QrJOfKYlJPe+1U1SeBrWjEITMPt2DU1b4NkXw3yWZBfWMNbZHjUCiDIRvjo8/fEG8SnH FLzjz6tNtjhgSInOM3gZETNp+roizE2WjxLKS0QRhVSrUUZUcp9MGdOMRfW6pIK96X+3 LLpPaAlOyZKm5D9NRsrh+oqmcjLFUUysuN+wfY0+59b1XyEBaNJHaCiBP9f9cqsMErgL X3Zw== 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=2P6Ws3RkPs8vzqQG8mBEIrnxkKqiE7dFwfIH2EVwUnM=; b=BQkTxbBb+uczVV7fWFmNS0z7tVYea7LXGvEh6y6f0BpbMalt4zLSjUWXGQGOZotyO3 Httzdy9W/B0zWZ12xXvbngnXX/kob7HhoNS+l62z3ZEHRk9GruGNeW7X61Bsq3YyvonQ RUxAYyi+W64dOeroiGLYk/DUgqgkTbk5Ufsbz1qXSyO7AczTCUtOIoIchHy/MOkUzayJ Yy68iKp2cM/MeaZgTDt9j/elUFsITCw6ETYBOb7PHrnPg/r9WcmyGI/B58iuCztqUypb uqj+5fHHVHm7TD5pRCJLuKg41ufH3vO4ZH1d1KW7cH0QDFGjG2UyW8glf/OrK0F6Vmb5 NpwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Hm0Lw1D/"; 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 n1si9896656oic.225.2020.02.19.09.34.37; Wed, 19 Feb 2020 09:34: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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Hm0Lw1D/"; 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 S1726651AbgBSReY (ORCPT + 99 others); Wed, 19 Feb 2020 12:34:24 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:45108 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726551AbgBSReX (ORCPT ); Wed, 19 Feb 2020 12:34:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=2P6Ws3RkPs8vzqQG8mBEIrnxkKqiE7dFwfIH2EVwUnM=; b=Hm0Lw1D/oQlx5O9Z44lRzvi5i8 S7PAX5z1ivDMlBCEzoFGozFeX3weNrthcgfVSCgrujqySa7S5ILzS99tXV3qmb5XnbtVDAl5o7sTO vlQut+G4rrX56/uxzmOieWFDhKeMKlIbbXZIi13WJOY9YhKZ3qe1xglpRgCHlG7BH9XjaID4EyqlT m+LHNOCydRn8YIQLbGVJLrrnI3ztmILiahomJvR14ECSwBi14a8eIMq5WpNpHg5064/qbkUcXxd84 gX+4BVkGJXSKhaCOhhyWdnd9Hdra/uga2t0UhyWOTY+Vmbzq9bPSbc+yYJ2eTfud/J+xf5axEDerH G7FUaDNA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4TEW-0002wP-Tq; Wed, 19 Feb 2020 17:34:01 +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 DE66A300565; Wed, 19 Feb 2020 18:32:05 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 520CF202287CB; Wed, 19 Feb 2020 18:33:58 +0100 (CET) Date: Wed, 19 Feb 2020 18:33:58 +0100 From: Peter Zijlstra To: Andy Lutomirski Cc: Borislav Petkov , LKML , linux-arch , Steven Rostedt , Ingo Molnar , Joel Fernandes , Greg KH , gustavo@embeddedor.com, Thomas Gleixner , paulmck@kernel.org, Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Tony Luck , Frederic Weisbecker , Dan Carpenter , Masami Hiramatsu Subject: Re: [PATCH v3 02/22] x86,mce: Delete ist_begin_non_atomic() Message-ID: <20200219173358.GP18400@hirez.programming.kicks-ass.net> References: <20200219144724.800607165@infradead.org> <20200219150744.488895196@infradead.org> <20200219171309.GC32346@zn.tnic> 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 Wed, Feb 19, 2020 at 09:21:48AM -0800, Andy Lutomirski wrote: > On Wed, Feb 19, 2020 at 9:13 AM Borislav Petkov wrote: > > > > On Wed, Feb 19, 2020 at 03:47:26PM +0100, Peter Zijlstra wrote: > > > Subject: Re: [PATCH v3 02/22] x86,mce: Delete ist_begin_non_atomic() > > > > x86/mce: ... > > > > > It is an abomination; and in prepration of removing the whole > > > ist_enter() thing, it needs to go. > > > > > > Convert #MC over to using task_work_add() instead; it will run the > > > same code slightly later, on the return to user path of the same > > > exception. > > > > That's fine because the error happened in userspace. > > Unless there is a signal pending and the signal setup code is about to > hit the same failed memory. I suppose we can just treat cases like > this as "oh well, time to kill the whole system". > > But we should genuinely agree that we're okay with deferring this handling. It doesn't delay much. The moment it does that local_irq_enable() it's subject to preemption, just like it is on the return to user path. Do you really want to create code that unwinds enough of nmi_enter() to get you to a preemptible context? *shudder*