Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp907040ybk; Wed, 13 May 2020 16:46:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjE09m0w7DJQXdehkW1go5kX+22hjFUjFV0l6cgcuUErSgLgrhC/18FnSxIXWSRHIAxpEH X-Received: by 2002:a17:906:7a4f:: with SMTP id i15mr1368495ejo.71.1589413571510; Wed, 13 May 2020 16:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589413571; cv=none; d=google.com; s=arc-20160816; b=jXJuD49oPoLVT4+1VR3IG2igLSAs2TTqpKeFmfPZZcQa9bMxMVl+eVpGDbeaGFYgsD 6e6T7h8yAiUAVQh0YRXVbxFRwcZAaJBy1ZQyEUplohA7zgMepx0FduuZ7yI9f2bbNS5S iab2EwOJo3ybE23oBCDzojSrfbfsXAnhMLtt1gQkCBd/59GPugynC59s3ZUEEPPJlMGD zPp+AnS++9EXlo6h5Xxl0nSuEVvYpZPtfYfZM0P+WrezkzdFrqDDA4w8GEduK2FisyKy siNasyxOLX4OVWm4SZ/9EJRFysQ1fCVYwrKkMt08tI/2MszuKKoJ3ttOzqcsLr9WBos3 UOaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=gZP/CrJgMswY4fKTD3gwvtjS/7Z/7asD+PSqyElTKh8=; b=wtvYVSEdjGYnealj/moidMebXGR3TnM2zxJTUCaK2XIPre8aZPsTrIp6kl1eYI5Cpj uZHrhd+14QXdjNyLYnKBehJ94B+poXrpKY79V52fygEwdXDnmJ3Z/IroGHalCnHAOSlv 0mMPfIyGdq5pFn6yA/zLWUYZhjxH9mZtHEd96vhaTMX5Y3zINOh1h185IiWmIz8Xxwb+ uCh+RHMt4qJ/SorAxcnxAY/rp/OAkwQUMbn3UF3JjwNdMDmMk/pIyc4BnoX8+43xUXHA xrCeZOW0DcoWbNbEIsh15IGgyLpomEy6kCtFBnuaOEwUEuEaG9fk8lEclVHxqkYiTW5h XUkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=lr4OqABL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pk4si774334ejb.118.2020.05.13.16.45.48; Wed, 13 May 2020 16:46:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=lr4OqABL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732769AbgEMXmT (ORCPT + 99 others); Wed, 13 May 2020 19:42:19 -0400 Received: from mail.efficios.com ([167.114.26.124]:44240 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732456AbgEMXmS (ORCPT ); Wed, 13 May 2020 19:42:18 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 8EA6C2BFAFD; Wed, 13 May 2020 19:42:17 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id HE5reDYQ7HtZ; Wed, 13 May 2020 19:42:17 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 374D02BFE99; Wed, 13 May 2020 19:42:17 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 374D02BFE99 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1589413337; bh=gZP/CrJgMswY4fKTD3gwvtjS/7Z/7asD+PSqyElTKh8=; h=Date:From:To:Message-ID:MIME-Version; b=lr4OqABLsSp0aAaqyT2bm+99FbSmkH7Uto45Qvqz1GGv8zNdq+LIeyRA/2bMn9Sw1 vGHg7UHNoazfOzSalNFkQJO4HKcBX2zPcQmFN3GtrlVmNKqmhatW+0uKUJ3Uv5ZLOY VyuXxaDvvJrYUH8w7jHLWbA7GQe+d/Wq4sWuyQr8/aedzs7Quil/t8lLs5P/DkiK1+ gBRVXqmewBhmlLxaaE4s5Vuyatx9Chasy0z0GtJL3zn123nZ+R9GX8vNC6fTS4Fd1J Ifsit3yLO5uNHoqVZewzZx7oMmiLGyCwetthiI4MW3HOSLwxMMF22eZ4JL/BzB8nvr Bi5VCd9Hj5n3Q== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MHSL4MiIFPVP; Wed, 13 May 2020 19:42:17 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 24C4F2BFE20; Wed, 13 May 2020 19:42:17 -0400 (EDT) Date: Wed, 13 May 2020 19:42:17 -0400 (EDT) From: Mathieu Desnoyers To: Thomas Gleixner Cc: linux-kernel , x86 , paulmck , Andy Lutomirski , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , rostedt , "Joel Fernandes, Google" , Boris Ostrovsky , Juergen Gross , Brian Gerst , Josh Poimboeuf , Will Deacon , Peter Zijlstra Message-ID: <409359846.20366.1589413337072.JavaMail.zimbra@efficios.com> In-Reply-To: <20200505134100.957390899@linutronix.de> References: <20200505131602.633487962@linutronix.de> <20200505134100.957390899@linutronix.de> Subject: Re: [patch V4 part 1 29/36] x86/mce: Send #MC singal from task work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3928 (ZimbraWebClient - FF76 (Linux)/8.8.15_GA_3928) Thread-Topic: x86/mce: Send #MC singal from task work Thread-Index: q+R/MvvYlgGjd3KZ3y/QG7hHPokAjQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On May 5, 2020, at 9:16 AM, Thomas Gleixner tglx@linutronix.de wrote: > From: Peter Zijlstra > Patch title: singal -> signal. > Convert #MC over to using task_work_add(); it will run the same code > slightly later, on the return to user path of the same exception. So I suspect that switching the order between tracehook_notify_resume() (which ends up calling task_work_run()) and do_signal() done by an earlier patch in this series intends to ensure the information about the instruction pointer causing the #MC is not overwritten by do_signal() (but I'm just guessing). If it's the case, I think it should be clearly stated as the intent of the earlier patch. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com