Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1333745pxb; Thu, 28 Jan 2021 13:48:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzT9wvryELtn7VUXTalo03f1wjpW40/daBCjrf8lEfmlMzSi+lIPV7Uw1aGZqkXxWlvS19c X-Received: by 2002:a17:906:b09a:: with SMTP id x26mr1501606ejy.199.1611870505617; Thu, 28 Jan 2021 13:48:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611870505; cv=none; d=google.com; s=arc-20160816; b=RtwvKB/pQbAi4AZevKNAzE3g/+hGussPD7YaGwXU9v8YZTrMwmSuKskSaq+t6/YmvF A6r5OISLnYIQFVmlwEAs1Am1XA/WqaWFEOB/A0w1l7BfgzNKVX+KjeBCHPOUJdyfcfi8 ik3E6z+OHXHqQB7vOLkWGWFHT4LI9wqKDx3MEmyND7IyTH6rykcl2Bz3D8wP6a91eB4z 4Ufw/R4ZoeAlBXnRwVOtsFW9E/hJ0BeWF49C8Yz8lLa8sSuRJiUiVMxsa6wnaDwPuGZX +5ZU6vrGFArhaaZ/0VpFYZ+buynhVKsxVuCew390jlZJ0NTT257iCbZG2gillzoMqCdN 4Q7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UryGwxPgjxzr4/u3z4SvuCaMZjYGfabFAIjtiGO6Pvs=; b=sCmd/0HmPAvv86g2feDfiuUd4XG4XAAdqT62FWnalxnViYgy7ROBzwUaBll1Y+v15k D9T+Oh4/QZOBtuHcsXsWu4D06duV97BfUCiRpgZtlCiUTTnqAcZQs/Nd3+oGkRoWSoCy KTvFgPDyBrh/7LDldFVVXCLEdSV02xFKfQYYn/PH3Bo4gybUpBUtdhP6P38V9ka1rOXv 85VShEGsEy3kkDyKtmYGh7sxWbzgbi8q9HlfzK1/xgwTaJTQyfWoXt6O9sq+kihpsSWd Z4woX/WMvYhbd4Bxb9q8/I0ZGWHy4q48l0yFueaa+De13xGQtLLzOoVd1ur/SAeKzuzy tkxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=TcKvgVRb; 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 d21si3808392edx.267.2021.01.28.13.48.00; Thu, 28 Jan 2021 13:48:25 -0800 (PST) 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=@soleen.com header.s=google header.b=TcKvgVRb; 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 S229757AbhA1VpS (ORCPT + 99 others); Thu, 28 Jan 2021 16:45:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231425AbhA1VpI (ORCPT ); Thu, 28 Jan 2021 16:45:08 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F16EC061573 for ; Thu, 28 Jan 2021 13:44:28 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id c2so8320486edr.11 for ; Thu, 28 Jan 2021 13:44:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UryGwxPgjxzr4/u3z4SvuCaMZjYGfabFAIjtiGO6Pvs=; b=TcKvgVRbjJ35lCfTmcTbelSSKo2zddaqaUSfEsRJUi9Yck2ulzBlgWSrmGOfwEQ9V+ 43cud6LkFN8JshOe9YTtHaX/FhOQZnLmPAZNQpp/1v72NoyIcGEdacnLfTY/57ILzpYP xudqv7Bdcs/7Ze6FBjwA/aUJBPko4gQBRadyDsxC482E69iivmRThpCWdak5/IHuOSup PCTjcPlNOaahVR14BZwr1PSPun7beqEL0xhuaQZ1qtIytPVvuBSt0lhCjMpJeRsBOvq+ esTBPv512kcs7xTNIinXGYoQppiBY8oxL3DgtdDHMAg3qo4ozoRyKHGcMgKfEppxPx8a AFCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UryGwxPgjxzr4/u3z4SvuCaMZjYGfabFAIjtiGO6Pvs=; b=VzkZsaMKj4aph9PW1Fveg3KL83RwZNojSwCAIw943F6ObLsYPRpAQhPj8O8b6Cm5Y5 BtoVVli0YD5woKGzg/K0wogHS07PyjF1LGrAG0GfzK4tnwOIwkM0x7Cy0wOGs4VHsvhx qQP1Gf31fdBcvFGGzdU/TYJvHrjR8zo/PDvsJxGvqAhTmfQZQFMqdndbOV1HhTPnnZgJ 0IFBraW8sfvFmBkXLUqExMfZ5czRbUD/ArP1/RjA8dkoRa59UOIUsA4SHBWqEyynceNw SG1Z28aV8ggeOHDPpTugp/SbLNFYUitdS8yy0h4G3LtEFtZDdIlVWJK8st4dr8AwrDyB hAnQ== X-Gm-Message-State: AOAM531zsNnAmN+zevNz1C6tNDB/60xG1Jj4MROhT/7Ko6vleK600Tb/ pce5gZaQ/Xwng/HOZfIGLevaqPLJ8VG2dmXxL/gTkA== X-Received: by 2002:aa7:cd87:: with SMTP id x7mr1943964edv.210.1611870266976; Thu, 28 Jan 2021 13:44:26 -0800 (PST) MIME-Version: 1.0 References: <20210126204125.313820-1-pasha.tatashin@soleen.com> <20210126204125.313820-2-pasha.tatashin@soleen.com> <87lfcczvab.fsf@x220.int.ebiederm.org> In-Reply-To: <87lfcczvab.fsf@x220.int.ebiederm.org> From: Pavel Tatashin Date: Thu, 28 Jan 2021 16:43:51 -0500 Message-ID: Subject: Re: [PATCH v2 1/1] kexec: dump kmessage before machine_kexec To: "Eric W. Biederman" Cc: James Morris , Sasha Levin , Tyler Hicks , Petr Mladek , Kees Cook , Anton Vorontsov , Colin Cross , Tony Luck , kexec mailing list , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2021 at 3:01 PM Eric W. Biederman wrote: > > Pavel Tatashin writes: > > > kmsg_dump(KMSG_DUMP_SHUTDOWN) is called before > > machine_restart(), machine_halt(), machine_power_off(), the only one that > > is missing is machine_kexec(). > > > > The dmesg output that it contains can be used to study the shutdown > > performance of both kernel and systemd during kexec reboot. > > > > Here is example of dmesg data collected after kexec: > > As long was we keep kmsg_dump out of the crash_kexec path where > it completely breaks kexec on panic this seems a reasonable thing to do. > On the ordinary kernel_kexec path everything is expected to be working. This is an ordinary kexec reboot path, not kdump. > > Is kmsg_dump expected to work after all of the device drivers > are shut down? Otherwise this placement of kmsg_dump is too late. Yes it is. It is called after device_shutdown(); in all other places. Thank you, Pasha