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=1.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_DBL_ABUSE_MALW 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 A94BFC33C9E for ; Thu, 30 Jan 2020 06:31:13 +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 7B9EE2063A for ; Thu, 30 Jan 2020 06:31:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rGBe97gW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="KbnW8hcV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B9EE2063A 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:From:To:Subject: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=6G5u6BeCQE4iAbQOi/yIGGFobLid4RV4SSuUV/4L+VE=; b=rGBe97gWVD537d JOHxe7LGMXv9LOeXE6nu5mG+k+hg1CaLDLZ5bSQF2PW7Rkmymj2jpZM5WQRdN4VuRrnmLu1u9c2WS +6z375mBKBhK+tpnOT4ep3UsYCq5VaQyXUUi5dvzCKEB8Owkt/ZV6DosJ2DuPRQlIKk78vmSVI6Tr wN9+qXu6e9UNeJyY8gzLa9Vc6bld9Fyfu9czvHe/wRw9W40JgSw+DN47FycXmYoy4K/JsRL2hq6sO 8NZPUNdR19DVbOWXsNABFORtLRaZzKT6g+uERrf9+AMHl+DJVY7+ec9aYT9SV5QrfsorCXv/ZJxfX y3WVqqM8vkfI4O9Uj/HQ==; 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 1ix3M0-0006at-9q; Thu, 30 Jan 2020 06:31:04 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ix3Lw-0006aH-Qx for linux-arm-kernel@lists.infradead.org; Thu, 30 Jan 2020 06:31:02 +0000 Received: by mail-pf1-x442.google.com with SMTP id 4so952859pfz.9 for ; Wed, 29 Jan 2020 22:30:59 -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:subject:to:from:cc:user-agent:date; bh=0tFsYcjfOOa4j0wNofi5s1JbHK10UxRY/7iGvUSf+kk=; b=KbnW8hcVBL+cjoPJI4C8c4WYYBRdr3lVrJlK+VN35PtAz96+RJuL/ELLxdLSp0mLQr U9iIpV6CcuvgD2XX6SiYM16zJwlenQUU/44+VCqojADOc8i5f1SrK9zHJA1yIoDzcTsb JyPMx/3lnzwjm2LBn+HJSPUK6x2NxxcpNjT24= 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:subject:to:from:cc :user-agent:date; bh=0tFsYcjfOOa4j0wNofi5s1JbHK10UxRY/7iGvUSf+kk=; b=j5s48l0ZYHwsoXE5VEtv/Qry6laFRSYPREyxEJ/AEhm6crxv2aYV3rhvoSoetZN4NN +OGK8sf2yCYUEIeixsmGSO5ad3eF80I57yY/cdflGWZEd44QyQWWOxpkbg0fW6q3Cxkz UmeGtVD/39R8xzr4e6EQexpe+l0VT+UrN89FOMqvCoeL0o0othHAYBvcrZJGnzCmHCGP j0DtTdU5qjZAWbOFkXDSkpLpLhbUsW2LMcUUMebYASL0Vqg3qdYa0qt6Slsmjyqpmty5 sDWQyj0cmjFs3brcuq9vUl9V3yXvfkTIkU1ALFaAh8wIU+mMh7E10AZpj3Ux3JenR92t KsHw== X-Gm-Message-State: APjAAAXqWJuHO3fy53Gz3vWYhl0pSDAIaPHgKOy2vYH6ZDDY4LRaoY0v JViTmhfd/8iZIZETDMWaOd0D1A== X-Google-Smtp-Source: APXvYqxkoOSz3EElUiJyrS7XLxT4E2RrTKPRQZsLo3gTD8kEkuzwObe1rg6ylHw8yiou5ZegP9TqoA== X-Received: by 2002:a63:e911:: with SMTP id i17mr3199910pgh.42.1580365859422; Wed, 29 Jan 2020 22:30:59 -0800 (PST) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id q12sm4862272pfh.158.2020.01.29.22.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jan 2020 22:30:58 -0800 (PST) Message-ID: <5e327822.1c69fb81.80136.dfc1@mx.google.com> MIME-Version: 1.0 In-Reply-To: <202001271525.E6EB4FDD6@keescook> References: <20200123160031.9853-1-saiprakash.ranjan@codeaurora.org> <202001271525.E6EB4FDD6@keescook> Subject: Re: [PATCH] pstore: Fix printing of duplicate boot messages to console To: Kees Cook , Sai Prakash Ranjan From: Stephen Boyd User-Agent: alot/0.8.1 Date: Wed, 29 Jan 2020 22:30:57 -0800 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200129_223100_899033_256B8C33 X-CRM114-Status: GOOD ( 13.79 ) 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: Tony Luck , linux-arm-msm@vger.kernel.org, Anton Vorontsov , linux-kernel@vger.kernel.org, Douglas Anderson , Matthias Kaehlcke , Colin Cross , Joel Fernandes , 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 Kees Cook (2020-01-27 15:27:33) > On Thu, Jan 23, 2020 at 09:30:31PM +0530, Sai Prakash Ranjan wrote: > > 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. > > I agree this patch isn't the solution, but I'm trying to understand > where better logic could be added. Is the issue that printk sees both > earlycon and CON_PRINTBUFFER active? Can we add a new CON_* flag that > means "not actually printing anything"? (Or maybe a new flag for > non-printing to replace CON_PRINTBUFFER that lets pstore still work?) > This seems to be fixed by commit def97da13651 ("printk: fix exclusive_console replaying"). I think there's nothing to do. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel