Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4623601yba; Wed, 10 Apr 2019 01:08:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3yf7msYXupdG8EIjdzLZRoaz2YK6XaU/LUKTgkXdHrYzMGhE5N0StTnHK8cnAR2VUfWxF X-Received: by 2002:a17:902:5a2:: with SMTP id f31mr40803001plf.119.1554883699261; Wed, 10 Apr 2019 01:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554883699; cv=none; d=google.com; s=arc-20160816; b=tWlaBLlKloeVkpcP8P4qGvWllPs3vKTPGd9geBmQDwcqHhJS/0PBjbf9tD7T7PGjNN HHKJkVzAtrEU9TQGvfxVXMdS7D2gi31/cE4gnrjKj1iAWCZRyW1BCm9XB3dpHqr4OvXo bAkba8/n5c31sIT5Gb5KVpDq+dqY4eAOgenL2DAjWb6Br9umyOSpSNExqfL4fmMLHx7M VwL/2yQ50Rjgqoj2q1NXIwrmUJAP/rHvzUiCFkpIbC1jdzVb/Oy+4GoJoPFQftND9rvt nsyJkx6o6wUERH95BJJ9qMci4lLEexUpF1i+/Ak+AVuhxCSRpblJ7P/HvOYKiNDSETJX T44Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XDDiJodBQ7IQjt9lN+ncErFAkRraFOjWdjnW5PiWknM=; b=LKJs6SHrl0ZHJWc4OTvvEucHkfleIiyAWHY8iWmUdd1bLc4QFPyIWlM51jb3X0uJsM vU3AOonLbaZdK97XRawFaTd+NUH6ZW6QNydNB90GpOMmIUYPmc0LeX1evAfpuizCgY64 xpvbXCryWAUIyurbkKN4pLztd4k181PS1RQOTXAajyHkWc8uO4m/JNVUMtqOJFqbFM5F xjtQ8R4/L+P9eS4Kr6jk8YWHwtm6pPNkGF9y4Sjf8lmzAZUrexuCNquj9HMmjcAS/nml E92RYlyOxPmR13ZjITUevDHtZRxH7eoRu4a/mW/L4aQhe5OmDDBT8vVx3/BhKC0WjSIS fSfw== 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 y2si30798835pgl.527.2019.04.10.01.08.03; Wed, 10 Apr 2019 01:08:19 -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 S1728558AbfDJIC0 (ORCPT + 99 others); Wed, 10 Apr 2019 04:02:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:48176 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726954AbfDJIC0 (ORCPT ); Wed, 10 Apr 2019 04:02:26 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DD311B0BD; Wed, 10 Apr 2019 08:02:24 +0000 (UTC) Date: Wed, 10 Apr 2019 10:02:24 +0200 From: Petr Mladek To: Sergey Senozhatsky Cc: Feng Tang , Andrew Morton , Steven Rostedt , linux-kernel@vger.kernel.org, Kees Cook , Borislav Petkov Subject: Re: [PATCH 2/2] panic: Enable to print out all printk msg in buffer Message-ID: <20190410080224.hmyzv2mqcjyceiw3@pathway.suse.cz> References: <1554115684-26846-1-git-send-email-feng.tang@intel.com> <1554115684-26846-2-git-send-email-feng.tang@intel.com> <20190409141430.w2fulp7jnnthojrc@pathway.suse.cz> <20190410015926.GC26212@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190410015926.GC26212@jagdpanzerIV> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2019-04-10 10:59:26, Sergey Senozhatsky wrote: > On (04/09/19 16:14), Petr Mladek wrote: > > We should: > > > > + Flush the latest messages before we replay the log. > > Do you mean the pending messages? When we replay the log we also should > print "header line" and panic-cpu backtrace. So we will print panic-cpu > oops twice console_flush_on_panic() is just the last resort. I believe that the panic header and backtrace reach the console even without it in most cases. Explicit flush before reply would just make it consistent. > // from panic-cpu flush_on_panic > [header] > backtrace > [end of header] > > // from console_replay > then all logbuf messages > and then the same header/backtrace one more time > > [header] > backtrace] > [end of backtrace] > > Is there any particular reason to flush pending messages before > we play the buffer? Replaying the logbuf can take some time, so > my guess would be that you want to print panic-cpu backtrace as > soon as possible. Is there something else? The panic() message is usually the most important one for debugging. I feel a bit uneasy that we would delay it until full replay that might get killed from several reasons: + external monitoring system would force reboot + user might realize, e.g. after 20 minutes, that the full log reply was probably not worth it. I understand that people enabling this option would most likely wait but still. I do not see it as a big deal to repeat the messages. Best Regards, Petr