Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2375184pxj; Sun, 16 May 2021 23:41:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ9xENIPjXEYtXofo2GwfqQ+s0xWO5bDb/itJkNSYEIOd8EFKwDl2wvJ7tzMlQgLctFlmH X-Received: by 2002:a02:cb04:: with SMTP id j4mr12919571jap.45.1621233671368; Sun, 16 May 2021 23:41:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621233671; cv=none; d=google.com; s=arc-20160816; b=WuVqZPfCANYu5whvvB0EboE7oaKRjhXnScBqr+1yXvfIFfxkJAWTNKwCwSr34m1fnV J6QTTebuKnHcuPNGNTRof1XSkBHs7q5UST/Q1kq4MwLYO8gsM7Qf4w8EULJzFod7h37u kUTkQ5QgLBvge2ejDQAPw9L/JzTN+rdQ+v5LUdewhnn9AO4B45RE2jDw5BdqKZlAr28B d2fxCawphbBdvIrjFfQiEAKOP9hb13GE/MB8QqQHaVU0GMnuPPV3iLM5RC0iUdEkZKU0 mUbIZB8e3V6CTtLqfFwY9JpZbyX/O5HmDk8t+AZUMFJJYC8JeZlnuQBZfXp3OziXw8pa mATw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=+soxiwcsp656/78/AvClx6ZPB3VDNbEc7o/vVgGMog4=; b=RX+Cv1nu/ehgGIpPU5Zn5Cx0YvmJbAwb8GremeFGip+BlzGmzcomrMnI7Sei2ap4K/ PWRizsBzVbU+dF/phSWK5GRx0MPzfnSAuoH4oR1sRKDEaDVwACFuxO6tp/WF5n9/5U+j m0+I4F5lL8dsnAphrpmF0wDUKF6dSSQxePsrPwfRMpjXBx/EEqbi06ORHQrkTTjEZcO0 ylVXFbxMHNQGoUGJXFFKw1ykVmbnOxo/3RWbO4niSBdywTrm8/mG0uATMmPH+PE178zn Wj+ktfESS7kE20nEq5tCaw7QmSMnKJd8cqNF10R9ev4Smj2ephHv1uA4+cdtz/l4Dgrr IWCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-embedded-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s19si16233079iow.52.2021.05.16.23.40.57; Sun, 16 May 2021 23:41:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-embedded-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235011AbhEQGWl (ORCPT + 86 others); Mon, 17 May 2021 02:22:41 -0400 Received: from mail-vk1-f174.google.com ([209.85.221.174]:42760 "EHLO mail-vk1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231238AbhEQGWl (ORCPT ); Mon, 17 May 2021 02:22:41 -0400 Received: by mail-vk1-f174.google.com with SMTP id m129so1126168vkh.9; Sun, 16 May 2021 23:21:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+soxiwcsp656/78/AvClx6ZPB3VDNbEc7o/vVgGMog4=; b=V36x0EG/9K79KlcUOvZSWqcQaXL/56M80rsEWlLHqJ39f5aIErDQAogW7ouxtpgDXO GBIy4YIYGQiE8lyKdYJLhcjXJixJahNR8jnP2ssORM4rrDAR11uQJJh5mnYBZfZLaGAq ISGn6a20+vd2CLa1WKIjYs9jYZ3fWX2M/OJwdZZPz+wDUJx5Mc9tSZcBhimQRycVz0E4 f7JIm6O2dyziHQLI5sW4g2oN1yuglkBIbvvOZj7Do7MIja5rcR07UnIb6QsaRWmhex68 XwN7bCtfH1mrOk5cJrnpc9TXy2EWIHWg9sAyP64iy7AWhyfcM3NI/VmZ+5hI1SjXwgJ7 Uo7w== X-Gm-Message-State: AOAM530rTagX5Zxye/HVaM2/3oAbYqKXpNRxZtoZACAyhsdiM7N5d/8O 1IZbxMWjFpUQZ15cn7TqFqmEtA3hg7l5B1t0vmg= X-Received: by 2002:a1f:a388:: with SMTP id m130mr44908380vke.1.1621232484718; Sun, 16 May 2021 23:21:24 -0700 (PDT) MIME-Version: 1.0 References: <20210331093104.383705-1-geert+renesas@glider.be> <20210331093104.383705-4-geert+renesas@glider.be> In-Reply-To: <20210331093104.383705-4-geert+renesas@glider.be> From: Geert Uytterhoeven Date: Mon, 17 May 2021 08:21:12 +0200 Message-ID: Subject: Re: [PATCH 3/3] lib/vsprintf: Use pr_crit() instead of long fancy messages To: Joerg Roedel , Will Deacon , Steven Rostedt , Ingo Molnar , Petr Mladek , Sergey Senozhatsky Cc: Linus Torvalds , Andrew Morton , Andy Shevchenko , Rasmus Villemoes , John Ogness , Marco Elver , Randy Dunlap , Vlastimil Babka , Linux IOMMU , Linux Kernel Mailing List , Linux Embedded , Geert Uytterhoeven Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-embedded@vger.kernel.org On Wed, Mar 31, 2021 at 11:59 AM Geert Uytterhoeven wrote: > While long fancy messages have a higher probability of being seen than > small messages, they may scroll of the screen fast, if visible at all, > and may still be missed. In addition, they increase boot time and > kernel size. > > The correct mechanism to increase importance of a kernel message is not > to draw fancy boxes with more text, but to shout louder, i.e. increase > the message's reporting level. Making sure the administrator of the > system is aware of such a message is a system policy, and is the > responsability of a user-space log daemon. > > Fix this by increasing the reporting level from KERN_WARNING to > KERN_CRIT, and removing irrelevant text and graphics. > > This reduces kernel size by ca. 0.5 KiB. > > Fixes: 5ead723a20e0447b ("lib/vsprintf: no_hash_pointers prints all addresses as unhashed") > Signed-off-by: Geert Uytterhoeven No comments? Unlike the cases handled by the other two patches in this series, this one cannot be configured out. Thanks! > --- a/lib/vsprintf.c > +++ b/lib/vsprintf.c > @@ -2193,20 +2193,9 @@ static int __init no_hash_pointers_enable(char *str) > > no_hash_pointers = true; > > - pr_warn("**********************************************************\n"); > - pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); > - pr_warn("** **\n"); > - pr_warn("** This system shows unhashed kernel memory addresses **\n"); > - pr_warn("** via the console, logs, and other interfaces. This **\n"); > - pr_warn("** might reduce the security of your system. **\n"); > - pr_warn("** **\n"); > - pr_warn("** If you see this message and you are not debugging **\n"); > - pr_warn("** the kernel, report this immediately to your system **\n"); > - pr_warn("** administrator! **\n"); > - pr_warn("** **\n"); > - pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); > - pr_warn("**********************************************************\n"); > - > + pr_crit("This system shows unhashed kernel memory addresses\n"); > + pr_crit("via the console, logs, and other interfaces. This\n"); > + pr_crit("might reduce the security of your system.\n"); > return 0; > } > early_param("no_hash_pointers", no_hash_pointers_enable); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds