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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 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 82DFBC28CBC for ; Tue, 2 Mar 2021 16:30:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5998E64F25 for ; Tue, 2 Mar 2021 16:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1835093AbhCBQ3B (ORCPT ); Tue, 2 Mar 2021 11:29:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:42770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573056AbhCBOI5 (ORCPT ); Tue, 2 Mar 2021 09:08:57 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BACBB6186A; Tue, 2 Mar 2021 14:08:12 +0000 (UTC) Date: Tue, 2 Mar 2021 09:08:11 -0500 From: Steven Rostedt To: Geert Uytterhoeven Cc: Vlastimil Babka , Petr Mladek , Marco Elver , Timur Tabi , Sergey Senozhatsky , Andy Shevchenko , Matthew Wilcox , Andrew Morton , Linus Torvalds , roman.fietze@magna.com, Kees Cook , John Ogness , Akinobu Mita , Alexander Potapenko , Andrey Konovalov , Rasmus Villemoes , Pavel Machek , Tetsuo Handa , Linux Kernel Mailing List , Linux MM Subject: Re: [PATCH 3/3] [v4] lib/vsprintf: no_hash_pointers prints all addresses as unhashed Message-ID: <20210302090811.620ae7d0@gandalf.local.home> In-Reply-To: References: <20210214161348.369023-1-timur@kernel.org> <20210214161348.369023-4-timur@kernel.org> <8893ff08-1e50-316c-f632-cd37be1690d5@suse.cz> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Mar 2021 14:49:42 +0100 Geert Uytterhoeven wrote: > > So this is basically a kernel tinyfication issue, right? Is that still pursued > > today? Are there better config options suitable for this than CONFIG_DEBUG_KERNEL? > > As long as I hear about products running Linux on SoCs with 10 MiB of > SRAM, I think the answer is yes. > I'm not immediately aware of a better config option. There are no more > TINY options left, and EXPERT selects DEBUG_KERNEL. Since the trace_printk() uses the same type of notice, I wonder if we could make this into a helper function and just pass in the top part. + 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"); Only the above section is really unique. The rest can be a boiler plate. -- Steve + 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"); +