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=-9.5 required=3.0 tests=BAYES_00, BUG6152_INVALID_DATE_TZ_ABSURD,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,INVALID_DATE_TZ_ABSURD, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 8BBBBC4727F for ; Wed, 30 Sep 2020 09:01:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BBDB20738 for ; Wed, 30 Sep 2020 09:01:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3+lnF0Ol"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bhYdahac" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728914AbgI3JBn (ORCPT ); Wed, 30 Sep 2020 05:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728744AbgI3JBi (ORCPT ); Wed, 30 Sep 2020 05:01:38 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F252C061755 for ; Wed, 30 Sep 2020 02:01:38 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601456496; 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: in-reply-to:in-reply-to:references:references; bh=6zpbAvUUgnuvXKvoTYxRiQVaXCaSNCsfpTcAwmFEpX8=; b=3+lnF0Olk77NtBQQXyGcMEWPYz4QkvaqtpzP5d3wwyMZPpfQGdXgn84zCSHeRyLigkgnYZ Vf0Kc2zn2vmcarnJFPawhcau5W8LsFZ2b1c4zCOe7JkMqfgTJZqX9A2SbuGeBceybm7hVX bDmnHR0B7g2VBTcyTI0K9xUlWAYF9aiOqxT3XHQsRA5RSrLryj+GaOw9EZrfRKLeKFOh4z U34bhrLI33q5V+wc0JEJPa9pMBG1EglrhW/Z4T9i9nPctXj6car7nBb0xvSaIjVEsi26Yd kKNjyQBpC/16BjhsltxdPBPJPZAuEvTdEJVn4dspe+ZLWH2skmyuwva5JMAzpg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601456496; 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: in-reply-to:in-reply-to:references:references; bh=6zpbAvUUgnuvXKvoTYxRiQVaXCaSNCsfpTcAwmFEpX8=; b=bhYdahacC9wzm16RzntbwPSO2HlRQbd1dWCdDz5wug21KgDopx6T5glMMYcVYCSObgWEfP wITTlMaFj+4iTKAw== To: Petr Mladek Cc: Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Thomas Gleixner , Marek Szyprowski , linux-kernel@vger.kernel.org Subject: [PATCH next v2 2/2] printk: reduce setup_text_buf size to LOG_LINE_MAX Date: Wed, 30 Sep 2020 11:07:34 +0206 Message-Id: <20200930090134.8723-3-john.ogness@linutronix.de> In-Reply-To: <20200930090134.8723-1-john.ogness@linutronix.de> References: <20200930090134.8723-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org @setup_text_buf only copies the original text messages (without any prefix or extended text). It only needs to be LOG_LINE_MAX in size. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 04cf1e00478f..1538df175aae 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1103,7 +1103,7 @@ static unsigned int __init add_to_rb(struct printk_ringbuffer *rb, return prb_record_text_space(&e); } -static char setup_text_buf[CONSOLE_EXT_LOG_MAX] __initdata; +static char setup_text_buf[LOG_LINE_MAX] __initdata; void __init setup_log_buf(int early) { -- 2.20.1