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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 A58E6C433C1 for ; Mon, 22 Mar 2021 11:16:51 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 0524B60C3D for ; Mon, 22 Mar 2021 11:16:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0524B60C3D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4F3sQT04P4z2ysp for ; Mon, 22 Mar 2021 22:16:49 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=HGQ4Dq/Q; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=GVJkDM5N; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linutronix.de (client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; envelope-from=john.ogness@linutronix.de; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=HGQ4Dq/Q; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=GVJkDM5N; dkim-atps=neutral Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4F3sPy3hlmz2y0D for ; Mon, 22 Mar 2021 22:16:22 +1100 (AEDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1616411776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d6MCD7pdLm1m9o0nSZfcGVynnHaaFFKisNBi8FUOUDI=; b=HGQ4Dq/QId1GFRVx1HMe3bnD4P4EIomI4JZ4cANiCSDYQJY6xdBYfGImEqIIUdflHSb2eG AG5nGJdk4lX5XVjaaiqS//GrJsVJP9Ijq8bdaIbrE7SKJoEIGdLpM/EDcpQBAB2lQgk6MU X8oZeFM6ONCXtShUT3/k50CnKRxnUQZBn4N/a/5fbdnrL+44mEG7qAdlWW2Tg8FmxwI7Oq VShNPK4jV2pQROn0KgdIlW5lbfX0nvRrf220GY7eMXUDCtKPCuFUg0M0FJO/mwUwNdxzQ1 QbMS2AQMn4FOISkPvPjbMNIlD+XNpFoBkR2xwJ+6iO0Nm/Vq0xMd3c4LvxLrUg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1616411776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d6MCD7pdLm1m9o0nSZfcGVynnHaaFFKisNBi8FUOUDI=; b=GVJkDM5NKKZT5EVSKd6owK/h9IbxTC3ADU1q8YrkwIBQ319MtYvZb+Ca0JzfmiT2F1P3nA kRaLvwiQ6+lXkyDA== To: Sergey Senozhatsky Subject: Re: [PATCH next v1 2/3] printk: remove safe buffers In-Reply-To: References: <20210316233326.10778-1-john.ogness@linutronix.de> <20210316233326.10778-3-john.ogness@linutronix.de> Date: Mon, 22 Mar 2021 12:16:15 +0100 Message-ID: <87k0pzmoao.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rafael Aquini , Peter Zijlstra , Paul Mackerras , Tiezhu Yang , Alexey Kardashevskiy , Yue Hu , Jordan Niethe , Petr Mladek , Kees Cook , "Paul E. McKenney" , Alistair Popple , "Guilherme G. Piccoli" , Nicholas Piggin , Steven Rostedt , Thomas Gleixner , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Eric Biederman , Andrew Morton , linuxppc-dev@lists.ozlabs.org, =?utf-8?Q?C=C3=A9dric?= Le Goater Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 2021-03-21, Sergey Senozhatsky wrote: >> @@ -369,7 +70,10 @@ __printf(1, 0) int vprintk_func(const char *fmt, va_list args) >> * Use the main logbuf even in NMI. But avoid calling console >> * drivers that might have their own locks. >> */ >> - if ((this_cpu_read(printk_context) & PRINTK_NMI_DIRECT_CONTEXT_MASK)) { >> + if (this_cpu_read(printk_context) & >> + (PRINTK_NMI_DIRECT_CONTEXT_MASK | >> + PRINTK_NMI_CONTEXT_MASK | >> + PRINTK_SAFE_CONTEXT_MASK)) { > > Do we need printk_nmi_direct_enter/exit() and > PRINTK_NMI_DIRECT_CONTEXT_MASK? Seems like all printk_safe() paths > are now DIRECT - we store messages to the prb, but don't call console > drivers. I was planning on waiting until the kthreads are introduced, in which case printk_safe.c is completely removed. But I suppose I could switch the 1 printk_nmi_direct_enter() user to printk_nmi_enter() so that PRINTK_NMI_DIRECT_CONTEXT_MASK can be removed now. I would do this in a 4th patch of the series. John Ogness