From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41F01C2D0DB for ; Thu, 23 Jan 2020 19:49:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1263C21D7D for ; Thu, 23 Jan 2020 19:49:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Qcet6k8I"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="PkSLtKYt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1263C21D7D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:Subject:From:To:References: In-Reply-To:MIME-Version:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B6hiRoIOjIM+ja9u/7FIfrM/fRaiURYxMvqY0bjXhwc=; b=Qcet6k8IuGnDnw 2nv33/FXG9nGKYZQIRZjs4G5CzFsDcIxqfJk8FuOrX5QcJxa+VZ8M0SmIxU9EJI7n32nY2bnuQBjy zEkOK7lNBjiLevf5q5tXuaPX8/uv7cdeTLDVFUn1mjuUzSe/Fr1HNLI/vIW1W4EGfmurszAUdRgJ1 1oaEnrdnmSgLDA6nNsdDOQ242caZ3nwAPuFAlePiVA5A7iAiVuuKAX04X25fbcG7dtG5y4CYl3DIN q+cXJKEK/Jc0+bbXBCVf1TwhRPbVpZvcIg0estmKqXah/VET7s4aMil0ffwpOi9i5TUDDiaaTvsxo jLURndca1b0aCR1qgiqw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iuiUH-0000Wd-7q; Thu, 23 Jan 2020 19:49:57 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iuiUE-0000W1-Ns for linux-arm-kernel@lists.infradead.org; Thu, 23 Jan 2020 19:49:56 +0000 Received: by mail-pg1-x543.google.com with SMTP id b9so1878763pgk.12 for ; Thu, 23 Jan 2020 11:49:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=message-id:mime-version:content-transfer-encoding:in-reply-to :references:to:cc:from:subject:user-agent:date; bh=AsiBDxfR3YiAUP6+urybhWiy8mHMpvOtUZtlAgoqD+g=; b=PkSLtKYtYi1OcAK+7nw7vWeNOsVnqbyq+qI+VdhZDT2KFdzpC+bHz8WiajuMhK++nz Ne4HKz7CL/6hY12kMMKuYVLgTLGYXi95QSDNG8LX662hiyD70AgACtRdmMyb8KhIm8UR VUEH28tRg96g6WLiM4Q22CqJXuRA4WX19k1Fk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version :content-transfer-encoding:in-reply-to:references:to:cc:from:subject :user-agent:date; bh=AsiBDxfR3YiAUP6+urybhWiy8mHMpvOtUZtlAgoqD+g=; b=JZLeQF0itrzvS0JQ/oA/UzLLxcxUbyVsfmT+S6XHmaXuxCa2alD+wX9WflGEJ2V2Zu raQsH9MnVEz6/js9GKtOjf5jmqoJJXud6tEDLkm5sCwL6XdFgKD9ev6so2Y+X3JinA6b cfLHmP5HXBq4eh6jG83npLpU2GtPtoPJG5g2i6vymOneU8kX8pqWt8I6O/C1RssC5t4n GFOODgJkhelinwwWZQ5e0IdKLcbwBmsLrpwAkonNM1bdHpW1JoKuMvv4w6kfNJ2SFRDk 40VIkwfzp5EmFgEGJG4Bm8ANK4mZOFE7+IH9ovGCuNlCl4Kdapb8vjLXchoUixcszKEO HxQg== X-Gm-Message-State: APjAAAXtp5vrzJgR9blsySrvEJxZOUqJhnH7zE0+CIwUdtV9tPvyLFcc kOiOF46R8dVBjVAox/9/Pm8r6A== X-Google-Smtp-Source: APXvYqwVEQXX+m3S5BGhf04yLN3caID/CuWtHA4zxtFC4LRWdaqmOtdLcHFyM8Ypv9iy28HI/QH1FA== X-Received: by 2002:aa7:9556:: with SMTP id w22mr6978147pfq.198.1579808992570; Thu, 23 Jan 2020 11:49:52 -0800 (PST) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id e18sm3856195pjt.21.2020.01.23.11.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2020 11:49:51 -0800 (PST) Message-ID: <5e29f8df.1c69fb81.fc97b.8df8@mx.google.com> MIME-Version: 1.0 In-Reply-To: <20200123160031.9853-1-saiprakash.ranjan@codeaurora.org> References: <20200123160031.9853-1-saiprakash.ranjan@codeaurora.org> To: Anton Vorontsov , Colin Cross , Joel Fernandes , Kees Cook , Sai Prakash Ranjan , Tony Luck From: Stephen Boyd Subject: Re: [PATCH] pstore: Fix printing of duplicate boot messages to console User-Agent: alot/0.8.1 Date: Thu, 23 Jan 2020 11:49:50 -0800 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200123_114954_802020_3106778D X-CRM114-Status: GOOD ( 12.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sai Prakash Ranjan , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson , Matthias Kaehlcke , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Sai Prakash Ranjan (2020-01-23 08:00:31) > Since commit f92b070f2dc8 ("printk: Do not miss new messages > when replaying the log"), CON_PRINTBUFFER flag causes the > duplicate boot messages to be printed on the console when > PSTORE_CONSOLE and earlycon (boot console) is enabled. > Pstore console registers to boot console when earlycon is > enabled during pstore_register_console as a part of ramoops > initialization in postcore_initcall and the printk core > checks for CON_PRINTBUFFER flag and replays the log buffer > to registered console (in this case pstore console which > just registered to boot console) causing duplicate messages > to be printed. Remove the CON_PRINTBUFFER flag from pstore > console since pstore is not concerned with the printing of > buffer to console but with writing of the buffer to the > backend. > > Console log with earlycon and pstore console enabled: > > [ 0.008342] Console: colour dummy device 80x25 > [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x51df805e] > ... > [ 1.244049] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. > [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x51df805e] > > Fixes: f92b070f2dc8 ("printk: Do not miss new messages when replaying the log") > Reported-by: Douglas Anderson > Signed-off-by: Sai Prakash Ranjan > --- While I like the idea, it seems that this breaks console-ramoops by removing all the text that is printed in the kernel log before this console is registered. I reboot and see that /sys/fs/pstore/console-ramoops-1 starts like this now: localhost ~ # cat /sys/fs/pstore/console-ramoops-0 [ 0.943472] printk: console [pstore-1] enabled Maybe this console can be "special" and not require anything to be printed out to visible consoles but still get the entire log contents? Or we should just not worry about it. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel