Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1444861ybk; Thu, 14 May 2020 09:08:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/QiUb47kAbQLG4N+RPBNULmlrY5mqGigjiM7DwNUp93GRDL5R243VwGbJpgx42RcrKODG X-Received: by 2002:a17:906:70c2:: with SMTP id g2mr2048209ejk.207.1589472535575; Thu, 14 May 2020 09:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589472535; cv=none; d=google.com; s=arc-20160816; b=QT9qDTRxmL1GlZ0ZqYZeuaAWt/KuJ1ofDbOmQDS9iC+L8s/obAycA5wTtCaovPvpxm QiVL1sag1Z6n6cTBV5OR7KAz1ffi5ChQiHw3NplG1qeQz8wYA7zHxIr7HLcTDsQXzN5I 54uCxyRWeVtqWu5BJM5uwlhvPV90SI1OagIjwZCJ0qWaVgzSEKvGBGmtaqCg6jaAe9rY qQQXrm5eLXEbjsZ788xDgogwlzX77//V4i3qm6I3EzJBU25LngGxlzy+yTa/dUODSNIr VZ1Mwz2WSrXV3vJVRo8o0zKBxQ6R2Au1ZXRRV04ZLfSwGSAt153R7tH6SLqWLhG+UJbD dXmA== 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=/hVJZGVH9zt1lpc/kaJwrZsacOrpH4fS70DXrJY7C9k=; b=mnfC9zbGhsBrx13oiONr0s5HIRIu3dUjus3WB49D88VDkggzx0cqRgomSVa0uzJ1iC vY+t3ejJE/yn5hyf6pJexLd8QpBjocaCPifVv6CYsL3G9pVUSJ+Sg0ECVW+9Rdbwdlhx JjK70aXVhnqkyptbiAKSC4o72A5D3oeA1v0/CknLkpY0iTOpLaoxpXl8HU9mPqMD8v19 nR7N7qntI9k6zHlEYwjdZxUegvWwL3qX7mpU1rOOr9GmwjYercPXekNJFW23y0rs1K5V qGIKsH8tUDRKqXkH+ApWwfKzpJmWxrP+pm63FynbJCwYCyW4L6svqfZxs8OhJoJjCcm6 mk+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=hJvoGzaM; 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 dn15si2814235ejc.66.2020.05.14.09.08.31; Thu, 14 May 2020 09:08:55 -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=hJvoGzaM; 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 S1728223AbgENQDd (ORCPT + 99 others); Thu, 14 May 2020 12:03:33 -0400 Received: from mail.efficios.com ([167.114.26.124]:37040 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbgENQDd (ORCPT ); Thu, 14 May 2020 12:03:33 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 4A7772A66CC; Thu, 14 May 2020 12:03:31 -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 5gzQ1SdIexmK; Thu, 14 May 2020 12:03:30 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 62E122A690E; Thu, 14 May 2020 12:03:30 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 62E122A690E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1589472210; bh=/hVJZGVH9zt1lpc/kaJwrZsacOrpH4fS70DXrJY7C9k=; h=Date:From:To:Message-ID:MIME-Version; b=hJvoGzaMRoPQaeAYsIjTFj1VpmMQPioMMbsEcBbxBAY2+cpiPUtfDfTIqOyQybNH+ LLK29BiaFU3JNxml4PAAKLitmiQCHccsk1SFXstfyk/3ao5kwsKvthpMJJcxqNDZLx DvSKDnEArHEnE2wjgWBOlSjabJ4hekUjjnvXSegx59CA2ePsbV7sjIEhXoLKzBD3+C 6MNkuuVLNa0o5z85+BT6y0jQNlXN/AxaE8+BYmljO4h6chSozFhthMIWLIh8lIvsr0 1X/5Chyz9DrZ6ZpMZSODyfRa476hISv26aIZuCBWQZqXoVaax1Bu6bhn4bYcFkK/Tt HxqiWLBG4ubcw== 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 80xRGhLcdnL6; Thu, 14 May 2020 12:03:30 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 4CB892A681A; Thu, 14 May 2020 12:03:30 -0400 (EDT) Date: Thu, 14 May 2020 12:03:30 -0400 (EDT) From: Mathieu Desnoyers To: Borislav Petkov Cc: Thomas Gleixner , 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 , Tony Luck Message-ID: <1278452779.21179.1589472210183.JavaMail.zimbra@efficios.com> In-Reply-To: <20200514141703.GD9266@zn.tnic> References: <20200505131602.633487962@linutronix.de> <20200505134100.957390899@linutronix.de> <20200514141703.GD9266@zn.tnic> 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: wef2KNYpsfeyobuXQ9ZvZ7vSRlOBzg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On May 14, 2020, at 10:17 AM, Borislav Petkov bp@alien8.de wrote: > + Tony. > > On Tue, May 05, 2020 at 03:16:31PM +0200, Thomas Gleixner wrote: >> From: Peter Zijlstra >> >> 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. >> >> Signed-off-by: Peter Zijlstra (Intel) >> Signed-off-by: Thomas Gleixner >> Reviewed-by: Frederic Weisbecker >> --- >> arch/x86/kernel/cpu/mce/core.c | 56 ++++++++++++++++++++++------------------- >> include/linux/sched.h | 6 ++++ >> 2 files changed, 37 insertions(+), 25 deletions(-) > > I like this: > > Reviewed-by: Borislav Petkov What I am not fully grasping here is whether this patch preserves the instruction pointer (and possibly other relevant information for siginfo_t) triggering the exception in a scenario where we have: - #MC triggered, queuing task work, - unrelated signal happens to be delivered to task, - exit to usermode loop handles do_signal first, - then it runs task work. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com