Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1513285ybk; Thu, 14 May 2020 10:46:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxh2Zr/FFGxis9usxzwziwhZtN6vAo/qaPJmULFyXObU8RIIH1UjiA8QgICSZVf8SqUBYq X-Received: by 2002:a17:906:6891:: with SMTP id n17mr4958989ejr.338.1589478397635; Thu, 14 May 2020 10:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589478397; cv=none; d=google.com; s=arc-20160816; b=wzOgS7L0UGXw7jQYNi//kdkAeSJBf94rWF1cyXLWz5Y9Upv3i/LYqaZM/DjZOA7Kxe oi+/JmoLN9o46DuVUnQHOSz+EANqqmmAcebf3pbTGUX0OwwDTJDorfkKf9weOKNOs/te ZvQ4GE1BsSt7KHK6+iQlWLF23stg3mFJ0n4M2saYdQj8DFwo7XEwznSLfwS1J8pyIsdX RYynUfkANYU49vMeLf4tjeJo3PIUhFX3U5r5i93CohsE68TJvQGeabmvMt2JMufO3BQx ojIED095iOhqM49Oz5dSX1yXv0iZ6BMJiSYecEaXkB85Wppou8UosJ2RYIhz17Be3+jZ VBAg== 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=rl5NndpsDO8QhemJHLzoUyiImPIEnoGILnWFL7l4FrA=; b=n1dyq30oe20cn9St2G3l4hBsfWEle22gkdgWxCwpc1M2jbEfriaJCuo79Nry2qLhmZ L8vrOnyudVWboV2JWZdStFoa94ICzOSzjekyZTfIuVlXUidw3wANLYzVvAuDXUNp2zPe mxZCd/R12iYp4R9w0BpZkpqEnUpKldaOwpo61b8ruLfvEgY8tVJn8P5DrXHx6gfkIiQJ u0CuULb3tS+J+F4Pqhd+/uZd7cH+9Y2ipIn3uSHvrztAE/izvwJ8/FIAV42JYsxL2na3 +MbGumwd0iVLDT6zTUUq6VcFcVEgJX/lLXE+GjEcu4Bls9JVDsHSIgml7wxyo3NnTYNG Pvug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=GmXkwb6t; 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 q19si2096657ejb.229.2020.05.14.10.46.13; Thu, 14 May 2020 10:46:37 -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=GmXkwb6t; 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 S1726141AbgENRmD (ORCPT + 99 others); Thu, 14 May 2020 13:42:03 -0400 Received: from mail.efficios.com ([167.114.26.124]:37914 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbgENRmD (ORCPT ); Thu, 14 May 2020 13:42:03 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id CE86B2A74A8; Thu, 14 May 2020 13:42:01 -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 6gRTkJaYBkVH; Thu, 14 May 2020 13:42:01 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 71EC92A726A; Thu, 14 May 2020 13:42:01 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 71EC92A726A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1589478121; bh=rl5NndpsDO8QhemJHLzoUyiImPIEnoGILnWFL7l4FrA=; h=Date:From:To:Message-ID:MIME-Version; b=GmXkwb6t1r1dVa06dFwR+WVq7UGqKtZYxWOstsYoLrzCLgzOvMU6QDx2u/7s1GxlG BixschzIw+si7AK7rtmBJofm+Csfq8P0tEixAV19Ge7lTSHWC8Zmap1YuhaMa6O8OD mXu2ZSdMKJiVuzKP8wZYJI6ugKfYRjDQqb2BHYoRdd9bf6oqjoMkYvaoUJ6BKclQGz EU3pqKuI3Isv4CAdZ+TbRvYR35e2sKUMKQcr3H0C6lxU/u/7+ZeNTvAFXeuJpJTXxw M7m3R+2gQMisLgDBmrG5JK0xM8sC634/8uAQsWCW2Ql1IPDn0DiBkeUSv8TslFjw7+ /d7pjbBeM+cOw== 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 fOKMkDNG6Odq; Thu, 14 May 2020 13:42:01 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 5F4F52A7601; Thu, 14 May 2020 13:42:01 -0400 (EDT) Date: Thu, 14 May 2020 13:42:01 -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: <1431848694.21308.1589478121367.JavaMail.zimbra@efficios.com> In-Reply-To: <87y2puxvqa.fsf@nanos.tec.linutronix.de> References: <20200505131602.633487962@linutronix.de> <20200505134100.957390899@linutronix.de> <409359846.20366.1589413337072.JavaMail.zimbra@efficios.com> <87y2puxvqa.fsf@nanos.tec.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: ImAUO0bzJcO1A9UmbRjZPE+t84RW8A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On May 14, 2020, at 1:38 PM, Thomas Gleixner tglx@linutronix.de wrote: > Mathieu Desnoyers writes: >> ----- 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). > > No, it does not. See the ordering discussion. > > Aside of that signal never transported any address information. It uses > force_sig(SIGBUS). > > Even if a different signal would be sent first then the register frame > of the #MC is still there when the fatal signal is sent later. > > But even w/o changing the ordering the taskwork check in do_signal() > runs the pending work before delivering anything. Yep, that was the key thing I missed, Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com