Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp13460pxv; Wed, 21 Jul 2021 14:06:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCl+AArCf3sjMzLgrAi8EtlVFpYpso9nxMUZZQMmlSo/mcbPyeoQv5CLDBeio36gm2/30A X-Received: by 2002:a05:6402:22aa:: with SMTP id cx10mr49714273edb.0.1626901598793; Wed, 21 Jul 2021 14:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626901598; cv=none; d=google.com; s=arc-20160816; b=FFmq70/5Le02Qmi/dH4eXbKJrkhWZ09GS1ykMny/iINi2m2SuQUFKwYEO7NmZ++pXm aC2FITLhKLn2UPGJj3SrHn5yLDcYteG6OiO8COHjpmJweAlDwoC8RpQsMuVyfX21zNec 6p3v1NA4ghS6xuj26N7zWqlo6Sje1LTvOHNyvXfkhCS0dvKvqCnZJqSbFbYV1oETRy96 AkaFNgWuZK88KBOsbVUCS+odMMzYJtZhg5o7+A6AGk66TxWSPcYAKVfzrfXlMUKgYogt qM4IPteqVAoA+K6CA0LBni2U7AsJuUlGGXDDqrpDAayjZy6trzyfy/mrXx82GjXdvg8H eXwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=VhovpCDMe6qYvpY3LIzNmgTjkTz8Q04ycc21UN9oufA=; b=zAZsnPLzwlGexJBHutBdDEGj9bxDXdHuHU3igSKB+Vkwe8FLxh/mdYa9l0dnUQuzxl prmOZNiALAiwqwVLTJMRKjA/8ww7SeJuSJm8LVYDNrAm/8sa7akOCYQkp2tZs3psfOld 567l2sIP+ufMNy4ZHZlaWToGT/+uYAKm3xbRklnRHdmf5PeNrQbpaw7KKGK1gHGl3M18 Q2fJ+uAzkdZyna9RDnI/HSo08I85YgN5uXrQmrE5IRq/EqjkfXm0cKl8mLzMZC0bMhYw 4PX8Yop2TPvP6i+vFsgkj4EqYDdHJvZxPcYsSK2Mh+8yJIvlnsylbLSrIqq5Gcqt5dwX SqZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UK2zeV1R; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si27258419edp.476.2021.07.21.14.06.15; Wed, 21 Jul 2021 14:06:38 -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=@linutronix.de header.s=2020 header.b=UK2zeV1R; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232214AbhGUTze (ORCPT + 99 others); Wed, 21 Jul 2021 15:55:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbhGUTzd (ORCPT ); Wed, 21 Jul 2021 15:55:33 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1DF4C061575 for ; Wed, 21 Jul 2021 13:36:09 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1626899767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VhovpCDMe6qYvpY3LIzNmgTjkTz8Q04ycc21UN9oufA=; b=UK2zeV1RXy7ul4dkcmxFImbE+m20gPvafLWpJWzJAa3oXMdMVmeebh4GCvJ78W4BYf0tjk zUzEZFtJ6/QxSCe54orsYwW4i3DaIVeq/wkBMoO802pvXH0iKj22d7DB1ArfRGZce/xve4 TcM3uFqtlNW5vcz+Sv6jTqQvvr5NAB+XKlILVK45Cqas9lahn95Huo2uBx/YpIyrZdcOw6 npeGcYZxaR2z7Q9MgI66+cP1IRJIY4vyQ6RNMWSqfUyz01XVUbDDV2W/7FwXypedHZmu1F s3wLinTjvHdaymPek8hBjdceSkV+Ajvnxw8m7kJcnaLPprRfKVsRvGl32XKbTQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1626899767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VhovpCDMe6qYvpY3LIzNmgTjkTz8Q04ycc21UN9oufA=; b=Q35vB6KKP75fXv/myH8LmcYww7OrbBTlhpEwSNfivsguyeXXnjE3o+He2KvQ5eLfvMsIlB n0JxhQgFkY8mPdDQ== To: Rik van Riel , linux-kernel@vger.kernel.org Cc: Dave Hansen , Andy Lutomirski , kernel-team@fb.com, Peter Zijlstra , Ingo Molnar , Borislav Petkov , x86@kernel.org Subject: Re: [PATCH] x86,mm: print likely CPU at segfault time In-Reply-To: <20210719150041.3c719c94@imladris.surriel.com> References: <20210719150041.3c719c94@imladris.surriel.com> Date: Wed, 21 Jul 2021 22:36:07 +0200 Message-ID: <87sg07pfpk.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rik, On Mon, Jul 19 2021 at 15:00, Rik van Riel wrote: > > Adding a printk to show_signal_msg() achieves that purpose. It isn't > perfect since the task might get rescheduled on another CPU between > when the fault hit and when the message is printed, but it should be > good enough to show correlation between userspace and kernel errors > when dealing with a bad CPU. we could collect the cpu number in do_*_addr_fault() before interrupts are enabled and just hand it through. There are only a few callchains which end up in __bad_area_nosemaphore(). Thanks, tglx