From patchwork Tue Mar 16 23:33:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 1454350 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: 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=ZBpkHA3y; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=qBoEY0L4; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F0V4G6gdmz9sWT for ; Wed, 17 Mar 2021 10:34:22 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4F0V4G5V1fz3bmm for ; Wed, 17 Mar 2021 10:34:22 +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=ZBpkHA3y; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=qBoEY0L4; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org 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=ZBpkHA3y; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=qBoEY0L4; 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 4F0V3M4gSvz30Bw for ; Wed, 17 Mar 2021 10:33:35 +1100 (AEDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1615937607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=F3yikjHBX3sE+vqVOAg0c4FbXVC7h/jsk7NB+UTl4pY=; b=ZBpkHA3yMsvjOMDQlQDKG/f2JwzyuZ+1kB+44ZuV4SbBS3JtyxSQaVXoT2trt3YilG9rDs L6h8pSjhEe1rzGdGxiJmp3/4WU53keFtoCa68VJYNVnPIbT3x5cOUKKdCN951p9YrzIwJI rbN+scLS88zfxi97ZeQK664T7hhUXrVKfCCKA0sSpKL6al6e2jW7ewe1ZH7680qsr05ZJA U9NI/Wei9c18v8sEnTDwNKjUZEzd7oZ+1SICWdHGblcKh7IYZqqswcrWNoF2iWzul6IM0+ 2IRQcdXQfgCkqVvLW+4eE/Eu/Eu9QYGmhuIrgWek4uzb63fMPAU5VKCBqXLdtw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1615937607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=F3yikjHBX3sE+vqVOAg0c4FbXVC7h/jsk7NB+UTl4pY=; b=qBoEY0L4Ynny3Z3D6ukRFXsT63ZYZeUutsYPyIJtoUFiA0tC+gFvfCvGeVj8Lgk1jz+F4a 9SujFVU6K+engkBQ== To: Petr Mladek Subject: [PATCH next v1 0/3] printk: remove safe buffers Date: Wed, 17 Mar 2021 00:33:23 +0100 Message-Id: <20210316233326.10778-1-john.ogness@linutronix.de> MIME-Version: 1.0 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: Sergey Senozhatsky , Peter Zijlstra , Paul Mackerras , Tiezhu Yang , Rafael Aquini , Alexey Kardashevskiy , Yue Hu , Jordan Niethe , 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, Sergey Senozhatsky , Eric Biederman , Andrew Morton , linuxppc-dev@lists.ozlabs.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hello, Here is v1 of a series to remove the safe buffers. They are no longer needed because messages can be stored directly into the log buffer from any context. However, the safe buffers also provided a form of recursion protection. For that reason, explicit recursion protection is also implemented for this series. This series falls in line with the printk-rework plan as presented [0] at Linux Plumbers in Lisbon 2019. This series is based on next-20210316. John Ogness [0] https://linuxplumbersconf.org/event/4/contributions/290/attachments/276/463/lpc2019_jogness_printk.pdf (slide 23) John Ogness (3): printk: track/limit recursion printk: remove safe buffers printk: convert @syslog_lock to spin_lock arch/powerpc/kernel/traps.c | 1 - arch/powerpc/kernel/watchdog.c | 5 - include/linux/printk.h | 10 - kernel/kexec_core.c | 1 - kernel/panic.c | 3 - kernel/printk/internal.h | 2 - kernel/printk/printk.c | 171 +++++++++-------- kernel/printk/printk_safe.c | 332 +-------------------------------- lib/nmi_backtrace.c | 6 - 9 files changed, 100 insertions(+), 431 deletions(-)