Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp206399rwn; Wed, 7 Sep 2022 23:35:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR6QxXiI8kDzr5NtJ/q7sOvsLS0x/7X1A5bQvr2cV6tGEGczpg6AJaJRhuMsvgb/x+zNptk4 X-Received: by 2002:a63:2ac2:0:b0:430:41b2:f29a with SMTP id q185-20020a632ac2000000b0043041b2f29amr6654913pgq.190.1662618921540; Wed, 07 Sep 2022 23:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662618921; cv=none; d=google.com; s=arc-20160816; b=gskXr7rQlfcZjpyFNHCI6KyWs2vW1mpty7tg3bOEZ3rAbyFM0nUbqcNu58qiDze/Wp Asc80uUg4h7dUCsIMHE4SDC0TC+CtbRZqEF+EPojtdBoxOi+rI1E8genyYygGeDNBMO+ ShKxK0hT3kPZ4KRcQKK/zXdZEpSxpbWrggPSMCbOzlsI3Nki+wa26lyhLzLnvvKUtoeL Cg8YOpcBE2yDqQYbNi89hOU5rvM3Vd3D84ILZSymYaQ9hqz9sl7bpzXOYrlyUlK98bhF 8FVgPRNF8RX2Z9U4j4XUPTEedJux3EEq+VdvuTkDlom8sa7YOeCL2N+sbi61LbHsdtFy TGvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=L4sZiKf7Pb+Ro+0hy7kuWa+zv8cmGXs8YS6IIyb9ffg=; b=Q7eY/JtWtiFGQZqeHIQ1VWO44yGStu0BYTw0d0aX+DmeZgN6c9StDjGJzj3dVPTukI 3wbuMddtOj7y/vxz6EPPVLrmKHVXGd72pehXx24URkySowOMynxrgUFAUmPQ9Lv5iPeK 1nLRT/NWqGPenlfBQs7vFfTMstpXqexT1gJiFaowjyKE707TjcCCX5c6cIG5WJiwZul1 JGcjlvQZOHOgG4tzppTaNTN7h2dsLi9kqFmMlXMBBqaAEsdOL7/YLhL6o/IpJCfMm38e 72jOwcPTxHqFJkEO7nhPV0Q0m/8vuaSZsM5HM5tMGdrvbL5PALTLQ6Auabjofvyj9yIk empw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Du9sKF9P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b16-20020a056a000a9000b0053a9fee3b22si15924739pfl.178.2022.09.07.23.35.02; Wed, 07 Sep 2022 23:35:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Du9sKF9P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229862AbiIHGLW (ORCPT + 99 others); Thu, 8 Sep 2022 02:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229896AbiIHGLR (ORCPT ); Thu, 8 Sep 2022 02:11:17 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96FC7AC24F for ; Wed, 7 Sep 2022 23:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662617475; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L4sZiKf7Pb+Ro+0hy7kuWa+zv8cmGXs8YS6IIyb9ffg=; b=Du9sKF9PWQ2ggf4koMJcbojFLDbaZl3U+C4Nfu1NtGhidQspJCVrEnD53PqEoFYS9FcvfS UdQHbIHobLlD7LGMHVRniIesHNe/mJsAfgO3x9zNB8M9XHFdytjA4X3+CkT5eOl03KWCiA UBCXRvSxrJKWHYRXSbpgCIp/wVOcCkA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-552-Ww0xld40Pz-8TyeFJln2vA-1; Thu, 08 Sep 2022 02:11:12 -0400 X-MC-Unique: Ww0xld40Pz-8TyeFJln2vA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 82919811E80; Thu, 8 Sep 2022 06:11:11 +0000 (UTC) Received: from butterfly.localnet (dhcp-10-40-5-89.brq.redhat.com [10.40.5.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDD03492C3B; Thu, 8 Sep 2022 06:11:07 +0000 (UTC) From: Oleksandr Natalenko To: "Eric W. Biederman" Cc: Oleg Nesterov , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jonathan Corbet , Alexander Viro , Andrew Morton , Huang Ying , "Jason A . Donenfeld" , Will Deacon , "Guilherme G . Piccoli" , Laurent Dufour , Stephen Kitt , Rob Herring , Joel Savitz , Kees Cook , Xiaoming Ni , Luis Chamberlain , Renaud =?ISO-8859-1?Q?M=E9trich?= , Grzegorz Halat , Qi Guo Subject: Re: [PATCH] core_pattern: add CPU specifier Date: Thu, 08 Sep 2022 08:11:07 +0200 Message-ID: <12050461.O9o76ZdvQC@redhat.com> Organization: Red Hat In-Reply-To: <877d2ec0ac.fsf@email.froward.int.ebiederm.org> References: <20220903064330.20772-1-oleksandr@redhat.com> <20220907173438.GA15992@redhat.com> <877d2ec0ac.fsf@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On =C4=8Dtvrtek 8. z=C3=A1=C5=99=C3=AD 2022 0:00:43 CEST Eric W. Biederman = wrote: > Oleg Nesterov writes: >=20 > > On 09/07, Oleksandr Natalenko wrote: > >> > >> The advantage of having CPU recorded in the file name is that > >> in case of multiple cores one can summarise them with a simple > >> ls+grep without invoking a fully-featured debugger to find out > >> whether the segfaults happened on the same CPU. > > > > Besides, if you only need to gather the statistics about the faulting > > CPU(s), you do not even need to actually dump the the core. For example, > > something like > > > > #!/usr/bin/sh > > > > echo $* >> path/to/coredump-stat.txt > > > > and > > echo '| path-to-script-above %C' >/proc/sys/kernel/core_pattern > > > > can help. >=20 > So I am confused. I thought someone had modified print_fatal_signal > to print this information. Looking at the code now I don't see it, > but perhaps that is in linux-next somewhere. That's a different story that gets solved here: [1] [2]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h= =3Dx86/cpu&id=3Dc926087eb38520b268515ae1a842db6db62554cc [2] https://lore.kernel.org/lkml/20220811024903.178925-1-ira.weiny@intel.co= m/ > That would seem to be the really obvious place to put this and much > closer to the original fault so we ware more likely to record the > cpu on which things actually happened on. >=20 > If we don't care about the core dump just getting the information in > syslog where it can be analyzed seems like the thing to do. >=20 > For a developers box putting it in core pattern makes sense, isn't a > hinderance to use. For anyone else's box the information needs to come > out in a way that allows automated tools to look for a pattern. > Requiring someone to take an extra step to print the information seems > a hinderance to automated tools doing the looking. >=20 > Eric >=20 >=20 =2D-=20 Oleksandr Natalenko (post-factum) Principal Software Maintenance Engineer