Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1462883imm; Wed, 25 Jul 2018 19:21:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfGgFiNwpl4d/y3akqjFmjCXzJV8wSdorTn9UbZegnHF4UZow3eO6+yDf3siBmfhgVSDURG X-Received: by 2002:a62:c218:: with SMTP id l24-v6mr47095pfg.185.1532571719206; Wed, 25 Jul 2018 19:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532571719; cv=none; d=google.com; s=arc-20160816; b=0afC862cQ+RlOHCUnXt4j5XnFzWW9uQ5W6EWCOSuGvIXtBcpnCIU+/HdbSwPXACVHW hS/kQs7Qf3E/WlX//7Xsm4/YVWLKt9GVDqH8as/P6in2T1qfKUOy+IZW3S5no8c7r3w2 z/PZ7NB9JrTqbPiBcG/EXmO9yGQGPn5r4YXCvItZ3hFS5kIKQn8+neXv5fql33hJF2WB lseiY9GMFxCc9mRNWTFmXsgOqtGHrXBquYEmChwbqZMJlCJ3rqzCEKYskkebWft+5CoB nRCFy3hk1/9iCxIn6VAFz2gpHOHB8FnIARYpdWvi42tadAr6iI29adZ1uIuGDO+Z1vXu q1KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=SVltSjob/OhGjy9npHGU/jagySCGESCUsPE1vhbv9Mw=; b=LdtHPuNrhMaF3GYVeuHJuftA0Vv6HOgXzwofsLZ+9xfKYiysj41RERjZDYN3pB3k2B FAEPthi8+7vKNGHPMPyuuBx9u3AvlAfc9viev+6FhLbES36mVsJaeWs9ho5DOVYX0r0d 1NzjrMost9PfR8npTOJdazpoglP+nXPE/oSZtDr636uC6DnfDwjbAkewCK7g7tdy2Q0N tWEgNqmmREmLZjaLXvOvHUFBRnKn+kXeYOYfp5JGSIj89OIu/XQWo/HRJDTjf8TG2/3q fqtLYiqjihpXQVJjX8Ejymo6xFftPsAD90Tc4zw20UG/wdlWRo4oU+7u0GtW4pLDznCp KJxQ== ARC-Authentication-Results: i=1; mx.google.com; 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 a1-v6si79579pli.472.2018.07.25.19.21.44; Wed, 25 Jul 2018 19:21:59 -0700 (PDT) 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; 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 S1728728AbeGZDf1 (ORCPT + 99 others); Wed, 25 Jul 2018 23:35:27 -0400 Received: from ozlabs.org ([203.11.71.1]:43657 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728485AbeGZDf1 (ORCPT ); Wed, 25 Jul 2018 23:35:27 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 41bbRq179Qz9ryl; Thu, 26 Jul 2018 12:20:55 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Murilo Opsfelder Araujo , Michael Neuling Cc: linux-kernel@vger.kernel.org, Alastair D'Silva , Andrew Donnellan , Balbir Singh , Benjamin Herrenschmidt , Christophe Leroy , Cyril Bur , "Eric W . Biederman" , Nicholas Piggin , Paul Mackerras , Simon Guo , Sukadev Bhattiprolu , "Tobin C . Harding" , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 0/7] powerpc: Modernize unhandled signals message In-Reply-To: <20180725193647.GA23643@kermit-br-ibm-com> References: <20180724192720.32417-1-muriloo@linux.ibm.com> <0f185351330a7f1d66409fe6a2dc02aae6826039.camel@neuling.org> <20180725193647.GA23643@kermit-br-ibm-com> Date: Thu, 26 Jul 2018 12:20:52 +1000 Message-ID: <87wotihh4r.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Murilo Opsfelder Araujo writes: > On Wed, Jul 25, 2018 at 05:00:21PM +1000, Michael Neuling wrote: >> On Tue, 2018-07-24 at 16:27 -0300, Murilo Opsfelder Araujo wrote: >> > This series was inspired by the need to modernize and display more >> > informative messages about unhandled signals. ... >> >> Nice.. the instruction dump would have been very handy when debugging the PCR >> init issue I had a month or so back. These things may be related :) >> What happens if we get a sudden flood of these from different processes that >> overlap their output? Are we going to be able to match up the process with >> instruction dump? > > As to the flood of messages, ___ratelimit() makes me think that we'll > likely see some warn messages informing how many show_signal_msg() > callbacks were suppressed, instead of interleaved messages and > instruction dumps. > > As to matching process with instruction dump, I believe we'd need more > information to glue them together. > > What if we modify show_instructions() to accept a string prefix to be > printed along with each line? > >> Should we prefix every line with the PID to avoid this? > > That's possible. An alternative would be prefixing each line with the > process name and its PID, as in the first line. For example: > > pandafault[10758]: segfault (11) at 00000000100007d0 nip 000000001000061c lr 00007fffabc85100 code 2 in pandafault[10000000+10000] > pandafault[10758]: Instruction dump: > pandafault[10758]: 4bfffeec 4bfffee8 3c401002 38427f00 fbe1fff8 f821ffc1 7c3f0b78 3d22fffe > pandafault[10758]: 392988d0 f93f0020 e93f0020 39400048 <99490000> 39200000 7d234b78 383f0040 > > The above can be interleaved with other messages and we'll still be able > to match process and its corresponding instruction dump. Yeah prefixing with the comm and pid is nice. Also the "Instruction dump:" line is a waste of space. I prefer the x86 format, where it's prefixed with "code:", eg: pandafault[10758]: segfault (11) at 00000000100007d0 nip 000000001000061c lr 00007fffabc85100 code 2 in pandafault[10000000+10000] pandafault[10758]: code: 4bfffeec 4bfffee8 3c401002 38427f00 fbe1fff8 f821ffc1 7c3f0b78 3d22fffe pandafault[10758]: code: 392988d0 f93f0020 e93f0020 39400048 <99490000> 39200000 7d234b78 383f0040 cheers