Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2577772pxb; Sat, 25 Sep 2021 11:05:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfTI0uLzIW6wZql7m3Xl8COXLeL+X3jD58gw54vFssNnLKAKWfqH4awuiFpDk1IO2oRnn+ X-Received: by 2002:a50:9d8e:: with SMTP id w14mr12366453ede.74.1632593150954; Sat, 25 Sep 2021 11:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632593150; cv=none; d=google.com; s=arc-20160816; b=vCnE15AQsr0MqGI9SH6+vl2gNpyv/cvSRhDQ9DA0y9bY2rh4WHAm3HKMrv4XSYFx/P EcqiVZNmB26rmTqN7jsxgtuaanfdxk47qCpHi0bs85X+c9A1gIO9SWDC2vk5zuryGy5F XNmtCPA5poV+GcGLEl8pOzAElmdGZ4fWdsaFnZLmMNsnyD2o7OZDfp5QNyTiP/ccSpuq NI4d/6O4HYabekiPXTO+ls+YH4jOxSULJjzfNxreX4Kxm58FAmz54eV6UeCxJkKDS76D s1vgHuOrNzogwhLbAprdKCs+3ILL1UU0j8/kQshcs8avolFj0HN1YT0AqeQ8a5otsG/v /WdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ipcQj88S/qneFLD2DcqqXKIGhTnpLpL069anxZTMDUU=; b=DI+lD3IwtgoT0WqGTXHXV0zRBfUN5OAX8Njpvyfk27YGWrjjCl3c/k6ry9cmiZICJ0 /+65aS7EFlSd3jQyND+F5xQqbFH/hXaekvl0fCIHenEMThgio8j4rTJ2cyJ7qC/2ZwjU Diy7HyB4AtNm3+hW4Bo7ZyShEArqZBmtsf54wwzeNBgkV7+iVm63oRlrCSnBH9WZeKJp GJf9IgpnAzGIJtNE8kimBQ4etngsi4RLvBOsY3dgXptWLIh86fj+waXWu82jmmIAwqcm w5KsqzyjQEdvXRFwq4bL9Qw9n8UG5omhBJ8lUEPXqhcK6rd6okgYlBsao4UlVxhYFRxk aOcw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec11si4270435edb.492.2021.09.25.11.05.11; Sat, 25 Sep 2021 11:05:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbhIYSEa (ORCPT + 99 others); Sat, 25 Sep 2021 14:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbhIYSE3 (ORCPT ); Sat, 25 Sep 2021 14:04:29 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01DD0C061570; Sat, 25 Sep 2021 11:02:54 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUC0g-007HJ0-Gg; Sat, 25 Sep 2021 18:02:50 +0000 Date: Sat, 25 Sep 2021 18:02:50 +0000 From: Al Viro To: Rustam Kovhaev Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [RFC][PATCH] coredump: save timestamp in ELF core Message-ID: References: <20210925171507.1081788-1-rkovhaev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210925171507.1081788-1-rkovhaev@gmail.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 25, 2021 at 10:15:07AM -0700, Rustam Kovhaev wrote: > Hello Alexander and linux-fsdevel@, > > I would like to propose saving a new note with timestamp in core file. > I do not know whether this is a good idea or not, and I would appreciate > your feedback. > > Sometimes (unfortunately) I have to review windows user-space cores in > windbg, and there is one feature I would like to have in gdb. > In windbg there is a .time command that prints timestamp when core was > taken. > > This might sound like a fixed problem, kernel's core_pattern can have > %t, and there are user-space daemons that write timestamp in the > report/journal file (apport/systemd-coredump), and sometimes it is > possible to correctly guess timestamp from btime/mtime file attribute, > and all of the above does indeed solve the problem most of the time. > > But quite often, especially while researching hangs and not crashes, > when dump is written by gdb/gcore, I get only core.PID file and some > application log for research and there is no way to figure out when > exactly the core was taken. > > I have posted a RFC patch to gdb-patches too [1] and I am copying > gdb-patches@ and binutils@ on this RFC. > Thank you! IDGI. What's wrong with the usual way of finding the creation date of any given file, including the coredump one?